Remove execute permission.
[pspp] / ChangeLog
1 2007-09-29  Bruno Haible  <bruno@clisp.org>
2
3         * README: Add CVS checkout update instructions.
4         Info from Bob Proulx <bob@proulx.com>.
5
6 2007-09-28  Eric Blake  <ebb9@byu.net>
7
8         Provide move-if-change.
9         * build-aux/move-if-change: New file, based on best practice
10         rather than any canonical upstream location.
11
12 2007-09-28  Jim Meyering  <jim@meyering.net>
13
14         Fix canonicalize loop-detection corner case.
15         Do not attempt to stat the symlink values stored via seen_triple.
16         Without this, coreutils' tests/misc/readlink-fp-loop test would fail
17         on linux-2.6.18, (but not 2.6.22).
18         * lib/canonicalize.c (seen_triple): Use triple_compare_ino_str, not
19         triple_compare.  The former compares dev,ino,filename, while the latter
20         would actually stat dirname(filename) when dev and ino were equal.
21         * lib/hash-triple.c: Install <string.h>.
22         (STREQ): Define.
23         (triple_compare_ino_str): New function.
24         * lib/hash-triple.h (triple_compare_ino_str): Declare it.
25
26 2007-09-28  Eric Blake  <ebb9@byu.net>
27
28         Enforce that AC_REPLACE_FUNCS files exist.
29         * gnulib-tool (func_emit_initmacro_done): Make AC_LIBSOURCES
30         override check for typos.
31
32         Fix test-closein on Solaris 10.
33         * tests/test-closein.c (main): Don't assume stdin can be inherited
34         closed on all systems.
35         * tests/test-closein.sh: Likewise.
36         Reported by Piotr Tarnowski.
37
38 2007-09-28  Jim Meyering  <jim@meyering.net>
39
40         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Fix typo in comment.
41
42 2007-09-27  Jim Meyering  <jim@meyering.net>
43
44         canonicalize: Avoid a false-positive cycle failure.
45         * modules/canonicalize (Depends-on): Add file-set and hash-triple.
46         Sort.  Remove cycle-check.
47         * lib/canonicalize.c: Include file-set.h and hash-triple.h,
48         not cycle-check.h.
49         (seen_triple): New function.
50         (canonicalize_filename_mode): Use it instead of cycle-check.
51         * tests/test-canonicalize.c: Add a test for this bug.
52         * tests/test-canonicalize.sh: Set up and run the test.
53
54         New module, file-set, from coreutils.
55         * modules/file-set: Define it.
56         * lib/file-set.c, lib/file-set.h: Implement.
57
58         New module, hash-triple, from coreutils.
59         * modules/hash-triple: Define it.
60         * lib/hash-triple.c, lib/hash-triple.h: Implement.
61
62 2007-09-25  Eric Blake  <ebb9@byu.net>
63
64         Fix strerror on Interix.
65         * lib/string_.h (strerror): Declare replacement.
66         * doc/functions/strerror.texi (strerror): Document the Interix
67         shortcoming.
68         * modules/string (Makefile.am): Support new hooks.
69         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Add new hooks.
70         * m4/strerror.m4 (gl_FUNC_STRERROR): Defer to
71         gl_FUNC_STRERROR_SEPARATE.
72         (gl_FUNC_STRERROR_SEPARATE): Check for Interix bug.
73         * lib/strerror.c (rpl_strerror): Provide replacement.
74         * modules/strerror (Depends-on): Add string.
75         (configure.ac): Detect use of module.
76         * tests/test-strerror.c: New file.
77         * modules/strerror-tests: New test module.
78         * modules/argp (Depends-on): Add strerror.
79         * modules/error (Depends-on): Likewise.
80         Reported by Martin Koeppe.
81
82 2007-09-24  Bruno Haible  <bruno@clisp.org>
83
84         * README: Update git instructions.
85
86 2007-09-24  Eric Blake  <ebb9@byu.net>
87
88         Revert fpending breakage from 2007-09-08.
89         * m4/fpending.m4 (gl_FUNC_FPENDING): Don't require existence of
90         __fpending.c.
91
92 2007-09-24  Jim Meyering  <jim@meyering.net>
93
94         filenamecat.c: Add a test.
95         * lib/filenamecat.c (main) [TEST_FILE_NAME_CONCAT]: Add a test
96         showing how the function works when DIR is the empty string.
97
98 2007-09-21  Simon Josefsson  <simon@josefsson.org>
99
100         * tests/test-canonicalize.sh: Turn on executable bit.
101
102 2007-09-19  Eric Blake  <ebb9@byu.net>
103
104         * README: Update CVS instructions.
105
106 2007-09-18  Bruno Haible  <bruno@clisp.org>
107
108         * modules/areadlink: New file.
109         * lib/areadlink.h (areadlink): New declaration.
110         * lib/areadlink.c: New file, based on lib/xreadlink.c.
111
112 2007-09-17  Jim Meyering  <jim@meyering.net>
113
114         * lib/savewd.c (ESTALE) [!defined]: Define.
115         Reported to be required on Interix by Martin Koeppe.
116
117 2007-09-17  Bruno Haible  <bruno@clisp.org>
118
119         * gnulib-tool (func_version): Use $version.
120
121 2007-09-16  Bruno Haible  <bruno@clisp.org>
122
123         * m4/printf.m4 (gl_PRINTF_LONG_DOUBLE, gl_PRINTF_INFINITE,
124         gl_PRINTF_INFINITE_LONG_DOUBLE): Increase buf's size from 100 to 10000.
125         Needed on glibc-2.6.1 with -fstack-protector -D_FORTIFY_SOURCE=2.
126         Reported by Greg Schafer <gschafer@zip.com.au>.
127
128 2007-09-15  Bruno Haible  <bruno@clisp.org>
129
130         * gnulib-tool (sed): Try a little harder to make bash understand the
131         alias.
132         Reported by Bruce Korb <bruce.korb@gmail.com>.
133
134 2007-09-13  Eric Blake  <ebb9@byu.net>
135
136         * ChangeLog: Remove conflict markers.
137
138 2007-09-13  Simon Josefsson  <simon@josefsson.org>
139
140         * lib/gc-gnulib.c (gc_hash_open): Catch NULL calloc return value.
141         Reported by Bruno Haible <bruno@clisp.org>.
142
143 2007-09-12  Bruno Haible  <bruno@clisp.org>
144
145         * m4/lock.m4: Don't provide an AC_USE_SYSTEM_EXTENSIONS definition.
146         (gl_LOCK_EARLY_BODY): Use AC_GNU_SOURCE when AC_USE_SYSTEM_EXTENSIONS
147         is not defined.
148
149 2007-09-12  Eric Blake  <ebb9@byu.net>
150
151         Track CVS Autoconf on AC_USE_SYSTEM_EXTENSIONS.
152         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Update to CVS
153         Autoconf definition.
154         * modules/euidaccess (Depends-on): Add extensions, for
155         AC_USE_SYSTEM_EXTENSIONS with autoconf <= 2.59.
156         * modules/fnmatch (Depends-on): Likewise.
157         * modules/getaddrinfo (Depends-on): Likewise.
158         * modules/getdelim (Depends-on): Likewise.
159         * modules/getline (Depends-on): Likewise.
160         * modules/getsubopt (Depends-on): Likewise.
161         * modules/gettext (Depends-on): Likewise.
162         * modules/group-member (Depends-on): Likewise.
163         * modules/mbchar (Depends-on): Likewise.
164         * modules/memmem (Depends-on): Likewise.
165         * modules/mempcpy (Depends-on): Likewise.
166         * modules/memrchr (Depends-on): Likewise.
167         * modules/pagealign_alloc (Depends-on): Likewise.
168         * modules/readutmp (Depends-on): Likewise.
169         * modules/stpcpy (Depends-on): Likewise.
170         * modules/stpncpy (Depends-on): Likewise.
171         * modules/strchrnul (Depends-on): Likewise.
172         * modules/strndup (Depends-on): Likewise.
173         * modules/strsep (Depends-on): Likewise.
174         * modules/strverscmp (Depends-on): Likewise.
175         * modules/vasprintf (Depends-on): Likewise.
176         * modules/wcwidth (Depends-on): Likewise.
177         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): AC_GNU_SOURCE will be
178         obsolete in Autoconf 2.62; use AC_USE_SYSTEM_EXTENSIONS instead.
179         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_GNU): Likewise.
180         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDR_INFO): Likewise.
181         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Likewise.
182         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise.
183         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Likewise.
184         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
185         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER): Likewise.
186         * m4/mbchar.m4 (gl_MBCHAR): Likewise.
187         * m4/memmem.m4 (gl_FUNC_MEMMEM): Likewise.
188         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
189         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
190         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Likewise.
191         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC): Likewise.
192         * m4/readutmp.m4 (gl_READUTMP): Likewise.
193         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
194         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
195         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
196         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
197         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
198         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
199         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
200         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP): Likewise.
201         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): Likewise.
202         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
203         * m4/lock.m4 (gl_LOCK_EARLY_BODY): Likewise, but provide fallback,
204         so that lock.m4 can be used in gettext without extensions module.
205
206 2007-09-11  Bruno Haible  <bruno@clisp.org>
207
208         * m4/isc-posix.m4: Remove file.
209         Suggested by Eric Blake.
210
211 2007-09-11  Eric Blake  <ebb9@byu.net>
212
213         * ChangeLog: Restore lines accidentally truncated 2007-04-06.
214
215 2007-09-10  Bruno Haible  <bruno@clisp.org>
216
217         * posix-modules: Fix typo in error message.
218         Reported by Matt <mkraai@beckman.com>.
219
220 2007-09-09  Bruno Haible  <bruno@clisp.org>
221
222         * doc/functions/getdelim.texi: Update list of platforms lacking the
223         function.
224         * doc/functions/getline.texi: Likewise.
225
226 2007-09-09  Jim Meyering  <jim@meyering.net>
227
228         * lib/hash.c (hash_initialize): Detect calloc failure.
229         Reported by Bruno Haible.
230
231 2007-09-09  Bruno Haible  <bruno@clisp.org>
232
233         * lib/canonicalize-lgpl.c (__realpath): Set errno to ENOMEM when
234         malloc or realloc fails.
235
236 2007-09-09  Bruno Haible  <bruno@clisp.org>
237
238         * modules/getcwd (Depends-on): Add malloc-posix.
239         * modules/glob (Depends-on): Likewise.
240         * modules/putenv (Depends-on): Likewise.
241         * modules/strdup (Depends-on): Likewise.
242         * modules/getdelim (Depends-on): Add realloc-posix.
243         * modules/read-file (Depends-on): Likewise.
244
245 2007-09-09  Bruno Haible  <bruno@clisp.org>
246
247         * m4/malloc.m4 (gl_CHECK_MALLOC_POSIX): New macro.
248         (gl_FUNC_MALLOC_POSIX): Require it.
249         * m4/realloc.m4 (gl_FUNC_REALLOC_POSIX): Likewise.
250         * m4/calloc.m4 (gl_FUNC_CALLOC_POSIX): Likewise.
251         * modules/realloc (Files): Add m4/malloc.m4.
252         * modules/calloc (Files): Likewise.
253
254 2007-09-09  Bruno Haible  <bruno@clisp.org>
255
256         * modules/malloc-posix: New file.
257         * modules/malloc (Depends-on): Add malloc-posix.
258         * lib/malloc.c: Include errno.h.
259         (rpl_malloc): Merge the requirements of a glibc-compatible malloc
260         and a POSIX-compatible malloc into a single function. Set ENOMEM
261         when returning NULL.
262         * m4/malloc.m4: New file.
263         * doc/functions/malloc.texi: Mention the malloc-posix module.
264         * lib/stdlib_.h (malloc): New declaration.
265         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize
266         GNULIB_MALLOC_POSIX and HAVE_MALLOC_POSIX.
267         * modules/stdlib (stdlib.h): Substitute also GNULIB_MALLOC_POSIX
268         and HAVE_MALLOC_POSIX.
269
270 2007-09-09  Bruno Haible  <bruno@clisp.org>
271
272         * modules/realloc-posix: New file.
273         * modules/realloc (Depends-on): Add realloc-posix.
274         * lib/realloc.c: Include errno.h.
275         (rpl_realloc): Merge the requirements of a glibc-compatible realloc
276         and a POSIX-compatible realloc into a single function. Set ENOMEM
277         when returning NULL.
278         * m4/realloc.m4: New file.
279         * doc/functions/realloc.texi: Mention the realloc-posix module.
280         * lib/stdlib_.h (realloc): New declaration.
281         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize
282         GNULIB_REALLOC_POSIX and HAVE_REALLOC_POSIX.
283         * modules/stdlib (stdlib.h): Substitute also GNULIB_REALLOC_POSIX
284         and HAVE_REALLOC_POSIX.
285
286 2007-09-09  Bruno Haible  <bruno@clisp.org>
287
288         * modules/calloc-posix: New file.
289         * modules/calloc (Depends-on): Add calloc-posix.
290         * lib/calloc.c: Include errno.h.
291         (rpl_calloc): Merge the requirements of a glibc-compatible calloc
292         and a POSIX-compatible calloc into a single function. Set ENOMEM
293         when returning NULL.
294         * m4/calloc.m4 (gl_FUNC_CALLOC_POSIX): New macro.
295         * doc/functions/calloc.texi: Mention the calloc-posix module.
296         * lib/stdlib_.h (calloc): New declaration.
297         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize
298         GNULIB_CALLOC_POSIX and HAVE_CALLOC_POSIX.
299         * modules/stdlib (stdlib.h): Substitute also GNULIB_CALLOC_POSIX
300         and HAVE_CALLOC_POSIX.
301
302 2007-09-09  Bruno Haible  <bruno@clisp.org>
303
304         Allow for modules to show an arbitrary notice.
305         * modules/TEMPLATE-EXTENDED: Add 'Notice' field.
306         * gnulib-tool: New option --extract-notice.
307         (func_usage): Document it.
308         (sed_extract_prog): Update.
309         (func_get_notice): New function.
310         (func_modules_notice): New function.
311         (func_import, func_create_testdir): Invoke it.
312         Suggested by Jim Meyering.
313
314 2007-09-09  Bruno Haible  <bruno@clisp.org>
315
316         * gnulib-tool: New options --verbose, --quiet.
317         (func_usage): Document them.
318         (verbose): New variable.
319         (func_execute_command): New function.
320         (func_import): Don't show the module list and the file list if
321         $verbose < 0.
322         (func_create_testdir): Likewise. Use func_execute_command.
323         (func_create_megatestdir): Use func_execute_command.
324
325 2007-09-08  Bruno Haible  <bruno@clisp.org>
326
327         * gnulib-tool (func_import): Prefer rsync over wget when available,
328         for fetching the PO files.
329
330 2007-09-08  Bruno Haible  <bruno@clisp.org>
331
332         * posix-modules: New file. Portions copied from gnulib-tool.
333         * doc/gnulib.texi (POSIX Substitutes Library): New chapter.
334
335 2007-09-08  Jim Meyering  <jim@meyering.net>
336
337         Rename __fpending.c -> fpending.c and __fpending.h -> fpending.h
338         * lib/fpending.h: Rename from __fpending.h.
339         * lib/fpending.c: Rename from __fpending.c.
340         Include "fpending.h", not "__fpending.h".
341         * lib/__fpending.h, lib/__fpending.c: Remove files.
342         * modules/fpending (Files): Reflect new file names.
343         * lib/close-stream.c: Include "fpending.h", not "__fpending.h".
344
345 2007-09-08  Bruno Haible  <bruno@clisp.org>
346
347         * m4/inttypes-h.m4: Remove stub file.
348
349 2007-09-07  Simon Josefsson  <simon@josefsson.org>
350
351         * doc/headers/stdint.texi: Discuss #include_next issue.
352
353 2007-09-06  Paul Eggert  <eggert@cs.ucla.edu>
354
355         * build-aux/bootstrap: Remove obsolete comment about wget --help.
356
357 2007-09-06  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
358
359         * m4/time_h.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Fix misspelling
360         in variable name.
361
362 2007-09-03  Jim Meyering  <jim@meyering.net>
363
364         New module: git-version-gen.
365         * modules/git-version-gen: New file.
366
367         Import changes from coreutils for bootstrap script.
368
369         * build-aux/bootstrap (WGET_COMMAND): Remove code to set this variable.
370
371         bootstrap: uses rsync to download the .po files
372         * build-aux/bootstrap (po_download_command_format): New global.
373         (download_po_files): Use rsync.
374         (update_po_files): Don't remove .po files after download,
375         so future rsync runs can take advantage of the copies.
376
377         * build-aux/bootstrap (gnulib_tool): Make sha1sum check quietly.
378
379         Solve the unnecessary-.po-file-regeneration problem once and for all.
380         * build-aux/bootstrap (download_po_files): New function, renamed from
381         get_translations.  Now, downloads, but doesn't update LINGUAS.
382         (update_po_files): New function.
383
384         bootstrap: Ignore more.
385         * build-aux/bootstrap (symlink_to_dir): Add a directory name like
386         uniwidth to e.g., lib/.gitignore.
387         (slurp): Handle the sys_stat_.h -> sys mapping, too.
388
389         * build-aux/bootstrap: New setting: vc_ignore.
390         (insert_sorted_if_absent): Create $file if absent.
391         Adapt to new, possibly empty, list: $vc_ignore.
392
393         bootstrap: generate more ignorable names
394         * build-aux/bootstrap (slurp): When generating ignorable names,
395         also map .sin to .sed, .gperf to .c, and .y to .c.
396
397 2007-09-03  Jim Meyering  <jim@meyering.net>
398
399         * build-aux/git-version-gen: New file, from coreutils.  For details, see
400         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=bfe49f506
401
402 2007-09-02  Bruno Haible  <bruno@clisp.org>
403
404         Fix mis-recognition of 'mcs' on QNX 6.
405         * m4/csharpcomp.m4 (gt_CSHARPCOMP): Test whether the "mcs --version"
406         output contains the string "Mono".
407         * lib/csharpcomp.c (compile_csharp_using_mono): Likewise.
408         Reported by <kraai@ftbfs.org> at <https://savannah.gnu.org/bugs/?18337>.
409
410 2007-09-01  Bruno Haible  <bruno@clisp.org>
411
412         Fix collision between uniwidth/* and linebreak modules.
413         * lib/linebreak.h (locale_charset, uc_width, u8_width, u16_width,
414         u32_width): Remove declarations.
415         * lib/linebreak.c: Include uniwidth.h, uniwidth/cjk.h, streq.h.
416         (u32_mbtouc_unsafe, streq9, streq8, streq7, streq6, streq5, streq4,
417         streq3, streq2, streq1, streq0): Remove functions.
418         (STREQ): Remove macro.
419         (is_cjk_encoding): Remove function.
420         (nonspacing_table_data, nonspacing_table_ind): Remove constants.
421         (uc_width, u8_width, u16_width, u32_width): Remove functions.
422         * modules/linebreak (Depends-on): Add streq, uniwidth/width.
423         * NEWS: Document the change.
424
425 2007-09-01  Bruno Haible  <bruno@clisp.org>
426
427         * lib/streq.h: Add double-inclusion guard.
428
429 2007-09-01  Karl Berry  <karl@gnu.org>
430
431         * MODULES.html.sh: Rename mreadlink_with_size to areadlink_with_size.
432
433 2007-08-28  Jim Meyering  <jim@meyering.net>
434
435         Rename mreadlink_with_size to areadlink_with_size.
436         * NEWS: Document the change.
437         * lib/mreadlink-with-size.c (mreadlink_with_size): Rename this to...
438         * lib/areadlink-with-size.c (areadlink_with_size): ...this.
439         * lib/mreadlink.h: Rename this to...
440         * lib/areadlink.h: ...this.
441         * modules/mreadlink-with-size: Rename this to...
442         * modules/areadlink-with-size: ...this.
443         * lib/canonicalize.c: Reflect the renaming.
444         * modules/canonicalize: Likewise.
445
446 2007-08-26  Bruno Haible  <bruno@clisp.org>
447
448         * gnulib-tool (func_import): When deciding which files to remove,
449         consider also dangling symbolic links.
450         Reported by Eric Blake.
451
452 2007-08-26  Bruno Haible  <bruno@clisp.org>
453
454         * gnulib-tool (func_ln_if_changed): Use "test -h", not "test -L".
455
456 2007-08-23  Simon Josefsson  <simon@josefsson.org>
457
458         * lib/readline.c: Don't include getline.h, the prototype is now
459         found in stdio.h.
460
461 2007-08-23  Jim Meyering  <jim@meyering.net>
462
463         Getdelim touchup.
464         * lib/getdelim.c (getdelim): Don't bother to save/restore errno
465         around the funlockfile call, since funlockfile never sets errno.
466         Don't set errno upon failed realloc.
467
468 2007-08-22  Eric Blake  <ebb9@byu.net>
469
470         Getline touchups.
471         * lib/getdelim.c (getdelim): Revert regression that required *n to
472         be 0 when *lineptr is NULL.  Preserve errno across funlockfile.
473         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Check for declaration of
474         getdelim, rather than whether implementation is missing.
475         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise for getline.
476         * lib/stdio_.h (getline): Also declare if replacement is
477         required.
478         * doc/functions/getdelim.texi: New file.
479         * doc/functions/getline.texi: Likewise.
480         * doc/gnulib.texi (Function Substitutes): Add new files.
481         Reported by Bruno Haible.
482
483 2007-08-22  Ludovic Courtès  <ludo@gnu.org>
484
485         * users.txt: Add Guile.
486
487 2007-08-22  Eric Blake  <ebb9@byu.net>
488
489         * tests/test-getdelim.c (main): Use remove, not unlink.
490         * tests/test-getline.c (main): Likewise.
491
492         Move getline and getdelim into stdio.h, per POSIX 200x.
493         * modules/getline (Files): Remove getline.h.
494         (Depends-on): Add stdio.
495         (configure.ac): Add module indicator.
496         * modules/getdelim (Files): Remove getdelim.h.
497         (Depends-on): Add stdio.
498         (configure.ac): Add module indicator.
499         * modules/stdio (Makefile.am): Work with new indicators.
500         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Add new defaults.
501         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Work with stdio needs.
502         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise.
503         * lib/getdelim.h: Delete.
504         * lib/getline.h: Delete.
505         * lib/stdio_.h (getdelim, getline): Declare.
506         * modules/getdelim-tests: New module.
507         * modules/getline-tests: Likewise.
508         * tests/test-getdelim.c: New file.
509         * tests/test-getline.c: Likewise.
510         * NEWS: Document the change.
511         * lib/getline.c: Update choice of header.
512         * lib/csharpcomp.c: Likewise.
513         * lib/getpass.c: Likewise.
514         * lib/javacomp.c: Likewise.
515         * lib/javaversion.c: Likewise.
516         * lib/yesno.c: Likewise.
517         * lib/getdelim.c: Likewise.
518         (getdelim): Set errno on failure, and avoid memory leak.
519
520 2007-08-19  Bruno Haible  <bruno@clisp.org>
521
522         * modules/closein (Depends-on): Add freadahead.
523         * lib/closein.c: Include freadahead.h.
524         (close_stdin): Skip the fseeko and fflush calls if freadahead(stdin)
525         is zero.
526
527 2007-08-19  Bruno Haible  <bruno@clisp.org>
528
529         * modules/freadahead-tests: New file.
530         * tests/test-freadahead.sh: New file.
531         * tests/test-freadahead.c: New file.
532
533         * modules/freadahead: New file.
534         * lib/freadahead.h: New file.
535         * lib/freadahead.c: New file.
536         * MODULES.html.sh (File stream based Input/Output): Add freadahead,
537         fbufmode, fpurge, freadable, fwritable.
538
539 2007-08-19  Eric Blake  <ebb9@byu.net>
540
541         Test yesno in combination with closein.
542         * lib/yesno.c (yesno): Document use of stdin.
543         * modules/yesno-tests (Files): New module.
544         * tests/test-yesno.c (main): New file.
545         * tests/test-yesno.sh: Likewise.
546
547 2007-08-19  Bruno Haible  <bruno@clisp.org>
548
549         * lib/fbufmode.c (fbufmode): Add tentative support for Solaris/AMD64.
550         * lib/fseeko.c (rpl_fseeko): Likewise.
551         * lib/fseterr.c (fseterr): Likewise.
552
553 2007-08-19  Bruno Haible  <bruno@clisp.org>
554
555         * tests/test-lseek.c (main): Disable a test for BeOS.
556         * doc/functions/lseek.texi: Document the BeOS bug.
557
558 2007-08-19  Bruno Haible  <bruno@clisp.org>
559             Eric Blake  <ebb9@byu.net>
560
561         * lib/lseek.c: Include <sys/stat.h>.
562         (rpl_lseek): Add workaround code also for Unix platforms.
563         Needed for BeOS.
564         * m4/lseek.m4 (gl_FUNC_LSEEK): When cross-compiling, fail on BeOS.
565         * doc/functions/lseek.texi: Document BeOS definiency.
566
567 2007-08-18  Bruno Haible  <bruno@clisp.org>
568
569         * modules/fstrcmp-tests: New file.
570         * tests/test-fstrcmp.c: New file.
571
572 2007-08-18  Bruno Haible  <bruno@clisp.org>
573
574         * modules/fstrcmp: New file, from GNU gettext with modifications.
575         * lib/fstrcmp.h: New file, from GNU gettext.
576         * lib/fstrcmp.c: New file, from GNU gettext.
577         * MODULES.html.sh (String handling): Add fstrcmp.
578
579 2007-08-18  Bruno Haible  <bruno@clisp.org>
580
581         * lib/diffseq.h (struct context): Change type of 'heuristic' field to
582         'bool'.
583         (diag, compareseq): Remove const from the ctxt argument.
584         (USE_HEURISTIC): Undefine at the end.
585
586 2007-08-18  Jim Meyering  <jim@meyering.net>
587
588         New file: lib/idcache.h
589         * NEWS: Mention the addition.
590         * modules/idcache (Files): Add lib/idcache.h
591         * lib/idcache.c: Include "idcache.h".
592         Don't include <sys/types.h>.
593         Add a FIXME comment.
594         Move file-scoped "static" declarations to the top.
595         * lib/idcache.h: New file.  Include <sys/types.h> here, instead.
596
597 2007-08-17  Bruno Haible  <bruno@clisp.org>
598         and Paul Eggert  <eggert@cs.ucla.edu>
599
600         * MODULES.html.sh: Add diffseq.
601         * modules/diffseq: New file.
602         * lib/diffseq.h: New file, from GNU gettext with a few minor changes,
603         extracted from GNU gettext's fstrcmp.c and GNU diff's analyze.c.
604
605 2007-08-15  Paul Eggert  <eggert@cs.ucla.edu>
606
607         Import changes from coreutils for bootstrap script.
608
609         2007-07-21  Paul Eggert  <eggert@cs.ucla.edu>
610
611         * build-aux/bootstrap (slurp): Work even in environments where
612         "ls" defaults to "ls -A".  Put in a FIXME, though, since the
613         current code does not slurp files whose names start with ".", and
614         this looks like it might be a troublesome area.
615
616         2007-07-11  Jim Meyering  <jim@meyering.net>
617
618         If there's a GPL vN copyright comment, require that N == 3.
619
620         2007-07-08  Jim Meyering  <jim@meyering.net>
621
622         Run the coreutils-specific code only if tests/Makefile.am.in exists.
623         * build-aux/bootstrap (mam_template): Move definition out of loop.
624
625         Create symlinks for gl/{lib,m4}/*, just as for gnulib/{lib,m4}/*.
626
627         * build-aux/bootstrap (symlink_to_dir): Rename function from
628         symlink_to_gnulib.  Add a directory parameter.  Update all
629         callers.
630         (cp_mark_as_generated): Also check for -- and link to -- files in
631         gl/.
632
633         2007-07-08  Jim Meyering  <jim@meyering.net>
634
635         Adapt to deeper hierarchy in gnulib.
636         * build-aux/bootstrap (symlink_to_dir): If the destination
637         directory doesn't exist, create it. This is required at least for
638         "lib/uniwidth/cjk.h".
639
640         2007-05-15  Jim Meyering  <jim@meyering.net>
641
642         * build-aux/bootstrap: Now that generated Makefile.am files
643         are no longer under version control, they must be created at
644         bootstrap time.
645
646 2007-08-14  Ben Pfaff  <blp@gnu.org>
647
648         * lib/count-one-bits.h: Add comments.  From Bruno Haible.
649
650 2007-08-14  Paul Eggert  <eggert@cs.ucla.edu>
651
652         * lib/count-one-bits.h: Don't include <limits.h>; no longer needed
653         given the changes below.
654         (COUNT_ONE_BITS): Use 'verify' rather than 'verify_true'.  Work
655         even on hosts that have padding bits beyond the supported 64.
656
657 2007-08-10  Paul Eggert  <eggert@cs.ucla.edu>
658
659         * NEWS: In xstrtol, remove STRTOL_FATAL_ERROR and add xstrtol_fatal.
660         * lib/xstrtol.h: Don't include exitfail.h; that's now internal to
661         xstrtol.c.  Include getopt.h, since xstrtol_fatal's signature
662         depends on it.
663         (xstrtol_error): Remove.
664         (xstrtol_fatal): New decl, replacing the functionality of xstrtol_error
665         but with a different signature.
666         (ATTRIBUTE_NORETURN, __attribute__): New macros.
667         * lib/xstrtol-error.c: Include exitfail.h.
668         (xstrtol_fatal): New function, with a different signature from the
669         old xstrtol_error, so that the caller need not worry about passing
670         in an exit status, or about storage management of the option argument.
671         (xstrtol_error): Now a static function.  Redo signature to
672         implement xstrtol_fatal.  Output the correct number of hyphens in
673         front of the option so that the caller need not worry about
674         storage management.
675         (N_): New macro.
676         (_): Remove; not used now.
677         * modules/xstrtol: Depend on getopt.
678         * tests/test-xstrtol.c (main): Use new xstrtol_error function instead
679         of old STRTOL_FATAL_ERROR macro.
680         * tests/test-xstrtol.sh (t-xstrtol.xo): Adjust to match new behavior
681         of test program.
682         * tests/test-xstrtoimax.sh (t-xstrtoimax.xo): Likewise.
683         * tests/test-xstrtoumax.sh (t-xstrtoumax.xo): Likewise.
684
685 2007-08-08  Eric Blake  <ebb9@byu.net>
686
687         * lib/xstrtol-error.c: Add missing include.
688
689         Move xstrtol messages into gnulib domain, when --pobase is used.
690         * lib/xstrtol.h (_STRTOL_ERROR): Move messages out of macro...
691         * lib/xstrtol-error.c (xstrtol_error): ...into new file.
692         * modules/xstrtol (Files): Distribute new file.
693         * m4/xstrtol.m4 (gl_XSTRTOL): Build new file.
694         * lib/xstrtol.c (TESTING_XSTRTO): Move tests...
695         * tests/test-xstrtol.c: ...into new file.
696         * tests/test-xstrtoul.c: Also test xstrtoul.
697         * tests/test-xstrtoimax.c: Also test xstrtoimax.
698         * tests/test-xstrtoumax.c: Also test xstrtoumax.
699         * tests/test-xstrtol.sh: Drive the tests.
700         * tests/test-xstrtoimax.sh: Likewise.
701         * tests/test-xstrtoumax.sh: Likewise.
702         * modules/xstrtol-tests: New module.
703         * modules/xstrtoimax-tests: Likewise.
704         * modules/xstrtoumax-tests: Likewise.
705
706 2007-08-08  Jim Meyering  <jim@meyering.net>
707
708         New function: mfile_name_concat.
709         * lib/filenamecat.c (mfile_name_concat): New function, just like
710         file_name_concat, but return NULL upon failure rather than exiting
711         with a diagnostic.
712         * lib/filenamecat.h: Declare it.
713
714 2007-08-07  Bruno Haible  <bruno@clisp.org>
715
716         * m4/inttypes.m4 (gl_INTTYPES_H): Use GL_TRIGGER_STDC_LIMIT_MACROS
717         instead of __STDC_LIMIT_MACROS_TRIGGER. This avoids a redefinition
718         warning from gcc.
719         Reported by Eric Blake.
720
721 2007-08-07  Simon Josefsson  <simon@josefsson.org>
722
723         * modules/crypto/arctwo (License): Use the synonymous term "LGPLv2+".
724         * modules/crypto/arcfour (License): Likewise.
725         * modules/crypto/des-tests (License): Likewise.
726         * modules/crypto/gc-arctwo-tests (License): Likewise.
727         * modules/crypto/gc-des-tests (License): Likewise.
728         * modules/crypto/gc-hmac-md5-tests (License): Likewise.
729         * modules/crypto/gc-hmac-sha1-tests (License): Likewise.
730         * modules/crypto/gc-md2-tests (License): Likewise.
731         * modules/crypto/gc-md4-tests (License): Likewise.
732         * modules/crypto/gc-md5-tests (License): Likewise.
733         * modules/crypto/gc-pbkdf2-sha1-tests (License): Likewise.
734         * modules/crypto/gc-rijndael-tests (License): Likewise.
735         * modules/crypto/gc-sha1-tests (License): Likewise.
736         * modules/crypto/gc-tests (License): Likewise.
737         * modules/crypto/hmac-md5 (License): Likewise.
738         * modules/crypto/hmac-sha1 (License): Likewise.
739         * modules/crypto/md2-tests (License): Likewise.
740         * modules/crypto/md4-tests (License): Likewise.
741         * modules/crypto/md5 (License): Likewise.
742         * modules/crypto/rijndael (License): Likewise.
743         * modules/crypto/sha1 (License): Likewise.
744         * modules/memxor (License): Likewise.
745
746 2007-08-06  Paul Eggert  <eggert@cs.ucla.edu>
747         and Bruno Haible  <bruno@clisp.org>
748
749         * NEWS: Describe interface changes to human, xstrtol.
750         * lib/human.h: Include <xstrtol.h>.
751         (human_options): Return enum strtol_error, not int.  Remove
752         bool arg; take int * instead.
753         * lib/human.c: Don't include "gettext.h".
754         (_): Remove; no longer used.
755         Don't include <xstrtol.h>, since human.h does it.
756         (human_options): Adjust to abovementioned interface changes.
757         Do not report error to stderr; that's now the caller's
758         responsibility.
759         * lib/xstrtol.c (main) [defined TESTING_XSTRTO]: Adjust to
760         interface change.
761         * lib/xstrtol.h (_STRTOL_ERROR): Take Option, Arg rather than
762         Str, Argument_type_string.  All uses changed.  Put " argument"
763         in diagnostics to make them clearer.  Change wording of suffix
764         message for clarity.
765         (STRTOL_FATAL_ERROR): Take Option, Arg rather than Str,
766         Argument_type_string.
767         (STRTOL_FATAL_WARN): Remove; no longer used.
768         * modules/human (Depends-on): Remove gettext-h.
769
770 2007-08-06  Simon Josefsson  <simon@josefsson.org>
771
772         * build-aux/maint.mk, build-aux/GNUmakefile: Relicense to GPLv3+.
773
774 2007-07-31  Bruno Haible  <bruno@clisp.org>
775
776         * m4/stdint.m4 (gl_STDINT_H): Test whether WCHAR_MIN and WCHAR_MAX
777         are defined by <stdint.h> (as opposed to <wchar.h>, as on Dragonfly).
778         Reported by Joerg Sonnenberger <joerg@britannica.bec.de>.
779
780 2007-07-31  Bruno Haible  <bruno@clisp.org>
781
782         * lib/fflush.c (rpl_fflush): On BSD systems, use the __SNPT flag.
783         Suggested by Joerg Sonnenberger <joerg@britannica.bec.de>.
784
785 2007-07-30  Bruno Haible  <bruno@clisp.org>
786
787         * modules/base64 (License): Use the synonymous term "LGPLv2+".
788         * modules/c-ctype (License): Likewise.
789         * modules/c-strcase (License): Likewise.
790         * modules/check-version (License): Likewise.
791         * modules/iconv (License): Likewise.
792         * modules/iconv_open (License): Likewise.
793         * modules/read-file (License): Likewise.
794         * modules/striconv (License): Likewise.
795         * modules/strverscmp (License): Likewise.
796         * modules/vasprintf (License): Likewise.
797         * modules/crypto/des (License): Likewise.
798         * modules/crypto/gc (License): Likewise.
799         * modules/crypto/gc-arcfour (License): Likewise.
800         * modules/crypto/gc-arctwo (License): Likewise.
801         * modules/crypto/gc-des (License): Likewise.
802         * modules/crypto/gc-hmac-md5 (License): Likewise.
803         * modules/crypto/gc-hmac-sha1 (License): Likewise.
804         * modules/crypto/gc-md2 (License): Likewise.
805         * modules/crypto/gc-md4 (License): Likewise.
806         * modules/crypto/gc-md5 (License): Likewise.
807         * modules/crypto/gc-pbkdf2-sha1 (License): Likewise.
808         * modules/crypto/gc-random (License): Likewise.
809         * modules/crypto/gc-rijndael (License): Likewise.
810         * modules/crypto/gc-sha1 (License): Likewise.
811         * modules/crypto/md2 (License): Likewise.
812         * modules/crypto/md4 (License): Likewise.
813
814 2007-07-30  Jim Meyering  <jim@meyering.net>
815
816         * lib/fts.c (fts_read): Upon failure to chdir into a subdirectory,
817         set fts_info to FTS_DNR, not to FTS_ERR, so that the caller knows
818         it has valid stat data.  This bug would cause du not to count the
819         sizes of inaccessible directories.
820         Patch by Bryan Mason <bmason@redhat.com>, via Jose Maria Plans
821         in <http://bugzilla.redhat.com/250077>.
822
823 2007-07-25  Peter O'Gorman  <peter@pogma.com>
824             Bruno Haible  <bruno@clisp.org>
825
826         * m4/include_next.m4 (gl_INCLUDE_NEXT): Test whether #include_next
827         really works. Needed because AIX 4.3 "xlc -E" doesn't understand
828         #include_next, gives a diagnostic about it, but reports no error in
829         the exit code.
830         Reported by Gary V. Vaughan <gary@thewrittenword.com>.
831
832 2007-07-24  Ben Pfaff  <blp@gnu.org>
833
834         Improve name: "count-one-bits" is better than "popcount".
835         * MODULES.html.sh: Update name.
836         * lib/popcount.h: Renamed lib/count-one-bits.h.
837         (popcount): Renamed count_one_bits.
838         (popcountl): Renamed count_one_bits_l.
839         (popcountll): Renamed count_one_bits_ll.
840         * m4/popcount.m4: Renamed m4/count-one-bits.m4.
841         * modules/popcount: Renamed module/count-one-bits.
842         * modules/popcount-tests: Renamed module/count-one-bits-tests.
843         * tests/test-popcount.c: Renamed tests/test-count-one-bits.c.
844
845 2007-07-23  Ben Pfaff  <blp@gnu.org>
846
847         * lib/popcount.h (popcount32): Reduce size of constants, to allow
848         better code generation, and add U to large constants to avoid
849         warnings, in non-GCC case.
850         Suggested by Bruno Haible.
851
852 2007-07-23  Ben Pfaff  <blp@gnu.org>
853
854         * lib/popcount.h: Use verify_true instead of if...abort.
855         * modules/popcount: Depend on verify module.
856         Suggested by Jim Meyering.
857
858 2007-07-23  Bruno Haible  <bruno@clisp.org>
859
860         * gnulib-tool (func_import): Create a .cvsignore file also when the
861         directory is not yet in CVS but the toplevel directory is. When
862         creating a .cvsignore file, add ".deps" and ".dirstamp" to it.
863         Reported by Karl Berry.
864
865 2007-07-22  Ben Pfaff  <blp@gnu.org>
866
867         * lib/popcount.h: Use faster, branchless algorithm for non-GCC
868         case.
869         Suggested by Eric Blake.
870
871 2007-07-22  Ben Pfaff  <blp@gnu.org>
872
873         New module: popcount.
874         * MODULES.html.sh: Add popcount.
875         * modules/popcount: New file.
876         * modules/popcount-tests: New file.
877         * tests/test-popcount.c: New file.
878         * lib/popcount.h: New file.
879         * m4/popcount.m4: New file.
880
881 2007-07-22  Paul Eggert  <eggert@cs.ucla.edu>
882
883         * build-aux/announce-gen: Update to GPLv3.
884
885         * build-aux/config.guess: Update from config.
886
887 2007-07-21  Bruno Haible  <bruno@clisp.org>
888
889         * lib/error.c (_) [ENABLE_NLS]: Define to gettext.
890         * lib/verror.c (_) [ENABLE_NLS]: Likewise.
891
892 2007-07-20  Jim Meyering  <jim@meyering.net>
893
894         * check-module: Diagnose a self-dependency.
895
896 2007-07-19  Bruno Haible  <bruno@clisp.org>
897
898         * gnulib-tool (func_import): Don't abort if pobase or po_domain is
899         empty.
900         Reported by Eric Blake.
901
902 2007-07-18  Bruno Haible  <bruno@clisp.org>
903
904         * gnulib-tool: New options --po-base, --po-domain.
905         (func_usage): Document them.
906         (pobase, po_domain): New variables.
907         (func_emit_lib_Makefile_am): Augment AM_CPPFLAGS, defining
908         DEFAULT_TEXT_DOMAIN.
909         (func_emit_po_Makevars, func_emit_po_POTFILES_in): New functions.
910         (func_import): Consider pobase and po_domain. Create a po/ directory.
911         (func_create_testdir): Set pobase and po_domain to empty.
912         * build-aux/po/Makefile.in.in: New file, from GNU gettext 0.16.1.
913         * build-aux/po/remove-potcdate.sin: New file, from GNU gettext 0.16.1.
914
915 2007-07-18  Bruno Haible  <bruno@clisp.org>
916
917         * gnulib-tool (func_get_automake_snippet): Synthesize also an
918         EXTRA_DIST augmentation for files in build-aux/.
919
920 2007-07-16  Bruno Haible  <bruno@clisp.org>
921
922         * modules/lseek (License): Use the synonymous term "LGPLv2+".
923         * modules/getdelim (License): Likewise.
924
925 2007-07-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
926
927         * modules/arpa_inet (License): Use the synonymous term LGPLv2+.
928         * modules/d-type (License): Likewise.
929         * modules/extensions (License): Likewise.
930         * modules/fnmatch (License): Likewise.
931         * modules/fseeko (License): Likewise.
932         * modules/getaddrinfo (License): Likewise.
933         * modules/getline (License): Likewise.
934         * modules/getlogin_r (License): Likewise.
935         * modules/getpass (License): Likewise.
936         * modules/gettimeofday (License): Likewise.
937         * modules/glob (License): Likewise.
938         * modules/inet_ntop (License): Likewise.
939         * modules/malloc (License): Likewise.
940         * modules/malloca (License): Likewise.
941         * modules/memmem (License): Likewise.
942         * modules/mempcpy (License): Likewise.
943         * modules/memset (License): Likewise.
944         * modules/minmax (License): Likewise.
945         * modules/mktime (License): Likewise.
946         * modules/netinet_in (License): Likewise.
947         * modules/pathmax (License): Likewise.
948         * modules/poll (License): Likewise.
949         * modules/regex (License): Likewise.
950         * modules/snprintf (License): Likewise.
951         * modules/stdbool (License): Likewise.
952         * modules/stdint (License): Likewise.
953         * modules/stdio (License): Likewise.
954         * modules/strcase (License): Likewise.
955         * modules/strcasestr (License): Likewise.
956         * modules/strdup (License): Likewise.
957         * modules/string (License): Likewise.
958         * modules/strndup (License): Likewise.
959         * modules/strnlen (License): Likewise.
960         * modules/strpbrk (License): Likewise.
961         * modules/strptime (License): Likewise.
962         * modules/strsep (License): Likewise.
963         * modules/sys_select (License): Likewise.
964         * modules/sys_socket (License): Likewise.
965         * modules/sys_stat (License): Likewise.
966         * modules/sys_time (License): Likewise.
967         * modules/time (License): Likewise.
968         * modules/time_r (License): Likewise.
969         * modules/timegm (License): Likewise.
970         * modules/unistd (License): Likewise.
971         * modules/vsnprintf (License): Likewise.
972         * modules/wctype (License): Likewise.
973
974 2007-07-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
975
976         * modules/argz (License): LGPLv2+.
977
978 2007-07-15  Karl Berry  <karl@gnu.org>
979
980         * doc/gnulib.texi: revise node structure per new fdl.texi.
981
982 2007-07-14  Bruno Haible  <bruno@clisp.org>
983
984         * lib/uniname/gen-uninames.lisp (main): Emit a "do not edit" line to
985         the output file.
986         * lib/uniname/uninames.h: Regenerated.
987
988 2007-07-14  Karl Berry  <karl@gnu.org>
989
990         * doc/*gpl*.texi, doc/fdl.texi: new versions, consistently
991         omitting sectioning and index commands.
992
993 2007-07-13  Bruno Haible  <bruno@clisp.org>
994
995         New gnulib-tool option --more-symlinks.
996         * gnulib-tool (func_usage): Document --more-symlinks.
997         (do_copyrights): New variable.
998         Recognize option --more-symlinks.
999         (func_import): Don't add a copyright notice transform to
1000         sed_transform_lib_file if do_copyrights is empty.
1001
1002 2007-07-13  Bruno Haible  <bruno@clisp.org>
1003
1004         * lib/vasnprintf.c (decimal_point_char): Define also if
1005         (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE)
1006         && !NEED_PRINTF_DIRECTIVE_A.
1007         Reported by Clemens Koller <clemens.koller@anagramm.de> via
1008         Gary V. Vaughan <gary@gnu.org>.
1009
1010 2007-07-13  Paul Eggert  <eggert@cs.ucla.edu>
1011
1012         * lib/inttypes_.h: Undo previous change, since it was fixed
1013         in a different way in the 2007-07-02 fix to m4/inttypes.m4.
1014
1015 2007-07-13  Bruno Haible  <bruno@clisp.org>
1016
1017         * lib/stdint_.h: Fix typo: _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H was
1018         misspelled as _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H.
1019
1020 2007-07-13  Jim Meyering  <jim@meyering.net>
1021
1022         df: Don't fail for Tru64's "file-on-file mount".
1023         * m4/fsusage.m4 (gl_FSUSAGE): Reject Tru64's buggy statvfs,
1024         so we fall through and use statfs instead.  Details here:
1025         <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/10878>
1026         Reported by Albert Chin.
1027
1028 2007-07-13  Bruno Haible  <bruno@clisp.org>
1029
1030         * modules/alloca-opt (License): Use the synonymous term "LGPLv2+".
1031         * modules/configmake (License): Likewise.
1032         * modules/gettext (License): Likewise.
1033         * modules/gettext-h (License): Likewise.
1034         * modules/include_next (License): Likewise.
1035         * modules/link-warning (License): Likewise.
1036         * modules/localcharset (License): Likewise.
1037         * modules/localename (License): Likewise.
1038         * modules/lock (License): Likewise.
1039         * modules/relocatable-lib-lgpl (License): Likewise.
1040         * modules/size_max (License): Likewise.
1041         * modules/vasnprintf (License): Likewise.
1042         * modules/wchar (License): Likewise.
1043         * modules/xsize (License): Likewise.
1044
1045 2007-07-13  Bruno Haible  <bruno@clisp.org>
1046
1047         * gnulib-tool (func_import): Treat LGPLv2 as synonymous to LGPL.
1048         (func_create_testdir): Handle copying terms "GPLv2+" and "LGPLv2+".
1049
1050 2007-07-12  Bruno Haible  <bruno@clisp.org>
1051
1052         * doc/gnulib-intro.texi (Copyright): Clarify the license abbreviations
1053         in the modules files.
1054
1055 2007-07-11  Karl Berry  <karl@gnu.org>
1056
1057         * MODULES.html.sh (func_module): use
1058          sed -e '\|^'"${includefile}"'$|d'
1059          instead of /.../d, to avoid errors on $includefile's containing /.
1060
1061 2007-07-10  Sergey Poznyakoff  <gray@gnu.org.ua>
1062
1063         * gnulib-tool (func_import): Avoid duplication of --avoid
1064         statements
1065         (func_dest_tmpfilename,func_create_testdir): Translate `-' in file
1066         names to `_' in variable names.
1067
1068 2007-07-10  Eric Blake  <ebb9@byu.net>
1069
1070         * lib/version-etc.c (version_etc_va): Default to GPLv3+.
1071         * NEWS: Document this change.
1072
1073 2007-07-08  Bruno Haible  <bruno@clisp.org>
1074
1075         Update to Unicode 5.0.
1076         * lib/uniwidth/width.c (nonspacing_table_data): Add U+00AD,
1077         U+0350..U+035F, U+05A2, U+05BA, U+05C5, U+05C7, U+0600..U+0603,
1078         U+0610..U+0615, U+0656..U+065E, U+07EB..U+07F3, U+0A01, U+0AE2..U+0AE3,
1079         U+0CBC. Remove U+0CBF, U+0CC6. Add U+0CE2..U+0CE3, U+135F,
1080         U+17B4..U+17B5, U+17DD. Remove U+180E. Add U+1920..U+1922,
1081         U+1927..U+192B, U+1932, U+1939..U+193B, U+1A17..U+1A18, U+1B00..U+1B03,
1082         U+1B34, U+1B36..U+1B3A, U+1B3C, U+1B42, U+1B6B..U+1B73, U+1DC0..U+1DCA,
1083         U+1DFE..U+1DFF, U+20EB..U+20EF, U+A802, U+A806, U+A80B, U+A825..U+A826,
1084         U+10A01..U+10A03, U+10A05..U+10A06, U+10A0C..U+10A0F, U+10A38..U+10A3A,
1085         U+10A3F, U+1D242..U+1D244.
1086         (nonspacing_table_ind): Update.
1087         (uc_width): Assign width 0 to U+E0100..U+E01EF. Assign width 1 to
1088         U+4DC0..U+4DFF. Assign width 2 to U+2329..U+232A, U+FE10..U+FE1F.
1089
1090 2007-07-08  Bruno Haible  <bruno@clisp.org>
1091
1092         Update to Unicode 5.0.
1093         * lib/uniname/gen-uninames.lisp (main): Add the range 0x12xxx to the
1094         code transform. Extend the name index field of unicode_name_to_code and
1095         unicode_code_to_name from 16 to 24 bits.
1096         * lib/uniname/uniname.c (unicode_character_name,
1097         unicode_name_character): Add the range 0x12xxx to the code transform.
1098         * lib/uniname/uninames.h: Regenerated.
1099         * tests/uniname/UnicodeDataNames.txt: Update to Unicode 5.0.
1100
1101 2007-07-07  Bruno Haible  <bruno@clisp.org>
1102
1103         * modules/wcwidth-tests: New file.
1104         * tests/test-wcwidth.c: New file.
1105
1106         Work around MacOS X wcwidth() bug.
1107         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Test against MacOS X 10.3 bug.
1108         * lib/wcwidth.c: Include localcharset.h, streq.h, uniwidth.h.
1109         (rpl_wcwidth): Special-case the UTF-8 locales. Fall back to the
1110         original wcwidth in non-UTF-8 locales.
1111         * modules/wcwidth (Depends-on): Add localcharset, streq,
1112         uniwidth/width.
1113         * doc/functions/wcwidth.texi: Update.
1114
1115 2007-07-07  Bruno Haible  <bruno@clisp.org>
1116
1117         * lib/wchar_.h: Include the GL_LINK_WARNING macro.
1118         (wcwidth): New declaration.
1119         * m4/wchar.m4 (gl_WCHAR_MODULE_INDICATOR, gl_WCHAR_H_DEFAULTS): New
1120         macros.
1121         (gl_WCHAR_H): Require gl_WCHAR_H_DEFAULTS. Don't set WCHAR_H to empty
1122         here. Prepare for creating <wchar.h> unconditionally.
1123         * modules/wchar (Depends-on): Add link-warning.
1124         (Makefile.am): Substitute also GNULIB_WCWIDTH, HAVE_DECL_WCWIDTH,
1125         REPLACE_WCWIDTH, and GL_LINK_WARNING.
1126         * lib/wcwidth.h: Remove file.
1127         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gl_WCHAR_H_DEFAULTS. Set
1128         HAVE_DECL_WCWIDTH, REPLACE_WCWIDTH, WCHAR_H.
1129         * modules/wcwidth (Files): Remove lib/wcwidth.h.
1130         (configure.ac): Invoke gl_WCHAR_MODULE_INDICATOR.
1131         (Include): Replace wcwidth.h with <wchar.h>.
1132         * lib/wcwidth.c: Include <wchar.h> instead of wcwidth.h.
1133         * lib/mbchar.h: Don't include wcwidth.h.
1134         * lib/mbswidth.c: Likewise.
1135         * NEWS: Mention the change.
1136
1137 2007-07-07  Bruno Haible  <bruno@clisp.org>
1138
1139         * lib/wcwidth.c: New file, extracted from lib/wcwidth.h.
1140         * lib/wcwidth.h: Don't include wctype.h. Replace inline function
1141         definition with an external declaration.
1142         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Use wcwidth.c when wcwidth is not
1143         defined as a function. Remove AC_C_INLINE requirement.
1144         * modules/wcwidth (Files): Add lib/wcwidth.c.
1145         (Makefile.am): Remove redundant statement.
1146
1147 2007-07-07  Bruno Haible  <bruno@clisp.org>
1148
1149         * MODULES.html.sh (Unicode string functions): Add the new modules.
1150
1151         * tests/uniwidth/test-u32-strwidth.c: New file.
1152         * modules/uniwidth/u32-strwidth-tests: New file.
1153
1154         * lib/uniwidth/u32-strwidth.c: New file.
1155         * modules/uniwidth/u32-strwidth: New file.
1156
1157         * tests/uniwidth/test-u16-strwidth.c: New file.
1158         * modules/uniwidth/u16-strwidth-tests: New file.
1159
1160         * lib/uniwidth/u16-strwidth.c: New file.
1161         * modules/uniwidth/u16-strwidth: New file.
1162
1163         * tests/uniwidth/test-u8-strwidth.c: New file.
1164         * modules/uniwidth/u8-strwidth-tests: New file.
1165
1166         * lib/uniwidth/u8-strwidth.c: New file.
1167         * modules/uniwidth/u8-strwidth: New file.
1168
1169         * tests/uniwidth/test-u32-width.c: New file.
1170         * modules/uniwidth/u32-width-tests: New file.
1171
1172         * lib/uniwidth/u32-width.c: New file.
1173         * modules/uniwidth/u32-width: New file.
1174
1175         * tests/uniwidth/test-u16-width.c: New file.
1176         * modules/uniwidth/u16-width-tests: New file.
1177
1178         * lib/uniwidth/u16-width.c: New file.
1179         * modules/uniwidth/u16-width: New file.
1180
1181         * tests/uniwidth/test-u8-width.c: New file.
1182         * modules/uniwidth/u8-width-tests: New file.
1183
1184         * lib/uniwidth/u8-width.c: New file.
1185         * modules/uniwidth/u8-width: New file.
1186
1187         * tests/uniwidth/test-uc_width.c: New file.
1188         * modules/uniwidth/width-tests: New file.
1189
1190         * lib/uniwidth/width.c: New file, from GNU libiconv.
1191         * lib/uniwidth/cjk.h: New file, from GNU libiconv.
1192         * modules/uniwidth/width: New file.
1193
1194         * lib/uniwidth.h: New file, from GNU libiconv.
1195         * modules/uniwidth/base: New file.
1196
1197 2007-07-07  Bruno Haible  <bruno@clisp.org>
1198
1199         * lib/uniname.h: New file, from GNU gettext.
1200         * lib/uniname/gen-uninames.lisp: New file, from GNU gettext.
1201         * lib/uniname/uninames.h: New file, from GNU gettext.
1202         * lib/uniname/uniname.c: New file, from GNU gettext.
1203         * tests/uniname/test-uninames.sh: New file.
1204         * tests/uniname/test-uninames.c: New file, from GNU gettext.
1205         * tests/uniname/UnicodeDataNames.txt: New file, from GNU gettext.
1206         * modules/uniname/base: New file.
1207         * modules/uniname/uniname: New file.
1208         * modules/uniname/uniname-tests: New file.
1209         * MODULES.html.sh (Unicode string functions): Add the new modules.
1210
1211 2007-07-06  Bruno Haible  <bruno@clisp.org>
1212
1213         * doc/Makefile (TEXI2HTML): Specify a --reference-limit.
1214
1215 2007-07-06  Bruno Haible  <bruno@clisp.org>
1216
1217         * lib/sys_time_.h: Use a recursion-safe inclusion guard rather than
1218         a split double-inclusion guard. Needed for cygwin, where <sys/time.h>
1219         includes <cygwin/sys_time.h> which includes <sys/select.h> which
1220         include <sys/time.h>.
1221         Reported by Eric Blake.
1222
1223 2007-07-06  Eric Blake  <ebb9@byu.net>
1224
1225         Fix testing canonicalize on cygwin.
1226         * modules/canonicalize-lgpl-tests (test_canonicalize_lgpl_LDADD):
1227         Revert patch from 2007-06-19.
1228         * tests/test-canonicalize-lgpl.c (main): Instead, skip test when
1229         canonicalize module is also in use.
1230         * tests/test-canonicalize.c: New file.
1231         * tests/test-canonicalize.sh: Likewise.
1232         * modules/canonicalize-tests: Likewise.
1233
1234 2007-07-06  Jim Meyering  <jim@meyering.net>
1235
1236         * lib/getugroups.c (getugroups): Detect getgrent failure.
1237         Adjust comment to reflect reality: this function may return -1.
1238
1239 2007-07-05  Sergey Poznyakoff  <gray@gnu.org.ua>
1240
1241         * build-aux/bootstrap (TP_URL,get_translations): Update to use
1242         the new TP address.
1243         (usage): Fix typo
1244         (gnulib_mk): New variable.
1245
1246 2007-07-05  Jim Meyering  <jim@meyering.net>
1247
1248         Don't let endgrent clobber errno, no matter how improbable.
1249         * lib/getugroups.c (getugroups): Save and restore errno around
1250         endgrent call.
1251
1252         Close the group DB even when failing with 2^31 or more members.
1253         * lib/getugroups.c (getugroups): Don't return without calling endgrent.
1254
1255 2007-07-04  Jim Meyering  <jim@meyering.net>
1256
1257         * lib/getugroups.h: New file.
1258         * lib/getugroups.c: Include "getugroups.h".
1259         Remove uses of "register" keyword.
1260         Move local variable, "cp", down into scope where used.
1261         Give "username" parameter the "const" attribute.
1262         * modules/getugroups (Files): Add lib/getugroups.h
1263
1264 2007-07-04  Karl Berry  <karl@gnu.org>
1265
1266         * MODULES.html.sh (func_all_modules): Complete rename of
1267         gpl/lgpl to gpl-2.0 and lgpl-2.1, and add gpl-3.0.
1268
1269 2007-07-02  Bruno Haible  <bruno@clisp.org>
1270
1271         * m4/inttypes.m4 (gl_INTTYPES_H): Define __STDC_LIMIT_MACROS in C++
1272         mode, when inttypes.h comes from gnulib.
1273         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
1274
1275 2007-07-02  Simon Josefsson  <simon@josefsson.org>
1276
1277         * NEWS: Mention lgpl module name change.
1278
1279         * modules/lgpl-2.1: Renamed from lgpl.
1280
1281         * NEWS: Mention gpl module name change.
1282
1283         * modules/gpl-3.0: New file, based on gpl-2.0.
1284
1285         * modules/gpl-2.0: Renamed from gpl.
1286
1287         * modules/gpl: Fix filename, doc/gpl.texi is now found at
1288         doc/gpl-2.0.texi.
1289
1290 2007-07-02  Paul Eggert  <eggert@cs.ucla.edu>
1291
1292         * lib/inttypes_.h [defined __cplusplus&&!defined __STDC_LIMIT_MACROS]:
1293         #define __STDC_LIMIT_MACROS temporarily while including
1294         <stdint.h>, so that __STDC_LIMIT_MACROS is defined.
1295         Problem reported by Joel E. Denny in
1296         <http://lists.gnu.org/archive/html/bug-gnulib/2007-07/msg00008.html>.
1297
1298 2007-07-01  Bruno Haible  <bruno@clisp.org>
1299
1300         * lib/unistdio.h: New file.
1301         * lib/unistdio/u-asnprintf.h: New file.
1302         * lib/unistdio/u-asprintf.h: New file.
1303         * lib/unistdio/u-printf-args.c: New file.
1304         * lib/unistdio/u-printf-args.h: New file.
1305         * lib/unistdio/u-printf-parse.h: New file.
1306         * lib/unistdio/u-snprintf.h: New file.
1307         * lib/unistdio/u-sprintf.h: New file.
1308         * lib/unistdio/u-vasprintf.h: New file.
1309         * lib/unistdio/u-vsnprintf.h: New file.
1310         * lib/unistdio/u-vsprintf.h: New file.
1311         * lib/unistdio/ulc-asnprintf.c: New file.
1312         * lib/unistdio/ulc-asprintf.c: New file.
1313         * lib/unistdio/ulc-fprintf.c: New file, based on lib/fprintf.c.
1314         * lib/unistdio/ulc-printf-parse.c: New file.
1315         * lib/unistdio/ulc-snprintf.c: New file.
1316         * lib/unistdio/ulc-sprintf.c: New file.
1317         * lib/unistdio/ulc-vasnprintf.c: New file.
1318         * lib/unistdio/ulc-vasprintf.c: New file.
1319         * lib/unistdio/ulc-vfprintf.c: New file, based on lib/vfprintf.c.
1320         * lib/unistdio/ulc-vsnprintf.c: New file.
1321         * lib/unistdio/ulc-vsprintf.c: New file.
1322         * lib/unistdio/u8-asnprintf.c: New file.
1323         * lib/unistdio/u8-asprintf.c: New file.
1324         * lib/unistdio/u8-printf-parse.c: New file.
1325         * lib/unistdio/u8-snprintf.c: New file.
1326         * lib/unistdio/u8-sprintf.c: New file.
1327         * lib/unistdio/u8-vasnprintf.c: New file.
1328         * lib/unistdio/u8-vasprintf.c: New file.
1329         * lib/unistdio/u8-vsnprintf.c: New file.
1330         * lib/unistdio/u8-vsprintf.c: New file.
1331         * lib/unistdio/u8-u8-asnprintf.c: New file.
1332         * lib/unistdio/u8-u8-asprintf.c: New file.
1333         * lib/unistdio/u8-u8-snprintf.c: New file.
1334         * lib/unistdio/u8-u8-sprintf.c: New file.
1335         * lib/unistdio/u8-u8-vasnprintf.c: New file.
1336         * lib/unistdio/u8-u8-vasprintf.c: New file.
1337         * lib/unistdio/u8-u8-vsnprintf.c: New file.
1338         * lib/unistdio/u8-u8-vsprintf.c: New file.
1339         * lib/unistdio/u16-asnprintf.c: New file.
1340         * lib/unistdio/u16-asprintf.c: New file.
1341         * lib/unistdio/u16-printf-parse.c: New file.
1342         * lib/unistdio/u16-snprintf.c: New file.
1343         * lib/unistdio/u16-sprintf.c: New file.
1344         * lib/unistdio/u16-vasnprintf.c: New file.
1345         * lib/unistdio/u16-vasprintf.c: New file.
1346         * lib/unistdio/u16-vsnprintf.c: New file.
1347         * lib/unistdio/u16-vsprintf.c: New file.
1348         * lib/unistdio/u16-u16-asnprintf.c: New file.
1349         * lib/unistdio/u16-u16-asprintf.c: New file.
1350         * lib/unistdio/u16-u16-snprintf.c: New file.
1351         * lib/unistdio/u16-u16-sprintf.c: New file.
1352         * lib/unistdio/u16-u16-vasnprintf.c: New file.
1353         * lib/unistdio/u16-u16-vasprintf.c: New file.
1354         * lib/unistdio/u16-u16-vsnprintf.c: New file.
1355         * lib/unistdio/u16-u16-vsprintf.c: New file.
1356         * lib/unistdio/u32-asnprintf.c: New file.
1357         * lib/unistdio/u32-asprintf.c: New file.
1358         * lib/unistdio/u32-printf-parse.c: New file.
1359         * lib/unistdio/u32-snprintf.c: New file.
1360         * lib/unistdio/u32-sprintf.c: New file.
1361         * lib/unistdio/u32-vasnprintf.c: New file.
1362         * lib/unistdio/u32-vasprintf.c: New file.
1363         * lib/unistdio/u32-vsnprintf.c: New file.
1364         * lib/unistdio/u32-vsprintf.c: New file.
1365         * lib/unistdio/u32-u32-asnprintf.c: New file.
1366         * lib/unistdio/u32-u32-asprintf.c: New file.
1367         * lib/unistdio/u32-u32-snprintf.c: New file.
1368         * lib/unistdio/u32-u32-sprintf.c: New file.
1369         * lib/unistdio/u32-u32-vasnprintf.c: New file.
1370         * lib/unistdio/u32-u32-vasprintf.c: New file.
1371         * lib/unistdio/u32-u32-vsnprintf.c: New file.
1372         * lib/unistdio/u32-u32-vsprintf.c: New file.
1373         * tests/unistdio/test-ulc-asnprintf1.c: New file.
1374         * tests/unistdio/test-ulc-asnprintf1.h: New file.
1375         * tests/unistdio/test-ulc-printf1.h: New file.
1376         * tests/unistdio/test-ulc-vasnprintf1.c: New file.
1377         * tests/unistdio/test-ulc-vasnprintf2.c: New file.
1378         * tests/unistdio/test-ulc-vasnprintf2.sh: New file.
1379         * tests/unistdio/test-ulc-vasnprintf3.c: New file.
1380         * tests/unistdio/test-ulc-vasnprintf3.sh: New file.
1381         * tests/unistdio/test-ulc-vasprintf1.c: New file.
1382         * tests/unistdio/test-ulc-vsnprintf1.c: New file.
1383         * tests/unistdio/test-ulc-vsprintf1.c: New file.
1384         * tests/unistdio/test-u8-asnprintf1.c: New file.
1385         * tests/unistdio/test-u8-asnprintf1.h: New file.
1386         * tests/unistdio/test-u8-printf1.h: New file.
1387         * tests/unistdio/test-u8-vasnprintf1.c: New file.
1388         * tests/unistdio/test-u8-vasnprintf2.c: New file.
1389         * tests/unistdio/test-u8-vasnprintf2.sh: New file.
1390         * tests/unistdio/test-u8-vasnprintf3.c: New file.
1391         * tests/unistdio/test-u8-vasnprintf3.sh: New file.
1392         * tests/unistdio/test-u8-vasprintf1.c: New file.
1393         * tests/unistdio/test-u8-vsnprintf1.c: New file.
1394         * tests/unistdio/test-u8-vsprintf1.c: New file.
1395         * tests/unistdio/test-u16-asnprintf1.c: New file.
1396         * tests/unistdio/test-u16-asnprintf1.h: New file.
1397         * tests/unistdio/test-u16-printf1.h: New file.
1398         * tests/unistdio/test-u16-vasnprintf1.c: New file.
1399         * tests/unistdio/test-u16-vasnprintf2.c: New file.
1400         * tests/unistdio/test-u16-vasnprintf2.sh: New file.
1401         * tests/unistdio/test-u16-vasnprintf3.c: New file.
1402         * tests/unistdio/test-u16-vasnprintf3.sh: New file.
1403         * tests/unistdio/test-u16-vasprintf1.c: New file.
1404         * tests/unistdio/test-u16-vsnprintf1.c: New file.
1405         * tests/unistdio/test-u16-vsprintf1.c: New file.
1406         * tests/unistdio/test-u32-asnprintf1.c: New file.
1407         * tests/unistdio/test-u32-asnprintf1.h: New file.
1408         * tests/unistdio/test-u32-printf1.h: New file.
1409         * tests/unistdio/test-u32-vasnprintf1.c: New file.
1410         * tests/unistdio/test-u32-vasnprintf2.c: New file.
1411         * tests/unistdio/test-u32-vasnprintf2.sh: New file.
1412         * tests/unistdio/test-u32-vasnprintf3.c: New file.
1413         * tests/unistdio/test-u32-vasnprintf3.sh: New file.
1414         * tests/unistdio/test-u32-vasprintf1.c: New file.
1415         * tests/unistdio/test-u32-vsnprintf1.c: New file.
1416         * tests/unistdio/test-u32-vsprintf1.c: New file.
1417         * modules/unistdio/base: New file.
1418         * modules/unistdio/u-printf-args: New file.
1419         * modules/unistdio/ulc-asnprintf: New file.
1420         * modules/unistdio/ulc-asprintf: New file.
1421         * modules/unistdio/ulc-fprintf: New file.
1422         * modules/unistdio/ulc-printf-parse: New file.
1423         * modules/unistdio/ulc-snprintf: New file.
1424         * modules/unistdio/ulc-sprintf: New file.
1425         * modules/unistdio/ulc-vasnprintf: New file.
1426         * modules/unistdio/ulc-vasprintf: New file.
1427         * modules/unistdio/ulc-vfprintf: New file.
1428         * modules/unistdio/ulc-vsnprintf: New file.
1429         * modules/unistdio/ulc-vsprintf: New file.
1430         * modules/unistdio/u8-asnprintf: New file.
1431         * modules/unistdio/u8-asprintf: New file.
1432         * modules/unistdio/u8-printf-parse: New file.
1433         * modules/unistdio/u8-snprintf: New file.
1434         * modules/unistdio/u8-sprintf: New file.
1435         * modules/unistdio/u8-vasnprintf: New file.
1436         * modules/unistdio/u8-vasprintf: New file.
1437         * modules/unistdio/u8-vsnprintf: New file.
1438         * modules/unistdio/u8-vsprintf: New file.
1439         * modules/unistdio/u8-u8-asnprintf: New file.
1440         * modules/unistdio/u8-u8-asprintf: New file.
1441         * modules/unistdio/u8-u8-snprintf: New file.
1442         * modules/unistdio/u8-u8-sprintf: New file.
1443         * modules/unistdio/u8-u8-vasnprintf: New file.
1444         * modules/unistdio/u8-u8-vasprintf: New file.
1445         * modules/unistdio/u8-u8-vsnprintf: New file.
1446         * modules/unistdio/u8-u8-vsprintf: New file.
1447         * modules/unistdio/u16-asnprintf: New file.
1448         * modules/unistdio/u16-asprintf: New file.
1449         * modules/unistdio/u16-printf-parse: New file.
1450         * modules/unistdio/u16-snprintf: New file.
1451         * modules/unistdio/u16-sprintf: New file.
1452         * modules/unistdio/u16-vasnprintf: New file.
1453         * modules/unistdio/u16-vasprintf: New file.
1454         * modules/unistdio/u16-vsnprintf: New file.
1455         * modules/unistdio/u16-vsprintf: New file.
1456         * modules/unistdio/u16-u16-asnprintf: New file.
1457         * modules/unistdio/u16-u16-asprintf: New file.
1458         * modules/unistdio/u16-u16-snprintf: New file.
1459         * modules/unistdio/u16-u16-sprintf: New file.
1460         * modules/unistdio/u16-u16-vasnprintf: New file.
1461         * modules/unistdio/u16-u16-vasprintf: New file.
1462         * modules/unistdio/u16-u16-vsnprintf: New file.
1463         * modules/unistdio/u16-u16-vsprintf: New file.
1464         * modules/unistdio/u32-asnprintf: New file.
1465         * modules/unistdio/u32-asprintf: New file.
1466         * modules/unistdio/u32-printf-parse: New file.
1467         * modules/unistdio/u32-snprintf: New file.
1468         * modules/unistdio/u32-sprintf: New file.
1469         * modules/unistdio/u32-vasnprintf: New file.
1470         * modules/unistdio/u32-vasprintf: New file.
1471         * modules/unistdio/u32-vsnprintf: New file.
1472         * modules/unistdio/u32-vsprintf: New file.
1473         * modules/unistdio/u32-u32-asnprintf: New file.
1474         * modules/unistdio/u32-u32-asprintf: New file.
1475         * modules/unistdio/u32-u32-snprintf: New file.
1476         * modules/unistdio/u32-u32-sprintf: New file.
1477         * modules/unistdio/u32-u32-vasnprintf: New file.
1478         * modules/unistdio/u32-u32-vasprintf: New file.
1479         * modules/unistdio/u32-u32-vsnprintf: New file.
1480         * modules/unistdio/u32-u32-vsprintf: New file.
1481         * modules/unistdio/ulc-asnprintf-tests: New file.
1482         * modules/unistdio/ulc-vasnprintf-tests: New file.
1483         * modules/unistdio/ulc-vasprintf-tests: New file.
1484         * modules/unistdio/ulc-vsnprintf-tests: New file.
1485         * modules/unistdio/ulc-vsprintf-tests: New file.
1486         * modules/unistdio/u8-asnprintf-tests: New file.
1487         * modules/unistdio/u8-vasnprintf-tests: New file.
1488         * modules/unistdio/u8-vasprintf-tests: New file.
1489         * modules/unistdio/u8-vsnprintf-tests: New file.
1490         * modules/unistdio/u8-vsprintf-tests: New file.
1491         * modules/unistdio/u16-asnprintf-tests: New file.
1492         * modules/unistdio/u16-vasnprintf-tests: New file.
1493         * modules/unistdio/u16-vasprintf-tests: New file.
1494         * modules/unistdio/u16-vsnprintf-tests: New file.
1495         * modules/unistdio/u16-vsprintf-tests: New file.
1496         * modules/unistdio/u32-asnprintf-tests: New file.
1497         * modules/unistdio/u32-vasnprintf-tests: New file.
1498         * modules/unistdio/u32-vasprintf-tests: New file.
1499         * modules/unistdio/u32-vsnprintf-tests: New file.
1500         * modules/unistdio/u32-vsprintf-tests: New file.
1501         * MODULES.html.sh (Unicode string functions): Add the new modules.
1502
1503 2007-07-01  Bruno Haible  <bruno@clisp.org>
1504
1505         * lib/sprintf.c (sprintf): Limit the available length estimation,
1506         to avoid address wraparound.
1507         * lib/vsprintf.c (vsprintf): Likewise.
1508         * modules/sprintf-posix (Dependencies): Add stdint.
1509         * modules/vsprintf-posix (Dependencies): Likewise.
1510
1511 2007-07-01  Bruno Haible  <bruno@clisp.org>
1512
1513         * gnulib-tool (self_abspathname): Determine PATH_SEPARATOR and handle
1514         Windows PATH as well. Conservative double-quoting. Comments.
1515
1516 2007-07-01  Bruno Haible  <bruno@clisp.org>
1517             Eric Blake  <ebb9@byu.net>
1518             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1519
1520         * gnulib-tool (self_abspathname): Fix algorithm to cope with
1521         empty components in $PATH, denoting '.'.
1522
1523 2007-07-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1524
1525         * gnulib-tool: Fix indentation.
1526         (func_create_megatestdir): Likewise.
1527         Report by Bruno Haible.
1528
1529 2007-06-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1530
1531         Sync from Automake.
1532         * build-aux/gnupload: Fix shell portability issues with for loops.
1533         Report by Karl Berry.
1534
1535 2007-06-29  Simon Josefsson  <simon@josefsson.org>
1536
1537         * build-aux/maint.mk (POURL): Use translationproject.org.
1538
1539 2007-06-27  Simon Josefsson  <simon@josefsson.org>
1540             Bruno Haible  <bruno@clisp.org>
1541
1542         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Require gl_HEADER_SYS_SOCKET
1543         before using HAVE_WS2TCPIP_H. Check for gai_strerror through an
1544         explicit link test, rather than AC_REPLACE_FUNCS - for mingw.
1545         (gl_PREREQ_GETADDRINFO): Require gl_HEADER_SYS_SOCKET before using
1546         HAVE_SYS_SOCKET_H and HAVE_WS2TCPIP_H.
1547
1548 2007-06-27  Bruno Haible  <bruno@clisp.org>
1549
1550         * build-aux/config.rpath: Upgrade to libtool-1.5.24.
1551         * build-aux/config.libpath: Upgrade to libtool-1.5.24.
1552
1553 2007-06-26  Karl Berry  <karl@gnu.org>
1554
1555         * MODULES.html.sh: remove xreadlink-with-size.
1556
1557 2007-06-23  Paul Eggert  <eggert@cs.ucla.edu>
1558
1559         * lib/time_.h: Port to Solaris 8 with Sun Studio 11, using a
1560         method that I hope also handles the double-include problem noted
1561         by Bruno Haible in
1562         <http://lists.gnu.org/archive/html/bug-gnulib/2007-05/msg00186.html>.
1563
1564 2007-06-23  Bruno Haible  <bruno@clisp.org>
1565
1566         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
1567         Don't let the 'mostlyclean' target fail if the last subdirectory could
1568         not be removed.
1569         Reported by Karl Berry.
1570
1571 2007-06-23  Bruno Haible  <bruno@clisp.org>
1572
1573         * gnulib-tool (echo): Add a speedier workaround for ksh.
1574         * tests/test-echo.sh: Likewise.
1575
1576 2007-06-23  Bruno Haible  <bruno@clisp.org>
1577
1578         * gnulib-tool (echo): Add workarounds also for bash versions < 2.04.
1579         * tests/test-echo.sh: Likewise.
1580
1581 2007-06-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1582
1583         * gnulib-tool (IFS): Initialize early, so we don't set it to
1584         empty later.
1585         (self_abspathname): Rewrite algorithm to set it, reindent.
1586         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am)
1587         (func_create_megatestdir): Merge some sed scripts.
1588
1589 2007-06-23  Paul Eggert  <eggert@cs.ucla.edu>
1590
1591         * m4/include_next.m4 (gl_CHECK_NEXT_HEADERS): Check some typos
1592         exposed by Sun Studio 11 cc on Solaris 8.
1593
1594 2007-06-22  Bruno Haible  <bruno@clisp.org>
1595
1596         * gnulib-tool (echo): Ensure the echo primitive does not interpret
1597         backslashes.
1598         * tests/test-echo.sh: New file.
1599
1600 2007-06-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1601
1602         * gnulib-tool (func_add_or_update, func_create_testdir): Do not
1603         simplify `sed_replace_build_aux' scripts, they are portable but
1604         echoing them with `echo' is not.
1605         Report and analysis by Fernando Ferreira <fernando.prog@netcabo.pt>.
1606
1607 2007-06-21  Karl Berry  <karl@gnu.org>
1608
1609         * config/srclist.txt: guess we can't handle the licenses via
1610         srclist at the moment.
1611
1612 2007-06-21  Paul Eggert  <eggert@cs.ucla.edu>
1613
1614         * MODULES.html.sh: Add include_next.
1615         * modules/include_next: New file.
1616
1617 2007-06-20  Paul Eggert  <eggert@cs.ucla.edu>
1618
1619         * m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
1620         INCLUDE_NEXT.
1621         (gl_CHECK_NEXT_HEADERS): New macro.
1622         * m4/fcntl_h.m4 (gl_FCNTL_H): use gl_CHECK_NEXT_HEADERS instead of
1623         the obsolescent gl_ABSOLUTE_HEADER.
1624         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Likewise.
1625         * m4/float_h.m4 (gl_FLOAT_H): Likewise.
1626         * m4/iconv_h.m4 (gl_ICONV_H): Likewise.
1627         * m4/inttypes.m4 (gl_INTTYPES_H): Likewise.
1628         * m4/locale_h.m4 (gl_LOCALE_H): Likewise.
1629         * m4/math_h.m4 (gl_MATH_H): Likewise.
1630         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Likewise.
1631         * m4/search_h.m4 (gl_SEARCH_H): Likewise.
1632         * m4/signal_h.m4 (gl_SIGNAL_H): Likewise.
1633         * m4/stdint.m4 (gl_STDINT_H): Likewise.
1634         * m4/stdio_h.m4 (gl_STDIO_H): Likewise.
1635         * m4/stdlib_h.m4 (gl_STDLIB_H): Likewise.
1636         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Likewise.
1637         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise.
1638         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Likewise.
1639         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Likewise.
1640         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Likewise.
1641         * m4/sysexits.m4 (gl_SYSEXITS): Likewise.
1642         * m4/time_h.m4 (gl_HEADER_TIME_H_BODY): Likewise.
1643         * m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
1644         * m4/wchar.m4 (gl_WCHAR_H): Likewise.
1645         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
1646         * m4/inttypes.m4 (gl_INTTYPES_H): Define
1647         _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H to avoid the problem of unclean
1648         builds, since ABSOLUTE_INTTYPES_H is no longer being defined.
1649         * m4/stdint.m4 (gl_STDINT_H): Likewise, for
1650         _GL_JUST_INCLUDE_SYSTEM_STDINT_H.
1651         * lib/fcntl_.h: Use @INCLUDE_NEXT@ @NEXT_foo_H@
1652         rather than @HAVE_INCLUDE_NEXT@ and @ABSOLUTE_foo_H@.
1653         * lib/float_.h: Likewise.
1654         * lib/inttypes_.h: Likewise.
1655         * lib/math_.h: Likewise.
1656         * lib/search_.h: Likewise.
1657         * lib/signal_.h: Likewise.
1658         * lib/stdint_.h: Likewise.
1659         * lib/stdio_.h: Likewise.
1660         * lib/stdlib_.h: Likewise.
1661         * lib/string_.h: Likewise.
1662         * lib/sys_stat_.h: Likewise.
1663         * lib/sys_time_.h: Likewise.
1664         * lib/time_.h: Likewise.
1665         * lib/unistd_.h: Likewise.
1666         * lib/wchar_.h: Likewise.
1667         * lib/wctype_.h: Likewise.
1668         * lib/dirent_.h: Likewise.
1669         * lib/iconv_.h: Likewise.
1670         * lib/locale_.h: Likewise.
1671         * lib/netinet_in_.h: Likewise.
1672         * lib/sys_select_.h: Likewise.
1673         * lib/sys_socket_.h: Likewise.
1674         * lib/sysexits_.h: Likewise.
1675         * modules/fcntl (Depends-on): Depend on include_next, not
1676         absolute_header.
1677         (Makefile): Substitute INCLUDE_NEXT and NEXT_foo_H, not
1678         HAVE_INCLUDE_NEXT and ABSOLUTE_foo_H.
1679         * modules/fchdir: Likewise.
1680         * modules/float: Likewise.
1681         * modules/iconv_open: Likewise.
1682         * modules/inttypes: Likewise.
1683         * modules/locale: Likewise.
1684         * modules/math: Likewise.
1685         * modules/netinet_in: Likewise.
1686         * modules/search: Likewise.
1687         * modules/signal: Likewise.
1688         * modules/stdint: Likewise.
1689         * modules/stdio: Likewise.
1690         * modules/stdlib: Likewise.
1691         * modules/string: Likewise.
1692         * modules/sys_select: Likewise.
1693         * modules/sys_socket: Likewise.
1694         * modules/sys_stat: Likewise.
1695         * modules/sys_time: Likewise.
1696         * modules/sysexits: Likewise.
1697         * modules/time: Likewise.
1698         * modules/unistd: Likewise.
1699         * modules/wchar: Likewise.
1700         * modules/wctype: Likewise.
1701         * modules/sys_stat: Change maintainer to "all".
1702         * modules/unistd: Likewise.
1703
1704 2007-06-20  Karl Berry  <karl@gnu.org>
1705
1706         * config/srclist.txt: track www changes in license files.
1707
1708 2007-06-20  Sergey Poznyakoff  <gray@gnu.org.ua>
1709
1710         * build-aux/bootstrap: Remove stray dot.
1711         Make sure build_aux settings are honored when linking
1712         gnulib_extra_files.
1713
1714 2007-06-19  Eric Blake  <ebb9@byu.net>
1715
1716         * modules/canonicalize-lgpl-tests (test_canonicalize_lgpl_LDADD):
1717         Allow compilation on cygwin.
1718
1719 2007-06-19  Jim Meyering  <jim@meyering.net>
1720
1721         xreadlink-with-size: Remove module.  No longer used.
1722         Ex-callers now use xreadlink or mreadlink-with-size.
1723         * modules/xreadlink-with-size: Remove module.
1724         * lib/xreadlink-with-size.c: Remove file.
1725         * lib/xreadlink.h (xreadlink_with_size): Remove prototype.
1726         (xreadlink): Remove inaccurate comment.  The one in xreadlink.c,
1727         just before the function definition *is* accurate.
1728
1729         Eliminate one way canonicalize_filename_mode could exit.
1730         * lib/canonicalize.c (canonicalize_filename_mode):
1731         Use mreadlink_with_size, not xreadlink_with_size.
1732
1733 2007-06-18  Paul Eggert  <eggert@cs.ucla.edu>
1734
1735         Detect porting problems to FreeBSD/arm, which has time_t wider than
1736         long int.  Original problem reported for GNU diff by Xin Li in
1737         <http://lists.gnu.org/archive/html/bug-gnu-utils/2007-06/msg00091.html>.
1738         * modules/getdate (Depends-on): Add intprops, verify.
1739         * lib/getdate.y: Include intprops.h, verify.h.  Verify that time_t
1740         is an integer type no wider than long int.
1741
1742 2007-06-18  Jim Meyering  <jim@meyering.net>
1743
1744         New module: mreadlink-with-size.
1745         * MODULES.html.sh: Add mreadlink-with-size.
1746         * modules/mreadlink-with-size: New module
1747         * modules/canonicalize (Depends-on): Depend on mreadlink-with-size,
1748         not xreadlink-with-size.
1749         * lib/mreadlink-with-size.c, lib/mreadlink.h: New files.
1750
1751 2007-06-16  Bruno Haible  <bruno@clisp.org>
1752
1753         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Catch the MacOS X 10.4 bug.
1754         * doc/functions/frexpl.texi: Document the MacOS X 10.4 bug.
1755         Reported by Gary V. Vaughan <gary@gnu.org>.
1756
1757 2007-06-15  Paul Eggert  <eggert@cs.ucla.edu>
1758
1759         Revamp lchown so that it lives in unistd.h where it belongs.
1760         * lib/lchown.h: Remove.
1761         * lib/dirchownmod.c: Don't include lib/lchown.h.
1762         * lib/fchownat.c: Likewise.
1763         * lib/openat.c: Likewise.
1764         * lib/lchown.c (REPLACE_CHOWN): Define to 0 if the system chown
1765         does not follow symlinks.
1766         (EOPNOTSUPP): Define if not defined.
1767         * lib/unistd_.h (chown): Do not replace if REPLADE_CHOWN
1768         is defined to 0.
1769         (lchown): New decl.
1770         * m4/lchown.m4 (gl_FUNC_LCHOWN): Require gl_UNISTD_H_DEFAULTS.
1771         Do not check for lchown decl.
1772         Set REPLACE_LCHOWN.
1773         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Set GNULIB_LCHOWN,
1774         REPLACE_LCHOWN.
1775         * modules/chown: Make it clear it follows symlinks.
1776         * modules/lchown: Make it clear it doesn't follow symlinks.
1777         (Files): Remove lib/lchown.h
1778         (Depends-on): Add unistd.
1779         (configure.ac): Add gl_UNISTD_MODULE_INDICATOR([lchown]).
1780         (Include): Include <unistd.h>, not "lchown.h".
1781         * modules/unistd (unistd.h): Substitude GNULIB_LCHOWN and
1782         REPLACE_LCHOWN.
1783
1784 2007-06-15  Jim Meyering  <jim@meyering.net>
1785
1786         Change license (GPL to LGPL) of fsusage and dependents.
1787         * modules/fsusage (License): Change to LGPL.
1788         * modules/full-read (License): Likewise.
1789         * modules/full-write (License): Likewise.
1790         * modules/safe-read (License): Likewise.
1791         * modules/safe-write (License): Likewise.
1792
1793 2007-06-14  Ben Pfaff  <blp@gnu.org>
1794
1795         Missing part of allocsa -> malloca transition.
1796         * modules/relocatable-prog-wrapper: gl_ALLOCSA should be
1797         gl_MALLOCA.
1798
1799 2007-06-12  Bruno Haible  <bruno@clisp.org>
1800
1801         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Guess no when cross-compiling
1802         to ia64, x86_64, i386.
1803         Reported by Eric Blake.
1804
1805 2007-06-12  Bruno Haible  <bruno@clisp.org>
1806
1807         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Guess no also when
1808         cross-compiling to x86_64.
1809
1810 2007-06-12  Paul Eggert  <eggert@cs.ucla.edu>
1811
1812         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Fix POSIX sed portability
1813         glitch reported by Ralf Wildenhues in
1814         <http://lists.gnu.org/archive/html/bug-gnulib/2007-06/msg00114.html>.
1815
1816         * m4/regex.m4 (gl_REGEX): Catch a bug with [[:alnum:]_-] reported by
1817         Vin Shelton.
1818
1819 2007-06-11  Bruno Haible  <bruno@clisp.org>
1820
1821         * lib/printf-args.c (PRINTF_FETCHARGS) [ENABLE_UNISTDIO]: Fix NULL
1822         replacement string.
1823         Reported by Eric Blake.
1824
1825 2007-06-10  Bruno Haible  <bruno@clisp.org>
1826
1827         Prepare vasnprintf code for use with Unicode strings.
1828         * lib/printf-args.h (PRINTF_FETCHARGS): New macro.
1829         (arg_type) [ENABLE_UNISTDIO]: Define TYPE_U8_STRING, TYPE_U16_STRING,
1830         TYPE_U32_STRING.
1831         (argument) [ENABLE_UNISTDIO]: Add a_u8_string, a_u16_string,
1832         a_u32_string variants.
1833         (PRINTF_FETCHARGS): Renamed from printf_fetchargs.
1834         * lib/printf-args.c: Don't include config.h and the specification
1835         header if PRINTF_FETCHARGS is already defined.
1836         (PRINTF_FETCHARGS): Renamed from printf_fetchargs.
1837         (PRINTF_FETCHARGS) [ENABLE_UNISTDIO]: Add code for TYPE_U8_STRING,
1838         TYPE_U16_STRING, TYPE_U32_STRING.
1839         * lib/printf-parse.h [ENABLE_UNISTDIO] (u8_directive, u8_directives,
1840         u16_directive, u16_directives, u32_directive, u32_directives): New
1841         types.
1842         (ulc_printf_parse, u8_printf_parse, u16_printf_parse, u32_printf_parse):
1843         New declarations.
1844         * lib/printf-parse.c: Don't include config.h and the specification
1845         header if PRINTF_PARSE is already defined. Eliminate the set of
1846         parameters for WIDE_CHAR_VERSION; the user of this file must provide
1847         them now. Include c-ctype.h.
1848         (PRINTF_PARSE) [ENABLE_UNISTDIO]: Add code implementing the 'U'
1849         directive and CHAR_T_ONLY_ASCII.
1850         * lib/vasnprintf.c: Don't include config.h and the specification header
1851         if VASNPRINTF is already defined.
1852         (DCHAR_IS_TCHAR, DCHAR_CPY): New macros.
1853         (VASNPRINTF): Use PRINTF_FETCHARGS instead of printf_fetchargs. Use
1854         DCHAR_CPY. Handle the case that DCHAR_T and FCHAR_T are not the same
1855         type. Handle the case that TCHAR_T and FCHAR_T are not of the same
1856         size. Handle the case that DCHAR_T and TCHAR_T are not the same type,
1857         add a conversion from TCHAR_T[] to DCHAR_T[], and rework the padding
1858         code accordingly.
1859         (VASNPRINTF) [ENABLE_UNISTDIO]: Implement the 'U' directive. Enable
1860         pad_ourselves also in this case, with the 'c' and 's' directives, and
1861         with a different notion of "width".
1862         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_WITH_EXTRAS): New macros.
1863
1864 2007-06-10  Bruno Haible  <bruno@clisp.org>
1865
1866         * modules/unistr/u32-mbsnlen: New file.
1867         * lib/unistr/u32-mbsnlen.c: New file.
1868
1869         * modules/unistr/u16-mbsnlen: New file.
1870         * lib/unistr/u16-mbsnlen.c: New file.
1871
1872         * modules/unistr/u8-mbsnlen: New file.
1873         * lib/unistr/u8-mbsnlen.c: New file.
1874
1875         * lib/unistr.h (u8_mbsnlen, u16_mbsnlen, u32_mbsnlen): New
1876         declarations.
1877
1878 2007-06-10  Bruno Haible  <bruno@clisp.org>
1879
1880         * lib/string_.h (mbsnlen): New declaration.
1881         * lib/mbsnlen.c: New file.
1882         * m4/mbsnlen.m4: New file.
1883         * modules/mbsnlen: New file.
1884         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Set GNULIB_MBSNLEN.
1885         * modules/string (string.h): Substitute GNULIB_MBSNLEN.
1886         * MODULES.html.sh (Internationalization functions): Add mbsnlen.
1887
1888 2007-06-10  Bruno Haible  <bruno@clisp.org>
1889
1890         * lib/mbslen.c: Include <stdlib.h>, needed for MB_CUR_MAX.
1891
1892 2007-06-10  Bruno Haible  <bruno@clisp.org>
1893
1894         * lib/mbiter.h: Include <stddef.h>, needed for ptrdiff_t.
1895         * lib/mbuiter.h: Likewise.
1896
1897 2007-06-10  Bruno Haible  <bruno@clisp.org>
1898
1899         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Check for _snprintf
1900         declaration.
1901
1902 2007-06-10  Karl Berry  <karl@gnu.org>
1903
1904         * config/srclist.txt: remove gettext entries, Bruno prefers
1905         to update individually.
1906
1907 2007-06-10  Bruno Haible  <bruno@clisp.org>
1908
1909         * lib/vasnprintf.c (VASNPRINTF) [!USE_SNPRINTF]: Remove variable
1910         'maxlen'. Ensure only length + width bytes are allocated, not
1911         length + 1 + width.
1912
1913 2007-06-09  Bruno Haible  <bruno@clisp.org>
1914
1915         * lib/vasnprintf.c (FCHAR_T, DCHAR_T, TCHAR_T): New macros.
1916         (CHAR_T): Remove macro.
1917         (VASNPRINTF): Update.
1918
1919 2007-06-09  Bruno Haible  <bruno@clisp.org>
1920
1921         * MODULES.html.sh (Unicode string functions): Add the new modules.
1922
1923         * modules/uniconv/u32-conv-to-enc: New file.
1924         * lib/uniconv/u32-conv-to-enc.c: New file.
1925         * modules/uniconv/u32-conv-to-enc-tests: New file.
1926         * tests/uniconv/test-u32-conv-to-enc.c: New file.
1927
1928         * modules/uniconv/u16-conv-to-enc: New file.
1929         * lib/uniconv/u16-conv-to-enc.c: New file.
1930         * lib/uniconv/u-conv-to-enc.h: New file.
1931         * modules/uniconv/u16-conv-to-enc-tests: New file.
1932         * tests/uniconv/test-u16-conv-to-enc.c: New file.
1933
1934         * modules/uniconv/u8-conv-to-enc: New file.
1935         * lib/uniconv/u8-conv-to-enc.c: New file.
1936         * modules/uniconv/u8-conv-to-enc-tests: New file.
1937         * tests/uniconv/test-u8-conv-to-enc.c: New file.
1938
1939         * lib/uniconv.h (u8_conv_to_encoding, u16_conv_to_encoding,
1940         u32_conv_to_encoding): New declarations.
1941
1942 2007-06-09  Bruno Haible  <bruno@clisp.org>
1943
1944         * tests/uniconv/test-u32-strconv-to-enc.c (main): Remove unused code.
1945
1946 2007-06-09  Bruno Haible  <bruno@clisp.org>
1947
1948         Rename 'allocsa' -> 'malloca', 'freesa' -> 'freea'.
1949         * modules/malloca: Renamed from modules/allocsa, updated.
1950         * lib/malloca.h: Renamed from lib/allocsa.h, updated.
1951         * lib/malloca.c: Renamed from lib/allocsa.c, updated.
1952         * lib/malloca.valgrind: Renamed from lib/allocsa.valgrind, updated.
1953         * m4/malloca.m4: Renamed from m4/allocsa.m4, updated.
1954         * modules/malloca-tests: Renamed from modules/allocsa-tests, updated.
1955         * tests/test-malloca.c: Renamed from tests/test-allocsa.c, updated.
1956         * modules/xmalloca: Renamed from modules/xallocsa, updated.
1957         * lib/xmalloca.h: Renamed from lib/xallocsa.h, updated.
1958         * lib/xmalloca.c: Renamed from lib/xallocsa.c, updated.
1959         * modules/c-strcasestr (Depends-on): Update.
1960         * lib/c-strcasestr.c: Update.
1961         * modules/c-strstr (Depends-on): Update.
1962         * lib/c-strstr.c: Update.
1963         * modules/canonicalize-lgpl (Depends-on): Update.
1964         * lib/canonicalize-lgpl.c: Update.
1965         * modules/clean-temp (Depends-on): Update.
1966         * lib/clean-temp.c: Update.
1967         * modules/csharpcomp (Depends-on): Update.
1968         * lib/csharpcomp.c: Update.
1969         * modules/csharpexec (Depends-on): Update.
1970         * lib/csharpexec.c: Update.
1971         * modules/javacomp (Depends-on): Update.
1972         * lib/javacomp.c: Update.
1973         * modules/javaexec (Depends-on): Update.
1974         * lib/javaexec.c: Update.
1975         * modules/mbscasestr (Depends-on): Update.
1976         * lib/mbscasestr.c: Update.
1977         * modules/mbsstr (Depends-on): Update.
1978         * lib/mbsstr.c: Update.
1979         * modules/setenv (Depends-on): Update.
1980         * lib/setenv.c: Update.
1981         * modules/strcasestr (Depends-on): Update.
1982         * lib/strcasestr.c: Update.
1983         * modules/striconveha (Depends-on): Update.
1984         * lib/striconveha.c: Update.
1985         * modules/relocatable-prog-wrapper (Files): Update.
1986         * lib/relocwrapper.c: Update.
1987         * build-aux/install-reloc: Update.
1988         * MODULES.html.sh (Memory management functions <stdlib.h>): Update.
1989
1990 2007-06-08  Bruno Haible  <bruno@clisp.org>
1991
1992         Port to uClibc.
1993         * lib/fbufmode.c (fbufmode): Add special code for uClibc.
1994         * lib/fpurge.c (fpurge): Likewise.
1995         * lib/freading.c (freading): Likewise.
1996         * lib/fseeko.c (rpl_fseeko): Likewise.
1997         * lib/fseterr.c (fseterr): Likewise.
1998         * lib/fwriting.c (fwriting): Likewise.
1999         * tests/test-fflush.c (main): Avoid a failure on uClibc.
2000
2001 2007-06-08  Bruno Haible  <bruno@clisp.org>
2002
2003         * m4/intlmacosx.m4: New file, extracted from gettext.m4.
2004         * m4/gettext.m4 (gt_INTL_MACOSX): Remove macro, moved to intlmacosx.m4.
2005         * modules/gettext (Files): Add m4/intlmacosx.m4.
2006
2007 2007-06-07  Bruno Haible  <bruno@clisp.org>
2008
2009         * modules/localename-tests: New file.
2010         * tests/test-localename.c: New file.
2011
2012         New module 'localename'.
2013         * lib/localename.h: New file.
2014         * lib/localename.c: New file, from GNU gettext.
2015         * m4/localename.m4: New file.
2016         * modules/localename: New file.
2017
2018 2007-06-07  Bruno Haible  <bruno@clisp.org>
2019
2020         Work around the lack of <wchar.h> on some builds of uClibc.
2021         * doc/headers/wchar.texi: Update.
2022         * lib/wchar_.h: Include <wchar.h> only if it exists.
2023         * m4/wchar.m4 (gl_WCHAR_H): Check for <wchar.h>. Set HAVE_WCHAR_H.
2024         * m4/stdint.m4 (gl_STDINT_H): Check for <wchar.h>.
2025         (gl_STDINT_TYPE_PROPERTIES): Don't try to include <wchar.h> if it
2026         doesn't exist.
2027         * modules/wchar (wchar.h): Substitute HAVE_WCHAR_H.
2028         * modules/mbfile (Depends-on): Add wchar.
2029         * modules/mbiter (Depends-on): Likewise.
2030         * modules/mbuiter (Depends-on): Likewise.
2031         Reported by Simon Josefsson.
2032
2033 2007-06-06  Paul Eggert  <eggert@cs.ucla.edu>
2034
2035         Work around problem reported by Steven M. Schweda in
2036         <http://lists.gnu.org/archive/html/bug-tar/2007-06/msg00002.html>:
2037         Tru64 5.1B with the Compaq compiler environment installed declares
2038         an 'isblank' function but does not define it in the C library.
2039         * lib/fnmatch.c (isblank): Check for HAVE_ISBLANK, too.
2040         * lib/regex_internal.h (isblank): Likewise.
2041         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for isblank existence.
2042         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
2043
2044 2007-06-05  Bruno Haible  <bruno@clisp.org>
2045
2046         Fix *printf so that it recognizes non-IEEE numbers on i386, x86_64,
2047         ia64.
2048         * modules/printf-safe: New file.
2049         * modules/fprintf-posix (Depends-on): Add printf-safe.
2050         * modules/printf-posix (Depends-on): Likewise.
2051         * modules/snprintf-posix (Depends-on): Likewise.
2052         * modules/sprintf-posix (Depends-on): Likewise.
2053         * modules/vasnprintf-posix (Depends-on): Likewise.
2054         * modules/vasprintf-posix (Depends-on): Likewise.
2055         * modules/vfprintf-posix (Depends-on): Likewise.
2056         * modules/vprintf-posix (Depends-on): Likewise.
2057         * modules/vsnprintf-posix (Depends-on): Likewise.
2058         * modules/vsprintf-posix (Depends-on): Likewise.
2059         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Require
2060         AC_C_BIGENDIAN. Define CHECK_PRINTF_SAFE if printf-safe is used. Test
2061         non-IEEE numbers on i386, x86_64, ia64. When cross-compiling, guess
2062         "no" on i386, x86_64, ia64.
2063         * tests/test-snprintf-posix.h (LDBL80_WORDS): New macro.
2064         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
2065         on i386, x86_64, ia64.
2066         * tests/test-sprintf-posix.h (LDBL80_WORDS): New macro.
2067         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
2068         on i386, x86_64, ia64.
2069         * tests/test-vasnprintf-posix.c: Include float.h.
2070         (LDBL80_WORDS): New macro.
2071         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
2072         on i386, x86_64, ia64.
2073         * tests/test-vasprintf-posix.c: Include float.h.
2074         (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-snprintf-posix.c: Include float.h.
2078         * tests/test-sprintf-posix.c: Likewise.
2079         * tests/test-vsnprintf-posix.c: Likewise.
2080         * tests/test-vsprintf-posix.c: Likewise.
2081
2082 2007-06-05  Bruno Haible  <bruno@clisp.org>
2083
2084         Fix isnanl so that it recognizes non-IEEE numbers on i386, x86_64, ia64.
2085         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Require AC_C_BIGENDIAN. Test
2086         non-IEEE numbers on i386, x86_64, ia64.
2087         (gl_LONG_DOUBLE_EXPONENT_LOCATION): Require AC_C_BIGENDIAN.
2088         * lib/isnan.c (FUNC): Add special code for i386, x86_64, ia64.
2089         * tests/test-isnanl.h: Include float.h.
2090         (main): Check also non-IEEE numbers on i386, x86_64, ia64.
2091
2092 2007-06-05  Bruno Haible  <bruno@clisp.org>
2093
2094         * lib/vasnprintf.c (VASNPRINTF): Do the extra handling of NaN and Inf
2095         also the %a / %A. Handle the %a / %A code before this extra handling.
2096
2097 2007-06-05  Bruno Haible  <bruno@clisp.org>
2098
2099         * lib/vasnprintf.c [NEED_PRINTF_LONG_DOUBLE ||
2100         NEED_PRINTF_INFINITE_LONG_DOUBLE]: Include fpucw.h.
2101
2102 2007-06-05  Bruno Haible  <bruno@clisp.org>
2103
2104         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE): Fix
2105         typo in variable name.
2106
2107 2007-06-05  Eric Blake  <ebb9@byu.net>
2108
2109         * m4/lseek.m4 (gl_FUNC_LSEEK): Work when cross-compiling.
2110         Reported by Simon Josefsson.
2111
2112 2007-06-04  Bruno Haible  <bruno@clisp.org>
2113
2114         Avoid test failures on some PowerPC platforms.
2115         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP):
2116         Define differently for PowerPC.
2117         * tests/test-frexpl.c (MIN_NORMAL_EXP): Likewise.
2118         Reported by Gary V. Vaughan <gary@gnu.org>.
2119
2120 2007-06-02  Bruno Haible  <bruno@clisp.org>
2121
2122         Fix test-stdint failure on FreeBSD/ia64.
2123         * m4/stdint.m4 (gl_STDINT_H): Check the values of PTRDIFF_MIN,
2124         PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN,
2125         WCHAR_MAX, WINT_MIN, WINT_MAX entirely, not only for plausibility.
2126         * doc/headers/stdint.texi: Update.
2127
2128 2007-06-01  Bruno Haible  <bruno@clisp.org>
2129
2130         * tests/test-binary-io.c (main): Pass a third argument to open().
2131         Reported by Gary V. Vaughan <gary@gnu.org>.
2132
2133 2007-06-01  Bruno Haible  <bruno@clisp.org>
2134
2135         * doc/functions/frexpl.texi: Update for mingw.
2136
2137 2007-06-01  Bruno Haible  <bruno@clisp.org>
2138
2139         * tests/test-lseek.c (main): Disable test of errno for invalid third
2140         argument.
2141         * doc/functions/lseek.texi: Update.
2142         Reported by Gary V. Vaughan <gary@gnu.org>.
2143
2144 2007-05-28  Bruno Haible  <bruno@clisp.org>
2145
2146         * m4/intl.m4 (AM_INTL_SUBDIR): Substitute variables WOE32, WINDRES.
2147
2148 2007-05-31  Eric Blake  <ebb9@byu.net>
2149
2150         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Guess no on mingw when
2151         cross compiling.
2152
2153 2007-05-30  Eric Blake  <ebb9@byu.net>
2154         and Bruno Haible  <bruno@clisp.org>
2155
2156         Work around mingw test failures exposed by m4-1.4.9b.
2157         * m4/stdint.m4 (gl_STDINT_H): Detect mingw bug.
2158         * tests/test-unistd.c: Disable uid_t and git_t tests for the
2159         moment.
2160
2161 2007-05-30  Bruno Haible  <bruno@clisp.org>
2162
2163         * tests/test-lseek.c: Explicitly close file descriptors 0 and 1 before
2164         assuming that they are closed. Needed on HP-UX 11.
2165
2166 2007-05-29  Bruno Haible  <bruno@clisp.org>
2167
2168         Fix a problem with #include_next.
2169         * lib/dirent_.h: Split the double-inclusion guard.
2170         * lib/fcntl_.h: Likewise.
2171         * lib/float_.h: Likewise.
2172         * lib/iconv_.h: Likewise.
2173         * lib/inttypes_.h: Likewise.
2174         * lib/locale_.h: Likewise.
2175         * lib/math_.h: Likewise.
2176         * lib/netinet_in_.h: Likewise.
2177         * lib/search_.h: Likewise.
2178         * lib/signal_.h: Likewise.
2179         * lib/stdint_.h: Likewise.
2180         * lib/stdio_.h: Likewise.
2181         * lib/stdlib_.h: Likewise.
2182         * lib/string_.h: Likewise.
2183         * lib/sys_select_.h: Likewise.
2184         * lib/sys_socket_.h: Likewise.
2185         * lib/sys_stat_.h: Likewise.
2186         * lib/sys_time_.h: Likewise.
2187         * lib/sysexits_.h: Likewise.
2188         * lib/time_.h: Likewise.
2189         * lib/unistd_.h: Likewise.
2190         * lib/wchar_.h: Likewise.
2191         * lib/wctype_.h: Likewise.
2192
2193 2007-05-29  Bruno Haible  <bruno@clisp.org>
2194
2195         * tests/test-unistd.c: Disable the tests for useconds_t and intptr_t
2196         for the moment.
2197
2198 2007-05-29  Bruno Haible  <bruno@clisp.org>
2199
2200         * m4/isnan.m4 (gl_DOUBLE_EXPONENT_LOCATION): Silence the AC_C_BIGENDIAN
2201         invocation.
2202         Reported by Eric Blake.
2203
2204 2007-05-29  Bruno Haible  <bruno@clisp.org>
2205
2206         * m4/isnanf.m4 (gl_FLOAT_EXPONENT_LOCATION): Fix typo in cross-
2207         compiling case.
2208
2209 2007-05-29  Eric Blake  <ebb9@byu.net>
2210             Bruno Haible  <bruno@clisp.org>
2211
2212         * m4/isnanf.m4 (gl_FUNC_ISNANF_NO_LIBM): Avoid syntax error on
2213         cross compiles.
2214
2215 2007-05-28  Eric Blake  <ebb9@byu.net>
2216
2217         * modules/closein-tests (test_closein_LDADD): Support test on
2218         cygwin with libtool.
2219
2220 2007-05-28  Bruno Haible  <bruno@clisp.org>
2221
2222         * tests/uniconv/test-u16-conv-from-enc.c: Remove #ifdef HAVE_CONFIG_H.
2223         * tests/uniconv/test-u16-strconv-from-enc.c: Likewise.
2224         * tests/uniconv/test-u16-strconv-to-enc.c: Likewise.
2225         * tests/uniconv/test-u32-conv-from-enc.c: Likewise.
2226         * tests/uniconv/test-u32-strconv-from-enc.c: Likewise.
2227         * tests/uniconv/test-u32-strconv-to-enc.c: Likewise.
2228         * tests/uniconv/test-u8-conv-from-enc.c: Likewise.
2229         * tests/uniconv/test-u8-strconv-from-enc.c: Likewise.
2230         * tests/uniconv/test-u8-strconv-to-enc.c: Likewise.
2231
2232 2007-05-28  Eric Blake  <ebb9@byu.net>
2233
2234         Unconditionally include <config.h> in unit tests.
2235         * tests/test-alloca-opt.c: Remove #ifdef HAVE_CONFIG_H.
2236         * tests/test-allocsa.c, tests/test-arcfour.c,
2237         tests/test-arctwo.c, tests/test-argmatch.c, tests/test-argp.c,
2238         tests/test-array_list.c, tests/test-array_oset.c,
2239         tests/test-atexit.c, test-avltree_list.c, test-avltree_oset.c,
2240         test-avltreehash_list.c, test-base64.c, test-binary-io.c,
2241         test-c-ctype.c, test-c-strcasecmp.c, test-c-strcasestr.c,
2242         test-c-strncasecmp.c, test-c-strstr.c, test-canonicalize-lgpl.c,
2243         test-carray_list.c, test-crc.c, test-des.c, test-dirname.c,
2244         test-fflush.c, test-fprintf-posix.c, test-gc-arcfour.c,
2245         test-gc-arctwo.c, test-gc-des.c, test-gc-hmac-md5.c,
2246         test-gc-hmac-sha1.c, test-gc-md2.c, test-gc-md4.c, test-gc-md5.c,
2247         test-gc-pbkdf2-sha1.c, test-gc-rijndael.c, test-gc-sha1.c,
2248         test-gc.c, test-getpass.c, test-hmac-md5.c, test-hmac-sha1.c,
2249         test-iconv.c, test-linked_list.c, test-linkedhash_list.c,
2250         test-lock.c, test-mbscasecmp.c, test-mbscasestr1.c,
2251         test-mbscasestr2.c, test-mbscasestr3.c, test-mbscasestr4.c,
2252         test-mbschr.c, test-mbscspn.c, test-mbsncasecmp.c, test-mbspbrk.c,
2253         test-mbspcasecmp.c, test-mbsrchr.c, test-mbsspn.c, test-mbsstr1.c,
2254         test-mbsstr2.c, test-mbsstr3.c, test-md2.c, test-md4.c,
2255         test-md5.c, test-memmem.c, test-printf-posix.c,
2256         test-rbtree_list.c, test-rbtree_oset.c, test-rbtreehash_list.c,
2257         test-read-file.c, test-rijndael.c, test-snprintf-posix.c,
2258         test-snprintf.c, test-sprintf-posix.c, test-stdint.c,
2259         test-strcasestr.c, test-striconv.c, test-striconveh.c,
2260         test-striconveha.c, test-tls.c, test-vasnprintf-posix.c,
2261         test-vasnprintf-posix2.c, test-vasnprintf.c,
2262         test-vasprintf-posix.c, test-vasprintf.c, test-verify.c,
2263         test-vfprintf-posix.c, test-vprintf-posix.c,
2264         test-vsnprintf-posix.c, test-vsnprintf.c, test-vsprintf-posix.c,
2265         test-xvasprintf.c: Likewise.
2266
2267 2007-05-28  Bruno Haible  <bruno@clisp.org>
2268
2269         * gnulib-tool (func_import): Remember the --with-tests command-line
2270         option through the macro gl_WITH_TESTS in the gnulib-cache.m4.
2271         Reported by Eric Blake.
2272
2273 2007-05-28  Bruno Haible  <bruno@clisp.org>
2274
2275         * modules/ftell-tests: New file.
2276         * tests/test-ftell.c: New file, based on tests/test-ftello.c.
2277         * tests/test-ftell.sh: New file, based on tests/test-ftello.sh.
2278
2279         * lib/ftell.c: New file.
2280         * modules/ftell: New file.
2281         * m4/ftell.m4: New file.
2282         * doc/functions/ftell.texi: Update.
2283         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FTELL,
2284         REPLACE_FTELL.
2285         * lib/stdio_.h (rpl_ftell): New declaration.
2286         * modules/stdio (Makefile.am): Substitute also GNULIB_FTELL,
2287         REPLACE_FTELL.
2288
2289 2007-05-28  Eric Blake  <ebb9@byu.net>
2290
2291         * lib/allocsa.h (safe_alloca): Avoid compiler warning.
2292
2293 2007-05-28  Bruno Haible  <bruno@clisp.org>
2294
2295         * modules/fseek-tests: New file.
2296         * tests/test-fseek.c: New file, based on tests/test-fseeko.c.
2297         * tests/test-fseek.sh: New file, based on tests/test-fseeko.sh.
2298
2299         * lib/fseek.c: New file.
2300         * modules/fseek: New file.
2301         * m4/fseek.m4: New file.
2302         * doc/functions/fseek.texi: Update.
2303         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FSEEK,
2304         REPLACE_FSEEK.
2305         * lib/stdio_.h (rpl_fseek): New declaration.
2306         * modules/stdio (Makefile.am): Substitute also GNULIB_FSEEK,
2307         REPLACE_FSEEK.
2308
2309 2007-05-28  Bruno Haible  <bruno@clisp.org>
2310
2311         * lib/stdio_.h (fflush): More comments.
2312
2313 2007-05-28  Bruno Haible  <bruno@clisp.org>
2314
2315         * m4/lseek.m4 (gl_FUNC_LSEEK): When not cross-compiling, perform a real
2316         runtime test.
2317
2318 2007-05-28  Eric Blake  <ebb9@byu.net>
2319
2320         Improve lseek module.
2321         * lib/lseek.c (rpl_lseek): Detect EBADF on mingw.
2322         * lib/unistd_.h (lseek): Scale back link warning message.
2323         * tests/test-lseek.c: Beef up test.
2324         * tests/test-lseek.sh: Exercise more facets of lseek.
2325         Reported by Bruno Haible.
2326
2327 2007-05-28  Bruno Haible  <bruno@clisp.org>
2328
2329         * tests/test-unistd.c: Test all the types that <unistd.h> is expected
2330         to define.
2331
2332 2007-05-27  Bruno Haible  <bruno@clisp.org>
2333
2334         * m4/iconv.m4 (AM_ICONV_LINK): Fix 2007-03-31 patch.
2335
2336 2007-05-27  Bruno Haible  <bruno@clisp.org>
2337
2338         * modules/openmp: New file.
2339         * m4/openmp.m4: New file, taken from autoconf's CVS with changes by
2340         Noah Misch.
2341
2342 2007-05-26  Bruno Haible  <bruno@clisp.org>
2343
2344         * modules/chdir-long (Depends-on): Add fchdir.
2345         * modules/chdir-safer (Depends-on): Likewise.
2346         * modules/fts (Depends-on): Likewise.
2347         * modules/fts-lgpl (Depends-on): Likewise.
2348         * modules/openat (Depends-on): Likewise.
2349         * modules/savewd (Depends-on): Likewise.
2350
2351 2007-05-24  Eric Blake  <ebb9@byu.net>
2352
2353         Fix lseek on mingw.
2354         * modules/lseek: New module.
2355         * m4/lseek.m4: New file.
2356         * lib/lseek.c: New file.
2357         * modules/lseek-tests: New file.
2358         * tests/test-lseek.c: New file.
2359         * tests/test-lseek.sh: New file.
2360         * MODULES.html.sh: Document lseek module.
2361         * modules/fflush (Depends-on): Add lseek, fseeko.
2362         * modules/fseeko (Depends-on): Likewise.
2363         * modules/ftello (Depends-on): Likewise.
2364         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Replace fseek[o] if lseek is
2365         broken.
2366         * m4/ftello.m4 (gl_FUNC_FTELLO): Replace ftell[o] if lseek is
2367         broken.
2368         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Trigger fseeko module.
2369         * lib/fseeko.c (rpl_fseeko): Quit early on non-seekable files.
2370         * lib/ftello.c (rpl_ftello): Likewise.
2371         * tests/test-fseeko.c (main): Test this.
2372         * tests/test-fseeko.sh: Likewise.
2373         * tests/test-ftello.c (main): Likewise.
2374         * tests/test-ftello.sh: Likewise.
2375         * lib/stdio_.h (fseek, ftell): Simplify, since missing fseeko now
2376         implies replacing fseek.
2377         * modules/stdio (Makefile.am): No longer need HAVE_FSEEKO,
2378         HAVE_FTELLO.
2379         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add lseek info.
2380         * modules/unistd (Makefile.am): Likewise.
2381         * lib/unistd_.h (lseek): Declare a replacement.
2382         * doc/functions/lseek.texi (lseek): Document this fix.
2383         * doc/functions/fseek.texi (fseek): Likewise.
2384         * doc/functions/ftell.texi (ftell): Likewise.
2385
2386 2007-05-24  Bruno Haible  <bruno@clisp.org>
2387
2388         * tests/test-vasnprintf-posix.c (test_function): Allow up to 50 bytes
2389         in the printed representation of a NaN.
2390         * tests/test-vasprintf-posix.c (test_function): Likewise.
2391         * tests/test-snprintf-posix.h (test_function): Likewise.
2392         * tests/test-sprintf-posix.h (test_function): Likewise.
2393         Reported by Eric Blake.
2394
2395 2007-05-23  Eric Blake  <ebb9@byu.net>
2396
2397         Fix fseeko/ftello on cygwin 1.5.24.
2398         * doc/functions/fseeko.texi (fseeko): Document the fix.
2399         * doc/functions/ftello.texi (ftello): Document the fix.
2400         * doc/functions/stdin.texi (stdin): Document the cygwin bug.
2401         * doc/functions/stdout.text (stdout): New file.
2402         * doc/functions/stderr.text (stderr): New file.
2403         * doc/gnulib.texi (Function Substitutes): Use new files.
2404         * tests/test-fseeko.c (main): Check for broken fseeko on cygwin
2405         prior to 1.7.0.
2406         * tests/test-ftello.c (main): Likewise for ftello.
2407         * tests/test-fseeko.sh: New file.
2408         * tests/test-ftello.sh: New file.
2409         * modules/fseeko-tests (Makefile.am): Ensure test-fseeko is run
2410         with seekable stdin.
2411         * modules/ftello-tests (Makefile.am): Likewise for test-ftello.
2412         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Detect the cygwin bug.
2413         (gl_REPLACE_FSEEKO): New macro.
2414         * m4/ftello.m4 (gl_FUNC_FTELLO, gl_REPLACE_FTELLO): Likewise.
2415         * modules/fseeko (Files): Distribute fseeko.c.
2416         * modules/ftello (Files): Distribute ftello.c.
2417         * lib/fseeko.c (rpl_fseeko) [__CYGWIN__]: Convert stdin to 64-bit
2418         mode.
2419         * lib/ftello.c (rpl_ftello): New file.
2420         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Allow replacement of
2421         fseeko, ftello.
2422         (gl_STDIN_LARGE_OFFSET): New macro.
2423         * modules/stdio (Makefile.am): Perform the replacement.
2424         * lib/stdio_.h (rpl_fseeko, rpl_ftello): Define when needed.
2425
2426 2007-05-23  Bruno Haible  <bruno@clisp.org>
2427
2428         * lib/stdio_.h (fseeko, ftello): Provide a link warning only if
2429         GNULIB_POSIXCHECK is defined.
2430
2431 2007-05-21  Bruno Haible  <bruno@clisp.org>
2432
2433         * m4/printf.m4 (gl_PRINTF_INFINITE, gl_PRINTF_INFINITE_LONG_DOUBLE):
2434         Check also the output for NaN arguments. When cross-compiling, guess
2435         no on IRIX.
2436         * lib/vasnprintf.c: Update comments.
2437         * tests/test-vasnprintf-posix.c (strisnan): New function.
2438         (test_function): Use it.
2439         * tests/test-vasprintf-posix.c (strisnan): New function.
2440         (test_function): Use it.
2441         * tests/test-snprintf-posix.h (strisnan): New function.
2442         (test_function): Use it.
2443         * tests/test-sprintf-posix.h (strisnan): New function.
2444         (test_function): Use it.
2445         Reported by Eric Blake.
2446
2447 2007-05-20  Bruno Haible  <bruno@clisp.org>
2448
2449         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Add test for large finite
2450         numbers that fails on BeOS.
2451         * doc/functions/frexpl.texi: Update.
2452
2453 2007-05-20  Jim Meyering  <jim@meyering.net>
2454
2455         * NEWS: Mention the incompatible change (s/futimens/gl_futimens/)
2456         forced upon us by glibc-2.6.
2457
2458 2007-05-20  Bruno Haible  <bruno@clisp.org>
2459
2460         Fix *printf result for NaN, Inf on AIX, Solaris, OSF/1.
2461         * m4/printf.m4 (gl_PRINTF_INFINITE): Update cross-compiling guesses.
2462         (gl_PRINTF_INFINITE_LONG_DOUBLE): New macro.
2463         * lib/vasnprintf.c: Use NEED_PRINTF_INFINITE_DOUBLE instead of
2464         NEED_PRINTF_INFINITE.
2465         (is_infinitel): New function.
2466         (VASNPRINTF): Handle NEED_PRINTF_INFINITE_LONG_DOUBLE case.
2467         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE): Renamed from
2468         gl_PREREQ_VASNPRINTF_INFINITE.
2469         (gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE): New macro.
2470         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
2471         gl_PRINTF_INFINITE_LONG_DOUBLE and test its result. Invoke
2472         gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE and
2473         gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE instead of
2474         gl_PREREQ_VASNPRINTF_INFINITE.
2475         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
2476         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
2477         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
2478         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
2479         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
2480         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2481         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
2482         * doc/functions/fprintf.texi: Update.
2483         * doc/functions/printf.texi: Update.
2484         * doc/functions/snprintf.texi: Update.
2485         * doc/functions/sprintf.texi: Update.
2486         * doc/functions/vfprintf.texi: Update.
2487         * doc/functions/vprintf.texi: Update.
2488         * doc/functions/vsnprintf.texi: Update.
2489         * doc/functions/vsprintf.texi: Update.
2490
2491 2007-05-20  Bruno Haible  <bruno@clisp.org>
2492
2493         * m4/frexpl.m4 (gl_FUNC_FREXPL_NO_LIBM): Set REPLACE_FREXPL if frexpl
2494         was not found in libc.
2495         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Likewise.
2496
2497 2007-05-20  Bruno Haible  <bruno@clisp.org>
2498
2499         * tests/test-vasnprintf-posix.c (test_function): Allow NaN to be
2500         printed as "-nan" instead of "nan".
2501         * tests/test-vasprintf-posix.c (test_function): Likewise.
2502         * tests/test-snprintf-posix.h (test_function): Likewise.
2503         * tests/test-sprintf-posix.h (test_function): Likewise.
2504         Needed for HP-UX 11.
2505
2506 2007-05-20  Jim Meyering  <jim@meyering.net>
2507
2508         Fix buggy test for the fchownat-deref bug.
2509         * m4/openat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): Create the dangling
2510         symlink required for the run-test.  Without it, this test would
2511         always declare that fchownat doesn't work, and client code would
2512         unnecessarily use the replacement function with fixed libc.
2513         (gl_FUNC_FCHOWNAT): Eliminate a variable that wasn't initialized.
2514         Reported by Greg Schafer.
2515
2516 2007-05-19  Bruno Haible  <bruno@clisp.org>
2517
2518         * m4/isnanf.m4 (gl_ISNANF_WORKS): New macro.
2519         (gl_FUNC_ISNANF_NO_LIBM): Invoke it.
2520         * lib/isnan.c (FUNC): Use run-time expressions for SGI compiler.
2521         Needed for IRIX 6.5 and Solaris 2.5.1.
2522
2523 2007-05-19  Bruno Haible  <bruno@clisp.org>
2524
2525         * tests/test-vasnprintf-posix.c (have_minus_zero): New function.
2526         (test_function): Skip tests involving -0.0 on platforms where
2527         -0.0 = 0.0.
2528         * tests/test-vasprintf-posix.c (have_minus_zero): New function.
2529         (test_function): Skip tests involving -0.0 on platforms where
2530         -0.0 = 0.0.
2531         * tests/test-snprintf-posix.h (have_minus_zero): New function.
2532         (test_function): Skip tests involving -0.0 on platforms where
2533         -0.0 = 0.0.
2534         * tests/test-sprintf-posix.h (have_minus_zero): New function.
2535         (test_function): Skip tests involving -0.0 on platforms where
2536         -0.0 = 0.0.
2537         * tests/test-fprintf-posix.h (test_function): Remove all -0.0 related
2538         tests.
2539         * tests/test-printf-posix.h (test_function): Likewise.
2540         * tests/test-printf-posix.output: Remove all -0.0 related results.
2541         Needed for IRIX 6.5.
2542
2543 2007-05-19  Bruno Haible  <bruno@clisp.org>
2544
2545         * tests/test-vasnprintf-posix.c (test_function): Allow NaN to be
2546         printed as "nan0x7fffffff" instead of "nan".
2547         * tests/test-vasprintf-posix.c (test_function): Likewise.
2548         * tests/test-snprintf-posix.h (test_function): Likewise.
2549         * tests/test-sprintf-posix.h (test_function): Likewise.
2550         * tests/test-fprintf-posix.h (NaN): Remove macro.
2551         (test_function): Remove all NaN related tests.
2552         * tests/test-printf-posix.h (NaN): Remove macro.
2553         (test_function): Remove all NaN related tests.
2554         * tests/test-printf-posix.output: Remove all NaN related results.
2555         Needed for IRIX 6.5.
2556
2557 2007-05-19  Bruno Haible  <bruno@clisp.org>
2558
2559         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Fix C89 syntax error in test code.
2560         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Likewise.
2561
2562 2007-05-19  Bruno Haible  <bruno@clisp.org>
2563
2564         * lib/float_.h: New file.
2565         * m4/float_h.m4: New file.
2566         * modules/float: New file.
2567         * modules/isnanl (Dependencies): Add float.
2568         * modules/isnanl-nolibm (Dependencies): Likewise.
2569         * modules/mathl (Dependencies): Likewise.
2570         * modules/printf-frexpl (Dependencies): Likewise.
2571         * modules/signbit (Dependencies): Likewise.
2572         * modules/vasnprintf (Dependencies): Likewise.
2573         * doc/headers/float.texi: Update.
2574
2575 2007-05-19  Jim Meyering  <jim@meyering.net>
2576
2577         * lib/utimens.c (gl_futimens): Rename from futimens,
2578         now that glibc-2.6 declares futimens.
2579         * lib/utimens.h: Likewise.
2580
2581 2007-05-19  Bruno Haible  <bruno@clisp.org>
2582
2583         Avoid test failures on mingw.
2584         * tests/test-fprintf-posix.sh: Convert CR/LF to LF in output.
2585         * tests/test-printf-posix.sh: Likewise.
2586         * tests/test-vfprintf-posix.sh: Likewise.
2587         * tests/test-vprintf-posix.sh: Likewise.
2588
2589 2007-05-19  Bruno Haible  <bruno@clisp.org>
2590
2591         Fix *printf result for NaN, Inf, -0.0 on mingw.
2592         * m4/printf.m4 (gl_PRINTF_INFINITE): New macro.
2593         * lib/vasnprintf.c: Include math.h and isnan.h.
2594         (is_infinite_or_zero): New function.
2595         (VASNPRINTF): Fix also the handling of infinite or zero 'double'
2596         values in the %f, %F, %e, %E, %g, %G directives.
2597         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE): New macro.
2598         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
2599         gl_PRINTF_INFINITE and test its result. Invoke
2600         gl_PREREQ_VASNPRINTF_INFINITE.
2601         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
2602         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
2603         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
2604         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
2605         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
2606         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2607         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
2608         * doc/functions/fprintf.texi: Update.
2609         * doc/functions/printf.texi: Update.
2610         * doc/functions/snprintf.texi: Update.
2611         * doc/functions/sprintf.texi: Update.
2612         * doc/functions/vfprintf.texi: Update.
2613         * doc/functions/vprintf.texi: Update.
2614         * doc/functions/vsnprintf.texi: Update.
2615         * doc/functions/vsprintf.texi: Update.
2616
2617 2007-05-19  Bruno Haible  <bruno@clisp.org>
2618
2619         * lib/vasnprintf.c (convert_to_decimal): Add an extra_zeroes argument.
2620         (scale10_round_decimal_long_double): Inline scale10_round_long_double.
2621         Instead of multiplying with 10^k, set extra_zeroes to k.
2622         (scale10_round_long_double): Remove function.
2623
2624 2007-05-18  Bruno Haible  <bruno@clisp.org>
2625
2626         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_ZERO]: Fix logic bug
2627         introduced on 2007-05-06.
2628
2629 2007-05-18  Bruno Haible  <bruno@clisp.org>
2630
2631         * tests/test-vasnprintf-posix.c (test_function): Also test the %e and
2632         %g directives.
2633         * tests/test-vasprintf-posix.c (test_function): Likewise.
2634         * tests/test-snprintf-posix.h (test_function): Likewise.
2635         * tests/test-sprintf-posix.h (test_function): Likewise.
2636
2637 2007-05-18  Bruno Haible  <bruno@clisp.org>
2638
2639         * tests/test-vasnprintf-posix.c (SIZEOF): New macro.
2640         (strmatch): New function.
2641         (test_function): Test the %f directive on numbers of various exponents.
2642         * tests/test-vasprintf-posix.c (SIZEOF): New macro.
2643         (strmatch): New function.
2644         (test_function): Test the %f directive on numbers of various exponents.
2645         * tests/test-snprintf-posix.h (strmatch): New function.
2646         (test_function): Test the %f directive on numbers of various exponents.
2647         * tests/test-sprintf-posix.h (strmatch): New function.
2648         (test_function): Test the %f directive on numbers of various exponents.
2649         * tests/test-snprintf-posix.c (SIZEOF): New macro.
2650         * tests/test-sprintf-posix.c (SIZEOF): New macro.
2651         * tests/test-vsnprintf-posix.c (SIZEOF): New macro.
2652         * tests/test-vsprintf-posix.c (SIZEOF): New macro.
2653
2654 2007-05-18  Bruno Haible  <bruno@clisp.org>
2655
2656         Add support for 'long double' number output.
2657         * m4/printf.m4 (gl_PRINTF_LONG_DOUBLE): New macro.
2658         * lib/vasnprintf.c: Include math.h and float+.h.
2659         (mp_limb_t): New type.
2660         (GMP_LIMB_BITS): New macro.
2661         (mp_twolimb_t): New type.
2662         (GMP_TWOLIMB_BITS): New macro.
2663         (mpn_t): New type.
2664         (multiply, divide, convert_to_decimal, decode_long_double,
2665         scale10_round_long_double, scale10_round_decimal_long_double,
2666         floorlog10l): New functions.
2667         (VASNPRINTF) [NEED_PRINTF_LONG_DOUBLE]: Implement 'long double' support
2668         for the %f, %F, %e, %E, %g, %G directives.
2669         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_LONG_DOUBLE): New macro.
2670         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
2671         gl_PRINTF_LONG_DOUBLE and test its result. Invoke
2672         gl_PREREQ_VASNPRINTF_LONG_DOUBLE.
2673         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
2674         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
2675         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
2676         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
2677         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
2678         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2679         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
2680         * modules/fprintf-posix (Depends-on): Add frexpl-nolibm.
2681         * modules/snprintf-posix (Depends-on): Likewise.
2682         * modules/sprintf-posix (Depends-on): Likewise.
2683         * modules/vasnprintf-posix (Depends-on): Likewise.
2684         * modules/vasprintf-posix (Depends-on): Likewise.
2685         * modules/vfprintf-posix (Depends-on): Likewise.
2686         * modules/vsnprintf-posix (Depends-on): Likewise.
2687         * modules/vsprintf-posix (Depends-on): Likewise.
2688         * modules/vasnprintf (Files): Add lib/float+.h.
2689         * doc/functions/fprintf.texi: Update.
2690         * doc/functions/printf.texi: Update.
2691         * doc/functions/snprintf.texi: Update.
2692         * doc/functions/sprintf.texi: Update.
2693         * doc/functions/vfprintf.texi: Update.
2694         * doc/functions/vprintf.texi: Update.
2695         * doc/functions/vsnprintf.texi: Update.
2696         * doc/functions/vsprintf.texi: Update.
2697
2698 2007-05-18  Bruno Haible  <bruno@clisp.org>
2699
2700         * lib/vasnprintf.c (USE_SNPRINTF): Define to 0 on BeOS.
2701
2702 2007-05-18  Bruno Haible  <bruno@clisp.org>
2703
2704         * lib/vasnprintf.c (VASNPRINTF) [WIN32]: Use %I64d instead of %lld
2705         for printing 64-bit integers. Needed for mingw.
2706
2707 2007-05-18  Bruno Haible  <bruno@clisp.org>
2708
2709         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Invoke
2710         gl_FUNC_FREXPL_WORKS.
2711         * modules/printf-frexpl (Files): Add m4/frexpl.m4.
2712
2713 2007-05-18  Bruno Haible  <bruno@clisp.org>
2714
2715         * modules/frexpl-nolibm-tests: New file.
2716
2717         * modules/frexpl-nolibm: New file.
2718         * m4/frexpl.m4 (gl_FUNC_FREXPL_NO_LIBM): New macro.
2719
2720 2007-05-17  Paul Eggert  <eggert@cs.ucla.edu>
2721
2722         * lib/dirent_.h: Prefer #include_next <foo.h> to #include
2723         @ABSOLUTE_FOO_H@ if @HAVE_INCLUDE_NEXT@.  This works better with
2724         GCC 4.2, which otherwise issues a lot of warnings.
2725         * lib/iconv_.h, lib/locale_.h, lib/netinet_in_.h, lib/sys_select_.h:
2726         * lib/sys_socket_.h, lib/sys_stat_.h, lib/sysexits_.h, lib/unistd_.h:
2727         Likewise.
2728         * modules/fchdir (dirent.h): Substitute @HAVE_INCLUDE_NEXT@.
2729         * modules/iconv_open (iconv.h): Likewise.
2730         * modules/locale (locale.h): Likewise.
2731         * modules/netinet_in (netinet/in.h): Likewise.
2732         * modules/sys_select (sys_select.h): Likewise.
2733         * modules/sys_socket (sys/socket.h): Likewise.
2734         * modules/sys_stat (sys/stat.h): Likewise.
2735         * modules/sysexits (sysexits.h): Likewise.
2736         * modules/unistd (unistd.h): Likewise.
2737
2738 2007-05-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2739
2740         * modules/closein-tests (Makefile.am): Distribute
2741         `test-closein.sh'.
2742
2743 2007-05-17  Bruno Haible  <bruno@clisp.org>
2744
2745         * tests/test-printf-posix.output: Renamed from
2746         tests/test-fprintf-posix.out.
2747         * modules/fprintf-posix-tests: Update.
2748         * modules/printf-posix-tests: Update.
2749         * modules/vfprintf-posix-tests: Update.
2750         * modules/vprintf-posix-tests: Update.
2751         * tests/test-fprintf-posix.sh: Update.
2752         * tests/test-printf-posix.sh: Update.
2753         * tests/test-vfprintf-posix.sh: Update.
2754         * tests/test-vprintf-posix.sh: Update.
2755         Reported by Ralf Wildenhues.
2756
2757 2007-05-16  Paul Eggert  <eggert@cs.ucla.edu>
2758
2759         * lib/fcntl_.h: Prefer #include_next <foo.h> to #include
2760         @ABSOLUTE_FOO_H@ if @HAVE_INCLUDE_NEXT@.  This works better with
2761         GCC 4.2, which otherwise issues a lot of warnings.
2762         * lib/inttypes_.h, lib/math_.h, lib/search_.h, lib/signal_.h:
2763         * lib/stdint_.h, lib/stdio_.h, lib/stdlib_.h, lib/string_.h:
2764         * lib/sys_time_.h, lib/time_.h, lib/wchar_.h, lib/wctype_.h: Likewise.
2765         * lib/stdlib_.h: Don't bother with #pragma GCC system_header, as
2766         it should no longer be needed.
2767         * lib/string_.h: Likewise.
2768         * modules/absolute-header (HAVE_INCLUDE_NEXT): New 'make' define.
2769         * modules/fcntl (fcntl.h): Substitute @HAVE_INCLUDE_NEXT@.
2770         * modules/inttypes (inttypes.h): Likewise.
2771         * modules/math (math.h): Likewise.
2772         * modules/search (search.h): Likewise.
2773         * modules/signal (signal.h): Likewise.
2774         * modules/stdint (stdint.h): Likewise.
2775         * modules/stdio (stdio.h): Likewise.
2776         * modules/stdlib (stdlib.h): Likewise.
2777         * modules/string (string.h): Likewise.
2778         * modules/sys_time (sys/time.h): Likewise.
2779         * modules/time (time.h): Likewise.
2780         * modules/wchar (wchar.h): Likewise.
2781         * modules/wctype (wtype.h): Likewise.
2782
2783 2007-05-16  Thien-Thi Nguyen  <ttn@gnuvola.org>  (tiny change)
2784
2785         * doc/gnulib-tool.texi (CVS Issues): Fix typo.
2786
2787 2007-05-13  Bruno Haible  <bruno@clisp.org>
2788
2789         * stpcpy.m4 (gl_FUNC_STPCPY): Require AC_C_RESTRICT.
2790         * stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
2791         * strsep.m4 (gl_FUNC_STRSEP): Likewise.
2792         * strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
2793         (gl_PREREQ_STRTOK_R): Don't require it here.
2794
2795 2007-05-13  Bruno Haible  <bruno@clisp.org>
2796
2797         * lib/stdlib_.h (mkdtemp, mkstemp): Comment out argument name. Needed
2798         when used in C++ mode.
2799
2800 2007-05-12  Bruno Haible  <bruno@clisp.org>
2801
2802         * lib/linebuffer.h: Tweak doc.
2803         * lib/linebuffer.c: Likewise.
2804
2805 2007-05-12  James Youngman  <jay@gnu.org>
2806
2807         * lib/linebuffer.c (readlinebuffer_delim): New function,
2808         like readlinebuffer, but use a caller-specified delimiter.
2809         (readlinebuffer): Just call readlinebuffer_delim with '\n'
2810         as the delimiter.
2811         * lib/linebuffer.h (readlinebuffer_delim): Declare it.
2812
2813 2007-05-12  Sergey Poznyakoff  <gray@gnu.org.ua>
2814
2815         * m4/openat.m4 (gl_FUNC_OPENAT): Do not require openat-die.
2816         * modules/openat (Files): Remove openat-die.c.
2817         (Depends-on): Add openat-die.
2818         * modules/openat-die: New module.
2819
2820 2007-05-06  Bruno Haible  <bruno@clisp.org>
2821
2822         * m4/printf.m4 (gl_PRINTF_FLAG_GROUPING, gl_VSNPRINTF_ZEROSIZE_C99):
2823         Update with info about Cygwin.
2824         * doc/functions/fprintf.texi: Update.
2825         * doc/functions/printf.texi: Update.
2826         * doc/functions/snprintf.texi: Update.
2827         * doc/functions/sprintf.texi: Update.
2828         * doc/functions/vfprintf.texi: Update.
2829         * doc/functions/vprintf.texi: Update.
2830         * doc/functions/vsnprintf.texi: Update.
2831         * doc/functions/vsprintf.texi: Update.
2832         Reported by Eric Blake.
2833
2834 2007-05-06  Bruno Haible  <bruno@clisp.org>
2835
2836         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_ZERO]: Perform the
2837         padding ourselves for the floating-point directives.
2838         * m4/printf.m4 (gl_PRINTF_FLAG_ZERO): New macro.
2839         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_ZERO): New macro.
2840         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
2841         gl_PRINTF_FLAG_ZERO and test its result. Invoke
2842         gl_PREREQ_VASNPRINTF_FLAG_ZERO.
2843         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
2844         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
2845         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
2846         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
2847         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
2848         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2849         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
2850         * tests/test-snprintf-posix.h (test_function): Also check the width
2851         and some flags in the %f directive.
2852         * tests/test-sprintf-posix.h (test_function): Likewise.
2853         * tests/test-vasnprintf-posix.c (test_function): Likewise.
2854         * tests/test-vasprintf-posix.c (test_function): Likewise.
2855         * doc/functions/fprintf.texi: Update.
2856         * doc/functions/printf.texi: Update.
2857         * doc/functions/snprintf.texi: Update.
2858         * doc/functions/sprintf.texi: Update.
2859         * doc/functions/vfprintf.texi: Update.
2860         * doc/functions/vprintf.texi: Update.
2861         * doc/functions/vsnprintf.texi: Update.
2862         * doc/functions/vsprintf.texi: Update.
2863
2864 2007-05-06  Bruno Haible  <bruno@clisp.org>
2865
2866         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_GROUPING]: Don't
2867         pass the ' flag character to sprintf or snprintf.
2868         * m4/printf.m4 (gl_PRINTF_FLAG_GROUPING): New macro.
2869         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_GROUPING): New macro.
2870         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
2871         gl_PRINTF_FLAG_GROUPING and test its result. Invoke
2872         gl_PREREQ_VASNPRINTF_FLAG_GROUPING.
2873         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
2874         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
2875         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
2876         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
2877         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
2878         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2879         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
2880         * tests/test-snprintf-posix.h (test_function): Also check the grouping
2881         flag.
2882         * tests/test-sprintf-posix.h (test_function): Likewise.
2883         * tests/test-vasnprintf-posix.c (test_function): Likewise.
2884         * tests/test-vasprintf-posix.c (test_function): Likewise.
2885         * doc/functions/fprintf.texi: Update.
2886         * doc/functions/printf.texi: Update.
2887         * doc/functions/snprintf.texi: Update.
2888         * doc/functions/sprintf.texi: Update.
2889         * doc/functions/vfprintf.texi: Update.
2890         * doc/functions/vprintf.texi: Update.
2891         * doc/functions/vsnprintf.texi: Update.
2892         * doc/functions/vsprintf.texi: Update.
2893
2894 2007-05-01  Bruno Haible  <bruno@clisp.org>
2895
2896         * tests/test-argp-2.sh (func_compare): Drop .exe suffix.
2897
2898 2007-05-03  Paul Eggert  <eggert@cs.ucla.edu>
2899
2900         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Use better
2901         comment for D_INO_IN_DIRENT.  Problem reported by James Youngman.
2902
2903 2007-05-02  Paul Eggert  <eggert@cs.ucla.edu>
2904
2905         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Test whether
2906         readdir returns garbage in d_ino.  Problem reported by Kaz Sasayama in
2907         <http://lists.gnu.org/archive/html/bug-gnulib/2007-05/msg00021.html>.
2908
2909 2007-05-02  Sergey Poznyakoff  <gray@gnu.org.ua>
2910
2911         * lib/argp-help.c (struct hol_entry): New member `ord'.
2912         (HOL_ENTRY_PTRCMP): Use ord for comparison
2913         (hol_sort): Initialize ord.
2914
2915 2007-05-01  Bruno Haible  <bruno@clisp.org>
2916
2917         * doc/functions/_Exit_C99.texi: Renamed from doc/functions/_Exit.texi.
2918         Reported by Eric Blake.
2919         * doc/gnulib.texi (Function Substitutes): Update.
2920
2921 2007-05-01  Bruno Haible  <bruno@clisp.org>
2922
2923         * doc/functions.texi: Remove file, now redundant through
2924         doc/functions/*.texi.
2925
2926 2007-05-01  Bruno Haible  <bruno@clisp.org>
2927
2928         * modules/argp (Depends-on): Add sleep.
2929
2930 2007-05-01  Bruno Haible  <bruno@clisp.org>
2931
2932         * modules/sleep-tests: New file.
2933         * tests/test-sleep.c: New file.
2934
2935         * modules/sleep: New file.
2936         * lib/sleep.c: New file.
2937         * m4/sleep.m4: New file.
2938         * lib/unistd_.h (sleep): New declaration.
2939         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_SLEEP,
2940         HAVE_SLEEP.
2941         * modules/unistd (Makefile.am): Substitute GNULIB_SLEEP, HAVE_SLEEP.
2942         * doc/functions/sleep.texi: Document the sleep module.
2943
2944 2007-05-01  Bruno Haible  <bruno@clisp.org>
2945
2946         * lib/sigprocmask.h: Remove file.
2947         * lib/signal_.h: Incorporate the previous contents of sigprocmask.h.
2948         * lib/sigprocmask.c: Include <signal.h> instead of sigprocmask.h.
2949         * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Substitute GNULIB_SIGPROCMASK,
2950         HAVE_POSIX_SIGNALBLOCKING, HAVE_SIGSET_T.
2951         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Require
2952         gl_SIGNAL_H_DEFAULTS. Set HAVE_POSIX_SIGNALBLOCKING as a shell variable.
2953         (gl_PREREQ_SIGPROCMASK): Require gl_SIGNAL_H_DEFAULTS. Set
2954         HAVE_SIGSET_T as a shell variable.
2955         * modules/signal (Makefile.am): Substitute GNULIB_SIGPROCMASK,
2956         HAVE_POSIX_SIGNALBLOCKING, HAVE_SIGSET_T into signal.h.
2957         * modules/sigprocmask (Files): Remove lib/sigprocmask.h.
2958         (Depends-on): Add signal. Remove verify.
2959         (configure.ac): Invoke gl_SIGNAL_MODULE_INDICATOR.
2960         (Include): Mention <signal.h> instead of sigprocmask.h.
2961         * NEWS: Mention the change.
2962         * lib/fatal-signal.c: Don't include sigprocmask.h.
2963
2964 2007-05-01  Bruno Haible  <bruno@clisp.org>
2965
2966         * modules/signal: New file.
2967         * lib/signal_.h: New file.
2968         * m4/signal_h.m4: New file.
2969
2970 2007-05-01  Bruno Haible  <bruno@clisp.org>
2971
2972         * lib/wctype_.h: Test HAVE_ISWCNTRL at configure time.
2973         * m4/wctype.m4 (gl_WCTYPE_H): Substitute HAVE_ISWCNTRL.
2974         * modules/wctype (Makefile.am): Substitute HAVE_ISWCNTRL instead of
2975         HAVE_WCTYPE_CTMP_BUG into wctype.h.
2976
2977 2007-05-01  Bruno Haible  <bruno@clisp.org>
2978
2979         * lib/sys_stat_.h: Test HAVE_LSTAT, HAVE_DECL_MKDIR, HAVE_IO_H at
2980         configure time.
2981         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Substitute HAVE_LSTAT,
2982         HAVE_DECL_MKDIR, HAVE_IO_H via AC_SUBST.
2983         * modules/sys_stat (Makefile.am): Substitute their values into
2984         sys/stat.h.
2985
2986 2007-05-01  Bruno Haible  <bruno@clisp.org>
2987
2988         * lib/glob_.h: Test HAVE_SYS_CDEFS_H at configure time.
2989         * m4/glob.m4 (gl_PREREQ_GLOB): Substitute HAVE_SYS_CDEFS_H via AC_SUBST.
2990         * modules/glob (Makefile.am): Put HAVE_SYS_CDEFS_H value into glob.h.
2991
2992 2007-05-01  Bruno Haible  <bruno@clisp.org>
2993
2994         * doc/header/assert.texi: Undo last change: don't mention the gnulib
2995         'assert' module here.
2996
2997 2007-05-01  Bruno Haible  <bruno@clisp.org>
2998
2999         * doc/functions/*.texi: New files.
3000         * doc/functions/google-ranking.txt: New file.
3001         * doc/gnulib.texi (Function Substitutes): New chapter.
3002         (ctime, inet_ntoa): Remove sections.
3003         * doc/ctime.texi: Remove file.
3004         * doc/inet_ntoa.texi: Remove file.
3005         * doc/Makefile (gnulib.info, gnulib.html, gnulib.dvi): Update
3006         dependencies.
3007         (%.info): New rule, specifying a --reference-limit.
3008
3009 2007-05-01  Bruno Haible  <bruno@clisp.org>
3010
3011         * MODULES.html.sh (posix_functions): Remove 'exec', 'toc'.
3012
3013 2007-05-01  Bruno Haible  <bruno@clisp.org>
3014
3015         * modules/mkdir (Depends-on): Add sys_stat, because sys_stat provides
3016         the portability of 'mkdir' to mingw systems.
3017
3018 2007-05-01  Bruno Haible  <bruno@clisp.org>
3019
3020         * doc/headers/google-ranking.txt: New file.
3021
3022 2007-04-30  Eric Blake  <ebb9@byu.net>
3023
3024         Prefer fseeko to fseek.
3025         * modules/getpass (Depends-on): Add fseeko.
3026         * lib/getpass.c (getpass): Use fseeko, not fseek.
3027
3028 2007-04-30  Sergey Poznyakoff  <gray@gnu.org.ua>
3029
3030         * lib/argp-help.c (hol_entry_cmp): Option sorting algorithm
3031         assumes the sorting is stable, while most qsort implementations
3032         are not.  Use argument addresses to ensure they never compare as
3033         equal.
3034
3035         * tests/test-argp-2.sh (usage-indent test): Fix output
3036         (func_compare): Restore diff options
3037         * tests/test-argp.c: Restore #include "progname.h"
3038
3039 2007-04-29  Bruno Haible  <bruno@clisp.org>
3040
3041         * m4/printf.m4 (gl_VSNPRINTF_ZEROSIZE_C99): New macro.
3042         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
3043         gl_VSNPRINTF_ZEROSIZE_C99. Test gl_cv_func_vsnprintf_zerosize_c99.
3044         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
3045         * modules/snprintf-posix-tests (Files): Add tests/test-snprintf.c.
3046         (configure.ac): Define CHECK_SNPRINTF_POSIX.
3047         (TESTS, check_PROGRAMS): Add test-snprintf.
3048         * modules/vsnprintf-posix-tests (Files): Add tests/test-vsnprintf.c.
3049         (configure.ac): Define CHECK_VSNPRINTF_POSIX.
3050         (TESTS, check_PROGRAMS): Add test-vsnprintf.
3051         * tests/test-snprintf.c (main) [!CHECK_SNPRINTF_POSIX]: Disable
3052         assertions that fail on HP-UX, OSF/1, or IRIX.
3053         * tests/test-vsnprintf.c (main) [!CHECK_VSNPRINTF_POSIX]: Likewise.
3054
3055 2007-04-29  Bruno Haible  <bruno@clisp.org>
3056
3057         * MODULES.html.sh (posix_functions): Remove 'contents'.
3058
3059 2007-04-29  Karl Berry  <karl@gnu.org>
3060
3061         * config/srclist.txt (gendocs_template_min): new entry.
3062
3063 2007-04-29  Bruno Haible  <bruno@clisp.org>
3064
3065         Work around fpurge bug on BSD systems.
3066         * modules/fpurge (Makefile.am): Compile fpurge.c unconditionally.
3067         * m4/fpurge.m4 (gl_FUNC_FPURGE): Don't invoke AC_LIBOBJ.
3068         * lib/fpurge.h (fpurge): Don't handle __fpurge wrapper here. Define
3069         fpurge to rpl_fpurge if the system already has this function.
3070         * lib/fpurge.c (fpurge): Handle also the __fpurge wrapper case and
3071         the case where the system already has this function. Correct invariants
3072         on BSD systems.
3073         * lib/fseeko.c (rpl_fseeko): Update recognition of preceding fflush on
3074         BSD systems.
3075
3076 2007-04-29  Sergey Poznyakoff  <gray@gnu.org.ua>
3077
3078         * lib/argp-help.c (hol_cluster_cmp): Reverse comparison.  Change
3079         proposed by Sven Verdoolaege.
3080
3081         * tests/test-argp.c: Fix option ordering.  Test deeply clustered
3082         options.
3083         * tests/test-argp-2.sh (func_compare): Use diff instead of cmp.
3084         (usage and help tests): Update
3085
3086 2007-04-29  Bruno Haible  <bruno@clisp.org>
3087
3088         * tests/test-fflush.c (main): Use a file of size 17, not 10.
3089         Print more information in case of failure. Disable a test on BeOS.
3090
3091 2007-04-29  Bruno Haible  <bruno@clisp.org>
3092
3093         * tests/**/test-*.[hc] (ASSERT): Use fprintf to show the line number.
3094         This helps debugging on systems on which no gdb is available.
3095
3096 2007-04-29  Bruno Haible  <bruno@clisp.org>
3097
3098         * lib/freading.h: Improve comments.
3099         * lib/fwriting.h: Likewise.
3100         * tests/test-freading.c (main): Don't check freading immediately after
3101         repositioning. Needed for glibc.
3102
3103 2007-04-29  Bruno Haible  <bruno@clisp.org>
3104
3105         * lib/freading.c (freading): Trivial simplification.
3106
3107 2007-04-28  Bruno Haible  <bruno@clisp.org>
3108
3109         * tests/test-fwriting.c (main): Also test the interaction between
3110         fflush and fwriting.
3111         * modules/fwriting-tests (Depends-on): Add fflush.
3112
3113         * tests/test-freading.c (main): Also test the interaction between
3114         fflush and freading.
3115         * modules/freading-tests (Depends-on): Add fflush.
3116
3117 2007-04-28  Bruno Haible  <bruno@clisp.org>
3118
3119         * lib/stdio_.h (fseek, ftell): Provide link warnings suggesting to use
3120         fseeko and ftello.
3121         Suggested by Eric Blake.
3122
3123 2007-04-28  Jim Meyering  <jim@meyering.net>
3124
3125         Avoid false-negative in gl_STDINT_H's C99 conformance test.
3126         * m4/stdint.m4 (gl_STDINT_H): When checking whether stdint.h conforms
3127         to C99, include all of gl_STDINT_INCLUDES, not just <stddef.h>.
3128
3129 2007-04-27  Eric Blake  <ebb9@byu.net>
3130
3131         * doc/headers/assert.texi (assert.h): Document assert module use.
3132
3133 2007-04-27  Bruno Haible  <bruno@clisp.org>
3134
3135         * doc/headers/*.texi: New files.
3136         * doc/gnulib.texi (Header File Substitutes): New chapter.
3137         * doc/Makefile (gnulib.info, gnulib.html, gnulib.dvi): Specify
3138         dependencies.
3139         (standards.info ,standards.html, standards.dvi): Update dependencies.
3140         (mostlyclean, clean): New targets.
3141
3142 2007-04-27  Bruno Haible  <bruno@clisp.org>
3143
3144         * lib/sysexits_.h: Renamed from lib/sysexit_.h.
3145         * modules/sysexits (Files, Makefile.am): Update.
3146
3147         * lib/sys_socket_.h: Renamed from lib/socket_.h.
3148         * modules/sys_socket (Files, Makefile.am): Update.
3149
3150         * lib/sys_stat_.h: Renamed from lib/stat_.h.
3151         * modules/sys_stat (Files, Makefile.am): Update.
3152
3153 2007-04-27  Eric Blake  <ebb9@byu.net>
3154
3155         * lib/freading.h: Improve comments.
3156         * lib/fwriting.h: Likewise.
3157         * lib/fflush.c: Likewise.
3158
3159         Fix closein for mingw.
3160         * modules/closein-tests: Add tests for closein.
3161         * tests/test-closein.c: New file.
3162         * tests/test-closein.sh: Likewise.
3163         * lib/unistd_.h [!SEEK_CUR]: Mingw also needs stdlib.h for _exit.
3164         * lib/closein.c (close_stdin): Don't fflush non-seekable streams.
3165
3166 2007-04-27  Bruno Haible  <bruno@clisp.org>
3167
3168         * lib/inttypes_.h [_DECC]: Don't use #include_next if the compiler
3169         version is < 6.
3170         * lib/math_.h [__DECC]: Likewise.
3171         * lib/stdio_.h [__DECC]: Likewise.
3172         * lib/stdlib_.h [__DECC]: Likewise.
3173         * lib/string_.h [__DECC]: Likewise.
3174         * lib/time_.h [__DECC]: Likewise.
3175         * lib/wchar_.h [__DECC]: Likewise.
3176         * lib/wctype_.h [__DECC]: Likewise.
3177
3178 2007-04-27  Bruno Haible  <bruno@clisp.org>
3179
3180         * tests/test-fbufmode.c (main): Relax test, to avoid failure on mingw.
3181
3182 2007-04-27  Bruno Haible  <bruno@clisp.org>
3183
3184         * lib/fflush.c: Add comments.
3185         * modules/fpurge-tests (Depends-on): Add fflush.
3186         * modules/freadable-tests (Depends-on): Likewise.
3187         * modules/fwritable-tests (Depends-on): Likewise.
3188
3189 2007-04-27  Charles Wilson  <libtool@cwilson.fastmail.fm>
3190
3191         * m4/argz.m4 (gl_FUNC_ARGZ): Use !HAVE_WORKING_ARGZ instead of
3192         SYSTEM_ARGZ_IS_BROKEN.  Also, minor stylistic improvements.
3193         Report by Bruno Haible <bruno@clisp.org>.
3194
3195 2007-04-26  Eric Blake  <ebb9@byu.net>
3196
3197         Fix fflush on mingw.
3198         * modules/fflush (Depends-on): Add freading.
3199         * lib/fflush.c (rpl_fflush): Use freading to avoid losing buffered
3200         but unread data.
3201
3202 2007-04-26  Eric Blake  <ebb9@byu.net>
3203         and Bruno Haible  <bruno@clisp.org>
3204
3205         Implement freading and fwriting.
3206         * lib/freading.c: New file.
3207         * lib/freading.h: Likewise.
3208         * m4/freading.m4: Likewise.
3209         * modules/freading: Likewise.
3210         * modules/freading-tests: Likewise.
3211         * tests/test-freading.c: Likewise.
3212         * lib/fwriting.c: New file.
3213         * lib/fwriting.h: Likewise.
3214         * m4/fwriting.m4: Likewise.
3215         * modules/fwriting: Likewise.
3216         * modules/fwriting-tests: Likewise.
3217         * tests/test-fwriting.c: Likewise.
3218         * MODULES.html.sh (File stream based Input/Output): Mention them.
3219
3220 2007-04-26  Bruno Haible  <bruno@clisp.org>
3221
3222         * lib/stdio_.h (fseeko, ftello): Check that off_t has the same size as
3223         'long' when we assume it.
3224         Suggested by Eric Blake.
3225
3226 2007-04-26  Bruno Haible  <bruno@clisp.org>
3227
3228         Ensure fseeko, ftello are declared on glibc systems.
3229         * modules/fflush (configure.ac-early): Require AC_FUNC_FSEEKO.
3230         * modules/fseeko (configure.ac-early): Likewise.
3231         * modules/ftello (configure.ac-early): Likewise.
3232         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Don't define HAVE_FSEEKO, rely on
3233         AC_FUNC_FSEEKO for this.
3234         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Inline gl_CHECK_FSEEKO.
3235         (gl_CHECK_FSEEKO): Remove macro.
3236
3237 2007-04-26  Bruno Haible  <bruno@clisp.org>
3238
3239         * tests/test-fflush.c (main): Also check the ftell result after
3240         fflush and fseek/fseeko.
3241         * lib/fflush.c (rpl_fflush): For BSD implementations, update the
3242         file descriptor position cache in the stream.
3243         * lib/fseeko.c (rpl_fseeko): Likewise.
3244
3245 2007-04-26  Bruno Haible  <bruno@clisp.org>
3246
3247         * modules/fflush-tests (Depends-on): Add fseeko.
3248
3249 2007-04-25  Charles Wilson  <libtool@cwilson.fastmail.fm>
3250             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3251
3252         * lib/argz_.h: ensure error_t definition is obtained in same
3253         mechanism system argz.h would have.
3254         * m4/argz.m4 (gl_FUNC_ARGZ): add new test to check if $host's
3255         argz facilities are known bad.  Err on the side of caution if
3256         cross-compiling.
3257
3258 2007-04-25  Eric Blake  <ebb9@byu.net>
3259
3260         * lib/fpurge.c (includes): Use stdlib.h for free.
3261         * tests/test-fflush.c (main): Also test fflush-fseeko.
3262
3263 2007-04-25  Bruno Haible  <bruno@clisp.org>
3264
3265         Make fflush+fseek POSIX-compliant on FreeBSD and MacOS X.
3266         * lib/fseeko.c: New file.
3267         * lib/stdio_.h: Include <sys/types.h> when off_t is needed.
3268         (fseeko, fseek): Define to replacements if REPLACE_FFLUSH.
3269         * m4/fseeko.m4 (gl_CHECK_FSEEKO): New macro, extracted from
3270         gl_FUNC_FSEEKO.
3271         (gl_FUNC_FSEEKO): Invoke it.
3272         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Arrange to compile fseeko.c. Invoke
3273         gl_CHECK_FSEEKO. Define HAVE_FSEEKO.
3274         * modules/fflush (Files): Add lib/fseeko.c, m4/fseeko.m4.
3275
3276 2007-04-25  Bruno Haible  <bruno@clisp.org>
3277
3278         * modules/fflush (Depends-on): Add ftello.
3279
3280 2007-04-25  Bruno Haible  <bruno@clisp.org>
3281
3282         * modules/ftello-tests: New file.
3283         * tests/test-ftello.c: New file.
3284
3285         * modules/ftello: New file.
3286         * m4/ftello.m4: New file.
3287         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FTELLO,
3288         HAVE_FTELLO.
3289         * lib/stdio_.h (ftello): New declaration.
3290         * modules/stdio (Makefile.am): Substitute also GNULIB_FTELLO,
3291         HAVE_FTELLO.
3292
3293 2007-04-25  Bruno Haible  <bruno@clisp.org>
3294
3295         * modules/fseeko-tests: New file.
3296         * tests/test-fseeko.c: New file.
3297
3298         * modules/fseeko: New file.
3299         * m4/fseeko.m4: New file.
3300         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FSEEKO,
3301         HAVE_FSEEKO.
3302         * lib/stdio_.h (fseeko): New declaration.
3303         * modules/stdio (Makefile.am): Substitute also GNULIB_FSEEKO,
3304         HAVE_FSEEKO.
3305
3306 2007-04-25  Bruno Haible  <bruno@clisp.org>
3307
3308         * lib/stdio_.h (fflush): Add support for GNULIB_POSIXCHECK.
3309
3310 2007-04-25  Bruno Haible  <bruno@clisp.org>
3311
3312         * lib/unistd_.h: Include <stdio.h> if needed to get the SEEK_* macros.
3313         * tests/test-stdio.c: Check that the various SEEK_* macros are defined.
3314         * tests/test-unistd.c: Likewise.
3315         * tests/test-fcntl.c: Likewise.
3316
3317 2007-04-23  Eric Blake  <ebb9@byu.net>
3318
3319         * lib/fflush.c: Fix missing include.
3320         Reported by Bruno Haible.
3321
3322 2007-04-23  Bruno Haible  <bruno@clisp.org>
3323
3324         * lib/fpurge.c (fpurge) [glibc, BSD]: Free a malloc()ed ungetc buffer.
3325         Reported by Eric Blake.
3326
3327 2007-04-23  Bruno Haible  <bruno@clisp.org>
3328
3329         * lib/fbufmode.c (fbufmode): Port to Solaris/SPARC64.
3330
3331 2007-04-23  Bruno Haible  <bruno@clisp.org>
3332
3333         * lib/fseterr.c (fseterr): Don't hardcode the value of _IOERR.
3334
3335 2007-04-23  Bruno Haible  <bruno@clisp.org>
3336
3337         * tests/test-fbufmode.c (main): Be prepared to a failure of setvbuf.
3338         Needed on HP-UX 11.
3339
3340 2007-04-16  Eric Blake  <ebb9@byu.net>
3341
3342         Make fflush rely on fpurge.
3343         * lib/fflush.c (rpl_fflush): Rely on fpurge module, rather than
3344         open coding all variants.
3345         * modules/fflush (Depends-on): Add fpurge and unistd.
3346         * modules/fflush-tests (Depends-on): Unistd is no longer extra.
3347         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Simplify.
3348
3349         Fix --with-tests compilation on cygwin.
3350         * modules/argmatch-tests (Makefile.am): List gnulib library first
3351         in LDADD.
3352         * modules/argp-tests (Makefile.am): Likewise.
3353         * modules/array-list-tests (Makefile.am): Likewise.
3354         * modules/array-oset-tests (Makefile.am): Likewise.
3355         * modules/avltree-list-tests (Makefile.am): Likewise.
3356         * modules/avltree-oset-tests (Makefile.am): Likewise.
3357         * modules/avltreehash-list-tests (Makefile.am): Likewise.
3358         * modules/carray-list-tests (Makefile.am): Likewise.
3359         * modules/dirname-tests (Makefile.am): Likewise.
3360         * modules/frexp-tests (Makefile.am): Likewise.
3361         * modules/isnanl-tests (Makefile.am): Likewise.
3362         * modules/linked-list-tests (Makefile.am): Likewise.
3363         * modules/linkedhash-list-tests (Makefile.am): Likewise.
3364         * modules/lock-tests (Makefile.am): Likewise.
3365         * modules/rbtree-list-tests (Makefile.am): Likewise.
3366         * modules/rbtree-oset-tests (Makefile.am): Likewise.
3367         * modules/rbtreehash-list-tests (Makefile.am): Likewise.
3368         * modules/tls-tests (Makefile.am): Likewise.
3369         * modules/tsearch-tests (Makefile.am): Likewise.
3370         * modules/xvasprintf-tests (Makefile.am): Likewise.
3371
3372         Fix fpurge for cygwin.
3373         * lib/fpurge.c (fpurge): Fix order of operation flub, and return a
3374         value.
3375         * modules/fpurge-tests (Depends-on): Clean up trash.
3376
3377 2007-04-16  Simon Josefsson  <simon@josefsson.org>
3378
3379         * lib/gc-libgcrypt.c (gc_hash_open): Shut up compiler warnings.
3380
3381         * m4/autobuild.m4: Re-indent.
3382
3383 2007-04-13  Bruno Haible  <bruno@clisp.org>
3384
3385         * modules/fpurge-tests: New file.
3386         * tests/test-fpurge.c: New file.
3387
3388         * modules/fpurge: New file.
3389         * lib/fpurge.h: New file.
3390         * lib/fpurge.c: New file.
3391         * m4/fpurge.m4: New file.
3392
3393 2007-04-13  Bruno Haible  <bruno@clisp.org>
3394
3395         * modules/fbufmode-tests: New file.
3396         * tests/test-fbufmode.c: New file.
3397
3398         * modules/fbufmode: New file.
3399         * lib/fbufmode.h: New file.
3400         * lib/fbufmode.c: New file.
3401         * m4/fbufmode.m4: New file.
3402
3403 2007-04-13  Bruno Haible  <bruno@clisp.org>
3404
3405         * modules/fwritable-tests: New file.
3406         * tests/test-fwritable.c: New file.
3407
3408         * modules/fwritable: New file.
3409         * lib/fwritable.h: New file.
3410         * lib/fwritable.c: New file.
3411         * m4/fwritable.m4: New file.
3412
3413 2007-04-13  Bruno Haible  <bruno@clisp.org>
3414
3415         * modules/freadable-tests: New file.
3416         * tests/test-freadable.c: New file.
3417
3418         * modules/freadable: New file.
3419         * lib/freadable.h: New file.
3420         * lib/freadable.c: New file.
3421         * m4/freadable.m4: New file.
3422
3423 2007-04-13  Bruno Haible  <bruno@clisp.org>
3424
3425         * modules/fflush-tests (Makefile.am): Remove EXTRA_DIST. Augment
3426         MOSTLYCLEANFILES.
3427
3428 2007-04-13  Paul Eggert  <eggert@cs.ucla.edu>
3429
3430         * build-aux/bootstrap (gnulib_tool_option_extras): New var, used by
3431         gzip bootstrap.conf to avoid dragging in i18n machinery.
3432         (gnulib_tool_option): Use it.
3433
3434 2007-04-13  Bruno Haible  <bruno@clisp.org>
3435
3436         * tests/test-vasnprintf-posix.c (test_function): Add tests for %f and
3437         %F directives.
3438         * tests/test-vasprintf-posix.c (test_function): Likewise.
3439         * tests/test-snprintf-posix.h (test_function): Likewise.
3440         * tests/test-sprintf-posix.h (test_function): Likewise.
3441         * tests/test-fprintf-posix.h (test_function): Likewise.
3442         * tests/test-printf-posix.h (test_function): Likewise.
3443         * tests/test-fprintf-posix.out: Likewise.
3444
3445 2007-04-13  Bruno Haible  <bruno@clisp.org>
3446
3447         * modules/lock-tests (configure.ac): For LIBSCHED, try also -lposix4.
3448         * modules/tls-tests (configure.ac): Likewise.
3449         Reported by Arto C. Nirkko <anirkko@insel.ch>.
3450
3451 2007-04-13  Bruno Haible  <bruno@clisp.org>
3452
3453         * lib/tls.c (glthread_tls_get): Fix return type.
3454         Patch by Arto C. Nirkko <anirkko@insel.ch>.
3455
3456 2007-04-12  Eric Blake  <ebb9@byu.net>
3457
3458         * modules/gettime (Depends-on): Remove gettime.
3459         Reported by Dmitry V. Levin.
3460
3461 2007-04-12  Bruno Haible  <bruno@clisp.org>
3462
3463         * modules/fflush (Include): Mention <stdio.h>.
3464         * modules/strtoimax (Include): Mention <inttypes.h>.
3465         * modules/strtoumax (Include): Likewise.
3466
3467 2007-04-12  Eric Blake  <ebb9@byu.net>
3468
3469         * .cvsignore: New file.
3470         * .gitignore: Likewise.
3471
3472 2007-04-12  Bruno Haible  <bruno@clisp.org>
3473
3474         * modules/iconv-tests (test_iconv_LDADD): Mention -liconv after LDADD,
3475         not before, since $(LDADD) often contains libgnu.a.
3476         * modules/striconv-tests (test_striconv_LDADD): Likewise.
3477         * modules/striconveh-tests (test_striconveh_LDADD): Likewise.
3478         * modules/striconveha-tests (test_striconveha_LDADD): Likewise.
3479         Needed on Cygwin.
3480
3481 2007-04-12  Eric Blake  <ebb9@byu.net>
3482
3483         Work around glibc's failure to flush stdin on fclose.
3484         * lib/closein.c (close_stdin): Flush stdin before closing.
3485
3486         Work around glibc's failure to reset seekable stdin on exit.
3487         * modules/closein: New module.
3488         * lib/closein.c: New file.
3489         * lib/closein.h: Likewise.
3490         * m4/closein.m4: Likewise.
3491         * MODULES.html.sh (File stream based Input/Output): Document it.
3492
3493 2007-04-12  Simon Josefsson  <simon@josefsson.org>
3494
3495         * gnulib-tool: Rename generated 'autobuild' script to
3496         'do-autobuild' in --create-megatestdir output.
3497
3498         * doc/gnulib.texi (Build robot for gnulib): Fix.
3499
3500 2007-04-12  Simon Josefsson  <simon@josefsson.org>
3501
3502         * modules/sysexits (Depends-on): Add absolute-header.
3503
3504 2007-04-12  Eric Blake  <ebb9@byu.net>
3505
3506         No need to preserve errno on success.
3507         * lib/fflush.c (rpl_fflush): Simplify errno tracking.
3508         Reported by Bruno Haible.
3509
3510 2007-04-12  Simon Josefsson  <simon@josefsson.org>
3511
3512         * MODULES.html.sh (Support for maintaining and releasing
3513         projects): Add autobuild.  Suggested by Eric Blake <ebb9@byu.net>.
3514
3515 2007-04-12  Simon Josefsson  <simon@josefsson.org>
3516
3517         * gnulib-tool (func_modules_add_dummy): Respect --avoid=dummy.
3518
3519 2007-04-12  Simon Josefsson  <simon@josefsson.org>
3520
3521         * modules/autobuild: New module.
3522
3523         * m4/autobuild.m4: New file.
3524
3525 2007-04-11  Bruno Haible  <bruno@clisp.org>
3526
3527         * lib/vasnprintf.c (VASNPRINTF): Implement the %F directive using the
3528         %f directive, if NEED_PRINTF_DIRECTIVE_F is defined.
3529         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_F): New macro.
3530         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_F): New macro.
3531         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
3532         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3533         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3534         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
3535         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3536         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3537         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Invoke
3538         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3539         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3540         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Invoke
3541         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3542         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3543         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Invoke
3544         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3545         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3546         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Invoke
3547         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3548         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3549         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Invoke
3550         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3551         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3552         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Invoke
3553         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3554         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3555         Reported by Eric Blake.
3556
3557 2007-04-11  Bruno Haible  <bruno@clisp.org>
3558
3559         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Fix test. It always failed.
3560
3561 2007-04-10  Bruno Haible  <bruno@clisp.org>
3562
3563         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct result
3564         for NaN and Infinity. Needed on FreeBSD 6.1.
3565         * tests/test-vasnprintf-posix.c (test_function): Undo last change
3566         regarding results for "%010a" of Infinity and NaN.
3567         * tests/test-vasprintf-posix.c (test_function): Likewise.
3568         * tests/test-snprintf-posix.h (test_function): Likewise.
3569         * tests/test-sprintf-posix.h (test_function): Likewise.
3570         * tests/test-fprintf-posix.h (test_function): Likewise.
3571         * tests/test-printf-posix.h (test_function): Likewise.
3572         * tests/test-fprintf-posix.out: Likewise.
3573
3574 2007-04-10  Bruno Haible  <bruno@clisp.org>
3575
3576         * modules/locale-tests: New file.
3577         * tests/test-locale.c: New file.
3578
3579         * modules/locale: New file.
3580         * lib/locale_.h: New file.
3581         * m4/locale_h.m4: New file.
3582
3583 2007-04-10  Paul Eggert  <eggert@cs.ucla.edu>
3584             Bruno Haible  <bruno@clisp.org>
3585
3586         * m4/signbit.m4 (gl_SIGNBIT): When the sign bit position could not
3587         be determined, test for availability of the copysignf, copysign,
3588         copysignl functions.
3589         * lib/signbitf.c (gl_signbitf): Use copysignf if available in libc.
3590         * lib/signbitd.c (gl_signbitd): Use copysign if available in libc.
3591         * lib/signbitl.c (gl_signbitl): Use copysignl if available in libc.
3592
3593 2007-04-09  Eric Blake  <ebb9@byu.net>
3594
3595         * lib/stdio_.h [REPLACE_FFLUSH]: Declare rpl_fflush.
3596         * modules/stdio (Makefile.am): Support fflush.
3597         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
3598         * modules/fflush: New file.
3599         * lib/fflush.c: Likewise.
3600         * m4/fflush.m4: Likewise.
3601         * modules/fflush-tests: New test.
3602         * tests/test-fflush.c: Likewise.
3603         * MODULES.html.sh (Input/output <stdio.h>): Document new module.
3604
3605 2007-04-06  Bruno Haible  <bruno@clisp.org>
3606
3607         * lib/vasnprintf.c: Include <math.h>. Don't include float+.h.
3608         (VASNPRINTF): Use signbit for faster determination whether to print a
3609         minus sign.
3610         * modules/vasnprintf (Files): Remove lib/float+.h.
3611         * modules/fprintf-posix (Depends-on): Add signbit.
3612         * modules/snprintf-posix (Depends-on): Likewise.
3613         * modules/sprintf-posix (Depends-on): Likewise.
3614         * modules/vasnprintf-posix (Depends-on): Likewise.
3615         * modules/vasprintf-posix (Depends-on): Likewise.
3616         * modules/vfprintf-posix (Depends-on): Likewise.
3617         * modules/vsnprintf-posix (Depends-on): Likewise.
3618         * modules/vsprintf-posix (Depends-on): Likewise.
3619
3620 2007-04-06  Bruno Haible  <bruno@clisp.org>
3621
3622         * tests/test-frexp.c (main): Test also the sign bit of zero results.
3623         * tests/test-frexpl.c (main): Likewise.
3624         * tests/test-ldexpl.c (main): Likewise.
3625         * modules/frexp-tests (Depends-on): Add signbit.
3626         * modules/frexpl-tests (Depdends-on): Likewise.
3627         * modules/ldexpl-tests (Depdends-on): Likewise.
3628
3629 2007-04-06  Bruno Haible  <bruno@clisp.org>
3630
3631         * modules/signbit-tests: New file.
3632         * tests/test-signbit.c: New file.
3633
3634         * modules/signbit: New file.
3635         * lib/signbitf.c: New file.
3636         * lib/signbitd.c: New file.
3637         * lib/signbitl.c: New file.
3638         * m4/signbit.m4: New file.
3639         * lib/math_.h (gl_signbitf, gl_signbitd, gl_signbitl): New declarations.
3640         (signbit): New macro.
3641         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_SIGNBIT and
3642         REPLACE_SIGNBIT.
3643         * modules/math (Makefile.am) Substibute also GNULIB_SIGNBIT and
3644         REPLACE_FREXPL into math.h.
3645
3646 2007-04-06  Bruno Haible  <bruno@clisp.org>
3647
3648         * modules/isnanf-nolibm-tests: New file.
3649         * tests/test-isnanf.c: New file.
3650
3651         * modules/isnanf-nolibm: New file.
3652         * lib/isnanf.h: New file.
3653         * lib/isnanf.c: New file.
3654         * lib/isnan.c: Consider the USE_FLOAT macro.
3655         * m4/isnanf.m4: New file.
3656
3657 2007-04-06  Bruno Haible  <bruno@clisp.org>
3658
3659         * modules/gettext-h (configure.ac): AC_SUBST LIBINTL and LTLIBINTL.
3660         (Link): New section.
3661
3662         * modules/canonicalize-lgpl-tests (Makefile.am): Undo last change.
3663
3664 2007-04-06  Bruno Haible  <bruno@clisp.org>
3665
3666         Assume the 'long double' type.
3667         * m4/longdouble.m4: Remove file.
3668         * config/srclist.txt: Don't mention longdouble.m4.
3669         * lib/allocsa.h: Assume HAVE_LONG_DOUBLE to be true.
3670         * lib/float+.h: Likewise.
3671         * lib/frexp.c: Likewise.
3672         * lib/printf-args.h: Likewise.
3673         * lib/printf-args.c: Likewise.
3674         * lib/printf-frexp.c: Likewise.
3675         * lib/printf-parse.c: Likewise.
3676         * lib/vasnprintf.c: Likewise.
3677         * m4/allocsa.m4: Remove gt_TYPE_LONGDOUBLE invocation.
3678         * m4/intl.m4: Likewise.
3679         * m4/isnanl.m4: Likewise.
3680         * m4/printf.m4: Likewise.
3681         * m4/printf-frexpl.m4: Likewise.
3682         * m4/vasnprintf.m4: Likewise.
3683         * modules/allocsa (Files): Remove m4/longdouble.m4.
3684         * modules/gettext (Files): Likewise.
3685         * modules/relocatable-prog-wrapper (Files): Likewise.
3686         * modules/vasnprintf (Files): Likewise.
3687         * modules/isnanl (Files): Likewise.
3688         (Include): Simplify.
3689         * modules/isnanl-nolibm (Files): Remove m4/longdouble.m4.
3690         (Include): Simplify.
3691         * modules/printf-frexpl (Files): Remove m4/longdouble.m4.
3692         (Include): Simplify.
3693         * modules/snprintf-posix-tests (Files): Remove m4/longdouble.m4.
3694         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3695         * modules/sprintf-posix-tests (Files): Remove m4/longdouble.m4.
3696         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3697         * modules/vasnprintf-posix-tests (Files): Remove m4/longdouble.m4.
3698         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3699         * modules/vasprintf-posix-tests (Files): Remove m4/longdouble.m4.
3700         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3701         * modules/vsnprintf-posix-tests (Files): Remove m4/longdouble.m4.
3702         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3703         * modules/vsprintf-posix-tests (Files): Remove m4/longdouble.m4.
3704         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3705         * tests/test-isnanl-nolibm.c: Assume HAVE_LONG_DOUBLE to be true.
3706         * tests/test-isnanl.c: Likewise.
3707         * tests/test-snprintf-posix.h: Likewise.
3708         * tests/test-sprintf-posix.h: Likewise.
3709         * tests/test-vasnprintf-posix.c: Likewise.
3710         * tests/test-vasnprintf-posix2.c: Likewise.
3711         * tests/test-vasprintf-posix.c: Likewise.
3712
3713 2007-04-06  Bruno Haible  <bruno@clisp.org>
3714
3715         Fix problem with Compaq (ex-DEC) Desktop C compiler on Tru64.
3716         * lib/math_.h [__DECC]: Include the overridden include file through
3717         #include_next, outside the double-inclusion guard.
3718         * lib/stdio_.h [__DECC]: Likewise.
3719         * lib/stdlib_.h [__DECC]: Likewise.
3720         * lib/string_.h [__DECC]: Likewise.
3721         * lib/time_.h [__DECC]: Likewise.
3722         * lib/wchar_.h [__DECC]: Likewise.
3723         * lib/wctype_.h [__DECC]: Likewise.
3724         * lib/inttypes_.h [__DECC]: Likewise.
3725         Reported by Albert Chin <china@thewrittenword.com> in
3726         <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00088.html>.
3727
3728 2007-04-04  Eric Blake  <ebb9@byu.net>
3729
3730         * m4/stdint.m4 (gl_STDINT_H): Detect WINT_MAX bug in cygwin
3731         1.5.x.
3732
3733 2007-04-04  Bruno Haible  <bruno@clisp.org>
3734
3735         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct
3736         rounding. Don't assume that FreeBSD 6 and NetBSD 4 pass this test.
3737
3738 2007-04-04  Bruno Haible  <bruno@clisp.org>
3739
3740         * tests/test-vasnprintf-posix.c (test_function): Allow two possible
3741         results for "%010a" of Infinity and NaN.
3742         * tests/test-vasprintf-posix.c (test_function): Likewise.
3743         * tests/test-snprintf-posix.h (test_function): Likewise.
3744         * tests/test-sprintf-posix.h (test_function): Likewise.
3745         * tests/test-fprintf-posix.h (test_function): Remove these tests.
3746         * tests/test-printf-posix.h (test_function): Likewise.
3747         * tests/test-fprintf-posix.out: Update.
3748         Needed for FreeBSD 6.1.
3749
3750 2007-04-04  Bruno Haible  <bruno@clisp.org>
3751
3752         * DEPENDENCIES: Remove mentions of tar and gzip, since they are not
3753         directly used by the gnulib modules nor by gnulib-tool.
3754
3755 2007-04-04  Paul Eggert  <eggert@cs.ucla.edu>
3756
3757         * DEPENDENCIES: Give overall description of version dependency
3758         desirability.  Use more-typical names for apps.
3759         Add shell, coreutils, diffutils, grep, tar, gzip.
3760
3761 2007-04-04  Simon Josefsson  <simon@josefsson.org>
3762
3763         * MODULES.html.sh: Rename crypto modules.  Remove iconvme.
3764
3765 2007-04-04  Karl Berry  <karl@gnu.org>
3766
3767         * MODULES.html.sh (func_module): missing '.
3768
3769 2007-04-03  Bruno Haible  <bruno@clisp.org>
3770
3771         * modules/argmatch-tests (Makefile.am): New variable
3772         test_argmatch_LDADD.
3773         * modules/argp-tests (Makefile.am): New variable test_argp_LDADD.
3774         * modules/array-list-tests (Makefile.am): New variable
3775         test_array_list_LDADD.
3776         * modules/array-oset-tests (Makefile.am): New variable
3777         test_array_oset_LDADD.
3778         * modules/avltree-list-tests (Makefile.am): New variable
3779         test_avltree_list_LDADD.
3780         * modules/avltree-oset-tests (Makefile.am): New variable
3781         test_avltree_oset_LDADD.
3782         * modules/avltreehash-list-tests (Makefile.am): New variable
3783         test_avltreehash_list_LDADD.
3784         * modules/canonicalize-lgpl-tests (Makefile.am): New variable
3785         test_canonicalize_lgpl_LDADD.
3786         * modules/carray-list-tests (Makefile.am): New variable
3787         test_carray_list_LDADD.
3788         * modules/dirname-tests (Makefile.am): New variable
3789         test_dirname_LDADD.
3790         * modules/linked-list-tests (Makefile.am): New variable
3791         test_linked_list_LDADD.
3792         * modules/linkedhash-list-tests (Makefile.am): New variable
3793         test_linkedhash_list_LDADD.
3794         * modules/rbtree-list-tests (Makefile.am): New variable
3795         test_rbtree_list_LDADD.
3796         * modules/rbtree-oset-tests (Makefile.am): New variable
3797         test_rbtree_oset_LDADD.
3798         * modules/rbtreehash-list-tests (Makefile.am): New variable
3799         test_rbtreehash_list_LDADD.
3800         * modules/xvasprintf-tests (Makefile.am): New variable
3801         test_xvasprintf_LDADD.
3802         Reported by Eric Blake.
3803
3804 2007-04-03  Eric Blake  <ebb9@byu.net>
3805
3806         * DEPENDENCIES: Weaken m4 requirements.
3807
3808 2007-04-03  Bruno Haible  <bruno@clisp.org>
3809
3810         * modules/frexp-tests (configure.ac): Remove AC_SUBST.
3811         * modules/isnanl-tests (configure.ac): Likewise.
3812
3813 2007-04-03  Ben Pfaff  <blp@gnu.org>
3814
3815         * modules/iconv_open: Add $(srcdir)/ to source directory
3816         references in Makefile fragments that call gperf, to fix VPATH
3817         builds.
3818
3819 2007-04-03  Bruno Haible  <bruno@clisp.org>
3820
3821         * modules/ldexpl (Depends-on): Add isnanl, remove isnanl-nolibm.
3822         * lib/ldexpl.c: Undo last change.
3823
3824 2007-04-03  Bruno Haible  <bruno@clisp.org>
3825
3826         * modules/printf-frexpl (Depends-on): Undo last change.
3827         (Files): Add m4/ldexpl.m4.
3828
3829 2007-04-03  Bruno Haible  <bruno@clisp.org>
3830
3831         * m4/isnanl.m4 (gl_FUNC_ISNANL): Substitute ISNANL_LIBM.
3832         * modules/isnanl (Link): New section.
3833
3834         * m4/frexp.m4 (gl_FUNC_FREXP): Substitute FREXP_LIBM.
3835         * modules/frexp (Link): New section.
3836
3837         * m4/frexpl.m4 (gl_FUNC_FREXPL): Substitute FREXPL_LIBM.
3838         * modules/frexpl (Link): New section.
3839
3840         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Substitute LDEXPL_LIBM.
3841         * modules/ldexpl (Link): New section.
3842
3843 2007-04-03  Bruno Haible  <bruno@clisp.org>
3844
3845         * modules/TEMPLATE-EXTENDED: New file.
3846         * gnulib-tool (func_all_modules, func_verify_module): Exclude it.
3847
3848 2007-04-03  Bruno Haible  <bruno@clisp.org>
3849
3850         * DEPENDENCIES: New file.
3851         Suggested by Simon Josefsson.
3852
3853 2007-04-03  Bruno Haible  <bruno@clisp.org>
3854
3855         * doc/gnulib.texi: Escape @.
3856
3857 2007-04-03  James Youngman  <jay@gnu.org>
3858         and Paul Eggert  <eggert@cs.ucla.edu>
3859
3860         * lib/stat-time.h (get_stat_birthtime): Check for zero-valued
3861         birthtime on all systems that have birthtime, not just those which
3862         use st_birthtimensec rather than st_birthtim.  Putting zero in
3863         st_birthtim.tv_sec is how (for example) FreeBSD/x86 6.1 indicates
3864         that the birth time is not available for files on an NFS mount.
3865
3866 2007-04-03  Simon Josefsson  <simon@josefsson.org>
3867
3868         * modules/memxor: Move back from crypto/, suggested by Bruno.
3869         * modules/crypto/hmac-sha1: Fix memxor dependency.
3870
3871         * modules/crypto/gc: Moved from ../.
3872
3873 2007-04-02  Eric Blake  <ebb9@byu.net>
3874
3875         * lib/ldexpl.c (includes): Avoid libm.
3876
3877         * modules/printf-frexpl (Depends-on): Depend on ldexpl.
3878
3879 2007-04-02  Bruno Haible  <bruno@clisp.org>
3880
3881         * lib/sysexit_.h (EX_OK): Disable the EX_OK definition from <unistd.h>
3882         on IRIX.
3883
3884 2007-04-02  Bruno Haible  <bruno@clisp.org>
3885
3886         * m4/intdiv0.m4 (gt_INTDIV0): Avoid performing the test for real on
3887         x86 or x86_64 platforms running MacOS X.
3888         Reported by Ryan Schmidt <@ryandesign.com>.
3889
3890 2007-04-02  Bruno Haible  <bruno@clisp.org>
3891
3892         * m4/intdiv0.m4 (gt_INTDIV0): When cross-compiling, treat x86_64 like
3893         i386.
3894
3895 2007-04-01  Simon Josefsson  <simon@josefsson.org>
3896
3897         * modules/crypto/arcfour: Moved from ../.
3898         * modules/crypto/arcfour-tests: Moved from ../.
3899         * modules/crypto/arctwo: Moved from ../.
3900         * modules/crypto/arctwo-tests: Moved from ../.
3901         * modules/crypto/des: Moved from ../.
3902         * modules/crypto/des-tests: Moved from ../.
3903         * modules/crypto/gc-arcfour: Moved from ../.
3904         * modules/crypto/gc-arcfour-tests: Moved from ../.
3905         * modules/crypto/gc-arctwo: Moved from ../.
3906         * modules/crypto/gc-arctwo-tests: Moved from ../.
3907         * modules/crypto/gc-des: Moved from ../.
3908         * modules/crypto/gc-des-tests: Moved from ../.
3909         * modules/crypto/gc-hmac-md5: Moved from ../.
3910         * modules/crypto/gc-hmac-md5-tests: Moved from ../.
3911         * modules/crypto/gc-hmac-sha1: Moved from ../.
3912         * modules/crypto/gc-hmac-sha1-tests: Moved from ../.
3913         * modules/crypto/gc-md2: Moved from ../.
3914         * modules/crypto/gc-md2-tests: Moved from ../.
3915         * modules/crypto/gc-md4: Moved from ../.
3916         * modules/crypto/gc-md4-tests: Moved from ../.
3917         * modules/crypto/gc-md5: Moved from ../.
3918         * modules/crypto/gc-md5-tests: Moved from ../.
3919         * modules/crypto/gc-pbkdf2-sha1: Moved from ../.
3920         * modules/crypto/gc-pbkdf2-sha1-tests: Moved from ../.
3921         * modules/crypto/gc-random: Moved from ../.
3922         * modules/crypto/gc-rijndael: Moved from ../.
3923         * modules/crypto/gc-rijndael-tests: Moved from ../.
3924         * modules/crypto/gc-sha1: Moved from ../.
3925         * modules/crypto/gc-sha1-tests: Moved from ../.
3926         * modules/crypto/gc-tests: Moved from ../.
3927         * modules/crypto/hmac-md5: Moved from ../.
3928         * modules/crypto/hmac-md5-tests: Moved from ../.
3929         * modules/crypto/hmac-sha1: Moved from ../.
3930         * modules/crypto/hmac-sha1-tests: Moved from ../.
3931         * modules/crypto/md2: Moved from ../.
3932         * modules/crypto/md2-tests: Moved from ../.
3933         * modules/crypto/md4: Moved from ../.
3934         * modules/crypto/md4-tests: Moved from ../.
3935         * modules/crypto/md5: Moved from ../.
3936         * modules/crypto/md5-tests: Moved from ../.
3937         * modules/crypto/memxor: Moved from ../.
3938         * modules/crypto/rijndael: Moved from ../.
3939         * modules/crypto/rijndael-tests: Moved from ../.
3940         * modules/crypto/sha1: Moved from ../.
3941
3942 2007-03-30  James Youngman  <jay@gnu.org>
3943
3944         * tests/test-stat-time.c (prepare_test): use chmod() rather than
3945         rename() to change the ctime of a file (because ctime is unaffected
3946         by rename on jfs2 on AIX 5.1).
3947         (main): Start by doing cleanup, in case a previous run failed leaving
3948         test files behind.
3949
3950 2007-03-31  Bruno Haible  <bruno@clisp.org>
3951
3952         Support old proprietary implementations of iconv.
3953         * modules/iconv_open: New file.
3954         * lib/iconv_.h: New file.
3955         * m4/iconv_h.m4: New file.
3956         * lib/iconv_open.c: New file.
3957         * lib/iconv_open-aix.gperf: New file.
3958         * lib/iconv_open-hpux.gperf: New file.
3959         * lib/iconv_open-irix.gperf: New file.
3960         * lib/iconv_open-osf.gperf: New file.
3961         * m4/iconv_open.m4: New file.
3962         * modules/linebreak (Depends-on): Add iconv_open.
3963         * modules/striconv (Depends-on): Likewise.
3964         * modules/striconveh (Depends-on): Likewise.
3965         * modules/unicodeio (Depends-on): Likewise.
3966         * lib/striconveh.h (mem_cd_iconveh, str_cd_iconveh): Allow cd to be
3967         (iconv_t)(-1).
3968         * lib/striconveh.c (mem_cd_iconveh_internal): Use an indirect
3969         conversion if cd is (iconv_t)(-1).
3970         (mem_iconveh, str_iconveh): Don't fail just because a direct conversion
3971         is not possible.
3972
3973 2007-03-31  Bruno Haible  <bruno@clisp.org>
3974
3975         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
3976         work on Solaris either. Protect also second use of "autodetect_jp".
3977
3978 2007-03-31  Bruno Haible  <bruno@clisp.org>
3979
3980         * m4/frexpl.m4 (gl_FUNC_FREXPL): Set HAVE_DECL_FREXPL to 0 when
3981         the function is not present.
3982
3983 2007-03-31  Bruno Haible  <bruno@clisp.org>
3984
3985         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Set HAVE_DECL_LDEXPL to 0 when
3986         the function is not present.
3987
3988 2007-03-31  Bruno Haible  <bruno@clisp.org>
3989
3990         * m4/iconv.m4 (AM_ICONV_LINK): Fix 2007-03-29 patch. Test also against
3991         a bug in HP-UX iconv_open().
3992
3993 2007-03-31  Bruno Haible  <bruno@clisp.org>
3994
3995         * MODULES.html.sh (func_module): Don't show gnulib-common.m4.
3996         (Mathematics <math.h>): New section, add fpieee.
3997         (Input/output <stdio.h>): Add fseterr.
3998         (Mathematics <math.h>): New section, add printf-frexp.
3999         (Container data structures): Add sublist.
4000         (Core language properties): Add fpucw, inline.
4001         (Functions for greatest-width integer types <inttypes.h>): Add
4002         imaxabs, imaxdiv, inttypes.
4003         (Mathematics <math.h>): Add frexp, frexpl, isnan-nolibm, isnanl,
4004         isnanl-nolibm, ldexp.
4005         (Mathematics <math.h>): New section, add printf-frexpl.
4006         (Support for systems lacking POSIX:2001): Add fprintf-posix,
4007         printf-posix, snprintf-posix, sprintf-posix, string, search, socklen,
4008         sys_select, sys_socket, vasnprintf-posix, vasprintf-posix,
4009         vfprintf-posix, vprintf-posix, vsnprintf-posix, vsprintf-posix.
4010         (Unicode string functions): Add unistr/u*-mbtoucr.
4011         (Java): Add javacomp-script, javaexec-script.
4012         (C#): Add csharpcomp-script, csharpexec-script.
4013         (Support for building libraries and executables): Add havelib,
4014         relocatable-*.
4015         (Support for maintaining and releasing projects): Renamed from
4016         'Support for maintaining and release projects'. Add announce-gen.
4017
4018 2007-03-31  Bruno Haible  <bruno@clisp.org>
4019
4020         * README: Talk primarily about git.
4021         (git and CVS): Renamed from CVS.
4022         * doc/gnulib.texi (Introduction, Build robot for gnulib): Mention that
4023         gnulib is available through git.
4024         * doc/gnulib-tool.texi (CVS Issues): Mention git and svn as well.
4025
4026 2007-03-30  Bruno Haible  <bruno@clisp.org>
4027
4028         * lib/alloca_.h: Change prefix of double-inclusion guard macro to _GL_.
4029         * lib/poll_.h: Likewise.
4030         * lib/stat_.h: Likewise.
4031         * lib/sys_time_.h: Likewise.
4032         * lib/sysexit_.h: Likewise.
4033         * lib/glob_.h: Prefix double-inclusion guard macro with _GL_.
4034         * lib/stdbool_.h: Likewise.
4035         * lib/byteswap_.h: Add double-inclusion guard.
4036
4037 2007-03-30  Sergey Poznyakoff  <gray@mirddin.farlep.net>
4038
4039         * lib/sysexit_.h: Prefix double-inclusion guard macro with _GNULIB.
4040
4041 2007-03-30  Karl Berry  <karl@gnu.org>
4042
4043         * config/srclist-update: double space after USA in the license
4044         substitution, since that's how it's usually (?) written.
4045
4046 2007-03-30  Paul Eggert  <eggert@cs.ucla.edu>
4047
4048         * lib/write-any-file.c (can_write_any_file): Fix else-else bug
4049         reported by Bruno Haible.
4050
4051 2007-03-29  Bruno Haible  <bruno@clisp.org>
4052
4053         * m4/iconv.m4 (AM_ICONV_LINK): Require AC_CANONICAL_HOST. Test against
4054         a bug in AIX iconv().
4055
4056 2007-03-29  Bruno Haible  <bruno@clisp.org>
4057
4058         * modules/ldexpl-tests: New file.
4059         * tests/test-ldexpl.c: New file.
4060
4061 2007-03-29  Bruno Haible  <bruno@clisp.org>
4062
4063         * lib/ldexpl.c: Include fpucw.h.
4064         (ldexpl): Use BEGIN/END_LONG_DOUBLE_ROUNDING. Skip the last unneeded
4065         multiplication.
4066         * modules/ldexpl (Depends-on): Add fpucw.
4067
4068 2007-03-29  Bruno Haible  <bruno@clisp.org>
4069
4070         * modules/ldexpl: New file.
4071         * m4/ldexpl.m4: New file.
4072         * lib/math_.h (ldexpl): Define to a replacement if REPLACE_LDEXPL is
4073         set.
4074         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize also GNULIB_LDEXPL,
4075         REPLACE_LDEXPL.
4076         * modules/math (Makefile.am): Substitute also GNULIB_LDEXPL,
4077         REPLACE_LDEXPL.
4078         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Invoke
4079         gl_FUNC_LDEXPL_WORKS.
4080         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Remove test for ldexpl.
4081         * modules/mathl (Files): Remove lib/ldexpl.c.
4082         (Depends-on): Add ldexpl.
4083
4084 2007-03-29  Bruno Haible  <bruno@clisp.org>
4085
4086         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Declare frexpl.
4087
4088 2007-03-29  Bruno Haible  <bruno@clisp.org>
4089
4090         * tests/test-striconveh.c (main): Don't assume that a direct conversion
4091         between ISO-8859-1 and ISO-8859-2 is possible. Needed for OSF/1, IRIX
4092         and possibly also HP-UX.
4093         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
4094         work on AIX, IRIX, HP-UX, OSF/1.
4095         * tests/uniconv/test-u16-conv-from-enc.c (main): Likewise.
4096         * tests/uniconv/test-u16-strconv-from-enc.c (main): Likewise.
4097         * tests/uniconv/test-u32-conv-from-enc.c (main): Likewise.
4098         * tests/uniconv/test-u32-strconv-from-enc.c (main): Likewise.
4099         * tests/uniconv/test-u8-conv-from-enc.c (main): Likewise.
4100         * tests/uniconv/test-u8-strconv-from-enc.c (main): Likewise.
4101
4102 2007-03-29  Bruno Haible  <bruno@clisp.org>
4103
4104         * tests/test-stat-time.c: Include <fcntl.h>, not <sys/fcntl.h>.
4105
4106 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
4107
4108         * lib/acl-internal.h (acl_get_fd, acl_set_fd): undef before defining,
4109         to work around a problem on OSF/1 5.1 reported by Bruno Haible.
4110
4111 2007-03-29  Eric Blake  <ebb9@byu.net>
4112
4113         * lib/acl-internal.h: Remove redundant include.
4114         (ACL_NOT_WELL_SUPPORTED): Also filter on EBUSY, returned by
4115         Cygwin when a file is locked.
4116
4117 2007-03-29  Bruno Haible  <bruno@clisp.org>
4118
4119         * lib/vasprintf.c [IN_LIBASPRINTF]: Include different specification
4120         file.
4121         * lib/asprintf.c [IN_LIBASPRINTF]: Likewise.
4122
4123 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
4124
4125         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Don't bother to
4126         try to remove a parent directory if the child couldn't be removed
4127         (except for the first rmdir, which could fail because the child
4128         doesn't exist).  Problem reported by Jeff Blaine in
4129         <http://lists.gnu.org/archive/html/bug-tar/2007-03/msg00014.html>.
4130
4131 2007-03-28  Bruno Haible  <bruno@clisp.org>
4132
4133         * lib/striconveh.c (utf8conv_carefully): New function.
4134         (mem_cd_iconveh_internal): Invoke it.
4135
4136 2007-03-28  Bruno Haible  <bruno@clisp.org>
4137
4138         * lib/striconveh.c (mem_cd_iconveh_internal): Use u8_mbtoucr instead
4139         of u8_mbtouc in order to distinguish invalid and incomplete UTF-8
4140         input.
4141         * modules/striconveh (Depends-on): Add unistr/u8-mbtoucr. Replace
4142         utf8-ucs4 with unistr/u8-mbtouc. Replace ucs4-utf8 with
4143         unistr/u8-uctomb.
4144
4145 2007-03-28  Bruno Haible  <bruno@clisp.org>
4146
4147         * modules/unistr/u8-mbtoucr: New file.
4148         * lib/unistr/u8-mbtoucr.c: New file.
4149         * modules/unistr/u16-mbtoucr: New file.
4150         * lib/unistr/u16-mbtoucr.c: New file.
4151         * modules/unistr/u16-mbtoucr: New file.
4152         * lib/unistr/u16-mbtoucr.c: New file.
4153         * lib/unistr.h (u8_mbtoucr, u16_mbtoucr, u32_mbtoucr): New declarations.
4154
4155 2007-03-27  Simon Josefsson  <simon@josefsson.org>
4156             Bruno Haible  <bruno@clisp.org>
4157
4158         * m4/vasprintf.m4: Convert AC_SUBST into shell variable for
4159         REPLACE_VASPRINTF.  Set HAVE_VASPRINTF.  Add
4160         AC_REQUIRE([gl_STDIO_H_DEFAULTS]).
4161
4162         * m4/stdio_h.m4: Add stubs for vasprintf too.
4163
4164         * modules/stdio: Support vasprintf in sed command.
4165
4166         * modules/vasprintf: Depend on stdio for prototypes.  Remove
4167         vasprintf.h.  Add stdio module indicator.
4168
4169         * lib/stdio_.h: Declare asprintf and vasprintf, based on
4170         vasprintf.h.
4171
4172         * lib/vasprintf.h: File removed.
4173
4174         * lib/asprintf.c: Use stdio.h instead of vasprintf.h.
4175         * lib/vasprintf.c: Ditto.
4176         * lib/xvasprintf.c: Ditto.
4177         * tests/test-vasprintf-posix.c: Ditto.
4178         * tests/test-vasprintf.c: Ditto.
4179
4180 2007-03-27  Bruno Haible  <bruno@clisp.org>
4181
4182         Make vasnprintf multithread-safe.
4183         * lib/vasnprintf.c (decimal_point_char): New function.
4184         (VASNPRINTF): Use it.
4185         Suggested by Simon Josefsson.
4186
4187 2007-03-27  Eric Blake  <ebb9@byu.net>
4188
4189         Support sub-second birthtime on cygwin.
4190         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Also check for st_birthtim.
4191         * lib/stat-time.h (STAT_TIMESPEC): Adjust comments.
4192         (get_stat_birthtime): Also work with st_birthtim.
4193
4194 2007-03-27  Paul Eggert  <eggert@cs.ucla.edu>
4195
4196         * lib/stat-time.h (USE_BIRTHTIME): Remove.
4197         (get_stat_atime_ns, get_stat_ctime_ns, get_stat_mtime_ns):
4198         (get_stat_birthtime_ns): Do not try to use "spare" fields.
4199         (get_stat_birthtime_ns): Simplify compile-time tests.
4200         (get_stat_birthtime): Change the API to look like
4201         get_stat_mtime etc., except return a negative tv_nsec on error.
4202         * m4/stat-time.m4 (gl_STAT_TIME, gl_STAT_BIRTHTIME):
4203         Don't check for "spare" fields.
4204         (gl_STAT_BIRTHTIME): Don't check for struct stat.st_birthtimespec.tv_sec
4205         or for struct stat.st_birthtime, as these tests aren't used.
4206         * tests/test-stat-time.c (test_birthtime): Adjust to new API.
4207
4208 2007-03-27  Bruno Haible  <bruno@clisp.org>
4209
4210         * lib/stat-time.h: Include <sys/stat.h>.
4211
4212 2007-03-27  James Youngman  <jay@gnu.org>
4213
4214         * lib/stat-time.h (get_stat_birthtime): New function for
4215           retrieving st_birthtime as provided by UFS2 (hence *BSD).
4216         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Probe for st_birthtime
4217           and its variants.
4218         * modules/stat-time (configure.ac): call gl_STAT_BIRTHTIME.
4219         * modules/stat-time-test: New file.
4220         * tests/test-stat-time.c: New test, devised by Bruno Haible.
4221
4222 2007-03-26  Bruno Haible  <bruno@clisp.org>
4223
4224         Better support of signalling NaNs.
4225         * lib/atanl.c: Include isnanl.h.
4226         (atanl): Perform test for NaN at the beginning of the function and
4227         through a call to isnanl.
4228         * lib/cosl.c: Include isnanl.h.
4229         (cosl): Perform test for NaN at the beginning of the function and
4230         through a call to isnanl.
4231         * lib/ldexpl.c: Include isnanl.h.
4232         (ldexpl): Perform test for NaN through a call to isnanl.
4233         * lib/logl.c: Include isnanl.h.
4234         (logl): Perform test for NaN at the beginning of the function and
4235         through a call to isnanl.
4236         * lib/sinl.c: Include isnanl.h.
4237         (sinl): Perform test for NaN at the beginning of the function and
4238         through a call to isnanl.
4239         * lib/sqrtl.c: Include isnanl.h.
4240         (sqrtl): Perform test for NaN at the beginning of the function and
4241         through a call to isnanl.
4242         * lib/tanl.c: Include isnanl.h.
4243         (tanl): Perform test for NaN at the beginning of the function and
4244         through a call to isnanl.
4245         * lib/trigl.c (ieee754_rem_pio2l): Remove test for NaN.
4246         * modules/mathl (Depends-on): Add isnanl.
4247
4248 2007-03-26  Eric Blake  <ebb9@byu.net>
4249
4250         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Fix
4251         regression in logic sense of previous patch.
4252
4253 2007-03-26  Bruno Haible  <bruno@clisp.org>
4254
4255         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Don't use
4256         unportable shell command "if ! ...".
4257         Reported by Ralf Wildenhues.
4258
4259 2007-03-25  Bruno Haible  <bruno@clisp.org>
4260
4261         * lib/sysexit_,h: If HAVE_SYSEXITS_H is defined, include the original
4262         <sysexits.h> file, and only add EX_CONFIG.
4263         * m4/sysexits.m4 (gl_SYSEXITS): If <sysexits.h> exists, check its
4264         absolute file name and whether it is sufficient. Substitute also
4265         HAVE_SYSEXITS_H and ABSOLUTE_SYSEXITS_H.
4266         * modules/sysexits (Makefile.am): Substitute HAVE_SYSEXITS_H and
4267         ABSOLUTE_SYSEXITS_H into sysexits.h.
4268
4269 2007-03-25  Bruno Haible  <bruno@clisp.org>
4270
4271         * lib/getaddrinfo.c (getaddrinfo): Don't access hints->ai_flags when
4272         hints is NULL.
4273
4274 2007-03-25  Bruno Haible  <bruno@clisp.org>
4275
4276         * lib/uniconv/u8-conv-from-enc.c (u8_conv_from_encoding): Add a cast.
4277         * lib/uniconv/u8-strconv-to-enc.c (u8_strconv_to_encoding): Likewise.
4278
4279 2007-03-25  Bruno Haible  <bruno@clisp.org>
4280
4281         * lib/vasnprintf.c: Include langinfo.h.
4282         (VASNPRINTF): Prefer nl_langinfo over localeconv, since it's more
4283         multithread-safe.
4284         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): New macro.
4285         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke it.
4286         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
4287         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
4288         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
4289         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
4290         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
4291         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX: Likewise.
4292         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
4293         Reported by Simon Josefsson.
4294
4295 2007-03-25  Bruno Haible  <bruno@clisp.org>
4296
4297         * lib/printf-parse.c [!IN_LIBINTL]: Include <stdint.h>, for intmax_t.
4298         (PRINTF_PARSE): Make the support for size specifier 'j' unconditional.
4299         * modules/vasnprintf (Depends-on): Add stdint.
4300
4301 2007-03-25  Bruno Haible  <bruno@clisp.org>
4302
4303         * modules/fpieee: New file.
4304         * m4/fpieee.m4: New file.
4305         * modules/isnan-nolibm (Depends-on): Add fpieee.
4306         * modules/isnanl-nolibm (Depends-on): Add fpieee.
4307         * modules/isnanl (Depends-on): Add fpieee.
4308
4309 2007-03-25  Bruno Haible  <bruno@clisp.org>
4310
4311         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Test also finite numbers.
4312
4313 2007-03-25  Bruno Haible  <bruno@clisp.org>
4314
4315         Avoid test failures on IRIX 6.5.
4316         * tests/test-frexpl.c (MIN_NORMAL_EXP): New macro.
4317         (main): Use it.
4318         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP): New
4319         macros.
4320         (main): Use them.
4321
4322 2007-03-25  Bruno Haible  <bruno@clisp.org>
4323
4324         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): New macro.
4325         (gl_FUNC_FREXPL): Invoke it. Set REPLACE_FREXPL to 1 if it frexpl
4326         exists but doesn't work.
4327         * lib/math_.h (frexpl): Define as a replacement macro if REPLACE_FREXPL
4328         is set. Don't provide a prototype if REPLACE_FREXPL is not set.
4329         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_FREXPL.
4330         * modules/math (Makefile.am) Substibute also REPLACE_FREXPL into math.h.
4331
4332 2007-03-25  Bruno Haible  <bruno@clisp.org>
4333
4334         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Add check whether frexp(inf)
4335         returns inf. Needed on IRIX 6.5.
4336
4337 2007-03-25  Bruno Haible  <bruno@clisp.org>
4338
4339         * tests/test-frexpl.c: Include isnanl-nolibm.h.
4340         (main): Use isnanl instead of x != x idiom.
4341         * modules/frexpl-tests (Depends-on): Add isnanl-nolibm.
4342
4343         * tests/test-frexp.c: Include isnan.h.
4344         (main): Use isnan instead of x != x idiom.
4345         * modules/frexp-tests (Depends-on): Add isnan-nolibm.
4346
4347 2007-03-25  Bruno Haible  <bruno@clisp.org>
4348
4349         * tests/test-frexp.c (NaN): New function/macro.
4350         (main): Use it instead of 0.0 / 0.0.
4351         * tests/test-isnan.c (NaN): New function/macro.
4352         (main): Use it instead of 0.0 / 0.0.
4353         * tests/test-vasnprintf-posix.c (NaN): New function/macro.
4354         (test_function): Use it instead of 0.0 / 0.0.
4355         * tests/test-vasprintf-posix.c (NaN): New function/macro.
4356         (test_function): Use it instead of 0.0 / 0.0.
4357         * tests/test-snprintf-posix.h (NaN): New function/macro.
4358         (test_function): Use it instead of 0.0 / 0.0.
4359         * tests/test-sprintf-posix.h (NaN): New function/macro.
4360         (test_function): Use it instead of 0.0 / 0.0.
4361         * tests/test-fprintf-posix.h (NaN): New function/macro.
4362         (test_function): Use it instead of 0.0 / 0.0.
4363         * tests/test-printf-posix.h (NaN): New function/macro.
4364         (test_function): Use it instead of 0.0 / 0.0.
4365
4366         * lib/isnan.c (FUNC): Work around a DEC C compiler bug.
4367
4368 2007-03-25  Bruno Haible  <bruno@clisp.org>
4369
4370         * lib/glob_.h: Include <sys/stat.h>. Avoids warnings on AIX 5.1.
4371
4372 2007-03-25  Bruno Haible  <bruno@clisp.org>
4373
4374         * lib/regexec.c (merge_state_with_log): Make static.
4375
4376 2007-03-25  Bruno Haible  <bruno@clisp.org>
4377
4378         * lib/trigl.c (kernel_rem_pio2): Make static.
4379
4380 2007-03-25  Bruno Haible  <bruno@clisp.org>
4381
4382         * lib/sincosl.c (sincosl_table): Make static.
4383
4384 2007-03-25  Bruno Haible  <bruno@clisp.org>
4385
4386         * lib/argp.h (__restrict): Define to empty, rather than to 'restrict',
4387         if the compiler does not support C99.
4388
4389 2007-03-25  Bruno Haible  <bruno@clisp.org>
4390
4391         * modules/time (Makefile.am): Ensure all rule action lines start with a
4392         tab.
4393
4394 2007-03-24  Bruno Haible  <bruno@clisp.org>
4395
4396         * modules/tsearch-tests: New file.
4397         * tests/test-tsearch.sh: New file.
4398         * tests/test-tsearch.c: New file, mostly copied from glibc.
4399
4400         * modules/search-tests: New file.
4401         * tests/test-search.c: New file.
4402
4403         * modules/search: New file.
4404         * lib/search_.h: New file, incorporating lib/tsearch.h.
4405         * m4/search_h.m4: New file.
4406         * lib/tsearch.h: Remove file.
4407         * lib/tsearch.c: Include search.h instead of tsearch.h.
4408         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Require gl_SEARCH_H_DEFAULTS. Set
4409         HAVE_TSEARCH.
4410         * modules/tsearch (Files): Remove lib/tsearch.h.
4411         (Depends-on): Add search.
4412         (configure.ac): Invoke gl_SEARCH_MODULE_INDICATOR.
4413         (Include): Change tsearch.h into search.h.
4414
4415 2007-03-24  Bruno Haible  <bruno@clisp.org>
4416
4417         * modules/fpucw: New file.
4418         * lib/fpucw.h: New file.
4419         * lib/frexp.c: Include fpucw.h.
4420         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
4421         (FUNC): Use them.
4422         * lib/printf-frexp.c: Include fpucw.h.
4423         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
4424         (FUNC): Use them.
4425         * lib/vasnprintf.c: Include fpucw.h.
4426         (VASNPRINTF): Invoke BEGIN/END_LONG_DOUBLE_ROUNDING around the
4427         'long double' calculations.
4428         * tests/test-frexpl.c: Include fpucw.h.
4429         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
4430         * tests/test-printf-frexpl.c: Include fpucw.h.
4431         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
4432         * modules/frexpl (Depends-on): Add fpucw.
4433         * modules/printf-frexpl (Depends-on): Likewise.
4434         * modules/fprintf-posix (Depends-on): Likewise.
4435         * modules/snprintf-posix (Depends-on): Likewise.
4436         * modules/sprintf-posix (Depends-on): Likewise.
4437         * modules/vasnprintf-posix (Depends-on): Likewise.
4438         * modules/vasprintf-posix (Depends-on): Likewise.
4439         * modules/vfprintf-posix (Depends-on): Likewise.
4440         * modules/vsnprintf-posix (Depends-on): Likewise.
4441         * modules/vsprintf-posix (Depends-on): Likewise.
4442         * modules/frexpl-tests (Depends-on): Likewise.
4443         * modules/printf-frexpl-tests (Depends-on): Likewise.
4444
4445 2007-03-24  Bruno Haible  <bruno@clisp.org>
4446
4447         * lib/float+.h: New file.
4448         * lib/isnan.c: Include float+.h.
4449         (SIZE): New macro.
4450         (FUNC): Compare only SIZE bytes of the value.
4451         * lib/vasnprintf.c: Include float+.h.
4452         (VASNPRINTF): When comparing agains +0.0L or +0.0, compare only
4453         SIZEOF_LDBL or SIZEOF_DBL bytes.
4454         * modules/isnan-nolibm (Files): Add lib/float+.h.
4455         * modules/isnanl-nolibm (Files): Add lib/float+.h.
4456         * modules/isnanl (Files): Add lib/float+.h.
4457         * modules/vasnprintf (Files): Add lib/float+.h.
4458
4459 2007-03-24  Bruno Haible  <bruno@clisp.org>
4460
4461         * lib/vasnprintf.c [!HAVE_LONG_DOUBLE]: Include printf-frexp.h. Don't
4462         include isnanl-nolibm.h.
4463
4464 2007-03-24  Bruno Haible  <bruno@clisp.org>
4465
4466         * tests/test-read-file.c (main): Don't produce spurious output for
4467         expected situations. Make the test fail if it encountered unexpected
4468         results.
4469
4470 2007-03-24  Bruno Haible  <bruno@clisp.org>
4471
4472         * m4/locale-fr.m4 (gt_LOCALE_FR): Remove the special-casing of NetBSD,
4473         since its fr_FR.ISO8859-1 locale wouldn't pass the tests.
4474
4475 2007-03-24  Bruno Haible  <bruno@clisp.org>
4476
4477         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Fix last change.
4478
4479 2007-03-24  Bruno Haible  <bruno@clisp.org>
4480
4481         * modules/unistr/base (Depends-on): Remove utf8-ucs4-unsafe,
4482         utf16-ucs4-unsafe, utf8-ucs4, utf16-ucs4, ucs4-utf8, ucs4-utf16.
4483
4484         * modules/unistr/u8-mbtouc: Add source files from module utf8-ucs4.
4485         * modules/utf8-ucs4: Turn into a symbolic link to module
4486         unistr/u8-mbtouc.
4487
4488         * modules/unistr/u8-mbtouc-unsafe: Add source files from module
4489         utf8-ucs4-unsafe.
4490         * modules/utf8-ucs4-unsafe: Turn into a symbolic link to module
4491         unistr/u8-mbtouc-unsafe.
4492
4493         * modules/unistr/u16-mbtouc: Add source files from module utf16-ucs4.
4494         * modules/utf16-ucs4: Turn into a symbolic link to module
4495         unistr/u16-mbtouc.
4496
4497         * modules/unistr/u16-mbtouc-unsafe: Add source files from module
4498         utf16-ucs4-unsafe.
4499         * modules/utf16-ucs4-unsafe: Turn into a symbolic link to module
4500         unistr/u16-mbtouc-unsafe.
4501
4502         * modules/unistr/u8-uctomb: Add source files from module utf4-utf8.
4503         * modules/ucs4-utf8: Turn into a symbolic link to module
4504         unistr/u8-ubtomb.
4505
4506         * modules/unistr/u16-uctomb: Add source files from module utf4-utf16.
4507         * modules/ucs4-utf16: Turn into a symbolic link to module
4508         unistr/u16-ubtomb.
4509
4510 2007-03-24  Bruno Haible  <bruno@clisp.org>
4511
4512         * lib/unistr/u8-mbtouc-aux.c: Renamed from lib/unistr/utf8-ucs4.c.
4513         Enable the function only if HAVE_INLINE.
4514         * lib/unistr/u8-mbtouc-unsafe-aux.c: Renamed from
4515         lib/unistr/utf8-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
4516         * lib/unistr/u16-mbtouc-aux.c: Renamed from lib/unistr/utf16-ucs4.c.
4517         Enable the function only if HAVE_INLINE.
4518         * lib/unistr/u16-mbtouc-unsafe-aux.c: Renamed from
4519         lib/unistr/utf16-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
4520         * lib/unistr/u8-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf8.c.
4521         Enable the function only if HAVE_INLINE.
4522         * lib/unistr/u16-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf16.c.
4523         Enable the function only if HAVE_INLINE.
4524         * modules/utf8-ucs4: Update.
4525         * modules/utf8-ucs4-unsafe: Update.
4526         * modules/utf16-ucs4: Update.
4527         * modules/utf16-ucs4-unsafe: Update.
4528         * modules/ucs4-utf8: Update.
4529         * modules/ucs4-utf16: Update.
4530
4531 2007-03-24  Bruno Haible  <bruno@clisp.org>
4532
4533         * lib/utf8-ucs4.h: Remove file.
4534         * lib/utf8-ucs4-unsafe.h: Remove file.
4535         * lib/utf16-ucs4.h: Remove file.
4536         * lib/utf16-ucs4-unsafe.h: Remove file.
4537         * lib/ucs4-utf8.h: Remove file.
4538         * lib/ucs4-utf16.h: Remove file.
4539         * lib/unistr.h: Include their previous contents.
4540         * m4/utf-ucs4.m4: Remove file.
4541         * m4/ucs4-utf.m4: Remove file.
4542         * modules/utf8-ucs4 (Files): Remove lib/utf8-ucs4.h.
4543         (Depends-on): Add unistr/base.
4544         (configure.ac): Remove gl_UTF_UCS4.
4545         (Makefile.am): Update.
4546         (Include): Change to unistr.h.
4547         * modules/utf8-ucs4-unsafe (Files): Remove lib/utf8-ucs4-unsafe.h.
4548         (Depends-on): Add unistr/base.
4549         (configure.ac): Remove gl_UTF_UCS4.
4550         (Makefile.am): Update.
4551         (Include): Change to unistr.h.
4552         * modules/utf16-ucs4 (Files): Remove lib/utf16-ucs4.h.
4553         (Depends-on): Add unistr/base.
4554         (configure.ac): Remove gl_UTF_UCS4.
4555         (Makefile.am): Update.
4556         (Include): Change to unistr.h.
4557         * modules/utf16-ucs4-unsafe (Files): Remove lib/utf16-ucs4-unsafe.h.
4558         (Depends-on): Add unistr/base.
4559         (configure.ac): Remove gl_UTF_UCS4.
4560         (Makefile.am): Update.
4561         (Include): Change to unistr.h.
4562         * modules/ucs4-utf8 (Files): Remove lib/ucs4-utf8.h.
4563         (Depends-on): Add unistr/base.
4564         (configure.ac): Remove gl_UCS4_UTF.
4565         (Makefile.am): Update.
4566         (Include): Change to unistr.h.
4567         * modules/ucs4-utf16 (Files): Remove lib/ucs4-utf16.h.
4568         (Depends-on): Add unistr/base.
4569         (configure.ac): Remove gl_UCS4_UTF.
4570         (Makefile.am): Update.
4571         (Include): Change to unistr.h.
4572         * lib/unistr/utf8-ucs4.c: Include unistr.h instead of utf8-ucs4.h.
4573         * lib/unistr/utf8-ucs4-unsafe.c: Include unistr.h instead of
4574         utf8-ucs4-unsafe.h.
4575         * lib/unistr/utf16-ucs4.c: Include unistr.h instead of utf16-ucs4.h.
4576         * lib/unistr/utf16-ucs4-unsafe.c: Include unistr.h instead of
4577         utf16-ucs4-unsafe.h.
4578         * lib/unistr/ucs4-utf8.c: Include unistr.h instead of ucs4-utf8.h.
4579         * lib/unistr/ucs4-utf16.c: Include unistr.h instead of ucs4-utf16.h.
4580         * lib/unistr/u8-chr.c: Don't include ucs4-utf8.h.
4581         * lib/unistr/u8-strchr.c: Likewise.
4582         * lib/unistr/u8-strrchr.c: Likewise.
4583         * lib/unistr/u16-chr.c: Don't include ucs4-utf16.h.
4584         * lib/unistr/u16-strchr.c: Likewise.
4585         * lib/unistr/u16-strrchr.c: Likewise.
4586         * lib/striconveh.c: Update.
4587         * lib/linebreak.c: Update.
4588
4589 2007-03-24  Bruno Haible  <bruno@clisp.org>
4590
4591         * lib/argp-help.c (fill_in_uparams, canon_doc_option): Cast the
4592         arguments of isspace, isalpha, isalnum, isdigit to 'unsigned char'.
4593
4594 2007-03-22  Bruno Haible  <bruno@clisp.org>
4595
4596         * lib/strptime.c (__strptime_internal): Use ANSI C syntax.
4597
4598 2007-03-23  Paul Eggert  <eggert@cs.ucla.edu>
4599
4600         * MODULES.html.sh (File system functions): New module write-any-file.
4601         * modules/write-any-file, lib/write-any-file.c, lib/write-any-file.h:
4602         * m4/write-any-file.m4: New files.
4603
4604 2007-03-23  Eric Blake  <ebb9@byu.net>
4605
4606         * gnulib-tool: Rearrange space-tab sequences, since some editors
4607         like to eat them.
4608
4609 2007-03-23  Eric Blake  <ebb9@byu.net>
4610
4611         * lib/version-etc.c (version_etc_va): Update license wording to
4612         be more concise.  Recommended by Richard Stallman.
4613
4614 2007-03-22  Bruno Haible  <bruno@clisp.org>
4615
4616         * lib/poll.c (MSG_PEEK): New fallback definition.
4617
4618 2007-03-22  Bruno Haible  <bruno@clisp.org>
4619
4620         * modules/sys_socket-tests (configure.ac): Check for shutdown function.
4621         * tests/test-sys_socket.c (a): Test only if shutdown() exists.
4622         (main): Update.
4623         Fixes a compilation error on BeOS.
4624
4625 2007-03-22  Bruno Haible  <bruno@clisp.org>
4626
4627         * modules/frexpl-tests: New file.
4628         * tests/test-frexpl.c: New file.
4629
4630         * modules/frexpl: New file.
4631         * m4/frexpl.m4: New file.
4632         * modules/math (Makefile.am): Also substitute GNULIB_FREXPL into math.h.
4633         * lib/math_.h (frexpl): Test GNULIB_FREXPL instead of GNULIB_MATHL.
4634         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_FREXPL.
4635         * modules/mathl (Files): Remove lib/frexpl.c, lib/frexp.c.
4636         (Depends-on): Add frexpl. Remove isnanl-nolibm.
4637         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Don't test for frexpl.
4638
4639 2007-03-22  Bruno Haible  <bruno@clisp.org>
4640
4641         * lib/frexpl.c: Share code with lib/frexp.c.
4642         * modules/mathl (Files): Add lib/frexp.c.
4643         (Depends-on): Add isnanl-nolibm.
4644
4645 2007-03-22  Bruno Haible  <bruno@clisp.org>
4646
4647         * modules/printf-frexp (Files): Add m4/frexp.m4.
4648         * m4/printf-frexp.m4 (gl_FUNC_PRINTF_FREXP): Define HAVE_FREXP_IN_LIBC
4649         only if the found frexp function actually works.
4650
4651 2007-03-22  Bruno Haible  <bruno@clisp.org>
4652
4653         * lib/frexp.c: Remove older implementation that uses divisions.
4654
4655 2007-03-21  Bruno Haible  <bruno@clisp.org>
4656
4657         * modules/frexp-tests: New file.
4658         * tests/test-frexp.c: New file.
4659
4660         * modules/frexp: New file.
4661         * lib/frexp.c: New file.
4662         * m4/frexp.m4: New file.
4663         * lib/math_.h (frexp): New declaration.
4664         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Also initialize GNULIB_FREXP and
4665         REPLACE_FREXP.
4666         * modules/math (math.h): Also substitute GNULIB_FREXP, REPLACE_FREXP.
4667
4668 2007-03-21  Bruno Haible  <bruno@clisp.org>
4669
4670         * modules/isnanl-tests: New file.
4671         * tests/test-isnanl.c: New file.
4672
4673         * modules/isnanl: New file.
4674         * lib/isnanl.h: New file.
4675         * m4/isnanl.m4 (gl_FUNC_ISNANL): New macro.
4676         (gl_FUNC_ISNANL_NO_LIBM): Invoke gl_HAVE_ISNANL_NO_LIBM,
4677         gl_FUNC_ISNANL_WORKS.
4678         (gl_HAVE_ISNANL_NO_LIBM, gl_HAVE_ISNANL_IN_LIBM, gl_FUNC_ISNANL_WORKS):
4679         New macros.
4680
4681 2007-03-21  Bruno Haible  <bruno@clisp.org>
4682
4683         * modules/isnanl-nolibm (Files): Add lib/isnanl-nolibm.h, remove
4684         lib/isnanl.h.
4685         (Include): Update.
4686         * lib/isnanl-nolibm.h: Renamed from lib/isnanl.h.
4687         * lib/vasnprintf.c: Update.
4688         * modules/isnanl-nolibm-tests (Files): Add tests/test-isnanl-nolibm.c,
4689         tests/test-isnanl.h, remove tests/test-isnanl.c.
4690         (Makefile.am): Update.
4691         * tests/test-isnanl-nolibm.c: New file.
4692         * tests/test-isnanl.h: New file.
4693         * tests/test-isnanl.c: Remove file.
4694
4695 2007-03-21  Jim Meyering  <jim@meyering.net>
4696
4697         When trying to open ".", treat ESTALE like EACCES.
4698         * lib/savewd.c (savewd_save): Resort to forking not just upon
4699         failure with EACCES, but also when errno is ESTALE.
4700
4701 2007-03-20  Bruno Haible  <bruno@clisp.org>
4702
4703         * lib/string_.h (strndup): Enable declaration also if HAVE_STRNDUP.
4704         Needed on AIX 5.1. Reported by Matthew Woehlke.
4705
4706 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
4707
4708         Suggestions by Bruno Haible:
4709         * lib/acl-internal.h: Include "gettext.h" rather than rolling
4710         our own.
4711         (ACL_NOT_WELL_SUPPORTED): Parenthesize arg when used.
4712         * modules/acl (Depends-on): Add gettext.
4713
4714 2007-03-19  Bruno Haible  <bruno@clisp.org>
4715
4716         * modules/iconvme: Remove file.
4717         * lib/iconvme.h: Remove file.
4718         * lib/iconvme.c: Remove file.
4719         * m4/iconvme.m4: Remove file.
4720
4721 2007-03-19  Bruno Haible  <bruno@clisp.org>
4722
4723         * doc/relocatable-maint.texi: Break long shell script line.
4724         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
4725
4726 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
4727
4728         Add limited support for Solaris 10 ZFS-style ACLs: just enough to
4729         handle file_has_acl.
4730         * lib/acl-internal.h, lib/acl_entries.c, lib/file-has-acl.c: New files.
4731         * lib/acl.c: Move header inclusions and related macro defns into
4732         lib/acl-internal.h.
4733         (S_ISLNK): Remove defn, since that's now done for us.
4734         (file_has_acl): Move to lib/file-has-acl.c.
4735         Call acl_trivial if available.  This is the crucial part of the fix.
4736         (acl_entries): Move to lib/acl_entries.c.  Now extern, since it's
4737         shared within the library.  Rewrite a bit, partly to make it compatible
4738         with the GNU coding style.
4739         * m4/acl.m4 (AC_FUNC_ACL): Add AC_LIBOBJ([file-has-acl]).
4740         Remove unnecessary double-quotes.
4741         Don't test for acl_to_text; the build will catch that.
4742         Replace acl_entries if it doesn't exist and it is needed.
4743         Check for -lsec and acl_trivial (as used on Solaris 10).
4744         * modules/acl (Files): Add lib/acl-internal.h, lib/acl_entries.c,
4745         lib/file-has-acl.c.
4746         (Depends-on): Add sys_stat, for S_ISLNK.
4747
4748 2007-03-19  Ben Pfaff  <blp@gnu.org>
4749
4750         * doc/gnulib.texi: Fix typos.
4751         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
4752
4753 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
4754
4755         * lib/getcwd.c (__getcwd): Remove redundant comparison of buf to NULL.
4756         If size is zero here, buf must be zero.
4757
4758 2007-03-19  Simon Josefsson  <simon@josefsson.org>
4759
4760         * des.c: Remove weak_keys_chksum.  Reported by Bruno Haible
4761         <bruno@clisp.org>.
4762
4763 2007-03-18  Bruno Haible  <bruno@clisp.org>
4764
4765         * lib/vasnprintf.c (VASNPRINTF): Undo first part of last patch.
4766         Suggested by Eric Blake.
4767
4768 2007-03-18  Ben Pfaff  <blp@gnu.org>
4769
4770         * doc/relocatable.texi: Recommend using as prefix a directory
4771         that does not exist and will never be created.  Based on
4772         discussion with Bruno Haible, Ralf Wildenhues, Matthew Woehlke,
4773         and others.
4774
4775 2007-03-17  Bruno Haible  <bruno@clisp.org>
4776
4777         * lib/fchownat.c: Include lchown.h.
4778
4779 2007-03-17  Bruno Haible  <bruno@clisp.org>
4780
4781         Fix endless loop when the given allocated size was > INT_MAX.
4782         * lib/vasnprintf.c (EOVERFLOW): New fallback definition.
4783         (VASNPRINTF): Fail with EOVERFLOW when the given allocated size is
4784         larger than INT_MAX, or when it grow to a value larger than INT_MAX.
4785         * lib/vsprintf.c (vsprintf): Don't pass a size > INT_MAX to vasnprintf.
4786         * lib/sprintf.c (sprintf): Likewise.
4787
4788 2007-03-17  Bruno Haible  <bruno@clisp.org>
4789
4790         * tests/test-argp-2.sh (func_compare): Output a context diff.
4791
4792 2007-03-17  Bruno Haible  <bruno@clisp.org>
4793
4794         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Check also the
4795         locale's decimal-point character.
4796
4797 2007-03-17  Bruno Haible  <bruno@clisp.org>
4798
4799         * lib/vasnprintf.c (VASNPRINTF): Clear out the memory used for arg_mem
4800         before comparing it. Needed because on some platforms (e.g. x86) a
4801         'long double' occupies less bytes than sizeof (long double).
4802
4803 2007-03-17  Bruno Haible  <bruno@clisp.org>
4804
4805         * tests/test-crc.c (main): Make printf statements 64-bit clean.
4806         * tests/test-gc-pbkdf2-sha1.c (main): Likewise.
4807         * tests/test-getaddrinfo.c (simple): Likewise.
4808         * tests/test-read-file.c (main): Likewise.
4809
4810 2007-03-17  Bruno Haible  <bruno@clisp.org>
4811
4812         * tests/test-dirname.c (main): Make printf statements 64-bit clean.
4813
4814 2007-03-17  Bruno Haible  <bruno@clisp.org>
4815
4816         * tests/test-xvasprintf.c (test_xvasprintf, test_xasprintf): Remove
4817         unused variable.
4818
4819 2007-03-17  Bruno Haible  <bruno@clisp.org>
4820
4821         * tests/test-c-strcasecmp.c: Include c-strcase.h.
4822         * tests/test-c-strncasecmp.c: Likewise.
4823
4824 2007-03-17  Bruno Haible  <bruno@clisp.org>
4825
4826         * modules/stdlib (Depends-on): Add unistd.
4827         * lib/stdlib_.h: Include <unistd.h> if mkstemp is desired.
4828         Needed for MacOS X 10.3.
4829
4830 2007-03-17  Bruno Haible  <bruno@clisp.org>
4831
4832         * lib/unistr/u-strdup.h: Include <stdlib.h>.
4833
4834 2007-03-17  Bruno Haible  <bruno@clisp.org>
4835
4836         * lib/unistr/u-cpy-alloc.h: Include <stdlib.h>.
4837
4838 2007-03-17  Bruno Haible  <bruno@clisp.org>
4839
4840         * gnulib-tool (func_import): Update .cvsignore and .gitignore files
4841         to reflect files copied from gnulib (with or without modifications).
4842         Suggested by Jim Meyering.
4843
4844 2007-03-17  Eric Blake  <ebb9@byu.net>
4845
4846         * NEWS: Document stdlib change from 2007-02-18.
4847
4848 2007-03-17  Jim Meyering  <jim@meyering.net>
4849
4850         Detect use of AC_CONFIG_AUX_DIR also when its argument is quoted.
4851         * build-aux/bootstrap: Put ""s around use of $build_aux, in case
4852         someone uses a name containing shell meta-characters.
4853         Reported by Alfred M. Szmidt.
4854
4855         * build-aux/bootstrap: Don't use \> in grep regexp.  For HP-UX.
4856
4857 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
4858
4859         * build-aux/bootstrap (with_gettext): New variable.  Run autopoint
4860         and copy gettext configuration files only if configure.ac contains
4861         a use of AM_GNU_GETTEXT_VERSION.
4862
4863 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
4864
4865         * build-aux/bootstrap (gnulib_name): New variable.
4866         (gnulib_tool_options): Use it.
4867
4868 2007-03-13  Simon Josefsson  <simon@josefsson.org>
4869
4870         * tests/test-des.c: Use new namespace.
4871
4872 2007-03-15  Bruno Haible  <bruno@clisp.org>
4873
4874         * lib/dummy.c (gl_dummy_symbol): Renamed from 'dummy'.
4875         Reported by James Youngman <jay@gnu.org>.
4876
4877 2007-03-15  Bruno Haible  <bruno@clisp.org>
4878
4879         * lib/glob.c (glob): Add 'restrict' so that prototype matches the
4880         declared prototype. Needed with cc on OSF/1 5.1.
4881
4882 2007-03-15  Bruno Haible  <bruno@clisp.org>
4883
4884         * lib/gl_list.h (gl_listelement_dispose_fn): New type.
4885         (gl_list_create_empty, gl_list_create): Add dispose_fn argument.
4886         (struct gl_list_implementation): Add dispose_fn argument to the
4887         'create_empty', 'create' methods.
4888         (struct gl_list_impl_base): Add field 'dispose_fn'.
4889         * lib/gl_list.c (gl_list_create_empty, gl_list_create): Add dispose_fn
4890         argument.
4891         * lib/gl_array_list.c (gl_array_create_empty, gl_array_create): Add
4892         dispose_fn argument.
4893         (gl_array_remove_node, gl_array_remove_at, gl_array_list_free): Call
4894         dispose_fn on the dropped values.
4895         * lib/gl_carray_list.c (gl_carray_create_empty, gl_carray_create): Add
4896         dispose_fn argument.
4897         (gl_carray_remove_at, gl_carray_list_free): Call dispose_fn on the
4898         dropped values.
4899         * lib/gl_anyavltree_list2.h (gl_tree_create): Add dispose_fn argument.
4900         (gl_tree_remove_node): Call dispose_fn on the dropped value.
4901         * lib/gl_anyrbtree_list2.h (gl_tree_create): Add dispose_fn argument.
4902         (gl_tree_remove_node): Call dispose_fn on the dropped value.
4903         * lib/gl_anytree_list2.h (gl_tree_create_empty): Add dispose_fn
4904         argument.
4905         (gl_tree_list_free): Call dispose_fn on the dropped values.
4906         * lib/gl_anytreehash_list2.h (gl_tree_list_free): Call dispose_fn on
4907         the dropped values.
4908         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
4909         Add dispose_fn argument.
4910         (gl_linked_remove_node, gl_linked_remove_at, gl_linked_list_free):
4911         Call dispose_fn on the dropped values.
4912         * lib/gl_sublist.c (gl_sublist_create_empty, gl_sublist_create_fill):
4913         Add dispose_fn argument.
4914         (gl_sublist_create): Initialize the 'dispose_fn' field.
4915         * lib/clean-temp.c (create_temp_dir, register_fd): Update.
4916         * tests/test-array_list.c (main): Update.
4917         * tests/test-carray_list.c (main): Update.
4918         * tests/test-avltree_list.c (main): Update.
4919         * tests/test-rbtree_list.c (main): Update.
4920         * tests/test-avltreehash_list.c (main): Update.
4921         * tests/test-rbtreehash_list.c (main): Update.
4922         * tests/test-linked_list.c (main): Update.
4923         * tests/test-linkedhash_list.c (main): Update.
4924         * tests/test-array_oset.c (main): Update.
4925
4926 2007-03-15  Bruno Haible  <bruno@clisp.org>
4927
4928         * lib/gl_oset.h (gl_setelement_dispose_fn): New type.
4929         (gl_oset_create_empty): Add dispose_fn argument.
4930         (struct gl_oset_implementation): Add dispose_fn argument to
4931         'create_empty' method.
4932         (struct gl_oset_impl_base): Add dispose_fn field.
4933         * lib/gl_oset.c (gl_oset_create_empty): Add dispose_fn argument.
4934         * lib/gl_array_oset.c (gl_array_create_empty): Add dispose_fn argument.
4935         (gl_array_remove_at, gl_array_free): Call dispose_fn on the dropped
4936         values.
4937         * lib/gl_anytree_oset.h (gl_tree_create_empty): Add dispose_fn argument.
4938         (gl_tree_oset_free): Call dispose_fn on the dropped values.
4939         * lib/gl_avltree_oset.c (gl_tree_remove_node): Call dispose_fn on the
4940         dropped value.
4941         * lib/gl_rbtree_oset.c (gl_tree_remove_node): Call dispose_fn on the
4942         dropped value.
4943         * tests/test-array_oset.c (main): Update.
4944         * tests/test-avltree_oset.c (main): Update.
4945         * tests/test-rbtree_oset.c (main): Update.
4946         * lib/gl_anytreehash_list1.h (add_to_bucket): Update.
4947
4948 2007-03-13  Bruno Haible  <bruno@clisp.org>
4949
4950         * tests/test-stdbool.c (i): Update after last patch.
4951
4952 2007-03-12  Bruno Haible  <bruno@clisp.org>
4953
4954         * lib/quotearg.c: Include <wctype.h> early, before the definition of
4955         the iswprint macro. Needed on Solaris 2.5.1.
4956
4957 2007-03-12  Bruno Haible  <bruno@clisp.org>
4958
4959         * tests/test-printf-frexp.c (main): Declare x as volatile.
4960
4961 2007-03-12  Simon Josefsson  <simon@josefsson.org>
4962
4963         * doc/gnulib.texi (Build robot for gnulib): New section.
4964
4965 2007-03-12  Jim Meyering  <jim@meyering.net>
4966
4967         * build-aux/bootstrap: New file.
4968         * build-aux/bootstrap.conf: New file, from coreutils.
4969
4970 2007-03-11  Bruno Haible  <bruno@clisp.org>
4971
4972         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Require AC_C_INLINE.
4973
4974 2007-03-12  Simon Josefsson  <simon@josefsson.org>
4975
4976         * lib/des.h, lib/des.c, lib/gc-gnulib.c: Use gl_ namespace, to
4977         avoid collisions with 'des_setkey'.  Reported by Bruno Haible
4978         <bruno@clisp.org>.  Also change 'tripledes_' to '3des_'.
4979
4980 2007-03-11  Bruno Haible  <bruno@clisp.org>
4981
4982         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): If the test program fails to
4983         compile, set LOCALE_TR_UTF8 to 'none' instead of empty.
4984
4985 2007-03-11  Bruno Haible  <bruno@clisp.org>
4986
4987         * lib/stdint_.h (INT64_MIN, INTMAX_MIN): Avoid using the ~INT..._MAX
4988         formula. Needed for SunPRO C 5.0.
4989
4990 2007-03-11  Bruno Haible  <bruno@clisp.org>
4991
4992         * modules/long-options (Depends-on): Add getopt.
4993
4994 2007-03-11  Bruno Haible  <bruno@clisp.org>
4995
4996         * modules/modechange (Depends-on): Add stdbool.
4997
4998 2007-03-11  Bruno Haible  <bruno@clisp.org>
4999
5000         * modules/i-ring (Depends-on): Add stdbool.
5001
5002 2007-03-11  Bruno Haible  <bruno@clisp.org>
5003
5004         * modules/gc-des (Depends-on): Add stdbool.
5005
5006 2007-03-11  Bruno Haible  <bruno@clisp.org>
5007
5008         * m4/mktime.m4 (gl_PREREQ_MKTIME): Require AC_C_INLINE.
5009
5010 2007-03-11  Bruno Haible  <bruno@clisp.org>
5011
5012         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Require AC_C_RESTRICT.
5013
5014 2007-03-11  Bruno Haible  <bruno@clisp.org>
5015
5016         * lib/unistr/u32-mbtouc-unsafe.c (u32_mbtouc_unsafe): Fix syntax error.
5017
5018 2007-03-11  Bruno Haible  <bruno@clisp.org>
5019
5020         * lib/vasnprintf.c (sprintf): Undefine.
5021
5022 2007-03-11  Bruno Haible  <bruno@clisp.org>
5023
5024         * lib/isnan.c (rpl_isnan, rpl_isnanl): Work around bug regarding
5025         initializers in SunPRO C and Compaq C compilers.
5026
5027 2007-03-11  Bruno Haible  <bruno@clisp.org>
5028
5029         * lib/gl_array_oset.c (gl_array_iterator_next): Make pointer
5030         decrementing code ANSI C compliant.
5031
5032 2007-03-11  Bruno Haible  <bruno@clisp.org>
5033
5034         * lib/dummy.c [__sun]: Define a dummy variable, not just a typedef.
5035         Needed for Solaris 2.5.1 ranlib and SunPRO C 5.0.
5036
5037 2007-03-11  Bruno Haible  <bruno@clisp.org>
5038
5039         * tests/test-stdbool.c (s, d, e, xlcbug): Disable checks that gnulib's
5040         <stdbool.h> substitute doesn't pass.
5041
5042 2007-03-11  Bruno Haible  <bruno@clisp.org>
5043
5044         * lib/vasnprintf.c (snprintf): Undefine. Avoids an endless recursion.
5045
5046 2007-03-11  Bruno Haible  <bruno@clisp.org>
5047
5048         * gnulib-tool (func_create_megatestdir): Create also an autobuild
5049         script, for submission to autobuild.josefsson.org.
5050
5051 2007-03-10  Bruno Haible  <bruno@clisp.org>
5052
5053         * modules/canonicalize-lgpl-tests: New file.
5054         * tests/test-canonicalize-lgpl.sh: New file.
5055         * tests/test-canonicalize-lgpl.c: New file.
5056
5057         * modules/c-strcase-tests: New file.
5058         * tests/test-c-strcase.sh: New file.
5059         * tests/test-c-strcasecmp.c: New file.
5060         * tests/test-c-strncasecmp.c: New file.
5061
5062         * modules/atexit-tests: New file.
5063         * tests/test-atexit.sh: New file.
5064         * tests/test-atexit.c: New file.
5065
5066 2007-03-10  Bruno Haible  <bruno@clisp.org>
5067
5068         * tests/test-binary-io.sh: Use temporary filenames that are not so
5069         likely to clash with those of other tests (in a parallel make).
5070         * tests/test-binary-io.c: Likewise.
5071
5072 2007-03-10  Bruno Haible  <bruno@clisp.org>
5073
5074         * lib/fseterr.c (fseterr): Port to Solaris/SPARC64. Deactivate the
5075         fallback; use #error instead.
5076         Suggested by Simon Josefsson.
5077
5078 2007-03-10  Bruno Haible  <bruno@clisp.org>
5079
5080         * gnulib-tool (func_create_testdir): Treat MOSTLYCLEANFILES like
5081         CLEANFILES. Put spaces in each line of $cleaned_files, not only the
5082         first and the last.
5083
5084 2007-03-10  Bruno Haible  <bruno@clisp.org>
5085
5086         * lib/stdint_.h (uint_least64_t): Fix typo in last patch.
5087
5088 2007-03-10  Bruno Haible  <bruno@clisp.org>
5089
5090         * modules/snprintf-posix-tests (EXTRA_DIST): New variable. Needed for
5091         "make distcheck".
5092         * modules/sprintf-posix-tests (EXTRA_DIST): Likewise.
5093         * modules/vsnprintf-posix-tests (EXTRA_DIST): Likewise.
5094         * modules/vsprintf-posix-tests (EXTRA_DIST): Likewise.
5095
5096 2007-03-10  Bruno Haible  <bruno@clisp.org>
5097
5098         * modules/allocsa-tests (test_allocsa_SOURCES): Remove redundant
5099         variable.
5100         * modules/dirname-tests (test_dirname_SOURCES): Remove redundant
5101         variable.
5102
5103 2007-03-09  Eric Blake  <ebb9@byu.net>
5104         and Matthew Woehlke  <mw_triad@users.sourceforge.net>  (tiny change)
5105
5106         * lib/stdint_.h (int64_t, uint64_t): Don't undefine if 64-bit
5107         types are not being provided by gnulib.
5108         (GL_INT64_T, GL_UINT64_T): New witnesses of whether gnulib 64-bit
5109         types are supported.
5110
5111 2007-03-10  Bruno Haible  <bruno@clisp.org>
5112
5113         * lib/stdio_.h (__attribute__): New macro.
5114         (fprintf, vfprintf, printf, vprintf, snprintf, vsnprintf, sprintf,
5115         vsprintf): Specify __attribute__ __format__ for GCC.
5116         Suggested by Eric Blake.
5117
5118 2007-03-09  Bruno Haible  <bruno@clisp.org>
5119
5120         * modules/printf-posix-tests: New file.
5121         * tests/test-printf-posix.sh: New file.
5122         * tests/test-printf-posix.c: New file.
5123
5124         * modules/printf-posix: New file.
5125         * lib/printf.c: New file.
5126         * m4/printf-posix-rpl.m4: New file.
5127         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_PRINTF_POSIX,
5128         REPLACE_PRINTF.
5129         * lib/stdio_.h (printf): New declaration.
5130         (format, __format__, ____printf____, ____scanf____, ____strftime____,
5131         ____strfmon____): New macros.
5132         * modules/stdio (Makefile.am): Substitute also GNULIB_PRINTF_POSIX,
5133         REPLACE_PRINTF.
5134
5135 2007-03-09  Bruno Haible  <bruno@clisp.org>
5136
5137         * tests/test-vasnprintf-posix2.sh: New file.
5138         * tests/test-vasnprintf-posix2.c: New file.
5139         * modules/vasnprintf-posix-tests (Files): Add them and m4/locale-fr.m4.
5140         (configure.ac): Invoke gt_LOCALE_FR and gt_LOCALE_FR_UTF8.
5141         (Makefile.am): Activate test-vasnprintf-posix2.sh.
5142
5143         * lib/vasnprintf.c (VASNPRINTF): For the 'a' and 'A' directives, use
5144         a locale dependent decimal point, rather than always '.'.
5145
5146 2007-03-09  Eric Blake  <ebb9@byu.net>
5147
5148         * lib/stdlib_.h (EXIT_FAILURE): GNU code expects this to be 1, in
5149         spite of platforms like Tandem/NSK that define it to -1.
5150
5151 2007-03-08  Bruno Haible  <bruno@clisp.org>
5152
5153         * modules/vprintf-posix-tests: New file.
5154         * tests/test-vprintf-posix.sh: New file.
5155         * tests/test-vprintf-posix.c: New file.
5156         * tests/test-printf-posix.h: New file.
5157
5158         * modules/vprintf-posix: New file.
5159         * lib/vprintf.c: New file.
5160         * m4/vprintf-posix.m4: New file.
5161         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VPRINTF_POSIX,
5162         REPLACE_VPRINTF.
5163         * lib/stdio_.h (vprintf): New declaration.
5164         * modules/stdio (Makefile.am): Substitute also GNULIB_VPRINTF_POSIX,
5165         REPLACE_VPRINTF.
5166
5167 2007-03-08  Bruno Haible  <bruno@clisp.org>
5168
5169         * modules/fprintf-posix-tests: New file.
5170         * tests/test-fprintf-posix.sh: New file.
5171         * tests/test-fprintf-posix.c: New file.
5172
5173         * modules/fprintf-posix: New file.
5174         * lib/fprintf.c: New file.
5175         * m4/fprintf-posix.m4: New file.
5176         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FPRINTF_POSIX,
5177         REPLACE_FPRINTF.
5178         * lib/stdio_.h (fprintf): New declaration.
5179         * modules/stdio (Makefile.am): Substitute also GNULIB_FPRINTF_POSIX,
5180         REPLACE_FPRINTF.
5181
5182 2007-03-08  Bruno Haible  <bruno@clisp.org>
5183
5184         * modules/vfprintf-posix-tests: New file.
5185         * tests/test-vfprintf-posix.sh: New file.
5186         * tests/test-vfprintf-posix.c: New file.
5187         * tests/test-fprintf-posix.h: New file.
5188         * tests/test-fprintf-posix.out: New file.
5189
5190         * modules/vfprintf-posix: New file.
5191         * lib/vfprintf.c: New file.
5192         * m4/vfprintf-posix.m4: New file.
5193         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VFPRINTF_POSIX,
5194         REPLACE_VFPRINTF.
5195         * lib/stdio_.h (vfprintf): New declaration.
5196         * modules/stdio (Makefile.am): Substitute also GNULIB_VFPRINTF_POSIX,
5197         REPLACE_VFPRINTF.
5198
5199 2007-03-08  Bruno Haible  <bruno@clisp.org>
5200
5201         * lib/stdio_.h: Treat __need___FILE like __need_FILE.
5202
5203 2007-03-08  Bruno Haible  <bruno@clisp.org>
5204
5205         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Use 'case' statements
5206         instead of 'expr' invocations.
5207         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
5208         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
5209         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
5210         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
5211         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
5212         Suggested by Paul Eggert.
5213
5214 2007-03-08  Bruno Haible  <bruno@clisp.org>
5215
5216         * modules/fseterr-tests: New file.
5217         * tests/test-fseterr.c: New file.
5218
5219         * modules/fseterr: New file.
5220         * lib/fseterr.h: New file.
5221         * lib/fseterr.c: New file.
5222
5223 2007-03-08  Bruno Haible  <bruno@clisp.org>
5224
5225         * lib/fnmatch_.h: Convert tabs in the middle of lines to spaces.
5226         * lib/getopt_.h: Likewise.
5227         * lib/mbswidth.h: Likewise.
5228         * lib/setenv.h: Likewise.
5229         * lib/vasnprintf.h: Likewise.
5230         * lib/vasprintf.h: Likewise.
5231         * lib/verror.h: Likewise.
5232         * lib/xsetenv.h: Likewise.
5233         * lib/xvasprintf.h: Likewise.
5234
5235 2007-03-08  Jim Meyering  <jim@meyering.net>
5236
5237         * users.txt: Add parted.
5238
5239         * ChangeLog: Restore 1500 lines mistakenly removed from the end.
5240
5241 2007-03-07  Bruno Haible  <bruno@clisp.org>
5242
5243         * m4/printf.m4: Make the shell script snippets copy&pastable.
5244
5245 2007-03-02  Bruno Haible  <bruno@clisp.org>
5246
5247         * lib/netinet_in_.h: New file.
5248         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Test whether netinet/in.h
5249         is self-contained. Set ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H.
5250         * modules/netinet_in (Files): Add lib/netinet_in_.h.
5251         (Depends-on): Add absolute-header.
5252         (Makefile.am): Substitute ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H
5253         into netinet/in.h.
5254
5255 2007-03-03  Bruno Haible  <bruno@clisp.org>
5256
5257         * lib/sys_select_.h: New file.
5258         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SELECT): Test whether sys/select.h
5259         is self-contained. Set ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H.
5260         * modules/sys_select (Files): Add lib/sys_select_.h.
5261         (Depends-on): Add absolute-header.
5262         (Makefile.am): Substitute ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H
5263         into sys/select.h.
5264
5265 2007-03-02  Bruno Haible  <bruno@clisp.org>
5266
5267         * lib/socket_.h: If sys/socket.h exists, include that and <sys/types.h>
5268         before it. Turn HAVE_WINSOCK2_H and HAVE_WS2TCPIP_H into configute-time
5269         values.
5270         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Test also whether
5271         <sys/socket.h> is self-contained. Set ABSOLUTE_SYS_SOCKET_H,
5272         HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H.
5273         * modules/sys_socket (Depends-on): Add absolute-header.
5274         (Makefile.am): Substitute ABSOLUTE_SYS_SOCKET_H, HAVE_SYS_SOCKET_H,
5275         HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H into sys/socket.h.
5276         (Include): Remove requirement of inclusion of <sys/types.h>.
5277
5278 2007-03-02  Bruno Haible  <bruno@clisp.org>
5279
5280         * lib/byteswap_.h (bswap_32): Fix formula.
5281
5282 2007-03-06  Bruno Haible  <bruno@clisp.org>
5283
5284         * modules/sprintf-posix-tests: New file.
5285         * tests/test-sprintf-posix.c: New file.
5286
5287         * modules/sprintf-posix: New file.
5288         * lib/sprintf.c: New file.
5289         * m4/sprintf-posix.m4: New file.
5290         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_SPRINTF_POSIX,
5291         REPLACE_SPRINTF.
5292         * lib/stdio_.h (sprintf): New declaration.
5293         * modules/stdio (Makefile.am): Substitute also GNULIB_SPRINTF_POSIX,
5294         REPLACE_SPRINTF.
5295
5296 2007-03-06  Bruno Haible  <bruno@clisp.org>
5297
5298         * modules/vsprintf-posix-tests: New file.
5299         * tests/test-vsprintf-posix.c: New file.
5300         * tests/test-sprintf-posix.h: New file.
5301
5302         * modules/vsprintf-posix: New file.
5303         * lib/vsprintf.c: New file.
5304         * m4/vsprintf-posix.m4: New file.
5305         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VSPRINTF_POSIX,
5306         REPLACE_VSPRINTF.
5307         * lib/stdio_.h (vsprintf): New declaration.
5308         * modules/stdio (Makefile.am): Substitute also GNULIB_VSPRINTF_POSIX,
5309         REPLACE_VSPRINTF.
5310
5311 2007-03-06  Bruno Haible  <bruno@clisp.org>
5312
5313         * modules/vsnprintf (Depend-on): Remove minmax.
5314
5315 2007-03-06  Bruno Haible  <bruno@clisp.org>
5316
5317         * modules/snprintf-posix-tests: New file.
5318         * tests/test-snprintf-posix.c: New file.
5319
5320         * modules/snprintf-posix: New file.
5321         * m4/snprintf-posix.m4: New file.
5322         * m4/snprintf.m4 (gl_REPLACE_SNPRINTF): New macro, extracted from
5323         gl_FUNC_SNPRINTF.
5324         (gl_FUNC_SNPRINTF): Invoke it.
5325         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_SNPRINTF.
5326         * lib/stdio_.h (snprintf): Define as a replacement if REPLACE_SNPRINTF
5327         is set.
5328         * modules/stdio (Makefile.am): Substitute also REPLACE_SNPRINTF.
5329
5330 2007-03-06  Bruno Haible  <bruno@clisp.org>
5331
5332         * modules/vsnprintf-posix-tests: New file.
5333         * tests/test-vsnprintf-posix.c: New file.
5334         * tests/test-snprintf-posix.h: New file.
5335
5336         * modules/vsnprintf-posix: New file.
5337         * m4/vsnprintf-posix.m4: New file.
5338         * m4/vsnprintf.m4 (gl_REPLACE_VSNPRINTF): New macro, extracted from
5339         gl_FUNC_VSNPRINTF.
5340         (gl_FUNC_VSNPRINTF): Invoke it.
5341         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_VSNPRINTF.
5342         * lib/stdio_.h (vsnprintf): Define as a replacement if
5343         REPLACE_VSNPRINTF is set.
5344         * modules/stdio (Makefile.am): Substitute also REPLACE_VSNPRINTF.
5345
5346 2007-03-06  Bruno Haible  <bruno@clisp.org>
5347
5348         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Test for vasnprintf here.
5349         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): ... not here.
5350
5351 2007-03-06  Bruno Haible  <bruno@clisp.org>
5352
5353         * lib/math_.h (acosl): Declare also if HAVE_DECL_ACOSL is set.
5354         (asinl): Declare also if HAVE_DECL_ASINL is set.
5355         (atanl): Declare also if HAVE_DECL_ATANL is set.
5356         (ceill): Declare also if HAVE_DECL_CEILL is set.
5357         (cosl): Declare also if HAVE_DECL_COSL is set.
5358         (expl): Declare also if HAVE_DECL_EXPL is set.
5359         (floorl): Declare also if HAVE_DECL_FLOORL is set.
5360         (frexpl): Declare also if HAVE_DECL_FREXPL is set.
5361         (ldexpl): Declare also if HAVE_DECL_LDEXPL is set.
5362         (logl): Declare also if HAVE_DECL_LOGL is set.
5363         (sinl): Declare also if HAVE_DECL_SINL is set.
5364         (sqrtl): Declare also if HAVE_DECL_SQRTL is set.
5365         (tanl): Declare also if HAVE_DECL_TANL is set.
5366         * modules/math (Makefile.am): Substitute the values of HAVE_DECL_*.
5367         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Set HAVE_DECL_* to 1.
5368         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Fix tests for the
5369         declaration of frexpl, ldexpl.
5370         * modules/printf-frexpl (Depends-on): Add math.
5371         * lib/printf-frexp.c (frexpl, ldexpl): Undo last change.
5372
5373 2007-03-05  Bruno Haible  <bruno@clisp.org>
5374
5375         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Also test whether
5376         frexpl and ldexpl are declared.
5377         * lib/printf-frexp.c (frexpl, ldexpl): Provide fallback declarations.
5378
5379 2007-03-05  Bruno Haible  <bruno@clisp.org>
5380
5381         * gnulib-tool (func_get_automake_snippet): Don't synthesize an
5382         EXTRA_lib_SOURCES augmentation for the relocatable-prog-wrapper module.
5383
5384 2007-03-05  Bruno Haible  <bruno@clisp.org>
5385
5386         * lib/stdio_.h: Include <stddef.h>.
5387
5388 2007-03-05  Bruno Haible  <bruno@clisp.org>
5389
5390         * m4/printf.m4 (gl_SNPRINTF_DIRECTIVE_N): New macro.
5391
5392 2007-03-05  Bruno Haible  <bruno@clisp.org>
5393
5394         * m4/printf.m4: Update with info about OpenBSD 3.9, HP-UX 10.20,
5395         NetBSD 4, from Ralf Wildenhues.
5396
5397 2007-03-04  Bruno Haible  <bruno@clisp.org>
5398
5399         * lib/vasprintf.h: Update #if logic for the case when the functions
5400         exist but are overridden.
5401
5402 2007-03-04  Bruno Haible  <bruno@clisp.org>
5403
5404         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Exclude two buggy
5405         implementations: glibc-2.4 and MacOS X 10.3.
5406         * tests/test-vasnprintf-posix.c (test_function): Test also the case
5407         that exhibits the bugs in glibc-2.4 and MacOS X 10.3.
5408         * tests/test-vasprintf-posix.c (test_function): Likewise.
5409
5410 2007-03-04  Bruno Haible  <bruno@clisp.org>
5411
5412         * modules/vasprintf-posix-tests: New file.
5413         * tests/test-vasprintf-posix.c: New file.
5414
5415         * modules/vasprintf-posix: New file.
5416         * lib/vasprintf.h (asprintf, vasprintf): Rename if REPLACE_VASPRINTF is
5417         defined.
5418         * m4/vasprintf-posix.m4: New file.
5419         * m4/vasprintf.m4 (gl_REPLACE_VASPRINTF): New macro, extracted from
5420         gl_FUNC_VASPRINTF.
5421         (gl_FUNC_VASPRINTF): Invoke it.
5422         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Define REPLACE_VASNPRINTF
5423         here.
5424         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Not here.
5425
5426 2007-03-04  Bruno Haible  <bruno@clisp.org>
5427
5428         * lib/sys_time_.h: Rename GETTIMEOFDAY_REPLACEMENT to
5429         REPLACE_GETTIMEOFDAY.
5430         * modules/sys_time (Makefile.am): Likewise.
5431         * m4/sys_time_h.m4: Likewise.
5432         * m4/gettimeofday.m4: Likewise.
5433
5434 2007-03-04  Bruno Haible  <bruno@clisp.org>
5435
5436         * modules/vasnprintf-posix-tests: New file.
5437         * tests/test-vasnprintf-posix.c: New file.
5438
5439         * modules/vasnprintf-posix: New file.
5440         * lib/vasnprintf.c: Include isnan.h, isnanl.h, printf-frexp.h,
5441         printf-frexpl.h.
5442         (VASNPRINTF): Handle the 'a' and 'A' directives here, if needed.
5443         * lib/vasnprintf.h (asnprintf, vasnprintf): Rename if
5444         REPLACE_VASNPRINTF is defined.
5445         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): New macro, extracted from
5446         gl_FUNC_VASNPRINTF.
5447         (gl_FUNC_VASNPRINTF): Invoke it.
5448         * m4/vasnprintf-posix.m4: New file.
5449         * m4/printf.m4: New file.
5450
5451 2007-03-04  Bruno Haible  <bruno@clisp.org>
5452
5453         Compile progreloc.c only if --enable-relocatable is specified.
5454         * m4/relocatable.m4 (gl_RELOCATABLE): Arrange to compile progreloc.c
5455         if --enable-relocatable was specified.
5456         * modules/relocatable-prog (Makefile.am): Remove progreloc.c from
5457         lib_SOURCES.
5458
5459 2007-03-04  Jim Meyering  <jim@meyering.net>
5460
5461         * lib/acl.c (ACL_NOT_WELL_SUPPORTED): New macro.
5462         Use it consistently, rather than enumerating errno constants.
5463
5464 2007-03-04  Bruno Haible  <bruno@clisp.org>
5465
5466         * modules/xvasprintf-tests: New file.
5467         * tests/test-xvasprintf.c: New file.
5468
5469         * modules/vasprintf-tests: New file.
5470         * tests/test-vasprintf.c: New file.
5471
5472         * modules/vasnprintf-tests: New file.
5473         * tests/test-vasnprintf.c: New file.
5474
5475         * modules/vsnprintf-tests: New file.
5476         * tests/test-vsnprintf.c: New file.
5477
5478         * modules/snprintf-tests: New file.
5479         * tests/test-snprintf.c: New file.
5480
5481 2007-03-04  Bruno Haible  <bruno@clisp.org>
5482
5483         Compile relocatable.c only if --enable-relocatable is specified.
5484         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY_BODY): Renamed from
5485         gl_RELOCATABLE_LIBRARY.
5486         (gl_RELOCATABLE_LIBRARY, gl_RELOCATABLE_LIBRARY_SEPARATE): New macros.
5487         * m4/relocatable.m4 (gl_RELOCATABLE): Invoke gl_RELOCATABLE_LIBRARY.
5488         (gl_RELOCATABLE_BODY): Require gl_RELOCATABLE_LIBRARY_BODY instead of
5489         gl_RELOCATABLE_LIBRARY.
5490         * modules/relocatable-lib (configure.ac): Invoke gl_RELOCATABLE_LIBRARY.
5491         (Makefile.am): Remove lib_SOURCES.
5492         * modules/relocatable-lib-lgpl (configure.ac): Invoke
5493         gl_RELOCATABLE_LIBRARY.
5494         (Makefile.am): Remove lib_SOURCES.
5495         * modules/relocatable-prog (Makefile.am): Don't compile relocatable.c
5496         always.
5497         * modules/relocatable-prog-wrapper (configure.ac): Invoke
5498         gl_RELOCATABLE_LIBRARY_SEPARATE instead of gl_RELOCATABLE_LIBRARY.
5499
5500 2007-03-04  Bruno Haible  <bruno@clisp.org>
5501
5502         * modules/argmatch-tests: New file.
5503         * tests/test-argmatch.c: New file.
5504
5505         * tests/test-allocsa.c (main): Halve the number of loop runs.
5506
5507         * modules/alloca-opt-tests: New file.
5508         * tests/test-alloca-opt.c: New file.
5509
5510 2007-03-04  Jim Meyering  <jim@meyering.net>
5511
5512         Work around difference between Linux ACLs and Solaris 10 ZFS.
5513         * lib/acl.c (set_acl): Revert to using chmod_or_fchmod also
5514         for EINVAL.
5515
5516 2007-03-03  Bruno Haible  <bruno@clisp.org>
5517
5518         * modules/relocatable-prog (Depends-on): Add back progreloc's
5519         dependencies: canonicalize-lgpl, xalloc, xreadlink, stdbool, unistd.
5520
5521 2007-03-03  Bruno Haible  <bruno@clisp.org>
5522
5523         * modules/relocatable-lib-lgpl: Renamed from modules/relocatable-lib.
5524         * modules/relocatable-lib: New file.
5525
5526 2007-03-03  Bruno Haible  <bruno@clisp.org>
5527
5528         * modules/relocatable-prog: Renamed from modules/relocatable.
5529         * doc/relocatable-maint.texi: Talk about module 'relocatable-prog'.
5530
5531 2007-03-03  Bruno Haible  <bruno@clisp.org>
5532
5533         * modules/relocatable-script (Files): Add doc/relocatable.texi,
5534         m4/relocatable-lib.m4.
5535         (Depends-on): Remove 'relocatable'.
5536         (configure.ac): Add gl_RELOCATABLE_NOP.
5537
5538 2007-03-03  Bruno Haible  <bruno@clisp.org>
5539
5540         * modules/relocatable-prog-wrapper: New file.
5541         * modules/relocatable (Depends-on): Add it. Remove all other
5542         dependencies except progname.
5543         (Files): Remove build-aux/install-reloc, lib/relocwrapper.c.
5544
5545         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): New macro.
5546         (gl_FUNC_STRERROR): Nop.
5547         * lib/strerror.c: Compile the file only if !HAVE_STRERROR.
5548
5549         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): New macro.
5550         * lib/setenv.c: Compile the file only if _LIBC || !HAVE_SETENV.
5551
5552         * m4/readlink.m4 (gl_FUNC_READLINK_SEPARATE): New macro.
5553         (gl_FUNC_READLINK): Update.
5554
5555         * m4/canonicalize-lgpl.m4 (gl_CANONICALIZE_LGPL_SEPARATE): New macro.
5556
5557 2007-03-03  Bruno Haible  <bruno@clisp.org>
5558
5559         * lib/xreadlink.c: Include <unistd.h> unconditionally.
5560         * modules/xreadlink (Depends-on): Add unistd.
5561         * modules/xreadlink-with-size (Depends-on): Likewise.
5562
5563 2007-03-03  Bruno Haible  <bruno@clisp.org>
5564
5565         * m4/setenv.m4 (gl_FUNC_SETENV, gl_FUNC_UNSETENV): New macros,
5566         extracted from gt_FUNC_SETENV.
5567         (gt_FUNC_SETENV): Remove macro.
5568         * modules/setenv (configure.ac): Add gl_FUNC_SETENV, gl_FUNC_UNSETENV,
5569         remove gt_FUNC_SETENV.
5570
5571 2007-03-03  Bruno Haible  <bruno@clisp.org>
5572
5573         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY): Define
5574         ENABLE_RELOCATABLE here.
5575         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Don't define it here.
5576
5577 2007-03-03  Bruno Haible  <bruno@clisp.org>
5578
5579         * modules/rbtreehash-list-tests (Depends-on): Add progname.
5580         * tests/test-rbtreehash_list.c: Include progname.h.
5581         (main): Call set_program_name.
5582
5583         * modules/rbtree-oset-tests (Depends-on): Add progname.
5584         * tests/test-rbtree_oset.c: Include progname.h.
5585         (main): Call set_program_name.
5586
5587         * modules/rbtree-list-tests (Depends-on): Add progname.
5588         * tests/test-rbtree_list.c: Include progname.h.
5589         (main): Call set_program_name.
5590
5591         * modules/linked-list-tests (Depends-on): Add progname.
5592         * tests/test-linked_list.c: Include progname.h.
5593         (main): Call set_program_name.
5594
5595 2007-03-03  Bruno Haible  <bruno@clisp.org>
5596
5597         * lib/glob-libc.h (_Restrict_): New macro, copied from lib/regex.h.
5598         All uses of __restrict changed to _Restrict_.
5599         * lib/glob_.h (__restrict): Remove macro.
5600
5601 2007-03-02  Bruno Haible  <bruno@clisp.org>
5602
5603         * modules/gettext (configure.ac): Require gettext infrastructure
5604         from version 0.16.1.
5605
5606 2007-03-02  Bruno Haible  <bruno@clisp.org>
5607
5608         * modules/linkedhash-list-tests (Depends-on): Add progname.
5609         * tests/test-linkedhash_list.c: Include progname.h.
5610         (main): Call set_program_name.
5611
5612         * modules/carray-list-tests (Depends-on): Add progname.
5613         * tests/test-carray_list.c: Include progname.h.
5614         (main): Call set_program_name.
5615
5616         * modules/avltreehash-list-tests (Depends-on): Add progname.
5617         * tests/test-avltreehash_list.c: Include progname.h.
5618         (main): Call set_program_name.
5619
5620         * modules/avltree-oset-tests (Depends-on): Add progname.
5621         * tests/test-avltree_oset.c: Include progname.h.
5622         (main): Call set_program_name.
5623
5624         * modules/avltree-list-tests (Depends-on): Add progname.
5625         * tests/test-avltree_list.c: Include progname.h.
5626         (main): Call set_program_name.
5627
5628         * modules/array-oset-tests (Depends-on): Add progname.
5629         * tests/test-array_oset.c: Include progname.h.
5630         (main): Call set_program_name.
5631
5632         * modules/array-list-tests (Depends-on): Add progname.
5633         * tests/test-array_list.c: Include progname.h.
5634         (main): Call set_program_name.
5635
5636         * modules/argp-tests (Depends-on): Add progname.
5637         * tests/test-argp.c: Include argp.h first. Include progname.h.
5638         (main): Call set_program_name.
5639
5640 2007-03-02  Paul Eggert  <eggert@cs.ucla.edu>
5641
5642         * doc/gnulib-tool.texi (Initial import): Reword description of
5643         _FILE_OFFSET_BITS and _GNU_SOURCE, since they sometimes have a
5644         limited effect even if defined after the first system include.
5645
5646 2007-03-01  Bruno Haible  <bruno@clisp.org>
5647
5648         * build-aux/config.libpath: Update to libtool-1.5.22.
5649         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
5650
5651 2007-03-01  Bruno Haible  <bruno@clisp.org>
5652
5653         * doc/relocatable-maint.texi: Recommend to set foo_CPPFLAGS, not
5654         foo_CFLAGS.
5655         Reported by Ralf Wildenhues.
5656
5657 2007-03-01  Bruno Haible  <bruno@clisp.org>
5658
5659         * build-aux/install-reloc: Remove object files left over by some
5660         compilers.
5661         Reported by Ralf Wildenhues.
5662
5663 2007-03-01  Bruno Haible  <bruno@clisp.org>
5664
5665         * build-aux/install-reloc: Break long lines.
5666
5667 2007-03-01  Bruno Haible  <bruno@clisp.org>
5668
5669         * doc/relocatable.texi: Document that it may not work on OpenBSD.
5670         Reported by Ralf Wildenhues.
5671
5672 2007-03-01  Bruno Haible  <bruno@clisp.org>
5673
5674         * doc/gnulib-tool.texi (Initial import): Remove paragraph about
5675         include ordering constraints.
5676
5677 2007-03-01  Paul Eggert  <eggert@cs.ucla.edu>
5678
5679         Followup to the 2007-02-12 patch, using suggestions from Bruno Haible in
5680         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00136.html>.
5681         * doc/gnulib-tool.texi (Initial import): Mention _FILE_OFFSET_BITS
5682         as another example.
5683         * lib/time_.h: Fix misspelling.
5684         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
5685         Require gl_HEADER_TIME_H_DEFAULTS.
5686         * m4/strptime.m4 (gl_FUNC_STRPTIME): Likewise.
5687         * m4/time_r.m4 (gl_TIME_R): Likewise.
5688         * m4/timegm.m4 (gl_FUNC_TIMEGM): Likewise.
5689
5690 2007-03-01  Bruno Haible  <bruno@clisp.org>
5691
5692         * m4/utimecmp.m4 (gl_UTIMECMP): Don't require gl_TIMESPEC.
5693         * m4/utimens.m4 (gl_UTIMENS): Likewise.
5694
5695 2007-03-01  Jim Meyering  <jim@meyering.net>
5696
5697         * modules/xreadlink (Maintainer): Add my name.
5698         * modules/xreadlink-with-size (Depends-on): Alphabetize.
5699
5700 2007-02-26  Ben Pfaff  <blp@cs.stanford.edu>
5701             Bruno Haible  <bruno@clisp.org>
5702
5703         * build-aux/install-reloc: Compile also c-ctype.c.
5704         * build-aux/relocatable.sh.in: New file.
5705         * doc/relocatable.texi: New file.
5706         * doc/relocatable-maint.texi: New file.
5707         * doc/gnulib.texi: Include relocatable-maint.texi.
5708         * lib/progreloc.c: Include unistd.h unconditionally.
5709         * lib/relocwrapper.c: Include unistd.h unconditionally.
5710         Include c-ctype.h.
5711         (add_dotbin): Use c_tolower.
5712         * m4/relocatable-lib.m4: New file, extracted from m4/relocatable.m4.
5713         (gl_RELOCATABLE_LIBRARY): Renamed from AC_RELOCATABLE_LIBRARY.
5714         (gl_RELOCATABLE_NOP): Renamed from AC_RELOCATABLE_NOP.
5715         * m4/relocatable.m4 (AC_RELOCATABLE_LIBRARY, AC_RELOCATABLE_NOP): Move
5716         to m4/relocatable-lib.m4.
5717         (gl_RELOCATABLE): Renamed from AC_RELOCATABLE. Set also
5718         RELOCATABLE_CONFIG_H_DIR, RELOCATABLE_SRC_DIR, RELOCATABLE_BUILD_DIR.
5719         (gl_RELOCATABLE_BODY): Renamed from AC_RELOCATABLE_BODY. Don't
5720         require obsolete macro AC_EXEEXT. Don't check for unistd.h. Don't set
5721         SET_RELOCATABLE. Instead set RELOCATABLE_LDFLAGS, INSTALL_PROGRAM_ENV.
5722         * modules/relocatable: New file.
5723         * modules/relocatable-lib: New file.
5724         * modules/relocatable-script: New file.
5725
5726 2007-02-28  Bruno Haible  <bruno@clisp.org>
5727
5728         Import --enable-relocatable infrastructure.
5729         * build-aux/config.libpath: New file, from GNU gettext.
5730         * build-aux/install-reloc: New file, from GNU gettext.
5731         * build-aux/reloc-ldflags: New file, from GNU gettext.
5732         * lib/relocatable.h: New file, from GNU gettext.
5733         * lib/relocatable.c: New file, from GNU gettext.
5734         * lib/relocwrapper.c: New file, from GNU gettext.
5735         * m4/relocatable.m4: New file, from GNU gettext.
5736
5737 2007-02-28  Bruno Haible  <bruno@clisp.org>
5738
5739         * MODULES.html.sh (File system functions): Add xreadlink-with-size.
5740
5741         * modules/xreadlink: New file, from GNU gettext with modifications.
5742         * lib/xreadlink.c: New file, from GNU gettext.
5743         * lib/xreadlink.h: Add comments.
5744         (xreadlink): New declaration.
5745
5746         * modules/xreadlink-with-size: Renamed from modules/xreadlink.
5747         (Files): Remove m4/xreadlink.m4. Replace lib/xreadlink.c with
5748         lib/xreadlink-with-size.c.
5749         (configure.ac): Remove gl_XREADLINK invocation.
5750         (Makefile.am): Augment lib_SOURCES.
5751         * m4/xreadlink.m4: Remove file.
5752         * lib/xreadlink-with-size.c: Renamed from lib/xreadlink.c.
5753         (xreadlink_with_size): Renamed from xreadink.
5754         * lib/xreadlink.h (xreadlink_with_size): Renamed from xreadink.
5755         * modules/canonicalize (Depends-on): Replace xreadlink with
5756         xreadlink-with-size.
5757         * lib/canonicalize.c (canonicalize_filename_mode): Update.
5758
5759 2007-02-25  Jim Meyering  <jim@meyering.net>
5760
5761         * build-aux/announce-gen: When complaining about excess arguments,
5762         list them.
5763
5764 2007-02-25  Paul Eggert  <eggert@cs.ucla.edu>
5765
5766         * README: Document signed integer overflow situation more
5767         accurately.
5768
5769 2007-02-25  Bruno Haible  <bruno@clisp.org>
5770
5771         * lib/vasnprintf.c (VASNPRINTF): Fix estimate of size needed for a
5772         'a' or 'A' conversion.
5773
5774 2007-02-25  Bruno Haible  <bruno@clisp.org>
5775
5776         * modules/filename: Renamed from modules/pathname.
5777         (Files): Replace lib/pathname.h with lib/filename.h. Replace
5778         lib/concatpath.c with lib/concat-filename.c.
5779         (Makefile.am): Update.
5780         (Include): Replace pathname.h with filename.h.
5781         * lib/filename.h: Renamed from lib/pathname.h.
5782         (concatenated_filename): Renamed from concatenated_pathname.
5783         * lib/concat-filename.c: Renamed from lib/concatpath.c.
5784         (concatenated_filename): Renamed from concatenated_pathname.
5785         * lib/findprog.c: Include filename.h instead of pathname.h.
5786         (find_in_path): Update.
5787         * lib/javacomp.c: Include filename.h instead of pathname.h.
5788         (is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_14_usable,
5789         is_envjavac_oldgcj_14_13_usable, is_envjavac_nongcj_usable,
5790         is_gcj_present, is_gcj43_usable, is_oldgcj_14_14_usable,
5791         is_oldgcj_14_13_usable, is_javac_usable): Update.
5792         * lib/javaexec.c: Include filename.h instead of pathname.h.
5793         (execute_java_class): Update.
5794         * modules/findprog: Update.
5795         * modules/javacomp: Update.
5796         * modules/javaexec: Update.
5797         * MODULES.html.sh (File system functions): Add 'filename', remove
5798         'pathname'.
5799
5800 2007-02-25  Bruno Haible  <bruno@clisp.org>
5801
5802         * modules/printf-frexpl-tests: New file.
5803         * tests/test-printf-frexpl.c: New file.
5804
5805         * modules/printf-frexpl: New file.
5806         * lib/printf-frexpl.h: New file.
5807         * lib/printf-frexpl.c: New file.
5808         * m4/printf-frexpl.m4: New file.
5809
5810 2007-02-25  Bruno Haible  <bruno@clisp.org>
5811
5812         * modules/printf-frexp-tests: New file.
5813         * tests/test-printf-frexp.c: New file.
5814
5815         * modules/printf-frexp: New file.
5816         * lib/printf-frexp.h: New file.
5817         * lib/printf-frexp.c: New file.
5818         * m4/printf-frexp.m4: New file.
5819
5820 2007-02-25  Bruno Haible  <bruno@clisp.org>
5821
5822         Assume automake >= 1.10 for the tests.
5823         * modules/arcfour-tests (TESTS): Remove $(EXEEXT) suffix.
5824         * modules/arctwo-tests: Likewise.
5825         * modules/argp-tests: Likewise.
5826         * modules/avltree-list-tests: Likewise.
5827         * modules/avltree-oset-tests: Likewise.
5828         * modules/avltreehash-list-tests: Likewise.
5829         * modules/carray-list-tests: Likewise.
5830         * modules/crc-tests: Likewise.
5831         * modules/des-tests: Likewise.
5832         * modules/gc-arcfour-tests: Likewise.
5833         * modules/gc-arctwo-tests: Likewise.
5834         * modules/gc-des-tests: Likewise.
5835         * modules/gc-hmac-md5-tests: Likewise.
5836         * modules/gc-hmac-sha1-tests: Likewise.
5837         * modules/gc-md2-tests: Likewise.
5838         * modules/gc-md4-tests: Likewise.
5839         * modules/gc-md5-tests: Likewise.
5840         * modules/gc-pbkdf2-sha1-tests: Likewise.
5841         * modules/gc-rijndael-tests: Likewise.
5842         * modules/gc-sha1-tests: Likewise.
5843         * modules/gc-tests: Likewise.
5844         * modules/getaddrinfo-tests: Likewise.
5845         * modules/hmac-md5-tests: Likewise.
5846         * modules/hmac-sha1-tests: Likewise.
5847         * modules/linked-list-tests: Likewise.
5848         * modules/linkedhash-list-tests: Likewise.
5849         * modules/lock-tests: Likewise.
5850         * modules/md2-tests: Likewise.
5851         * modules/md4-tests: Likewise.
5852         * modules/md5-tests: Likewise.
5853         * modules/rbtree-list-tests: Likewise.
5854         * modules/rbtree-oset-tests: Likewise.
5855         * modules/rbtreehash-list-tests: Likewise.
5856         * modules/read-file-tests: Likewise.
5857         * modules/rijndael-tests: Likewise.
5858         * modules/stdint-tests: Likewise.
5859         * modules/tls-tests: Likewise.
5860
5861 2007-02-24  Bruno Haible  <bruno@clisp.org>
5862
5863         * lib/isnanl.h (isnanl): Define through isnan if isnan is a macro.
5864         * m4/isnan.m4 (gl_FUNC_ISNAN_NO_LIBM): Don't check for isnan as a
5865         function; instead check whether isnan with a double argument links.
5866         * m4/isnanl.m4 (gl_FUNC_ISNANL_NO_LIBM): Don't check for isnanl as a
5867         function; instead check whether isnan with a 'long double' argument
5868         links.
5869         Reported by Eric Blake <ebb9@byu.net>.
5870
5871 2007-02-24  Bruno Haible  <bruno@clisp.org>
5872
5873         * lib/isnan.c: Support the 'long double' case if USE_LONG_DOUBLE is
5874         defined.
5875         * lib/isnanl.c: Remove all code. Just include isnan.c.
5876         * modules/isnanl-nolibm (Files): Add lib/isnan.c.
5877
5878 2007-02-25  Jim Meyering  <jim@meyering.net>
5879
5880         Avoid conflicting types for 'unsetenv' on FreeBSD.
5881         * lib/putenv.c (_unsetenv): Rename from "unsetenv", to avoid
5882         conflicting with FreeBSD's (5.0 and 6.1) function declaration
5883         in stdlib.h.
5884
5885 2007-02-24  Bruno Haible  <bruno@clisp.org>
5886
5887         * modules/isnanl-nolibm-tests: New file.
5888         * tests/test-isnanl.c: New file.
5889
5890         * modules/isnanl-nolibm: New file.
5891         * lib/isnanl.h: New file.
5892         * lib/isnanl.c: New file.
5893         * m4/isnanl.m4: New file.
5894
5895 2007-02-24  Bruno Haible  <bruno@clisp.org>
5896
5897         * modules/isnan-nolibm-tests: New file.
5898         * tests/test-isnan.c: New file.
5899
5900         * modules/isnan-nolibm: New file.
5901         * lib/isnan.h: New file.
5902         * lib/isnan.c: New file.
5903         * m4/isnan.m4: New file.
5904
5905 2007-02-24  Bruno Haible  <bruno@clisp.org>
5906
5907         * lib/frexpl.c (frexpl): Correct return values for x = 1.0L. Don't
5908         assume that an exponent fits in 20 bits.
5909
5910 2007-02-24  Jim Meyering  <jim@meyering.net>
5911
5912         * m4/regex.m4: Update the description of the configure-time option,
5913         --without-included-regex, to state accurately what the defaults are,
5914         and perhaps to give people an idea why using this option is risky.
5915
5916 2007-02-24  Paul Eggert  <eggert@cs.ucla.edu>
5917
5918         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check for a nanosleep that
5919         loops on small arguments.  This attempts to avoid the problem
5920         Bruno Haible reported for AIX 4.3.2 in
5921         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00309.html>.
5922
5923 2007-02-23  Bruno Haible  <bruno@clisp.org>
5924
5925         * m4/perl.m4 (gl_PERL): Require version 5.005, not 5.003.
5926         Needed for help2man.
5927
5928 2007-02-23  Karl Berry  <karl@gnu.org>
5929
5930         * doc/gnulib-tool.texi (CVS Issues): mention that when foo_.h
5931         exists, foo.h should be cvs-ignored, not committed.
5932
5933 2007-02-23  Eric Blake  <ebb9@byu.net>
5934
5935         * lib/getdate.h (includes):  Include <time.h>, not "timespec.h".
5936         * lib/stat-time.h (includes): Likewise.
5937         * lib/utimecmp.c (includes): Likewise.
5938         * lib/utimens.h (includes): Likewise.
5939         * lib/getdate.y (includes): Also include "timespec.h" for use
5940         internal to the module.
5941         * modules/utimens (Depends-on): Revert yesterday's patch.
5942         * modules/nanosleep (Depends-on): Add missing dependency.
5943
5944 2007-02-22  Bruno Haible  <bruno@clisp.org>
5945
5946         * lib/glob.c: Don't include getlogin_r.h.
5947
5948 2007-02-22  Jim Meyering  <jim@meyering.net>
5949
5950         * modules/utimens (Depends-on): Add timespec, required for
5951         utimens.h's inclusion of timespec.h.
5952
5953 2007-02-21  Paul Eggert  <eggert@cs.ucla.edu>
5954
5955         * lib/getcwd.c (__getcwd): Undo previous change; it mishandled
5956         long unreadable paths in GNU/Linux.  Problem reported by Andreas
5957         Schwab in
5958         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00261.html>.
5959         I'll try to think of a better way to fix the Solaris problem.
5960
5961         * lib/getcwd.c (__getcwd): Don't assume getcwd (NULL, 0) works
5962         like glibc; on Solaris 10, it fails with errno == EINVAL.
5963         POSIX says the behavior is unspecified if the first argument is NULL,
5964         so play it safe and never pass NULL to the system getcwd.
5965
5966 2007-02-21  Jim Meyering  <jim@meyering.net>
5967
5968         * lib/gettimeofday.c (rpl_gettimeofday): Remove declaration
5969         of gettimeofday.  It would conflict with the one now always
5970         provided via sys_time_.h.  Reported by Matthew Woehlke, as
5971         an IRIX 6.5 build failure.
5972
5973 2007-02-20  Paul Eggert  <eggert@cs.ucla.edu>
5974
5975         Minor fixups to port to Solaris 10 with Sun C 5.8.
5976         * lib/getcwd.c [!_LIBC]: Include dirfd.h, since we use dirfd.
5977         * modules/getcwd (Depends-on): Add dirfd.
5978         * lib/putenv.c (putenv): #undef it.
5979         (rpl_putenv): New decl.
5980         (malloc, free): Include <stdlib.h> rather than prototyping separately.
5981
5982 2007-02-20  Bruno Haible  <bruno@clisp.org>
5983
5984         * modules/stdio-tests: New file.
5985         * tests/test-stdio.c: New file.
5986
5987         * modules/vsnprintf (Files): Remove lib/vsnprintf.h.
5988         (Depends-on): Add stdio.
5989         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
5990         (Include): Use <stdio.h> instead of vsnprintf.h.
5991         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
5992         HAVE_DECL_VSNPRINTF.
5993         * lib/vsnprintf.c: Include <stdio.h> instead of vsnprintf.h.
5994
5995         * modules/snprintf (Files): Remove lib/snprintf.h.
5996         (Depends-on): Add stdio.
5997         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
5998         (Include): Use <stdio.h> instead of snprintf.h.
5999         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
6000         HAVE_DECL_SNPRINTF.
6001         * lib/snprintf.c: Include <stdio.h> instead of snprintf.h.
6002         * lib/getaddrinfo.c: Likewise.
6003
6004         * modules/stdio: New file.
6005         * lib/stdio_.h: New file, incorporating snprintf.h and vsnprintf.h.
6006         * lib/snprintf.h: Remove file.
6007         * lib/vsnprintf.h: Remove file.
6008         * lib/.cppi-disable: Remove snprintf.h.
6009         * m4/stdio_h.m4: New file.
6010         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdio.
6011
6012 2007-02-20  Jim Meyering  <jim@meyering.net>
6013
6014         * lib/ftruncate.c [HAVE_CHSIZE]: Document that this code is
6015         used by e.g., mingw.  From Bruno Haible.
6016
6017 2007-02-19  Bruno Haible  <bruno@clisp.org>
6018
6019         * lib/string_.h: Use "#pragma GCC system_header" to suppress some gcc
6020         warnings.
6021         Reported by Ben Pfaff <blp@cs.stanford.edu>.
6022
6023 2007-02-19  Bruno Haible  <bruno@clisp.org>
6024
6025         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Don't request a complaint mail
6026         from mingw users.
6027
6028 2007-02-19  Bruno Haible  <bruno@clisp.org>
6029
6030         * lib/stdlib_.h: Use "#pragma GCC system_header" to suppress some gcc
6031         warnings.
6032         Reported by Joel E. Denny <jdenny@ces.clemson.edu> via Paul Eggert.
6033
6034 2007-02-19  Jim Meyering  <jim@meyering.net>
6035
6036         Don't use FD after a successful "fdopendir (fd)".
6037         * lib/getcwd.c (__getcwd) [AT_FDCWD]: fdopendir (fd) usually closes fd.
6038         Reset it by calling dirfd on the just-obtained DIR*.
6039
6040         * m4/ftruncate.m4: Adjust comment to give this module a 3-year reprieve.
6041         Prompted by a report from Bruno Haible that mingw lacks ftruncate.
6042
6043 2007-02-18  Bruno Haible  <bruno@clisp.org>
6044
6045         * lib/readlink.c: Include <unistd.h>.
6046         * m4/readlink.m4 (gl_FUNC_READLINK): Require gl_UNISTD_H_DEFAULTS. Set
6047         HAVE_READLINK.
6048         * modules/readlink (Depends-on): Add unistd.
6049         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
6050         (Include): Add <unistd.h>.
6051
6052         * lib/getlogin_r.h: Remove file.
6053         * lib/getlogin_r.c: Include <unistd.h> instead of getlogin_r.h.
6054         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE): Remove macro.
6055         (gl_GETLOGIN_R): Inline it here. Require gl_UNISTD_H_DEFAULTS. Set
6056         HAVE_DECL_GETLOGIN_R.
6057         * modules/getlogin_r (Files): Remove lib/getlogin_r.h.
6058         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
6059         (Include): Use <unistd.h> instead of getlogin_r.h.
6060
6061         * lib/getcwd.h: Remove file.
6062         * lib/getcwd.c: Include <unistd.h> instead of getcwd.h.
6063         * lib/xgetcwd.c: Likewise.
6064         * m4/getcwd.m4 (gl_FUNC_GETCWD): Require gl_UNISTD_H_DEFAULTS. Set
6065         REPLACE_GETCWD. Don't define __GETCWD_PREFIX.
6066         * modules/getcwd (Files): Remove lib/getcwd.h.
6067         (Depends-on): Add unistd.
6068         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
6069         (Include): Use <unistd.h> instad of getcwd.h.
6070
6071         * lib/ftruncate.c: Include <unistd.h> first.
6072         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Require gl_UNISTD_H_DEFAULTS.
6073         Set HAVE_FTRUNCATE.
6074         * modules/ftruncate (Depends-on): Add unistd.
6075         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
6076
6077         * lib/fchdir.c: Include <unistd.h> first.
6078         * lib/dirent_.h: Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT.
6079         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_UNISTD_H_DEFAULTS instead
6080         of gl_HEADER_UNISTD_DEFAULTS. Set REPLACE_FCHDIR. Don't set UNISTD_H.
6081         * modules/fchdir (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
6082         (Makefile.am): Substitute also REPLACE_FCHDIR into dirent.h.
6083
6084         * lib/dup2.c: Include <unistd.h> first.
6085         * m4/dup2.m4 (gl_FUNC_DUP2): Require gl_UNISTD_H_DEFAULTS. Set
6086         HAVE_DUP2.
6087         * modules/dup2 (Depends-on): Add unistd.
6088         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
6089
6090         * lib/chown.c: Include <unistd.h> first. Undefine chown later.
6091         * m4/chown.m4 (gl_FUNC_CHOWN): Require gl_UNISTD_H_DEFAULTS. Set
6092         REPLACE_CHOWN. Don't define chown as a macro here.
6093         * modules/chown (Depends-on): Add unistd.
6094         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
6095
6096         * lib/unistd_.h: Test HAVE_UNISTD_H determined at configure time.
6097         Add definition for GL_LINK_WARNING.
6098         (chown, dup2): New declarations.
6099         (fchdir): Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT. Provide optional
6100         link warning.
6101         (ftruncate): New declaration.
6102         (getcwd): New declaration, taken from old getcwd.h.
6103         (getlogin_r): New declaration, taken from old getlogin_r.h.
6104         (readlink): New declaration.
6105         * m4/unistd_h.m4 (gl_UNISTD_H): Renamed from gl_HEADER_UNISTD. Don't
6106         set UNISTD_H. Inline gl_PREREQ_UNISTD. Set HAVE_UNISTD_H.
6107         (gl_PREREQ_UNISTD): Remove macro.
6108         (gl_UNISTD_MODULE_INDICATOR): New macro.
6109         (gl_UNISTD_H_DEFAULTS): Renamed from gl_HEADER_UNISTD_DEFAULTS. Set
6110         many new variables. Don't set UNISTD_H.
6111         * modules/unistd (Description): Change.
6112         (Depends-on): Add link-warning.
6113         (configure.ac): Update.
6114         (Makefile.am): Create unistd.h always. Substitute many new variables
6115         into it.
6116
6117 2007-02-18  Bruno Haible  <bruno@clisp.org>
6118
6119         * lib/stdlib_.h (getsubopt): New declaration, copied from getsubopt.h.
6120         * modules/stdlib (stdlib.h): Also substitute GNULIB_GETSUBOPT and
6121         HAVE_GETSUBOPT.
6122         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Also initialize
6123         GNULIB_GETSUBOPT and HAVE_GETSUBOPT.
6124         * lib/getsubopt.h: Remove file.
6125         * modules/getsubopt (Files): Remove lib/getsubopt.h.
6126         (Depends-on): Add stdlib.
6127         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
6128         (Includes): Use <stdlib.h> instead of getsubopt.h.
6129         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Require gl_STDLIB_H_DEFAULTS.
6130         Set HAVE_GETSUBOPT.
6131         * lib/getsubopt.c: Don't include getsubopt.h.
6132
6133 2007-02-18  Bruno Haible  <bruno@clisp.org>
6134
6135         * modules/fchdir (Depends-on): Add dup2.
6136
6137 2007-02-18  Bruno Haible  <bruno@clisp.org>
6138
6139         * lib/stdlib_.h: Handle glibc's special invocation convention
6140         specially.
6141
6142 2007-02-18  Bruno Haible  <bruno@clisp.org>
6143
6144         * modules/stdlib-tests: New file.
6145         * tests/test-stdlib.c: New file.
6146
6147         * modules/mkstemp (Files): Remove lib/mkstemp.h.
6148         (Depends-on): Add stdlib.
6149         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
6150         (Includes): Use <stdlib.h> instead of mkstemp.h.
6151         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require gl_STDLIB_H_DEFAULTS. Set
6152         REPLACE_MKSTEMP. Remove definition of __MKSTEMP_PREFIX.
6153         * lib/mkstemp.c: Don't include mkstemp.h.
6154         * lib/mkstemp-safer.c: Include <stdlib.h> instead of mkstemp.h.
6155         * lib/stdlib--.h: Don't include mkstemp.h.
6156
6157         * modules/mkdtemp (Files): Remove lib/mkdtemp.h.
6158         (Depends-on): Add stdlib.
6159         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
6160         (Includes): Use <stdlib.h> instead of mkdtemp.h.
6161         * m4/mkdtemp.m4 (gt_FUNC_MKDTEMP): Require gl_STDLIB_H_DEFAULTS. Set
6162         HAVE_MKDTEMP.
6163         * lib/mkdtemp.c: Don't include mkdtemp.h.
6164         * lib/clean-temp.c: Don't include mkdtemp.h.
6165
6166         * modules/exit (Files): Remove lib/exit.h.
6167         (Depends-on): Add stdlib.
6168         (Makefile.am): Remove lib_SOURCES.
6169         (Include): Use <stdlib.h> instead of exit.h.
6170         * lib/argmatch.c: Don't include exit.h.
6171         * lib/execute.c: Likewise.
6172         * lib/pagealign_alloc.c: Likewise.
6173         * lib/pipe.c: Likewise.
6174         * lib/wait-process.c: Likewise.
6175         * lib/copy-file.c: Include <stdlib.h> instead of exit.h.
6176         * lib/exitfail.c: Likewise.
6177         * lib/savewd.c: Likewise.
6178         * lib/xsetenv.c: Likewise.
6179
6180         * modules/stdlib: New file.
6181         * lib/stdlib_.h: New file, incorporating exit.h, mkdtemp.h, mkstemp.h
6182         and extra comments about mkstemp().
6183         * lib/exit.h: Remove file.
6184         * lib/mkdtemp.h: Remove file.
6185         * lib/mkstemp.h: Remove file.
6186         * m4/stdlib_h.m4: New file.
6187         * MODULES.html.sh (Support for systems lacking ANSI C 89): Add stdlib.
6188
6189 2007-02-18  Bruno Haible  <bruno@clisp.org>
6190
6191         * modules/math-tests: New file.
6192         * tests/test-math.c: New file.
6193
6194         * modules/math: New file.
6195         * modules/mathl (Files): Remove lib/mathl.h.
6196         (Depends-on): Add math.
6197         (Makefile.am): Don't mention mathl.h.
6198         (Include): Use <math.h> instead of mathl.h.
6199         * lib/math_.h: New file.
6200         * lib/mathl.h: Remove file.
6201         * lib/acosl.c: Include <config.h> and <math.h> first. Don't include
6202         mathl.h.
6203         * lib/asinl.c: Likewise.
6204         * lib/atanl.c: Likewise.
6205         * lib/ceill.c: Likewise.
6206         * lib/cosl.c: Likewise.
6207         * lib/expl.c: Likewise.
6208         * lib/floorl.c: Likewise.
6209         * lib/frexpl.c: Likewise.
6210         * lib/ldexpl.c: Likewise.
6211         * lib/logl.c: Likewise.
6212         * lib/sincosl.c: Likewise.
6213         * lib/sinl.c: Likewise.
6214         * lib/sqrtl.c: Likewise.
6215         * lib/tanl.c: Likewise.
6216         * lib/trigl.c: Likewise.
6217         * m4/math_h.m4: New file.
6218         * MODULES.html.sh (Mathematics): Add math.
6219
6220 2007-02-17  Bruno Haible  <bruno@clisp.org>
6221
6222         * modules/wctype-tests: New file.
6223         * tests/test-wctype.c: New file.
6224
6225         * modules/wchar-tests: New file.
6226         * tests/test-wchar.c: New file.
6227
6228         * modules/unistd-tests: New file.
6229         * tests/test-unistd.c: New file.
6230
6231         * modules/time-tests: New file.
6232         * tests/test-time.c: New file.
6233
6234         * modules/sysexits-tests: New file.
6235         * tests/test-sysexits.c: New file.
6236
6237         * modules/sys_time-tests: New file.
6238         * tests/test-sys_time.c: New file.
6239
6240         * modules/sys_stat-tests: New file.
6241         * tests/test-sys_stat.c: New file.
6242
6243         * modules/sys_socket-tests: New file.
6244         * tests/test-sys_socket.c: New file.
6245
6246         * modules/sys_select-tests: New file.
6247         * tests/test-sys_select.c: New file.
6248
6249         * modules/string-tests: New file.
6250         * tests/test-string.c: New file.
6251
6252         * modules/stdbool-tests: New file.
6253         * tests/test-stdbool.c: New file.
6254
6255         * modules/netinet_in-tests: New file.
6256         * tests/test-netinet_in.c: New file.
6257
6258         * modules/inttypes-tests: New file.
6259         * tests/test-inttypes.c: New file.
6260
6261         * modules/fcntl-tests: New file.
6262         * tests/test-fcntl.c: New file.
6263
6264         * modules/byteswap-tests: New file.
6265         * tests/test-byteswap.c: New file.
6266
6267         * modules/arpa_inet-tests: New file.
6268         * tests/test-arpa_inet.c: New file.
6269
6270 2007-02-17  Bruno Haible  <bruno@clisp.org>
6271
6272         * lib/inttypes_.h: Add definition for GL_LINK_WARNING.
6273         (imaxabs, imaxdiv, strtoimax, strtoumax): Don't declare the function
6274         if the corresponding module is not enabled. Emit link warnings if
6275         the function is used nevertheless.
6276         * m4/inttypes.m4 (gl_INTTYPES_H): Never use the existing <inttypes.h>.
6277         Don't AC_SUBST HAVE_DECL_IMAXABS, HAVE_DECL_IMAXDIV,
6278         HAVE_DECL_STRTOIMAX, HAVE_DECL_STRTOUMAX.
6279         (gl_INTTYPES_MODULE_INDICATOR, gl_INTTYPES_H_DEFAULTS): New macros.
6280         * modules/inttypes (Depends-on): Add link-warning.
6281         (Makefile.am): Copy the contents of build-aux/link-warning.h into
6282         inttypes.h. Substitute also GNULIB_IMAXABS, GNULIB_IMAXDIV,
6283         GNULIB_STRTOIMAX, GNULIB_STRTOUMAX.
6284         * modules/imaxabs (configure.ac): Invoke gl_INTTYPES_MODULE_INDICATOR.
6285         * modules/imaxdiv (configure.ac): Likewise.
6286         * modules/strtoimax (configure.ac): Likewise.
6287         * modules/strtoumax (configure.ac): Likewise.
6288
6289 2007-02-17  Bruno Haible  <bruno@clisp.org>
6290
6291         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of
6292         gl_STRING_MODULE_INDICATOR_DEFAULTS.
6293         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Remove macro.
6294         (gl_HEADER_STRING_H_BODY, gl_STRING_MODULE_INDICATOR): Update.
6295
6296 2007-02-17  Bruno Haible  <bruno@clisp.org>
6297
6298         * modules/link-warning: New file.
6299         * build-aux/link-warning.h: New file, extracted from lib/string_.h.
6300         * lib/string_.h (GL_LINK_WARNING): Remove definition.
6301         * modules/string (Depends-on): Add link-warning.
6302         (Makefile.am): Copy the contents of build-aux/link-warning.h into
6303         string.h.
6304         * MODULES.html.sh (Support for building libraries and executables): Add
6305         link-warning.
6306
6307 2007-02-17  Bruno Haible  <bruno@clisp.org>
6308
6309         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strcasecmp,
6310         strncasecmp, strchr, strchrnul, strdup, strndup, strnlen, strcspn,
6311         strpbrk, strspn, strrchr, strsep, strstr, strcasestr, strtok_r): Break
6312         long lines.
6313
6314 2007-02-17  Ben Pfaff  <blp@cs.stanford.edu>
6315             Bruno Haible  <bruno@clisp.org>
6316
6317         * modules/tmpfile: New file.
6318         * lib/tmpfile.c: New file.
6319         * m4/tmpfile.m4: New file.
6320         * MODULES.html.sh (func_all_modules): New section "Input/output".
6321
6322 2007-02-15  Bruno Haible  <bruno@clisp.org>
6323
6324         * lib/clean-temp.c [WIN32 && !CYGWIN]: Include <windows.h>.
6325         (supports_delete_on_close): New function.
6326         (open_temp, fopen_temp): Use _O_TEMPORARY when supported.
6327
6328 2007-02-14  Bruno Haible  <bruno@clisp.org>
6329
6330         * modules/mbspcasecmp-tests: New file.
6331         * tests/test-mbspcasecmp.sh: New file.
6332         * tests/test-mbspcasecmp.c: New file.
6333
6334         New module mbspcasecmp.
6335         * modules/mbspcasecmp: New file.
6336         * lib/mbspcasecmp.c: New file.
6337         * lib/string_.h (strncasecmp): Change warning message.
6338         (mbspcasecmp): New declaration.
6339         * m4/mbspcasecmp.m4: New file.
6340         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6341         GNULIB_MBSPCASECMP.
6342         * modules/string (string.h): Also substitute GNULIB_MBSPCASECMP.
6343         * MODULES.html.sh (Internationalization functions): Add mbspcasecmp.
6344
6345 2007-02-14  Bruno Haible  <bruno@clisp.org>
6346
6347         * modules/mbsncasecmp-tests: New file.
6348         * tests/test-mbsncasecmp.sh: New file.
6349         * tests/test-mbsncasecmp.c: New file.
6350
6351         New module mbsncasecmp.
6352         * modules/mbsncasecmp: New file.
6353         * lib/mbsncasecmp.c: New file.
6354         * lib/string_.h (mbsncasecmp): New declaration.
6355         * m4/mbsncasecmp.m4: New file.
6356         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6357         GNULIB_MBSNCASECMP.
6358         * modules/string (string.h): Also substitute GNULIB_MBSNCASECMP.
6359         * MODULES.html.sh (Internationalization functions): Add mbsncasecmp.
6360
6361 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
6362
6363         * lib/exclude.c (FNM_EXTMATCH): Define if system does not.
6364         Verify that it doesn't overlap with our flags.
6365         (fnmatch_no_wildcards): Don't use strcasecmp or strncasecmp, which
6366         do not have the desired effect in multibyte locales; instead, use
6367         mbscasecmp.
6368         * modules/exclude (Depends-on): Depend on mbscasecmp, not strcase.
6369         Add dependency on xalloc.  Depend on fnmatch, not fnmatch-gnu, since
6370         we don't require GNU fnmatch ourselves (if our users require it, they
6371         should do so explicitly).
6372
6373         Fix regex code so it doesn't rely on strcasecmp.
6374         * lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
6375         Otherwise, include gnulib's langinfo.h.
6376         * lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
6377         undesirable behavior in non-C locales.  Instead, rely on localecharset.
6378         * m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
6379         * modules/regex (FILES): Remove m4/codeset.m4.
6380         (Depends-on): Add localcharset.  Remove strcase.
6381
6382 2007-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6383
6384         * m4/unlinkdir.m4 (gl_UNLINKDIR): Fix m4 quoting bug.
6385         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
6386
6387 2007-02-13  Bruno Haible  <bruno@clisp.org>
6388
6389         * m4/intdiv0.m4 (gt_INTDIV0): Assume ANSI C. Fix underquoting bug.
6390         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6391
6392 2007-02-12  Bruno Haible  <bruno@clisp.org>
6393
6394         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
6395         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): If
6396         GNULIB_POSIXCHECK and the gnulib module not enabled, provoke a link-
6397         time warning rather than a link error.
6398
6399 2007-02-12  Bruno Haible  <bruno@clisp.org>
6400
6401         * m4/locale-fr.m4 (gt_LOCALE_FR): Fix m4 quoting bug.
6402         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
6403         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6404
6405 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
6406
6407         * lib/string_.h (strncasecmp): Fix typo: this macro takes 3
6408         args, not 2.
6409
6410 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
6411
6412         New module 'time', so that apps can include <time.h> as per
6413         POSIX and GNU instead of separate include files like time_r.h
6414         and timegm.h.  This implementation tries out a simpler approach
6415         for replacing decls in standard include files (as compared to
6416         the string module), somewhat as an experiment.
6417
6418         * config/srclist.txt: Comment out mktime.c for now.
6419         * doc/gnulib-tool.texi (Initial import): Don't use time_r as an example
6420         since it doesn't apply any more.  Use generic wording instead.
6421         * MODULES.html.sh (Support for systems lacking POSIX:2001): New module
6422         'time'.
6423         * lib/time_.h, m4/time_h.m4, modules/time: New files.
6424         * lib/strptime.h, lib/time_r.h, lib/timegm.h: Remove.
6425         * lib/mktime.c: Include config.h depending on _LIBC, not HAVE_CONFIG_H.
6426         Don't include <sys/types.h>; no longer needed since we assume C89.
6427         * lib/mktime.c: Don't include "time_r.h"; no longer needed.
6428         * lib/strftime.c: Likewise.
6429         * lib/time_r.c: Likewise.
6430         * lib/nanosleep.c (nanosleep): #undef after include files, not before.
6431         * lib/nanosleep.c: Include <time.h> first, to check interface.
6432         * lib/strptime.c: Likewise.
6433         * lib/time_r.c: Likewise.
6434         * lib/timegm.c: Likewise.
6435         * lib/strptime.c: Don't include strptime.h or time_r.h; no longer
6436         needed.
6437         * lib/timegm.c: Don't include timegm.h; no longer needed.
6438         * lib/timespec.h: Don't include <sys/time.h> before <time.h>;
6439         time.h now handles any problems in that area.
6440         (struct timespec, nanosleep): Remove; time.h now arranges for these.
6441         * lib/xnanosleep.c: Don't include timespec.h; no longer needed now
6442         that time.h defines struct timespec.
6443         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check that nanosleep is declared.
6444         Set REPLACE_NANOSLEEP.  Don't AC_DEFINE nanosleep; the time module now
6445         handles that.
6446         * m4/strptime.m4 (gl_FUNC_STPRTIME): Set REPLACE_STRPTIME.
6447         * m4/time_r.m4 (gl_TIME_R): Don't define HAVE_TIME_R_POSIX; no longer
6448         needed.  Set REPLACE_LOCALTIME.
6449         * m4/timegm.m4 (gl_FUNC_TIMEGM): Set REPLACE_TIMEGM.
6450         * m4/timespec.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Move to time_h.m4.
6451         (gl_TIMESPEC): Don't check for sys/time.h or struct timespec or
6452         nanosleep; time_h.m4 now does that.  Don't require
6453         gl_USE_SYSTEM_EXTENSIONS; no longer needed directly, and the time
6454         module handles this now.
6455         * modules/getdate (Depends-on): Remove timespec.  Add time.
6456         * modules/nanosleep (Depends-on): Likewise.
6457         * modules/stat-time (Depends-on): Likewise.
6458         * modules/nanosleep (Include): Include time.h, not timespec.h.
6459         * modules/strptime (Files): Remove lib/strptime.h.
6460         (Depends-on): Add extensions, time.
6461         (Include): Include time.h, not strptime.h.
6462         * modules/time_r (Files): Remove lib/time_r.h.
6463         (Depends-on): Add time.
6464         (Include): Include time.h, not time_r.h.
6465         * modules/timegm: Likewise.
6466         * modules/timespec (Description): Now does timespec-related decls
6467         of our own, instead of struct timespec itself.
6468         (Depends-on): Add time; remove extensions.
6469         (Maintainer): Add self.
6470         * modules/utimecmp (Depends-on): Add time; remove timespec.
6471         * modules/utimens (Depends-on): Likewise.
6472         * modules/xnanosleep (Depends-on): Likewise.
6473
6474 2007-02-11  Bruno Haible  <bruno@clisp.org>
6475
6476         * lib/c-strstr.c: Include allocsa.h.
6477         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
6478         * lib/c-strcasestr.c: Include allocsa.h.
6479         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
6480         * lib/strcasestr.c: Include allocsa.h.
6481         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
6482         * lib/mbsstr.c: Include allocsa.h.
6483         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
6484         allocsa/freesa instead of malloc/free.
6485         * lib/mbscasestr.c: Include allocsa.h.
6486         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
6487         allocsa/freesa instead of malloc/free.
6488         * modules/c-strstr (Depends-on): Add allocsa.
6489         * modules/c-strcasestr (Depends-on): Likewise.
6490         * modules/strcasestr (Depends-on): Likewise.
6491         * modules/mbsstr (Depends-on): Likewise.
6492         * modules/mbscasestr (Depends-on): Likewise.
6493
6494 2007-02-11  Bruno Haible  <bruno@clisp.org>
6495
6496         * lib/mbsspn.c (mbsspn): Fix bug. Remove unnecessary strlen call.
6497
6498         * modules/mbsspn-tests: New file.
6499         * tests/test-mbsspn.sh: New file.
6500         * tests/test-mbsspn.c: New file.
6501
6502 2007-02-11  Bruno Haible  <bruno@clisp.org>
6503
6504         * lib/mbspbrk.c (mbspbrk): Remove unneeded cast.
6505
6506         * modules/mbspbrk-tests: New file.
6507         * tests/test-mbspbrk.sh: New file.
6508         * tests/test-mbspbrk.c: New file.
6509
6510 2007-02-11  Bruno Haible  <bruno@clisp.org>
6511
6512         * lib/mbscspn.c (mbscspn): Remove unnecessary strlen call and
6513         unneeded cast.
6514
6515         * modules/mbscspn-tests: New file.
6516         * tests/test-mbscspn.sh: New file.
6517         * tests/test-mbscspn.c: New file.
6518
6519 2007-02-11  Bruno Haible  <bruno@clisp.org>
6520
6521         * modules/mbscasecmp-tests: New file.
6522         * tests/test-mbscasecmp.sh: New file.
6523         * tests/test-mbscasecmp.c: New file.
6524
6525 2007-02-11  Bruno Haible  <bruno@clisp.org>
6526
6527         Ensure O(n) worst-case complexity of mbscasestr.
6528         * lib/mbscasestr.c: Include stdbool.h.
6529         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
6530         functions.
6531         (mbscasestr): Add some bookkeeping. Invoke knuth_morris_pratt_* when
6532         the bookkeeping indicates that it's worth it.
6533         * modules/mbscasestr (Depends-on): Add stdbool, mbslen, strnlen.
6534
6535         * modules/mbscasestr-tests: New file.
6536         * tests/test-mbscasestr1.c: New file.
6537         * tests/test-mbscasestr2.sh: New file.
6538         * tests/test-mbscasestr2.c: New file.
6539         * tests/test-mbscasestr3.sh: New file.
6540         * tests/test-mbscasestr3.c: New file.
6541         * tests/test-mbscasestr4.sh: New file.
6542         * tests/test-mbscasestr4.c: New file.
6543         * m4/locale-tr.m4: New file.
6544
6545 2007-02-11  Bruno Haible  <bruno@clisp.org>
6546
6547         Ensure O(n) worst-case complexity of mbsstr.
6548         * lib/mbsstr.c: Include stdbool.h.
6549         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
6550         functions.
6551         (mbsstr): Add some bookkeeping. Invoke knuth_morris_pratt_* when the
6552         bookkeeping indicates that it's worth it.
6553         * modules/mbsstr (Depends-on): Add stdbool, mbslen, strnlen.
6554
6555         * modules/mbsstr-tests: New file.
6556         * tests/test-mbsstr1.c: New file.
6557         * tests/test-mbsstr2.sh: New file.
6558         * tests/test-mbsstr2.c: New file.
6559         * tests/test-mbsstr3.sh: New file.
6560         * tests/test-mbsstr3.c: New file.
6561         * m4/locale-fr.m4: New file.
6562
6563 2007-02-11  Bruno Haible  <bruno@clisp.org>
6564
6565         * lib/mbsrchr.c (mbsrchr): Fix bug.
6566
6567         * modules/mbsrchr-tests: New file.
6568         * tests/test-mbsrchr.sh: New file.
6569         * tests/test-mbsrchr.c: New file.
6570
6571 2007-02-11  Bruno Haible  <bruno@clisp.org>
6572
6573         * lib/mbschr.c (mbschr): Fix bug.
6574
6575         * modules/mbschr-tests: New file.
6576         * tests/test-mbschr.sh: New file.
6577         * tests/test-mbschr.c: New file.
6578         * m4/locale-zh.m4: New file.
6579
6580 2007-02-11  Bruno Haible  <bruno@clisp.org>
6581
6582         Support for copying multibyte string iterators.
6583         * lib/mbiter.h: Include <string.h>.
6584         (mbiter_multi_copy): New function.
6585         (mbi_copy): New macro.
6586         * lib/mbuiter.h: Include <string.h>.
6587         (mbuiter_multi_copy): New function.
6588         (mbui_copy): New macro.
6589
6590 2007-02-11  Bruno Haible  <bruno@clisp.org>
6591
6592         New module mbslen.
6593         * modules/mbslen: New file.
6594         * lib/mbslen.c: New file.
6595         * lib/string_.h (mbslen): New declaration.
6596         * m4/mbslen.m4: New file.
6597         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6598         GNULIB_MBSLEN.
6599         * modules/string (string.h): Also substitute GNULIB_MBSLEN.
6600         * MODULES.html.sh (Internationalization functions): Add mbslen.
6601
6602 2007-02-11  Bruno Haible  <bruno@clisp.org>
6603
6604         Ensure O(n) worst-case complexity of strcasestr substitute.
6605         * lib/strcasestr.c: Include stdbool.h.
6606         (knuth_morris_pratt): New function.
6607         (strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when the
6608         bookkeeping indicates that it's worth it.
6609         * modules/strcasestr (Depends-on): Add stdbool, strnlen.
6610
6611         * modules/strcasestr-tests: New file.
6612         * tests/test-strcasestr.c: New file.
6613
6614 2007-02-11  Bruno Haible  <bruno@clisp.org>
6615
6616         Ensure O(n) worst-case complexity of c_strcasestr.
6617         * lib/c-strcasestr.c: Include stdbool.h, string.h.
6618         (knuth_morris_pratt): New function.
6619         (c_strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when
6620         the bookkeeping indicates that it's worth it.
6621         * modules/c-strcasestr (Depends-on): Add stdbool, strnlen.
6622
6623         * modules/c-strcasestr-tests: New file.
6624         * tests/test-c-strcasestr.c: New file.
6625
6626 2007-02-11  Bruno Haible  <bruno@clisp.org>
6627
6628         Ensure O(n) worst-case complexity of c_strstr.
6629         * lib/c-strstr.c: Include stdbool.h, string.h.
6630         (knuth_morris_pratt): New function.
6631         (c_strstr): Add some bookkeeping. Invoke knuth_morris_pratt when the
6632         bookkeeping indicates that it's worth it.
6633         * modules/c-strstr (Depends-on): Add stdbool, strnlen.
6634
6635         * lib/c-strstr.c: Complete rewrite for maintainability.
6636
6637         * modules/c-strstr-tests: New file.
6638         * tests/test-c-strstr.c: New file.
6639
6640 2007-02-11  Bruno Haible  <bruno@clisp.org>
6641
6642         * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils
6643         5.2.1 and earlier, whereby \055 was treated just like the range
6644         delimiter '-'.
6645         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
6646
6647 2007-02-08  Bruno Haible  <bruno@clisp.org>
6648
6649         * modules/regex (Depends-on): Add stdbool.
6650         Reported by Dalibor Topic <robilad@kaffe.org>.
6651
6652 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
6653
6654         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
6655         Prefer returning from main to exiting from it.
6656         Remove unnecessary parens after sizeof.
6657
6658 2007-02-05  Bruno Haible  <bruno@clisp.org>
6659
6660         New module mbssep.
6661         * modules/mbssep: New file.
6662         * lib/mbssep.c: New file.
6663         * lib/string_.h (strsep): Add a conditional link warning.
6664         (mbssep): New declaration.
6665         * m4/mbssep.m4: New file.
6666         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6667         GNULIB_MBSSEP.
6668         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
6669         * MODULES.html.sh (Internationalization functions): Add mbssep.
6670
6671 2007-02-05  Bruno Haible  <bruno@clisp.org>
6672
6673         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
6674         Optimize search in case of 1 delimiter.
6675
6676 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
6677
6678         * lib/acl.h: Include sys/types.h before sys/acl.h.
6679
6680 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
6681
6682         Merge upstream fix for glibc bugzilla #3957:
6683
6684         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
6685
6686         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
6687         bit for RE_HAT_LISTS_NOT_NEWLINE.
6688         (build_charclass_op): Remove bogus comment.
6689
6690 2007-02-05  Simon Josefsson  <simon@josefsson.org>
6691
6692         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
6693
6694 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
6695
6696         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
6697         * lib/memmem.c [!defined _LIBC]: Include config.h.
6698
6699 2007-02-04  Bruno Haible  <bruno@clisp.org>
6700
6701         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
6702         warning message.
6703
6704 2007-02-04  Bruno Haible  <bruno@clisp.org>
6705
6706         New module mbstok_r.
6707         * modules/mbstok_r: New file.
6708         * lib/mbstok_r.c: New file.
6709         * lib/string_.h (strtok_r): Change argument names to match the
6710         comments. Add a conditional link warning.
6711         (mbstok_r): New declaration.
6712         * m4/mbstok_r.m4: New file.
6713         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6714         GNULIB_MBSTOK_R.
6715         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
6716         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
6717
6718 2007-02-04  Bruno Haible  <bruno@clisp.org>
6719
6720         New module mbsspn.
6721         * modules/mbsspn: New file.
6722         * lib/mbsspn.c: New file.
6723         * lib/string_.h (strspn): Add a conditional link warning.
6724         (mbsspn): New declaration.
6725         * m4/mbsspn.m4: New file.
6726         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6727         GNULIB_MBSSPN.
6728         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
6729         * MODULES.html.sh (Internationalization functions): Add mbsspn.
6730
6731 2007-02-04  Bruno Haible  <bruno@clisp.org>
6732
6733         New module mbspbrk.
6734         * modules/mbspbrk: New file.
6735         * lib/mbspbrk.c: New file.
6736         * lib/string_.h (strpbrk): Add a conditional link warning.
6737         (mbspbrk): New declaration.
6738         * m4/mbspbrk.m4: New file.
6739         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6740         GNULIB_MBSPBRK.
6741         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
6742         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
6743
6744 2007-02-04  Bruno Haible  <bruno@clisp.org>
6745
6746         New module mbscspn.
6747         * modules/mbscspn: New file.
6748         * lib/mbscspn.c: New file.
6749         * lib/string_.h (strcspn): Add a conditional link warning.
6750         (mbscspn): New declaration.
6751         * m4/mbscspn.m4: New file.
6752         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6753         GNULIB_MBSCSPN.
6754         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
6755         * MODULES.html.sh (Internationalization functions): Add mbscspn.
6756
6757 2007-02-04  Bruno Haible  <bruno@clisp.org>
6758
6759         New module mbscasestr, reduced goal of strcasestr.
6760         * modules/mbscasestr: New file.
6761         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
6762         (mbscasestr): Renamed from strcasestr.
6763         * lib/strcasestr.c: Don't include mbuiter.h.
6764         (strcasestr): Remove support for multibyte locales.
6765         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
6766         Change the conditional link warning.
6767         (mbscasestr): New declaration.
6768         * m4/mbscasestr.m4: New file.
6769         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
6770         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
6771         REPLACE_STRCASESTR.
6772         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
6773         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
6774         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
6775         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
6776         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
6777         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
6778         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
6779         (Depends-on): Remove mbuiter.
6780         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
6781
6782 2007-02-04  Bruno Haible  <bruno@clisp.org>
6783
6784         Simplify handling of strncasecmp.
6785         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
6786         the conditional link warning.
6787         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
6788         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
6789         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
6790         * modules/strcase (configure.ac): Don't invoke
6791         gl_STRING_MODULE_INDICATOR.
6792         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
6793
6794 2007-02-04  Bruno Haible  <bruno@clisp.org>
6795
6796         New module mbscasecmp, reduced goal of strcasecmp.
6797         * modules/mbscasecmp: New file.
6798         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
6799         (mbscasecmp): Renamed from strcasecmp.
6800         * lib/strcasecmp.c: Don't include mbuiter.h.
6801         (strcasecmp): Remove support for multibyte locales.
6802         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
6803         Change the conditional link warning.
6804         (mbscasecmp): New declaration.
6805         * m4/mbscasecmp.m4: New file.
6806         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
6807         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
6808         REPLACE_STRCASECMP.
6809         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
6810         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6811         GNULIB_MBSCASECMP.
6812         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
6813         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
6814         * modules/strcase (Files): Remove m4/mbrtowc.m4.
6815         (Depends-on): Remove mbuiter.
6816         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
6817
6818 2007-02-04  Bruno Haible  <bruno@clisp.org>
6819
6820         New module mbsstr. Remove module strstr.
6821         * modules/mbsstr: New file.
6822         * modules/strstr: Remove file.
6823         * lib/mbsstr.c: Renamed from lib/strstr.c.
6824         (mbsstr): Renamed from strstr.
6825         * lib/string_.h (strstr): Remove declaration. Change the conditional
6826         link warning.
6827         (mbsstr): New declaration.
6828         * m4/mbsstr.m4: New file.
6829         * m4/strstr.m4: Remove file.
6830         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
6831         REPLACE_STRSTR.
6832         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
6833         Don't initialize GNULIB_STRSTR.
6834         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
6835         substitute GNULIB_STRSTR and REPLACE_STRSTR.
6836         * MODULES.html.sh (Internationalization functions): Add mbsstr.
6837         (Support for systems lacking ANSI C 89): Remove strstr.
6838
6839 2007-02-04  Bruno Haible  <bruno@clisp.org>
6840
6841         New module mbsrchr.
6842         * modules/mbsrchr: New file.
6843         * lib/mbsrchr.c: New file.
6844         * lib/string_.h (strrchr): Add a conditional link warning.
6845         (mbsrchr): New declaration.
6846         * m4/mbsrchr.m4: New file.
6847         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6848         GNULIB_MBSRCHR.
6849         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
6850         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
6851
6852 2007-02-04  Bruno Haible  <bruno@clisp.org>
6853
6854         New module mbschr.
6855         * modules/mbschr: New file.
6856         * lib/mbschr.c: New file.
6857         * lib/string_.h (strchr): Add a conditional link warning.
6858         (mbschr): New declaration.
6859         * m4/mbschr.m4: New file.
6860         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6861         GNULIB_MBSCHR.
6862         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
6863         * MODULES.html.sh (Internationalization functions): Add mbschr.
6864
6865 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
6866
6867         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
6868
6869         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
6870
6871 2007-02-04  Bruno Haible  <bruno@clisp.org>
6872
6873         New module description section 'configure.ac-early'.
6874         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
6875         (func_get_autoconf_early_snippet): New function.
6876         (func_import, func_create_testdir): Use it. Remove special cases for
6877         modules 'extensions' and 'lock'.
6878         * modules/extensions (configure.ac-early): Require
6879         gl_USE_SYSTEM_EXTENSIONS.
6880         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
6881
6882 2007-02-04  Bruno Haible  <bruno@clisp.org>
6883
6884         Make use of gcj-4.3's -fsource and -ftarget option.
6885         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
6886         and if so try the options -fsource and -ftarget.
6887         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
6888         source_version, ftarget_option, target_version arguments.
6889         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
6890         (is_envjavac_oldgcj_14_14_usable): Renamed from
6891         is_envjavac_gcj_14_14_usable.
6892         (is_envjavac_oldgcj_14_13_usable): Renamed from
6893         is_envjavac_gcj_14_13_usable.
6894         (is_gcj_present): Update.
6895         (is_gcj_43, is_gcj43_usable): New functions.
6896         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
6897         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
6898         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
6899         try the options -fsource and -ftarget.
6900
6901 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
6902
6903         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
6904         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
6905         larger value.
6906
6907 2007-02-03  Jim Meyering  <jim@meyering.net>
6908
6909         Give tools a better chance to allocate space for very large buffers.
6910         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
6911
6912         Make pwd and readlink work also when run with an unreadable parent dir
6913         on systems with openat support.
6914         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
6915         provided getcwd function, even when we have openat support.
6916         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
6917
6918 2007-02-02  Bruno Haible  <bruno@clisp.org>
6919
6920         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
6921         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
6922         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
6923         portability problems if one of these functions is only used on specific
6924         platforms.
6925         Reported by Paul Eggert.
6926
6927 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
6928
6929         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
6930         is causing more trouble than it's curing.
6931         * lib/regex_internal.h (__mempcpy): Remove.
6932         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
6933         (and make the code a tad smaller to boot).
6934         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
6935
6936 2007-02-02  Jim Meyering  <jim@meyering.net>
6937
6938         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
6939         section, not in the Makefile.am: one.
6940
6941 2007-02-02  Eric Blake  <ebb9@byu.net>
6942
6943         * lib/strchrnul.c: Always include config.h first.
6944
6945         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
6946         gnulib strstr is not necessary here.
6947
6948 2007-02-02  Simon Josefsson  <simon@josefsson.org>
6949
6950         * m4/socklen.m4: Fix typo.
6951
6952 2007-02-02  Eric Blake  <ebb9@byu.net>
6953
6954         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
6955         * modules/netinet_in (Makefile.am): Likewise.
6956
6957 2007-02-01  Bruno Haible  <bruno@clisp.org>
6958
6959         * lib/string_.h (GL_LINK_WARNING): New macro.
6960         (strcasecmp, strstr, strcasestr): If provided by the system,
6961         conditionally define as a macro that leads to a warning instead of to
6962         an error.
6963         (strncasecmp): Conditionally define as a macro that leads to a warning.
6964
6965 2007-02-01  Karl Berry  <karl@gnu.org>
6966
6967         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
6968
6969 2007-02-01  Bruno Haible  <bruno@clisp.org>
6970
6971         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
6972         renamings.
6973
6974 2007-02-01  Eric Blake  <ebb9@byu.net>
6975
6976         * modules/regex (Depends-on): Revert dependence on mempcpy.
6977         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
6978         module's definition of mempcpy.
6979         Reported by Paul Eggert.
6980
6981 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
6982
6983         * lib/string_.h: If the gnulib module XYZ is not present, undefine
6984         the symbol XYZ before redefining it.  This fixes a problem with
6985         programs that don't use XYZ, when compiled on systems that define
6986         XYZ to something else.
6987
6988 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
6989
6990         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
6991         occurs when "mkdir -m foo" creates a setgid directory that is (1)
6992         writeable to group or other and (2) is intended to have a special
6993         mode bit that is set or cleared.  In such a case, the directory
6994         should be neither group- nor other-writeable until the special
6995         mode bits are right.
6996
6997 2007-01-31  Eric Blake  <ebb9@byu.net>
6998
6999         * modules/mountlist (Depends-on): Add strstr.
7000
7001         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
7002         bug.
7003         * modules/string (Makefile.am): Remove redundant replacement.
7004         * modules/regex (Depends-on): Add mempcpy.
7005
7006 2007-01-31  Bruno Haible  <bruno@clisp.org>
7007
7008         New module description field 'Link'.
7009         * gnulib-tool (func_usage): Document --extract-link-directive.
7010         (sed_extract_prog): Recognize 'Link' directive.
7011         (func_get_link_directive): New function.
7012         (func_import): Show summary of link directives.
7013         Handle --extract-link-directive option.
7014         * modules/acl (Link): New section.
7015         * modules/clock-time (Link): New section.
7016         * modules/euidaccess (Link): New section.
7017         * modules/gettext (Link): New section.
7018         * modules/iconv (Link): New section.
7019         * modules/lock (Link): New section.
7020         * modules/nanosleep (Link): New section.
7021         * modules/readline (Link): New section.
7022
7023 2007-01-27  Bruno Haible  <bruno@clisp.org>
7024
7025         Enforce the use of gnulib modules for unportable <string.h> functions.
7026         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
7027         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
7028         (gl_HEADER_STRING_H_BODY): Require it.
7029         * lib/string_.h: If the gnulib module XYZ is not present, redefine
7030         the symbol XYZ to one that gives a link error.
7031         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
7032         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
7033         * modules/mempcpy (configure.ac): Likewise.
7034         * modules/memrchr (configure.ac): Likewise.
7035         * modules/stpcpy (configure.ac): Likewise.
7036         * modules/stpncpy (configure.ac): Likewise.
7037         * modules/strcase (configure.ac): Likewise.
7038         * modules/strcasestr (configure.ac): Likewise.
7039         * modules/strchrnul (configure.ac): Likewise.
7040         * modules/strdup (configure.ac): Likewise.
7041         * modules/strndup (configure.ac): Likewise.
7042         * modules/strnlen (configure.ac): Likewise.
7043         * modules/strpbrk (configure.ac): Likewise.
7044         * modules/strsep (configure.ac): Likewise.
7045         * modules/strstr (configure.ac): Likewise.
7046         * modules/strtok_r (configure.ac): Likewise.
7047
7048 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
7049
7050         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
7051
7052 2007-01-30  Jim Meyering  <jim@meyering.net>
7053
7054         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
7055
7056 2007-01-29  Bruno Haible  <bruno@clisp.org>
7057
7058         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
7059         * lib/execute.c: Likewise.
7060         * lib/pipe.c: Likewise.
7061         * lib/printf-args.h: Likewise.
7062         * lib/printf-args.c: Likewise.
7063         * lib/printf-parse.c: Likewise.
7064         * lib/vasnprintf.c: Likewise.
7065
7066 2007-01-29  Eric Blake  <ebb9@byu.net>
7067
7068         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
7069         declaration.
7070
7071 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
7072
7073         * lib/strptime.h (strptime): Use 'restrict' for args where
7074         POSIX requires this.
7075         * lib/strptime.c (strptime): Likewise.
7076         Change license notice from LGPL to GPL, since gnulib-tool will
7077         change this as needed.
7078         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
7079         defined.
7080         Include "strptime.h" first, to check interface.
7081         Do not #undef _LIBC and _NL_CURRENT.
7082         Do not include <stdlib.h>; no longer needed.
7083         Include "time_r.h" and declare ptime_locale_status
7084         only if _LIBC is not defined.
7085         (__P): Remove unused macro.
7086         (match_string): Bring back glibc version, but use it only if _LIBC
7087         is defined.
7088         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
7089         Remove unnecessary assertion and abort() call.
7090         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
7091         * m4/strptime.m4: Fix serial number comment.
7092         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
7093         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
7094         (Depends-on): Add time_r.
7095
7096 2007-01-29  Bruno Haible  <bruno@clisp.org>
7097
7098         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
7099         strptime.
7100         * modules/strptime (Depends-on): Add stdbool.
7101         * lib/strptime.h: Include <time.h> always. Add comments.
7102
7103 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
7104
7105         * modules/strptime: New file.
7106         * lib/strptime.h: New file.
7107         * lib/strptime.c: New file.
7108         * m4/strptime.m4: New file.
7109
7110 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
7111
7112         * MODULES.html.sh: New module mpsort.
7113         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
7114
7115         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
7116         a circularity problem with HP-UX ia64 reported by Bob Proulx in
7117         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
7118         All uses changed.
7119         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
7120         All uses changed.
7121         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
7122         to _Restrict_.
7123         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
7124         the parameter matches the prototype.
7125
7126 2007-01-28  Jim Meyering  <jim@meyering.net>
7127
7128         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
7129         sys/time.h here, reverting that part of the previous patch:
7130         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
7131
7132 2007-01-28  Bruno Haible  <bruno@clisp.org>
7133
7134         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
7135         value of $(SYS_TIME_H).
7136         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
7137         remove it conditionally, too. [added by Jim Meyering]
7138         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
7139         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
7140         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
7141         GETTIMEOFDAY_REPLACEMENT to 1.
7142
7143 2007-01-28  Bruno Haible  <bruno@clisp.org>
7144
7145         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
7146         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
7147         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
7148         Set UNISTD_H instead of UNISTD_H2.
7149         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
7150
7151 2007-01-28  Bruno Haible  <bruno@clisp.org>
7152
7153         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
7154         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
7155
7156 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7157
7158         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
7159         (func_create_testdir): Ensure C locale for `grep' and `tr'
7160         character ranges.
7161         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
7162         ACLOCAL_AMFLAGS parsing state machine.
7163
7164 2007-01-27  Bruno Haible  <bruno@clisp.org>
7165
7166         * modules/unistr/base: Update.
7167
7168 2007-01-27  Bruno Haible  <bruno@clisp.org>
7169
7170         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
7171         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
7172         * modules/unistr/u32-mbtouc-unsafe: Renamed from
7173         modules/unistr/u32-mbtouc.
7174         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
7175         * lib/unistr.h: Update.
7176         * lib/linebreak.c: Update.
7177         * modules/unistr/u32-mbtouc: Renamed from
7178         modules/unistr/u32-mbtouc-safe.
7179         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
7180         * lib/unistr.h: Update.
7181         * lib/unistr/u32-to-u8.c: Update.
7182         * lib/unistr/u32-to-u16.c: Update.
7183
7184 2007-01-27  Bruno Haible  <bruno@clisp.org>
7185
7186         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
7187         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
7188         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
7189         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
7190         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
7191         * modules/unistr/u16-mbtouc-unsafe: Renamed from
7192         modules/unistr/u16-mbtouc.
7193         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
7194         * lib/unistr.h: Update.
7195         * lib/linebreak.c: Update.
7196         * modules/linebreak: Update.
7197         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
7198         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
7199         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
7200         * modules/unistr/u16-mbtouc: Renamed from
7201         modules/unistr/u16-mbtouc-safe.
7202         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
7203         * lib/unistr.h: Update.
7204         * lib/unistr/u16-to-u8.c: Update.
7205         * modules/unistr/u16-to-u8: Update.
7206         * lib/unistr/u16-to-u32.c: Update.
7207         * modules/unistr/u16-to-u32: Update.
7208
7209 2007-01-27  Bruno Haible  <bruno@clisp.org>
7210
7211         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
7212         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
7213         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
7214         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
7215         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
7216         * modules/unistr/u8-mbtouc-unsafe: Renamed from
7217         modules/unistr/u8-mbtouc.
7218         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
7219         * lib/unistr.h: Update.
7220         * lib/striconveh.c: Update.
7221         * modules/striconveh: Update.
7222         * lib/linebreak.c: Update.
7223         * modules/linebreak: Update.
7224         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
7225         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
7226         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
7227         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
7228         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
7229         * lib/unistr.h: Update.
7230         * lib/striconveh.c: Update.
7231         * modules/striconveh: Update.
7232         * lib/unistr/u8-to-u16.c: Update.
7233         * modules/unistr/u8-to-u16: Update.
7234         * lib/unistr/u8-to-u32.c: Update.
7235         * modules/unistr/u8-to-u32: Update.
7236
7237 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7238
7239         Sync from Libtool.
7240         * lib/argz.c: Do not include strings.h nor memory.h, include
7241         string.h unconditionally.  Patch by Simon Josefsson.
7242
7243 2007-01-27  Bruno Haible  <bruno@clisp.org>
7244
7245         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
7246         from gl_HEADER_STRING_H_BODY.
7247         (gl_HEADER_STRING_H_BODY): Require it.
7248         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
7249         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
7250         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
7251         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
7252         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
7253         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
7254         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
7255         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
7256         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
7257         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
7258         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
7259         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
7260         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
7261         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
7262         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
7263
7264 2007-01-27  Bruno Haible  <bruno@clisp.org>
7265
7266         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
7267         check_PROGRAMS into noinst_PROGRAMS.
7268         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
7269         check_PROGRAMS in this case.
7270         (func_import): Set for_test to false.
7271         (func_create_testdir): Set for_test to true.
7272
7273 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
7274             Bruno Haible  <bruno@clisp.org>
7275
7276         * modules/strcasestr (Files): Remove lib/strcasestr.h.
7277         (Depends-on): Add string.
7278         (Includes): Use <string.h> instead of strcasestr.h.
7279         * modules/string (Makefile.am): Also substitute the value of
7280         REPLACE_STRCASESTR.
7281         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
7282         assume strcasestr is declared in <string.h> not <strings.h>. Also
7283         set REPLACE_STRCASESTR.
7284         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
7285         REPLACE_STRCASESTR.
7286         * lib/strcasestr.h: Remove file.
7287         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
7288         * lib/string_.h (strcasestr): New declaration.
7289
7290 2007-01-27  Bruno Haible  <bruno@clisp.org>
7291
7292         * lib/string_.h: Use 'extern'.
7293
7294 2007-01-27  Jim Meyering  <jim@meyering.net>
7295
7296         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
7297         of set-but-not-used local, "q".
7298
7299         * lib/mempcpy.c: Include <config.h> before <string.h>.
7300         This fixes a compilation error on HP-UX, due to the system's
7301         "restrict"-using mempcpy prototype.
7302
7303 2007-01-26  Bruno Haible  <bruno@clisp.org>
7304
7305         Small optimization.
7306         * lib/javacomp.c: Include c-strstr.h.
7307          (is_envjavac_gcj): Use c_strstr instead of strstr.
7308         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
7309
7310 2007-01-26  Bruno Haible  <bruno@clisp.org>
7311
7312         * MODULES.html.sh (Unicode string functions): Add the new modules.
7313
7314         * modules/uniconv/u32-strconv-to-locale: New file.
7315         * lib/uniconv/u32-strconv-to-locale.c: New file.
7316
7317         * modules/uniconv/u16-strconv-to-locale: New file.
7318         * lib/uniconv/u16-strconv-to-locale.c: New file.
7319
7320         * modules/uniconv/u8-strconv-to-locale: New file.
7321         * lib/uniconv/u8-strconv-to-locale.c: New file.
7322
7323         * modules/uniconv/u32-strconv-from-locale: New file.
7324         * lib/uniconv/u32-strconv-from-locale.c: New file.
7325
7326         * modules/uniconv/u16-strconv-from-locale: New file.
7327         * lib/uniconv/u16-strconv-from-locale.c: New file.
7328
7329         * modules/uniconv/u8-strconv-from-locale: New file.
7330         * lib/uniconv/u8-strconv-from-locale.c: New file.
7331
7332         * modules/uniconv/u32-strconv-to-enc: New file.
7333         * lib/uniconv/u32-strconv-to-enc.c: New file.
7334         * modules/uniconv/u32-strconv-to-enc-tests: New file.
7335         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
7336
7337         * modules/uniconv/u16-strconv-to-enc: New file.
7338         * lib/uniconv/u16-strconv-to-enc.c: New file.
7339         * lib/uniconv/u-strconv-to-enc.h: New file.
7340         * modules/uniconv/u16-strconv-to-enc-tests: New file.
7341         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
7342
7343         * modules/uniconv/u8-strconv-to-enc: New file.
7344         * lib/uniconv/u8-strconv-to-enc.c: New file.
7345         * modules/uniconv/u8-strconv-to-enc-tests: New file.
7346         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
7347
7348         * modules/uniconv/u32-strconv-from-enc: New file.
7349         * lib/uniconv/u32-strconv-from-enc.c: New file.
7350         * modules/uniconv/u32-strconv-from-enc-tests: New file.
7351         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
7352
7353         * modules/uniconv/u16-strconv-from-enc: New file.
7354         * lib/uniconv/u16-strconv-from-enc.c: New file.
7355         * modules/uniconv/u16-strconv-from-enc-tests: New file.
7356         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
7357
7358         * modules/uniconv/u8-strconv-from-enc: New file.
7359         * lib/uniconv/u8-strconv-from-enc.c: New file.
7360         * lib/uniconv/u-strconv-from-enc.h: New file.
7361         * modules/uniconv/u8-strconv-from-enc-tests: New file.
7362         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
7363
7364         * modules/uniconv/u32-conv-from-enc: New file.
7365         * lib/uniconv/u32-conv-from-enc.c: New file.
7366         * modules/uniconv/u32-conv-from-enc-tests: New file.
7367         * tests/uniconv/test-u32-conv-from-enc.c: New file.
7368
7369         * modules/uniconv/u16-conv-from-enc: New file.
7370         * lib/uniconv/u16-conv-from-enc.c: New file.
7371         * lib/uniconv/u-conv-from-enc.h: New file.
7372         * modules/uniconv/u16-conv-from-enc-tests: New file.
7373         * tests/uniconv/test-u16-conv-from-enc.c: New file.
7374
7375         * modules/uniconv/u8-conv-from-enc: New file.
7376         * lib/uniconv/u8-conv-from-enc.c: New file.
7377         * modules/uniconv/u8-conv-from-enc-tests: New file.
7378         * tests/uniconv/test-u8-conv-from-enc.c: New file.
7379
7380         * modules/uniconv/base: New file.
7381         * lib/uniconv.h: New file.
7382
7383 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
7384
7385         * doc/gnulib-tool.texi (Initial import): Update to match current
7386         behavior with strdup module.
7387         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
7388         * lib/memmem.h: Remove; all uses removed.  This is now done
7389         by <string.h>.
7390         * lib/mempcpy.h: Likewise.
7391         * lib/memrchr.h: Likewise.
7392         * lib/stpcpy.h: Likewise.
7393         * lib/stpncpy.h: Likewise.
7394         * lib/strcase.h: Likewise.
7395         * lib/strchrnul.h: Likewise.
7396         * lib/strdup.h: Likewise.
7397         * lib/strndup.h: Likewise.
7398         * lib/strnlen.h: Likewise.
7399         * lib/strpbrk.h: Likewise.
7400         * lib/strsep.h: Likewise.
7401         * lib/strstr.h: Likewise.
7402         * lib/strtok_r.h: Likewise.
7403         * lib/string_.h: New file.
7404         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
7405         Rely on <string.h> instead.
7406         * lib/canon-host.c: Likewise.
7407         * lib/chdir-long.c: Likewise.
7408         * lib/concatpath.c: Likewise.
7409         * lib/exclude.c: Likewise.
7410         * lib/fchdir.c: Likewise.
7411         * lib/getaddrinfo.c: Likewise.
7412         * lib/getcwd.c: Likewise.
7413         * lib/getsubopt.c: Likewise.
7414         * lib/glob.c: Likewise.
7415         * lib/hard-locale.c: Likewise.
7416         * lib/iconvme.c: Likewise.
7417         * lib/javacomp.c: Likewise.
7418         * lib/mempcpy.c: Likewise.
7419         * lib/memrchr.c: Likewise.
7420         * lib/regex_internal.h: Likewise.
7421         * lib/stpncpy.c: Likewise.
7422         * lib/strcasecmp.c: Likewise.
7423         * lib/strchrnul.c: Likewise.
7424         * lib/strdup.c: Likewise.
7425         * lib/striconv.c: Likewise.
7426         * lib/striconveh.c: Likewise.
7427         * lib/striconveha.c: Likewise.
7428         * lib/strncasecmp.c: Likewise.
7429         * lib/strndup.c: Likewise.
7430         * lib/strnlen.c: Likewise.
7431         * lib/strsep.c: Likewise.
7432         * lib/strstr.c: Likewise.
7433         * lib/strtok_r.c: Likewise.
7434         * lib/userspec.c: Likewise.
7435         * lib/w32spawn.h: Likewise.
7436         * lib/xstrndup.c: Likewise.
7437         * lib/mountlist.c (strstr): Remove decl.
7438         * m4/string_h.m4: New file.
7439         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
7440         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
7441         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
7442         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
7443         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
7444         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
7445         Set REPLACE_STRCASECMP if necessary.
7446         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
7447         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
7448         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
7449         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
7450         HAVE_DECL_STRDUP if necessary.
7451         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
7452         since gl_FUNC_STRNDUP does that now.
7453         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
7454         Check for decl here...
7455         (gl_PREREQ_STRNLEN): ... not here.
7456         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
7457         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
7458         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
7459         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
7460         necessary.
7461         * modules/string: New file.
7462         * modules/memmem (Files): Remove special-purpose include file.
7463         (Depends-on): Add string.
7464         (Include): Include <string.h>, not the removed file.
7465         * modules/mempcpy: Likewise.
7466         * modules/memrchr: Likewise.
7467         * modules/stpcpy: Likewise.
7468         * modules/stpncpy: Likewise.
7469         * modules/strcase: Likewise.
7470         * modules/strchrnul: Likewise.
7471         * modules/strdup: Likewise.
7472         * modules/strndup: Likewise.
7473         * modules/strnlen: Likewise.
7474         * modules/strpbrk: Likewise.
7475         * modules/strsep: Likewise.
7476         * modules/strstr: Likewise.
7477         * modules/strtok_r: Likewise.
7478         * tests/test-dirname.c: Don't include "strdup.h", since
7479         <string.h> now suffices.
7480         * tests/test-memmem.c: Don't include "memmem.h", since
7481         <string.h> now suffices.
7482
7483 2007-01-25  Bruno Haible  <bruno@clisp.org>
7484
7485         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
7486         *resultp is 0.
7487
7488         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
7489         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
7490         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
7491         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
7492
7493         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
7494         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
7495         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
7496         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
7497         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
7498         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
7499
7500 2007-01-24  Bruno Haible  <bruno@clisp.org>
7501
7502         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
7503         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
7504         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
7505         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
7506         gl_FUNC_FTS_CORE.
7507         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
7508         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
7509         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
7510         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
7511         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
7512         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
7513         gl_FUNC_FCHOWNAT.
7514         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
7515         gl_FUNC_STRFTIME.
7516         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
7517         Reported by Ralf Wildenhues.
7518
7519 2007-01-24  Bruno Haible  <bruno@clisp.org>
7520
7521         Drop AC_REQUIRE calls that are redundant with the module dependencies.
7522         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
7523         gl_GETADDRINFO.
7524         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
7525         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
7526         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
7527
7528 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
7529
7530         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
7531         Don't use 'exit'; just return from 'main'.
7532         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
7533
7534         * lib/fnmatch_.h: Readjust white space and comments to match
7535         glibc, to avoid spurious diffs.
7536
7537 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
7538
7539         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
7540         2004-12-01 change by Jakub Jelinek, since this code won't compile
7541         if !LIBC.  Problem reported by Bob Proulx.
7542
7543 2007-01-23  Bruno Haible  <bruno@clisp.org>
7544
7545         * lib/striconveh.c: Include c-strcaseeq.h.
7546         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
7547         * modules/striconveh (Depends-on): Add c-strcaseeq.
7548
7549 2007-01-23  Bruno Haible  <bruno@clisp.org>
7550
7551         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
7552
7553         * modules/c-strcaseeq: New file.
7554         * lib/c-strcaseeq.h: New file.
7555
7556         * modules/streq: New file.
7557         * lib/streq.h: New file.
7558
7559 2007-01-23  Bruno Haible  <bruno@clisp.org>
7560
7561         * modules/striconveha-tests: New file.
7562         * tests/test-striconveha.c: New file.
7563
7564         * lib/striconveha.h: Include <stdbool.h>.
7565         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
7566         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
7567         (mem_iconveha_notranslit): Renamed from mem_iconveha.
7568         (mem_iconveha): New function.
7569         (str_iconveha_notranslit): Renamed from str_iconveha.
7570         (str_iconveha): New function.
7571         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
7572         c-strcase.
7573
7574 2007-01-23  Bruno Haible  <bruno@clisp.org>
7575
7576         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
7577         encodings without forgiving before trying any encoding with handler.
7578         (str_iconveha): Try all encodings without forgiving before trying any
7579         encoding with handler.
7580
7581 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
7582
7583         Import the following changes from libc.
7584
7585         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
7586
7587         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
7588
7589         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
7590
7591         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
7592         normal_bracket label.
7593
7594         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
7595
7596         [BZ #361]
7597         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
7598         to normal_bracket after fetching the next character.
7599
7600 2007-01-22  Bruno Haible  <bruno@clisp.org>
7601
7602         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
7603         argument.
7604         * lib/striconveh.c (iconv_carefully_1): New function.
7605         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
7606         argument.
7607         (str_cd_iconveh): Update.
7608         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
7609         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
7610         * tests/test-striconveh.c (MAGIC): New macro.
7611         (new_offsets): New function.
7612         (main): Test call with and without offsets.
7613
7614 2007-01-22  Bruno Haible  <bruno@clisp.org>
7615
7616         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
7617         * modules/sys_select (Makefile.am): Likewise.
7618         * modules/sys_socket (Makefile.am): Likewise.
7619         * modules/sys_time (Makefile.am): Likewise.
7620
7621 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
7622
7623         * modules/gettimeofday (License): Change from GPL to LGPL, since
7624         gettimeofday is a library function.
7625
7626 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7627
7628         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
7629
7630 2007-01-21  Bruno Haible  <bruno@clisp.org>
7631
7632         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
7633
7634 2007-01-21  Bruno Haible  <bruno@clisp.org>
7635
7636         * modules/striconveha: New file.
7637         * lib/striconveha.h: New file.
7638         * lib/striconveha.c: New file.
7639         * MODULES.html.sh (Internationalization functions): Add striconveha.
7640         * lib/striconv.c (str_iconv): Optimize the case of an empty input
7641         string.
7642         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
7643
7644 2007-01-21  Bruno Haible  <bruno@clisp.org>
7645
7646         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
7647         * lib/striconveh.c (str_iconveh): Likewise.
7648
7649 2007-01-21  Bruno Haible  <bruno@clisp.org>
7650
7651         * lib/striconveh.h (mem_iconveh): New declaration.
7652         * lib/striconveh.c (mem_iconveh): New function.
7653         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
7654
7655 2007-01-21  Bruno Haible  <bruno@clisp.org>
7656
7657         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
7658
7659         * lib/striconveh.h (mem_cd_iconveh): Change specification.
7660         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
7661         original result buffer.
7662         (str_cd_iconveh): Update.
7663         * tests/test-striconveh.c (main): Update.
7664
7665         * lib/striconv.h (mem_cd_iconv): Change specification.
7666         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
7667         result buffer.
7668         (str_cd_iconv): Update.
7669         * tests/test-striconv.c (main): Update.
7670
7671 2007-01-21  Bruno Haible  <bruno@clisp.org>
7672
7673         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
7674
7675 2007-01-20  Jim Meyering  <jim@meyering.net>
7676
7677         * lib/userspec.c (parse_with_separator): If a user or group string
7678         starts with "+", skip the corresponding name-to-ID look-up, since
7679         such a look-up must fail: user and group names may not include "+".
7680
7681 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
7682
7683         * lib/poll.c: Include sys/time.h and time.h unconditionally,
7684         since we now assume the sys_time module.
7685         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
7686         check for sys/time.h; no longer needed.
7687         * modules/poll (Depends-on): Depend on sys_time.
7688
7689 2007-01-18  Bruno Haible  <bruno@clisp.org>
7690
7691         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
7692         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
7693
7694         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
7695         gettimeofday.
7696
7697         * tests/test-gettimeofday.c: Include <time.h>.
7698         (dummy): Remove variable.
7699
7700         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
7701         gl_HEADER_SYS_TIME_H.
7702         (gl_HEADER_SYS_TIME_H): New macro.
7703
7704         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
7705         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7706         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
7707         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
7708         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7709         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
7710         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
7711         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7712         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
7713         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
7714         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7715
7716         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
7717         last change; it caused a compilation error when cross-compiling to
7718         Cygwin.
7719
7720 2007-01-18  Jim Meyering  <jim@meyering.net>
7721
7722         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
7723         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
7724         than the race-prone "test -d sys || mkdir sys".
7725         (configure.ac): Use AC_PROG_MKDIR_P.
7726         * modules/sys_select: Likewise.
7727         * modules/sys_socket: Likewise.
7728         * modules/sys_time: Likewise.
7729
7730 2007-01-18  Eric Blake  <ebb9@byu.net>
7731
7732         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
7733         replace gettimeofday.
7734         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
7735         name, to avoid infinite recursion.
7736
7737 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
7738
7739         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
7740         module sys_time.
7741         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
7742         assume timespec.h defines struct timeval.
7743         * lib/settime.c: Likewise.
7744         * lib/utimens.c: Likewise.
7745         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
7746         since we now assume the gettimeofday module.
7747         * lib/tempname.c (__gen_tempname): Likewise.
7748         * lib/gettimeofday.h: Remove.
7749         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
7750         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
7751         Include <time.h>, for 'time()'.
7752         (localtime_buffer_addr): Also use this workaround if
7753         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
7754         to simplify the uses.  All uses changed.
7755         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
7756         that #undef is inside {}, and 'const' follows type name consistently.
7757         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
7758         (gettimeofday): Do not use the maximum possible value for
7759         tv->tv_usec, since that might break usages other than ls.c.
7760         Instead, we'll leave ls.c alone.  This undoes today's patch
7761         by Bruno.  Add a compile-time warning for 1s-clock resolution;
7762         we've never observed the problem but might as well keep the
7763         canary.
7764         * lib/nanosleep.c: Include timespec.h first, for interface check.
7765         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
7766         now assume the sys_time module.
7767         * lib/tempname.c: Likewise.
7768         * lib/timespec.h: Likewise.
7769         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
7770         needed.
7771         * lib/strftime.c: Likewise.
7772         * lib/timespec.h: Likewise.
7773         * lib/posixtm.c: Include posixtm.h first, for interface check.
7774         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
7775         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
7776         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
7777         * lib/sys_time_.h: New file.
7778         * lib/timespec.h (struct timespec): Use long int, not long.
7779         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
7780         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
7781         Remove obsolescent call to AC_HEADER_TIME.
7782         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
7783         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
7784         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
7785         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
7786         Likewise.
7787         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
7788         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
7789         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
7790         into the sys_time module.  Check for gettimeofday just once.
7791         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
7792         for gettimeofday signature to just check the signature.  Merely
7793         compile it, since linking doesn't test signature.  Improve test for
7794         whether gettimeofday.o is actually needed.
7795         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
7796         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
7797         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
7798         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7799         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
7800         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
7801         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
7802         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
7803         than worrying about sys/time.h.
7804         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
7805         Don't bother worrying about TIME_WITH_SYS_TIME.
7806         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
7807         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
7808         * m4/sys_time_h.m4: New file.
7809         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
7810         Don't include sys/time.h.  Return from main rather than exiting.
7811         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
7812         all uses changed.
7813         * modules/gethrxtime (Depends-on): Add sys_time.
7814         * modules/gettime (Depends-on): Likewise.
7815         * modules/gettimeofday (Depends-on): Likewise.
7816         * modules/nanosleep (Depends-on): Likewise.
7817         * modules/settime (Depends-on): Likewise.
7818         * modules/tempname (Depends-on): Likewise.
7819         * modules/utimens (Depends-on): Likewise.
7820         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
7821         (Include:) Change back to <sys/time.h>.
7822         (Maintainer:) Add self.
7823         * modules/sys_time: New file.
7824         * modules/tempname (Depends-on): Add gettimeofday.
7825         * tests/test-gettimeofday.c: Include <sys/time.h>
7826         rather than gettimeofday.h.
7827
7828 2007-01-17  Bruno Haible  <bruno@clisp.org>
7829
7830         * gnulib-tool (func_get_license): Revert last patch. Instead, let
7831         the license default to GPL.
7832         (func_create_testdir): Don't complain if a module is LGPL and its
7833         tests module depends on GPLed modules.
7834
7835 2007-01-17  Bruno Haible  <bruno@clisp.org>
7836
7837         * lib/gettimeofday.c (gettimeofday): Add code for the case
7838         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
7839         maximum possible value for tv->tv_usec, rather than the minimum one.
7840
7841 2005-10-08  Martin Lambers  <marlam@marlam.de>
7842 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
7843 2007-01-16  Bruno Haible  <bruno@clisp.org>
7844
7845         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
7846         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
7847         gl_FUNC_GETTIMEOFDAY.
7848         (Include): Add gettimeofday.h.
7849         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
7850         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
7851         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
7852         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
7853         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
7854         * lib/gettimeofday.h: New file.
7855         * lib/gettimeofday.c: Include <sys/timeb.h>.
7856         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
7857         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7858         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
7859         fall back on time().
7860
7861         * tests/test-gettimeofday.c: New file.
7862         * modules/gettimeofday-tests: New file.
7863
7864 2007-01-16  Eric Blake  <ebb9@byu.net>
7865
7866         * modules/fnmatch (Depends-on): Depend on wchar.
7867         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
7868         * m4/fnmatch.m4: Likewise.
7869         * modules/mbchar (Makefile.am): Assume <wchar.h>.
7870         * m4/mbchar.m4: Likewise.
7871         * modules/mbswidth (Depends-on): Depend on wchar.
7872         * lib/mbswidth.c: Assume <wchar.h>.
7873         * m4/mbswidth.m4: Likewise.
7874         * modules/quotearg (Depends-on): Depend on wchar.
7875         * lib/quotearg.c: Assume <wchar.h>.
7876         * m4/quotearg.m4: Likewise.
7877         * modules/regex (Depends-on): Depend on wchar.
7878         * lib/regex_internal.h: Assume <wchar.h>.
7879         * m4/regex.m4: Likewise.
7880         * modules/stdint (Depends-on): Depend on wchar.
7881         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
7882         * m4/stdint.m4: Likewise.
7883         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
7884         * modules/strftime (Depends-on): Depend on wchar.
7885         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
7886         * modules/strtol (Depends-on): Depend on wchar.
7887         * lib/strtol.c: Assume <wchar.h>.
7888         * modules/wcwidth (Depends-on): Depend on wchar.
7889         * lib/wcwidth.h: Assume <wchar.h>.
7890         * m4/wcwidth.m4: Likewise.
7891
7892 2007-01-16  Bruno Haible  <bruno@clisp.org>
7893
7894         * modules/csharpexec-script: New, created from...
7895         * modules/csharpexec: ... this.
7896
7897 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
7898
7899         * modules/javaexec-script: New, created from...
7900         * modules/javaexec: ... this.
7901
7902 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7903
7904         * modules/poll (Dependencies): Add sys_select.
7905
7906 2007-01-15  Jim Meyering  <jim@meyering.net>
7907
7908         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
7909         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
7910         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
7911         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
7912
7913 2007-01-15  Bruno Haible  <bruno@clisp.org>
7914
7915         * modules/striconveh: New file.
7916         * lib/striconveh.h: New file.
7917         * lib/striconveh.c: New file.
7918         * MODULES.html.sh (Internationalization functions): Add striconveh.
7919
7920         * modules/striconveh-tests: New file.
7921         * tests/test-striconveh.c: New file.
7922
7923 2007-01-15  Bruno Haible  <bruno@clisp.org>
7924
7925         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
7926         not from GNU libiconv or GNU libc.
7927
7928 2007-01-15  Bruno Haible  <bruno@clisp.org>
7929
7930         * doc/gnulib-intro.texi (Copyright): Explain the different license
7931         terms for module descriptions, autoconf macros, tests, documentation.
7932
7933 2007-01-14  Bruno Haible  <bruno@clisp.org>
7934
7935         * modules/striconv-tests: New file.
7936         * tests/test-striconv.c: New file.
7937
7938 2007-01-14  Bruno Haible  <bruno@clisp.org>
7939
7940         * modules/iconv-tests: New file.
7941         * tests/test-iconv.c: New file.
7942
7943 2007-01-14  Bruno Haible  <bruno@clisp.org>
7944
7945         * gnulib-tool (func_get_license): For test modules, use the license of
7946         the main module.
7947
7948 2007-01-14  Bruno Haible  <bruno@clisp.org>
7949
7950         * modules/iconv (Include): Clarify that <iconv.h> can only be included
7951         if iconv is found to exist.
7952
7953 2007-01-14  Bruno Haible  <bruno@clisp.org>
7954
7955         * modules/c-ctype-tests: New file.
7956         * tests/test-c-ctype.c: New file.
7957
7958 2007-01-14  Bruno Haible  <bruno@clisp.org>
7959
7960         * modules/binary-io-tests: New file.
7961         * tests/test-binary-io.sh: New file.
7962         * tests/test-binary-io.c: New file.
7963
7964 2007-01-14  Bruno Haible  <bruno@clisp.org>
7965
7966         * modules/array-oset-tests: New file.
7967         * tests/test-array_oset.c: New file.
7968
7969 2007-01-14  Bruno Haible  <bruno@clisp.org>
7970
7971         * modules/array-list-tests: New file.
7972         * tests/test-array_list.c: New file.
7973
7974 2007-01-14  Bruno Haible  <bruno@clisp.org>
7975
7976         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
7977         and make.
7978         Reported by Simon Josefsson in
7979         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
7980
7981 2007-01-14  Bruno Haible  <bruno@clisp.org>
7982
7983         * modules/allocsa-tests: New file.
7984         * tests/test-allocsa.c: New file.
7985
7986 2007-01-14  Bruno Haible  <bruno@clisp.org>
7987
7988         * modules/fchdir (Depends-on): Add absolute-header.
7989         * modules/unistd (Depends-on): Likewise.
7990
7991 2006-12-30  Bruno Haible  <bruno@clisp.org>
7992
7993         * modules/fchdir: New file.
7994         * modules/unistd (Files): Add lib/unistd_.h.
7995         (Makefile.am): Generate unistd.h from unistd_.h.
7996         * lib/fchdir.c: New file.
7997         * lib/dirent_.h: New file.
7998         * lib/unistd_.h: New file.
7999         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
8000         * m4/fchdir.m4: New file.
8001         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
8002         (gl_HEADER_UNISTD): Invoke it.
8003         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
8004         function.
8005         * lib/backupfile.c (opendir, closedir): Undefine.
8006         * lib/chown.c (open, close): Undefine.
8007         * lib/clean-temp.c (open, close): Undefine.
8008         * lib/copy-file.c (open, close): Undefine.
8009         * lib/execute.c (open, close): Undefine.
8010         * lib/fsusage.c (open, close): Undefine.
8011         * lib/gc-gnulib.c (open, close): Undefine.
8012         * lib/getcwd.c (opendir, closedir): Undefine.
8013         * lib/glob.c (opendir, closedir): Undefine.
8014         * lib/javacomp.c (open, close): Undefine.
8015         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
8016         * lib/openat-proc.c (open, close): Undefine.
8017         * lib/pagealign_alloc.c (open, close): Undefine.
8018         * lib/pipe.c (open, close): Undefine.
8019         * lib/progreloc.c (open, close): Undefine.
8020         * lib/savedir.c (opendir, closedir): Undefine.
8021         * lib/utime.c (open, close): Undefine.
8022         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
8023
8024 2007-01-10  Bruno Haible  <bruno@clisp.org>
8025
8026         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
8027
8028 2007-01-12  Eric Blake  <ebb9@byu.net>
8029
8030         Provide a robust <wchar.h>.  Further simplifications are now
8031         possible in other modules, but not included here.
8032         * modules/wchar: New module.
8033         * m4/wchar.m4: New file.
8034         * lib/wchar_.h: Likewise.
8035         * modules/mbchar (Depends-on): Depend on wchar, as the first use
8036         of the new module.
8037         * MODULES.html.sh (Extended multibyte and wide character utilities):
8038         New section.
8039
8040 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
8041
8042         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
8043         to a reasonable default for memory allocation.
8044         (xreadlink): Don't allocate a huge buffer, to work around a buggy
8045         file system that reports garbage st_size values for symlinks.
8046         Problem reported by Liyang Hu.
8047
8048 2007-01-11  Simon Josefsson  <simon@josefsson.org>
8049
8050         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
8051         Emacs .#* auto-save files).
8052
8053 2007-01-11  Bruno Haible  <bruno@clisp.org>
8054
8055         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
8056         directory.
8057
8058 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
8059
8060         Use @...@ consistently in lib/wctype_.h.
8061         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
8062         on it being set to 1 or 0.
8063         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
8064         go back to AC_SUBSTing it.
8065         * modules/wctype (Makefile.am): Undo previous change.
8066
8067 2007-01-10  Eric Blake  <ebb9@byu.net>
8068
8069         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
8070         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
8071         * modules/wctype (Makefile.am): Likewise.
8072         Reported by Chris McGuire.
8073
8074 2007-01-10  Jim Meyering  <jim@meyering.net>
8075
8076         fts.c: a small readability/maintainability improvement
8077         * lib/fts.c (fts_read): Make this code slightly more readable and
8078         maintainable by hoisting the "sp->fts_cur = p" assignments to
8079         immediately follow the statements that set P.  Derived from
8080         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
8081
8082 2007-01-10  Eric Blake  <ebb9@byu.net>
8083
8084         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
8085         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
8086         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
8087         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
8088         Reported by Chris McGuire.
8089
8090 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8091
8092         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
8093         in sed script.
8094
8095 2007-01-09  Bruno Haible  <bruno@clisp.org>
8096
8097         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
8098         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
8099         variables.
8100         (func_module): Use them.
8101
8102 2007-01-09  Bruno Haible  <bruno@clisp.org>
8103
8104         * modules/unistr/base: New file.
8105         * lib/unistr.h: New file.
8106
8107         * modules/unistr/u8-to-u16: New file.
8108         * lib/unistr/u8-to-u16.c: New file.
8109
8110         * modules/unistr/u8-to-u32: New file.
8111         * lib/unistr/u8-to-u32.c: New file.
8112
8113         * modules/unistr/u16-to-u8: New file.
8114         * lib/unistr/u16-to-u8.c: New file.
8115
8116         * modules/unistr/u16-to-u32: New file.
8117         * lib/unistr/u16-to-u32.c: New file.
8118
8119         * modules/unistr/u32-to-u8: New file.
8120         * lib/unistr/u32-to-u8.c: New file.
8121
8122         * modules/unistr/u32-to-u16: New file.
8123         * lib/unistr/u32-to-u16.c: New file.
8124
8125         * modules/unistr/u8-check: New file.
8126         * modules/unistr/u16-check: New file.
8127         * modules/unistr/u32-check: New file.
8128         * lib/unistr/u8-check.c: New file.
8129         * lib/unistr/u16-check.c: New file.
8130         * lib/unistr/u32-check.c: New file.
8131
8132         * modules/unistr/u8-chr: New file.
8133         * modules/unistr/u16-chr: New file.
8134         * modules/unistr/u32-chr: New file.
8135         * lib/unistr/u8-chr.c: New file.
8136         * lib/unistr/u16-chr.c: New file.
8137         * lib/unistr/u32-chr.c: New file.
8138
8139         * modules/unistr/u8-cmp: New file.
8140         * modules/unistr/u16-cmp: New file.
8141         * modules/unistr/u32-cmp: New file.
8142         * lib/unistr/u8-cmp.c: New file.
8143         * lib/unistr/u16-cmp.c: New file.
8144         * lib/unistr/u32-cmp.c: New file.
8145
8146         * modules/unistr/u8-cpy: New file.
8147         * modules/unistr/u16-cpy: New file.
8148         * modules/unistr/u32-cpy: New file.
8149         * lib/unistr/u8-cpy.c: New file.
8150         * lib/unistr/u16-cpy.c: New file.
8151         * lib/unistr/u32-cpy.c: New file.
8152         * lib/unistr/u-cpy.h: New file.
8153
8154         * modules/unistr/u8-cpy-alloc: New file.
8155         * modules/unistr/u16-cpy-alloc: New file.
8156         * modules/unistr/u32-cpy-alloc: New file.
8157         * lib/unistr/u8-cpy-alloc.c: New file.
8158         * lib/unistr/u16-cpy-alloc.c: New file.
8159         * lib/unistr/u32-cpy-alloc.c: New file.
8160         * lib/unistr/u-cpy-alloc.h: New file.
8161
8162         * modules/unistr/u8-endswith: New file.
8163         * modules/unistr/u16-endswith: New file.
8164         * modules/unistr/u32-endswith: New file.
8165         * lib/unistr/u8-endswith.c: New file.
8166         * lib/unistr/u16-endswith.c: New file.
8167         * lib/unistr/u32-endswith.c: New file.
8168         * lib/unistr/u-endswith.h: New file.
8169
8170         * modules/unistr/u8-mblen: New file.
8171         * modules/unistr/u16-mblen: New file.
8172         * modules/unistr/u32-mblen: New file.
8173         * lib/unistr/u8-mblen.c: New file.
8174         * lib/unistr/u16-mblen.c: New file.
8175         * lib/unistr/u32-mblen.c: New file.
8176
8177         * modules/unistr/u8-mbtouc: New file.
8178         * modules/unistr/u16-mbtouc: New file.
8179         * modules/unistr/u32-mbtouc: New file.
8180         * lib/unistr/u8-mbtouc.c: New file.
8181         * lib/unistr/u16-mbtouc.c: New file.
8182         * lib/unistr/u32-mbtouc.c: New file.
8183
8184         * modules/unistr/u8-mbtouc-safe: New file.
8185         * modules/unistr/u16-mbtouc-safe: New file.
8186         * modules/unistr/u32-mbtouc-safe: New file.
8187         * lib/unistr/u8-mbtouc-safe.c: New file.
8188         * lib/unistr/u16-mbtouc-safe.c: New file.
8189         * lib/unistr/u32-mbtouc-safe.c: New file.
8190
8191         * modules/unistr/u8-move: New file.
8192         * modules/unistr/u16-move: New file.
8193         * modules/unistr/u32-move: New file.
8194         * lib/unistr/u8-move.c: New file.
8195         * lib/unistr/u16-move.c: New file.
8196         * lib/unistr/u32-move.c: New file.
8197         * lib/unistr/u-move.h: New file.
8198
8199         * modules/unistr/u8-next: New file.
8200         * modules/unistr/u16-next: New file.
8201         * modules/unistr/u32-next: New file.
8202         * lib/unistr/u8-next.c: New file.
8203         * lib/unistr/u16-next.c: New file.
8204         * lib/unistr/u32-next.c: New file.
8205
8206         * modules/unistr/u8-prev: New file.
8207         * modules/unistr/u16-prev: New file.
8208         * modules/unistr/u32-prev: New file.
8209         * lib/unistr/u8-prev.c: New file.
8210         * lib/unistr/u16-prev.c: New file.
8211         * lib/unistr/u32-prev.c: New file.
8212
8213         * modules/unistr/u8-set: New file.
8214         * modules/unistr/u16-set: New file.
8215         * modules/unistr/u32-set: New file.
8216         * lib/unistr/u8-set.c: New file.
8217         * lib/unistr/u16-set.c: New file.
8218         * lib/unistr/u32-set.c: New file.
8219         * lib/unistr/u-set.h: New file.
8220
8221         * modules/unistr/u8-startswith: New file.
8222         * modules/unistr/u16-startswith: New file.
8223         * modules/unistr/u32-startswith: New file.
8224         * lib/unistr/u8-startswith.c: New file.
8225         * lib/unistr/u16-startswith.c: New file.
8226         * lib/unistr/u32-startswith.c: New file.
8227         * lib/unistr/u-startswith.h: New file.
8228
8229         * modules/unistr/u8-stpcpy: New file.
8230         * modules/unistr/u16-stpcpy: New file.
8231         * modules/unistr/u32-stpcpy: New file.
8232         * lib/unistr/u8-stpcpy.c: New file.
8233         * lib/unistr/u16-stpcpy.c: New file.
8234         * lib/unistr/u32-stpcpy.c: New file.
8235         * lib/unistr/u-stpcpy.h: New file.
8236
8237         * modules/unistr/u8-stpncpy: New file.
8238         * modules/unistr/u16-stpncpy: New file.
8239         * modules/unistr/u32-stpncpy: New file.
8240         * lib/unistr/u8-stpncpy.c: New file.
8241         * lib/unistr/u16-stpncpy.c: New file.
8242         * lib/unistr/u32-stpncpy.c: New file.
8243         * lib/unistr/u-stpncpy.h: New file.
8244
8245         * modules/unistr/u8-strcat: New file.
8246         * modules/unistr/u16-strcat: New file.
8247         * modules/unistr/u32-strcat: New file.
8248         * lib/unistr/u8-strcat.c: New file.
8249         * lib/unistr/u16-strcat.c: New file.
8250         * lib/unistr/u32-strcat.c: New file.
8251         * lib/unistr/u-strcat.h: New file.
8252
8253         * modules/unistr/u8-strchr: New file.
8254         * modules/unistr/u16-strchr: New file.
8255         * modules/unistr/u32-strchr: New file.
8256         * lib/unistr/u8-strchr.c: New file.
8257         * lib/unistr/u16-strchr.c: New file.
8258         * lib/unistr/u32-strchr.c: New file.
8259
8260         * modules/unistr/u8-strcmp: New file.
8261         * modules/unistr/u16-strcmp: New file.
8262         * modules/unistr/u32-strcmp: New file.
8263         * lib/unistr/u8-strcmp.c: New file.
8264         * lib/unistr/u16-strcmp.c: New file.
8265         * lib/unistr/u32-strcmp.c: New file.
8266
8267         * modules/unistr/u8-strcpy: New file.
8268         * modules/unistr/u16-strcpy: New file.
8269         * modules/unistr/u32-strcpy: New file.
8270         * lib/unistr/u8-strcpy.c: New file.
8271         * lib/unistr/u16-strcpy.c: New file.
8272         * lib/unistr/u32-strcpy.c: New file.
8273         * lib/unistr/u-strcpy.h: New file.
8274
8275         * modules/unistr/u8-strcspn: New file.
8276         * modules/unistr/u16-strcspn: New file.
8277         * modules/unistr/u32-strcspn: New file.
8278         * lib/unistr/u8-strcspn.c: New file.
8279         * lib/unistr/u16-strcspn.c: New file.
8280         * lib/unistr/u32-strcspn.c: New file.
8281         * lib/unistr/u-strcspn.h: New file.
8282
8283         * modules/unistr/u8-strdup: New file.
8284         * modules/unistr/u16-strdup: New file.
8285         * modules/unistr/u32-strdup: New file.
8286         * lib/unistr/u8-strdup.c: New file.
8287         * lib/unistr/u16-strdup.c: New file.
8288         * lib/unistr/u32-strdup.c: New file.
8289         * lib/unistr/u-strdup.h: New file.
8290
8291         * modules/unistr/u8-strlen: New file.
8292         * modules/unistr/u16-strlen: New file.
8293         * modules/unistr/u32-strlen: New file.
8294         * lib/unistr/u8-strlen.c: New file.
8295         * lib/unistr/u16-strlen.c: New file.
8296         * lib/unistr/u32-strlen.c: New file.
8297         * lib/unistr/u-strlen.h: New file.
8298
8299         * modules/unistr/u8-strmblen: New file.
8300         * modules/unistr/u16-strmblen: New file.
8301         * modules/unistr/u32-strmblen: New file.
8302         * lib/unistr/u8-strmblen.c: New file.
8303         * lib/unistr/u16-strmblen.c: New file.
8304         * lib/unistr/u32-strmblen.c: New file.
8305
8306         * modules/unistr/u8-strmbtouc: New file.
8307         * modules/unistr/u16-strmbtouc: New file.
8308         * modules/unistr/u32-strmbtouc: New file.
8309         * lib/unistr/u8-strmbtouc.c: New file.
8310         * lib/unistr/u16-strmbtouc.c: New file.
8311         * lib/unistr/u32-strmbtouc.c: New file.
8312
8313         * modules/unistr/u8-strncat: New file.
8314         * modules/unistr/u16-strncat: New file.
8315         * modules/unistr/u32-strncat: New file.
8316         * lib/unistr/u8-strncat.c: New file.
8317         * lib/unistr/u16-strncat.c: New file.
8318         * lib/unistr/u32-strncat.c: New file.
8319         * lib/unistr/u-strncat.h: New file.
8320
8321         * modules/unistr/u8-strncmp: New file.
8322         * modules/unistr/u16-strncmp: New file.
8323         * modules/unistr/u32-strncmp: New file.
8324         * lib/unistr/u8-strncmp.c: New file.
8325         * lib/unistr/u16-strncmp.c: New file.
8326         * lib/unistr/u32-strncmp.c: New file.
8327
8328         * modules/unistr/u8-strncpy: New file.
8329         * modules/unistr/u16-strncpy: New file.
8330         * modules/unistr/u32-strncpy: New file.
8331         * lib/unistr/u8-strncpy.c: New file.
8332         * lib/unistr/u16-strncpy.c: New file.
8333         * lib/unistr/u32-strncpy.c: New file.
8334         * lib/unistr/u-strncpy.h: New file.
8335
8336         * modules/unistr/u8-strnlen: New file.
8337         * modules/unistr/u16-strnlen: New file.
8338         * modules/unistr/u32-strnlen: New file.
8339         * lib/unistr/u8-strnlen.c: New file.
8340         * lib/unistr/u16-strnlen.c: New file.
8341         * lib/unistr/u32-strnlen.c: New file.
8342         * lib/unistr/u-strnlen.h: New file.
8343
8344         * modules/unistr/u8-strpbrk: New file.
8345         * modules/unistr/u16-strpbrk: New file.
8346         * modules/unistr/u32-strpbrk: New file.
8347         * lib/unistr/u8-strpbrk.c: New file.
8348         * lib/unistr/u16-strpbrk.c: New file.
8349         * lib/unistr/u32-strpbrk.c: New file.
8350         * lib/unistr/u-strpbrk.h: New file.
8351
8352         * modules/unistr/u8-strrchr: New file.
8353         * modules/unistr/u16-strrchr: New file.
8354         * modules/unistr/u32-strrchr: New file.
8355         * lib/unistr/u8-strrchr.c: New file.
8356         * lib/unistr/u16-strrchr.c: New file.
8357         * lib/unistr/u32-strrchr.c: New file.
8358
8359         * modules/unistr/u8-strspn: New file.
8360         * modules/unistr/u16-strspn: New file.
8361         * modules/unistr/u32-strspn: New file.
8362         * lib/unistr/u8-strspn.c: New file.
8363         * lib/unistr/u16-strspn.c: New file.
8364         * lib/unistr/u32-strspn.c: New file.
8365         * lib/unistr/u-strspn.h: New file.
8366
8367         * modules/unistr/u8-strstr: New file.
8368         * modules/unistr/u16-strstr: New file.
8369         * modules/unistr/u32-strstr: New file.
8370         * lib/unistr/u8-strstr.c: New file.
8371         * lib/unistr/u16-strstr.c: New file.
8372         * lib/unistr/u32-strstr.c: New file.
8373         * lib/unistr/u-strstr.h: New file.
8374
8375         * modules/unistr/u8-strtok: New file.
8376         * modules/unistr/u16-strtok: New file.
8377         * modules/unistr/u32-strtok: New file.
8378         * lib/unistr/u8-strtok.c: New file.
8379         * lib/unistr/u16-strtok.c: New file.
8380         * lib/unistr/u32-strtok.c: New file.
8381         * lib/unistr/u-strtok.h: New file.
8382
8383         * modules/unistr/u8-uctomb: New file.
8384         * modules/unistr/u16-uctomb: New file.
8385         * modules/unistr/u32-uctomb: New file.
8386         * lib/unistr/u8-uctomb.c: New file.
8387         * lib/unistr/u16-uctomb.c: New file.
8388         * lib/unistr/u32-uctomb.c: New file.
8389
8390         * MODULES.html.sh (Unicode string functions): Add the new modules.
8391
8392 2007-01-08  Bruno Haible  <bruno@clisp.org>
8393
8394         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
8395         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
8396         subdirectories.
8397
8398 2007-01-08  Karl Berry  <karl@gnu.org>
8399
8400         * doc/error.texi: mention that main() fns must set program_name
8401         when progname is used.
8402
8403 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
8404
8405         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
8406         WCTYPE_H is empty, for the benefit of builds from non-distclean
8407         directories.  Problem reported by Eric Blake in
8408         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
8409
8410 2007-01-08  Bruno Haible  <bruno@clisp.org>
8411
8412         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
8413         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
8414         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
8415         PROVIDE_CANONICALIZE_FILENAME_MODE.
8416         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
8417
8418 2007-01-08  Bruno Haible  <bruno@clisp.org>
8419
8420         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
8421         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
8422         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
8423         * lib/fts.c: Likewise.
8424         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
8425
8426 2006-12-25  Bruno Haible  <bruno@clisp.org>
8427
8428         * modules/utf8-ucs4-safe: New file.
8429         * lib/utf8-ucs4-safe.h: New file.
8430         * lib/unistr/utf8-ucs4-safe.c: New file.
8431
8432         * modules/utf16-ucs4-safe: New file.
8433         * lib/utf16-ucs4-safe.h: New file.
8434         * lib/unistr/utf16-ucs4-safe.c: New file.
8435
8436         * MODULES.html.sh (Unicode string functions): Add the new modules.
8437
8438 2007-01-08  Bruno Haible  <bruno@clisp.org>
8439
8440         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
8441         (Depends-on): Add unitypes.
8442         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
8443         (u8_mbtouc_aux): Move out to separate file.
8444         (u8_mbtouc): Use ucs4_t, uint8_t types.
8445         * lib/unistr/utf8-ucs4.c: New file.
8446
8447         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
8448         (Depends-on): Add unitypes.
8449         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
8450         (u16_mbtouc_aux): Move out to separate file.
8451         (u16_mbtouc): Use ucs4_t, uint16_t types.
8452         * lib/unistr/utf16-ucs4.c: New file.
8453
8454         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
8455         (Depends-on): Add unitypes.
8456         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
8457         (u8_uctomb_aux): Move out to separate file.
8458         (u8_uctomb): Use ucs4_t, uint8_t types.
8459         * lib/unistr/ucs4-utf8.c: New file.
8460
8461         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
8462         (Depends-on): Add unitypes.
8463         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
8464         (u16_uctomb_aux): Move out to separate file.
8465         (u16_uctomb): Use ucs4_t, uint16_t types.
8466         * lib/unistr/ucs4-utf16.c: New file.
8467
8468 2006-12-25  Bruno Haible  <bruno@clisp.org>
8469
8470         * modules/unitypes: New file.
8471         * lib/unitypes.h: New file.
8472         * MODULES.html.sh (func_all_modules): New section "Unicode string
8473         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
8474         this section. Add unitypes.
8475
8476 2007-01-08  Bruno Haible  <bruno@clisp.org>
8477
8478         Avoid variable names that conflict with those from libtool.
8479         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
8480         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
8481         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
8482         library_names_spec to acl_library_names_spec, hardcode_* to
8483         acl_hardcode_*.
8484         Reported by Ralf Wildenhues.
8485
8486 2007-01-08  Bruno Haible  <bruno@clisp.org>
8487
8488         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
8489         definition.
8490         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
8491         definition.
8492         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
8493         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
8494         definition.
8495         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
8496         definition.
8497         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
8498         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
8499         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
8500         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
8501         definition.
8502         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
8503         definition.
8504         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
8505         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
8506         GC_USE_<algorithm>.
8507         * lib/gc-libgcrypt.c: Likewise.
8508         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
8509         * modules/gc-arctwo (configure.ac): Likewise.
8510         * modules/gc-des (configure.ac): Likewise.
8511         * modules/gc-hmac-md5 (configure.ac): Likewise.
8512         * modules/gc-hmac-sha1 (configure.ac): Likewise.
8513         * modules/gc-md2 (configure.ac): Likewise.
8514         * modules/gc-md4 (configure.ac): Likewise.
8515         * modules/gc-md5 (configure.ac): Likewise.
8516         * modules/gc-random (configure.ac): Likewise.
8517         * modules/gc-rijndael (configure.ac): Likewise.
8518         * modules/gc-sha1 (configure.ac): Likewise.
8519
8520 2007-01-08  Bruno Haible  <bruno@clisp.org>
8521
8522         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
8523         macro definition.
8524         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
8525         definition.
8526         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
8527         definition.
8528         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
8529         * modules/fcntl-safer (configure.ac): Likewise.
8530         * modules/fopen-safer (configure.ac): Likewise.
8531         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
8532         GNULIB_FWRITEERROR macro definition.
8533
8534 2007-01-08  Bruno Haible  <bruno@clisp.org>
8535
8536         * m4/gnulib-common.m4: New file.
8537         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
8538         (func_get_filelist): Add m4/gnulib-common.m4.
8539
8540 2007-01-08  Bruno Haible  <bruno@clisp.org>
8541
8542         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
8543         command.
8544
8545 2007-01-08  Jim Meyering  <jim@meyering.net>
8546
8547         Use a more robust test for a "can't happen" condition.
8548         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
8549         narrowed the st_size value.  Presuming the "can't happen" condition
8550         is true, that narrowing could conceivably convert an invalid st_size
8551         value into a valid one.  Instead, use a change based on Matthew
8552         Woehlke's original patch.
8553
8554         Slight readability improvement: use an assert-like macro
8555         in place of literal "abort ()" uses.
8556         * lib/fts.c (fts_assert): Define.
8557         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
8558         Use this macro instead of a bare 'abort'.
8559
8560 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
8561
8562         Don't worry about using IRIX 5.3's wctype.h broken definitions;
8563         simply work around them.
8564         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
8565         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
8566         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before
8567         declaring.
8568         Don't bother to define as macros, since the standard doesn't require it.
8569         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
8570         longer worry about IRIX 5.3.
8571         (HAVE_WCTYPE_CTMP_BUG): Remove.
8572
8573 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
8574
8575         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
8576         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
8577         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
8578         Problems reported by Georg Schwarz for IRIX 5.3.
8579
8580         * gnulib-tool (autoconf_minversion): Take the maximum version number
8581         found, not the minimum.  Problem reported by James Youngman.
8582
8583 2007-01-03  Karl Berry  <karl@gnu.org>
8584
8585         * doc/error.texi: new file, explaining interaction with progname.
8586         * doc/gnulib.texi: include it.  Update copyright.
8587
8588 2007-01-03  Simon Josefsson  <simon@josefsson.org>
8589
8590         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
8591         AC_CANONICAL_HOST, to improve autobuild outputs.
8592
8593 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
8594             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
8595
8596         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
8597         sockets, server sockets, and other file descriptors.  Count errors
8598         to compute the return value.  Reorder the code a bit to be easier
8599         to follow.  Don't set event bits that were not requested (except
8600         POLLERR and POLLHUP).
8601
8602 2007-01-01  Bruno Haible  <bruno@clisp.org>
8603
8604         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
8605
8606 2007-01-03  Jim Meyering  <jim@meyering.net>
8607
8608         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
8609
8610 2007-01-02  Bruno Haible  <bruno@clisp.org>
8611
8612         * modules/settime (Include): Require timespec.h.
8613         * modules/nanosleep (Include): Likewise.
8614
8615 2007-01-01  Bruno Haible  <bruno@clisp.org>
8616
8617         * gnulib-tool (func_emit_copyright_notice): Bump year.
8618         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
8619
8620 2007-01-01  Bruno Haible  <bruno@clisp.org>
8621
8622         Improve support for OpenBSD.
8623         * build-aux/config.rpath (libname_spec): Export.
8624         (library_names_spec): New variable. Export.
8625         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
8626         library_names_spec from the config.rpath output. Locate shared library
8627         through the name pattern in library_names_spec.
8628
8629 2007-01-01  Eric Blake  <ebb9@byu.net>
8630
8631         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
8632
8633 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
8634
8635         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
8636         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
8637         assume the C locale, and avoid an "eval" that could cause trouble.
8638         Problem with SORT reported by Bob Proulx.
8639
8640         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
8641         Define.  Trivial patch from Henning Nielsen Lund, originally
8642         sent to bug-grep@gnu.org today.
8643
8644 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
8645
8646         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
8647         struct stat.  Problem reported by Henning Nielsen Lund.
8648         * lib/acl.c: Include acl.h first, to check interface.  Don't
8649         bother to include sys/types.h and sys/stat.h again.
8650
8651 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
8652
8653         Import the following change from libc; problem reported by
8654         Sven Verdoolaege.
8655
8656         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
8657
8658         [BZ #1373]
8659         * lib/argp.h: Remove __NTH for __argp_usage inline function.
8660
8661 2006-12-28  Jim Meyering  <jim@meyering.net>
8662
8663         * build-aux/announce-gen: Do not assume that the package
8664         builds any of tar.gz, tar.bz2, and .xdelta files.
8665         Suggestion from Simon Josefsson.
8666
8667 2006-12-28  Simon Josefsson  <simon@josefsson.org>
8668
8669         * modules/announce-gen: New file.
8670
8671 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
8672
8673         * lib/mbchar.h: Just include <wctype.h>; the wctype module
8674         handles its gotchas now.
8675         * lib/mbswidth.c: Likewise.
8676         * lib/wcwidth.h: Likewise.
8677         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
8678         and iswcntrl; the wctype module does this stuff now.
8679         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
8680         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
8681         * modules/mbchar (Depends-on): Add wctype.
8682         * modules/mbswidth (Depends-on): Likewise.
8683         * modules/wcwidth (Depends-on): Likewise.
8684
8685 2006-12-27  Eric Blake  <ebb9@byu.net>
8686
8687         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
8688         module uses more than what <wctype.h> is required to provide.
8689
8690 2006-12-26  Eric Blake  <ebb9@byu.net>
8691
8692         * gnulib-tool (sed_extract_prog): Avoid space-tab.
8693
8694 2006-12-26  Eric Blake  <ebb9@byu.net>
8695
8696         * modules/absolute-header: New module.
8697         * modules/fcntl (Depends-on): Depend on it.
8698         * modules/inttypes (Depends-on): Likewise.
8699         * modules/stdint (Depends-on): Likewise.
8700         * modules/sys_stat (Depends-on): Likewise.
8701         * modules/wctype (Depends-on): Likewise.
8702         * MODULES.html.sh (Support for building libraries and
8703         executables): Document it.
8704
8705 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
8706
8707         * gnulib-tool (SED): Remove, undoing previous change.
8708         The problem was that it broke coreutils on Solaris, because
8709         "sed --posix" leaked into a makefile.
8710         (sed): New alias, if 'alias' and GNU sed.
8711
8712 2006-12-24  Jim Meyering  <jim@meyering.net>
8713
8714         Work around an fchownat bug in glibc-2.4:
8715         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
8716         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
8717         in spite of the -P option.
8718         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
8719         New macros.
8720         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
8721         * modules/openat (Files): Add lib/fchownat.c.
8722         * lib/openat.c (fchownat): Don't define here.  Move to...
8723         * lib/fchownat.c: ...this new file.
8724
8725 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
8726
8727         Fix bug reported by Bruno Haible in
8728         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
8729         where quotearg.c didn't compile on Mac OS X 10.2 because it
8730         lacks <wchar.h> and wint_t.
8731         * lib/wctype_.h (__wctype_wint_t): New type.
8732         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
8733         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
8734         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
8735         Arg is now of type __wctype_wint_t, not wint_t.
8736         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
8737         substitute HAVE_WINT_T.
8738         * modules/wctype (Files): Add m4/wint_t.m4.
8739         (wctype.h): Substitute HAVE_WINT_T.
8740
8741 2006-12-23  Bruno Haible  <bruno@clisp.org>
8742
8743         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
8744
8745 2006-12-23  Bruno Haible  <bruno@clisp.org>
8746
8747         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
8748         S_ISLNK.
8749         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
8750         mingw.
8751
8752 2006-12-22  Bruno Haible  <bruno@clisp.org>
8753
8754         * lib/copy-file.c: Include acl.h.
8755         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
8756         Close the file descriptors only after being done with copy_acl.
8757         * modules/copy-file (Depends-on): Add acl.
8758
8759 2006-12-22  Bruno Haible  <bruno@clisp.org>
8760
8761         * gnulib-tool (SED): New variable.
8762         Use $SED instead of sed everywhere.
8763
8764 2006-12-22  Bruno Haible  <bruno@clisp.org>
8765
8766         * modules/no-c++: New file.
8767         * m4/no-c++.m4: New file.
8768         * MODULES.html.sh (Support for building libraries and executables):
8769         Add no-c++.
8770
8771 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
8772
8773         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
8774         Include <limits.h>, and use its INT_MAX to rewrite the
8775         j loop so that it does not overflow 'int'.  Problem reported by
8776         Ralf Wildenhues in
8777         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
8778         Play it safe by shifting left by 1 rather than multiplying by 2,
8779         as GCC is less likely to optimize this away when the value
8780         is signed (when it assumes overflow leads to undefined behavior).
8781         Also, don't assume time_t uses two's complement.
8782
8783 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
8784
8785         * MODULES.html.sh: New module wctype.
8786         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
8787         * lib/fnmatch.c: Don't bother to include <wchar.h> before
8788         <wctype.h>, since the new wctype module should fix this.
8789         * lib/quotearg.c: Include <wctype.h> unconditionally, since
8790         the wctype module should arrange for it.
8791         * lib/regex_internal.h: Likewise.
8792         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
8793         since the wctype module should handle this now.
8794         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
8795         * modules/fnmatch (Depends-on): Add wctype.
8796         * modules/quotearg (Depends-on): Likewise.
8797         * modules/regex (Depends-on): Likewise.
8798
8799 2006-12-19  Bruno Haible  <bruno@clisp.org>
8800
8801         * lib/strdup.h [C++]: Wrap definitions in extern "C".
8802         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
8803
8804 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8805
8806         * modules/savewd (Depends-on): Fix dependency on fcntl.
8807
8808 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
8809
8810         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
8811         conforms to C99, rather than relying on the user's environment
8812         setting of STDINT_H.
8813
8814 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
8815         and Eric Blake  <ebb9@byu.net>
8816
8817         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
8818         This is more consistent with the other defines here.
8819         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
8820         Port to z/OS.  Problem reported by Paul Gilmartin.
8821         Change local vars to use gl_ prefix rather than ac_.
8822         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
8823         with other defines.
8824         * modules/double-slash-root: New module.
8825         * modules/dirname (Files): Remove m4/double-slash-root.m4.
8826         (Depends-on): Add double-slash-root.
8827         * MODULES.html.sh (File system functions): Mention new module.
8828
8829 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
8830
8831         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
8832         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
8833         This is for the benefit of gzip, which doesn't do i18n.
8834
8835 2006-12-12  Jim Meyering  <jim@meyering.net>
8836
8837         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
8838         Reported by Andreas Schwab <schwab@suse.de>.
8839
8840 2006-12-12  Bruno Haible  <bruno@clisp.org>
8841
8842         Merge these changes.
8843         2006-09-05  Bruno Haible  <bruno@clisp.org>
8844         * lib/iconvme.c (iconv_string): No need to save and restore errno when
8845         iconv_alloc succeeded.
8846         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
8847         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
8848         test for " && dest " at the end - dest is always != NULL there. Call
8849         iconv with 4xNULL arguments initially, to reset the state. Call iconv
8850         with 2xNULL arguments, also to flush the state storage. Handle the
8851         IRIX iconv behaviour. Realloc the final result, to throw away unused
8852         memory.
8853
8854 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
8855
8856         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
8857         and fchmodat unconditionally, since glibc 2.4 has them.
8858         Problem reported by Arkadiusz Miskiewicz.
8859
8860 2006-12-10  Bruno Haible  <bruno@clisp.org>
8861
8862         * gnulib-tool (func_import): Show the include files only for those
8863         modules that are copied and specified.
8864         Reported by Karl Berry.
8865
8866 2006-12-08  Jim Meyering  <jim@meyering.net>
8867
8868         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
8869         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
8870
8871         * build-aux/announce-gen: Add two new options, both optional:
8872         --bootstrap-tools=TOOL_LIST
8873               a comma-separated list of tools, e.g.,
8874               autoconf,automake,bison,gnulib
8875         --gnulib-snapshot-date=DATE
8876               if gnulib is in the bootstrap tool list,
8877               then report this as the snapshot date.
8878               If not specified, use the current date/time.
8879               If you specify a date here, be sure it's UTC.
8880
8881 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8882
8883         * tests/test-argp-2.sh: Fix test to match actual output.
8884         (func_compare): Fix sed script to be portable.
8885
8886 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
8887
8888         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
8889         workaround for this case.  It is not autoconfigured now; offhand
8890         it's hard to see how to autoconfigure it.
8891
8892 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
8893
8894         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
8895         a directory that is about to be chowned.  Such a directory's
8896         initial file permissions should permit the owner only and this
8897         should not be changed until after the chown, since the group and
8898         other bits would be incorrect if they granted permission before
8899         the chown.
8900
8901         Fix porting problem for iswctype reported by Georg Schwarz in:
8902         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
8903         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
8904         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
8905         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
8906         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
8907
8908 2006-12-03  Jim Meyering  <jim@meyering.net>
8909
8910         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
8911         p->fts_statp may not yet be defined.
8912         (fts_read): Instead, set it in the caller, once p->fts_statp is
8913         sure to be defined, and corresponds to a top-level directory.
8914         This bug made du -x fail.  Here's the coreutils test case:
8915         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
8916         Reported by Mike Frysinger.
8917
8918 2006-12-01  Jim Meyering  <jim@meyering.net>
8919
8920         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
8921         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
8922         Reported by Simon Josefsson.
8923
8924 2006-11-30  Jim Meyering  <jim@meyering.net>
8925
8926         * m4/warning.m4: Use the all-permissive copyright notice
8927         recommended by RMS (rather than LGPL).
8928         * m4/vararrays.m4: Likewise.
8929         * m4/flexmember.m4: Likewise.
8930
8931 2006-11-29  Bruno Haible  <bruno@clisp.org>
8932
8933         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
8934         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
8935         using +=.
8936         Reported by Simon Josefsson <simon@josefsson.org>.
8937
8938 2006-11-28  James Youngman <jay@gnu.org>
8939
8940         * README: Advise users that they might find the bug-gnulib@gnu.org
8941         and autotools-announce@gnu.org mailing lists useful.
8942
8943 2006-11-28  Bruno Haible  <bruno@clisp.org>
8944
8945         * m4/ptrdiff_max.m4: Remove file.
8946
8947 2006-11-21  Bruno Haible  <bruno@clisp.org>
8948
8949         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
8950         _AC_COMPUTE_INT.
8951         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
8952         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
8953         _AC_COMPUTE_INT.
8954         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
8955         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
8956         _AC_COMPUTE_INT.
8957         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
8958
8959 2006-11-28  Jim Meyering  <jim@meyering.net>
8960
8961         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
8962         warning from "gcc -Wshadow" about shadowing the builtin.
8963
8964 2006-11-27  Bruno Haible  <bruno@clisp.org>
8965
8966         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): 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-27  Bruno Haible  <bruno@clisp.org>
8971             Paul Eggert  <eggert@cs.ucla.edu>
8972
8973         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
8974
8975 2006-11-26  Bruno Haible  <bruno@clisp.org>
8976
8977         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
8978         noinst_LTLIBRARIES.
8979
8980 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
8981             Bruno Haible  <bruno@clisp.org>
8982
8983         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
8984         if compiling with "gcc -ansi".
8985
8986 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
8987
8988         Fix some incompatibilities with gcc -ansi -pedantic.
8989         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
8990         if compiling pedantically with GCC, unless it's C99 or later.
8991         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
8992         it mishandles gcc -ansi -pedantic as well.
8993         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
8994         if gcc -pedantic.
8995         * lib/regexec.c (check_node_accept_bytes): Don't use auto
8996         initializers for struct if -pedantic, unless it's C99 or later.
8997
8998 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
8999
9000         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
9001         Don't close an fd more than once. Identical atimes indicate
9002         success, not failure.
9003
9004 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
9005
9006         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
9007
9008 2006-11-23  Jim Meyering  <jim@meyering.net>
9009
9010         * build-aux/announce-gen: New file.  From coreutils.
9011
9012 2006-11-22  Jim Meyering  <jim@meyering.net>
9013
9014         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
9015         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
9016         (fts_read): Use a temporary to narrow the overused st_size member
9017         before using it in a switch statement.  Reported by Matthew Woehlke.
9018
9019         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
9020         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
9021
9022 2006-11-20  Bruno Haible  <bruno@clisp.org>
9023
9024         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
9025         changequote instead of pairs of brackets.
9026         Reported by Andreas Schwab <schwab@suse.de>.
9027
9028 2006-11-21  Jim Meyering  <jim@meyering.net>
9029
9030         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
9031         so as to remain compatible with older compilers.
9032         Patch from Michael Deutschmann.
9033
9034 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
9035
9036         * MODULES.html.sh (File system functions): Add openat.
9037
9038         * lib/openat.h (rpl_fstatat): New macro, if
9039         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
9040         (fstatat): Define to rpl_fstatat under the same conditions,
9041         unless COMPILING_FSTATAT.
9042         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
9043         seems to have the bug.
9044         * lib/fstatat.c: New file.
9045         * modules/openat (Files): Add it.
9046
9047 2006-11-20  Bruno Haible  <bruno@clisp.org>
9048
9049         * Makefile: New file.
9050
9051 2006-11-20  Jim Meyering  <jim@meyering.net>
9052
9053         The beginnings of syntax-related checks for gnulib.
9054         * lib/Makefile: New file.
9055         * lib/t-idcache: New script.  Ensure that the two halves of
9056         idcache.c stay in sync.
9057
9058         * lib/idcache.c: Adjust comments in user- and group- portions to
9059         be more accurate, and to be consistent with one another.
9060
9061 2006-11-20  Jim Meyering  <jim@meyering.net>
9062
9063         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
9064         continue using the flexible array member (thus, this module performs
9065         half as many malloc calls), with the addition that...
9066         (getgroup, getuser): Consistently record a non-match via an empty
9067         "name" string, and map an empty string match to a NULL return value.
9068         * modules/idcache (Depends-on): Re-add flexmember.
9069
9070         * lib/idcache.c (getuser): Remove all uses of the register keyword.
9071         (getuidbyname, getgroup, getgidbyname): Likewise.
9072
9073         Use cleaner syntax: NULL rather than 0.
9074         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
9075
9076 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
9077
9078         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
9079         It mishandled the case where the group was missing.
9080         Problem reported by Greg Schafer.
9081         * modules/idcache: Likewise.
9082
9083 2006-11-18  Jim Meyering  <jim@meyering.net>
9084
9085         * check-module (%exempt_header): Add exception for some
9086         conditionally-included headers.
9087
9088         * modules/i-ring (Depends-on): Add verify.
9089         (License): Change to LGPL.
9090
9091 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
9092
9093         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
9094         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
9095         and inttostr.h.  Use snprintf rather than uinttostr, so that
9096         LGPLed code doesn't depend on GPLed.
9097
9098 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
9099
9100         * modules/inline (License): Change from GPL to LGPL.
9101
9102 2006-11-17  Jim Meyering  <jim@meyering.net>
9103
9104         * modules/d-type (License): Switch to LGPL.
9105
9106 2006-11-15  Bruno Haible  <bruno@clisp.org>
9107
9108         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
9109
9110 2006-11-15  Eric Blake  <ebb9@byu.net>
9111
9112         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
9113         the module dependency.
9114
9115 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
9116             Bruno Haible  <bruno@clisp.org>
9117
9118         * gnulib-tool (func_create_testdir): Add license consistency check.
9119
9120 2006-11-15  Eric Blake  <ebb9@byu.net>
9121
9122         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
9123         random "(cached)" in configure output.
9124
9125 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9126
9127         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
9128         test for conforming inttypes.h is both announced and cached.
9129
9130         * MODULES.html.sh (seen_modules, seen_files): New variables.
9131         (func_module): Rewrite to use a few less gnulib-tool and sed
9132         invocations.  Avoid a couple of quadratic algorithms for ...
9133         (missed_modules, missed_files): ... these, with ...
9134         (func_append, func_tmpdir): ... these new functions, from
9135         gnulib-tool.  Analogously, install traps for cleanup.
9136
9137         * tests/test-gc.c (main): Remove unused variables.
9138         * tests/test-read-file.c: Include stdlib.h, for 'free'.
9139
9140 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
9141
9142         * modules/inttostr (License): Change to LGPL.
9143
9144 2006-11-14  Eric Blake  <ebb9@byu.net>
9145
9146         * modules/tempname (License): Change to LGPL.
9147
9148 2006-11-14  Eric Blake  <ebb9@byu.net>
9149
9150         * doc/functions.texi (Function Portability): *printf functions on
9151         Cygwin now understand all POSIX size specifiers.
9152
9153 2006-11-14  Bruno Haible  <bruno@clisp.org>
9154
9155         * modules/c-ctype (License): Change to LGPL.
9156
9157 2006-11-12  Bruno Haible  <bruno@clisp.org>
9158
9159         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
9160         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
9161         for GNOME libraries, for which the include files are installed in
9162         subdirectories of $prefix/include.
9163
9164 2006-11-12  Bruno Haible  <bruno@clisp.org>
9165
9166         * m4/lib-link.m4: Require at least autoconf-2.54.
9167         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
9168         name to underscores for the --with option.
9169
9170 2006-11-13  Bruno Haible  <bruno@clisp.org>
9171
9172         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
9173         the tests directory.
9174         Reported by Ralf Wildenhues.
9175
9176 2006-11-13  Bruno Haible  <bruno@clisp.org>
9177
9178         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
9179         (func_emit_initmacro_end): Undo the override here.
9180         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
9181         Works around the famous automake error in coreutils.
9182
9183 2006-11-13  Eric Blake  <ebb9@byu.net>
9184
9185         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
9186         element, not its node.
9187
9188 2006-11-12  Bruno Haible  <bruno@clisp.org>
9189
9190         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
9191         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
9192
9193 2006-11-12  Bruno Haible  <bruno@clisp.org>
9194
9195         * gnulib-tool: New option --local-symlink.
9196         (func_usage): Document it.
9197         (lsymbolic): New variable.
9198         (func_import, func_create_testdir): If --symlink was not specified,
9199         test whether --local-symlink was specified and the file comes from
9200         the local_gnulib_dir.
9201
9202 2006-11-12  Bruno Haible  <bruno@clisp.org>
9203
9204         * gnulib-tool (func_ln): New function.
9205         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
9206
9207 2006-11-12  Bruno Haible  <bruno@clisp.org>
9208
9209         Finish support for source files in subdirectories.
9210         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
9211         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
9212         AUTOMAKE_OPTIONS.
9213         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
9214
9215 2006-11-12  Bruno Haible  <bruno@clisp.org>
9216
9217         * gnulib-tool (func_get_automake_snippet): Synthesize also an
9218         EXTRA_lib_SOURCES augmentation.
9219         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
9220
9221 2006-11-12  Jim Meyering  <jim@meyering.net>
9222
9223         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
9224         file descriptors.  This also averts a failure on systems with
9225         native openat support when a traversed directory lacks "x" access.
9226         * lib/fts_.h: Include "i-ring.h"
9227         (struct FTS) [fts_fd_ring]: New member.
9228         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
9229         (FCHDIR): Add parentheses.
9230         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
9231         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
9232         When descending, rather than simply closing the previous
9233         fts_cwd_fd value, push that file descriptor onto the ring.
9234         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
9235         (fts_open): Initialize the new fd_ring member.
9236         (fts_close): Clear the ring.
9237         (fts_safe_changedir): When possible, use our new fd_ring to skip
9238         the diropen and fstat and dev/ino comparison that would normally
9239         accompany a virtual `chdir ("..")'.
9240
9241         * modules/fts (Depends-on): Add i-ring.
9242         * modules/i-ring: New module.
9243         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
9244         * m4/i-ring.m4: New file.
9245
9246 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9247
9248         * gnulib-tool (func_create_testdir): Fix replacement of
9249         `build-aux' in configure.ac.  Run autotools in gltests
9250         subdirectory.
9251         (func_create_testdir, func_create_megatestdir, test): There is
9252         no need for '--force' in most autotool invocations in a new
9253         tree.  Actually fail the whole test if any of the tools, or the
9254         configure or make stages fail.
9255
9256         Sync from Automake.
9257         * build-aux/gnupload: Revert last change.  Add pointer to upload
9258         instructions of the GNU Maintenance Instructions.
9259         Suggestion by Karl Berry.
9260
9261 2006-11-10  Jim Meyering  <jim@meyering.net>
9262
9263         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
9264
9265 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
9266
9267         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
9268         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
9269         (bind_textdomain_codeset) [! ENABLE_NLS]:
9270         Evaluate all the arguments.  That way, callers get compatible behavior
9271         if the arguments have side effects.  Also, it avoids some GCC
9272         diagnostics in some cases; Joel E. Denny reported problems when Bison
9273         was configured with --enable-gcc-warnigs.
9274
9275 2006-11-10  Jim Meyering  <jim@meyering.net>
9276
9277         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
9278         relevant options in CFLAGS (like -O, -fno-inline) are taken into
9279         account.
9280
9281 2006-11-10  Jim Meyering  <jim@meyering.net>
9282
9283         * modules/inline: New file/module.
9284         * modules/xalloc (Files): Remove m4/inline.m4.
9285         (Depends-on): Add inline, instead.
9286         * modules/oset: Likewise.
9287         * modules/list: Likewise.
9288
9289 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
9290
9291         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
9292         Problem reported by Matthew Woehlke.
9293
9294 2006-11-09  Bruno Haible  <bruno@clisp.org>
9295
9296         * lib/tempname.c (gen_tempname): Remove variant that invokes
9297         __gen_tempname.
9298         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
9299         __gen_tempname.
9300
9301 2006-11-08  Bruno Haible  <bruno@clisp.org>
9302
9303         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
9304         to 'yes' instead of 'cross-compiling'.
9305
9306 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
9307
9308         * lib/quotearg.h (quotearg_free): New decl.
9309         * lib/quotearg.c (quotearg_free): New function.
9310         (slot0, nslots, slotvec0, slotvec):
9311         Now file-scope so that quotearg_free can get at them.
9312
9313 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9314
9315         Sync from Automake.
9316         * build-aux/gnupload: Add missing 'gnu' to example URL.
9317         Report by Karl Berry.
9318
9319 2006-11-08  Bruno Haible  <bruno@clisp.org>
9320
9321         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
9322         Suggested by Paul Eggert.
9323
9324 2006-11-08  Jim Meyering  <jim@meyering.net>
9325
9326         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
9327         It's already included if !_LIBC.
9328         (fts_safe_changedir): Add a comment.
9329
9330 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
9331
9332         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
9333         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
9334         Matthew Woehlke.
9335
9336         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
9337         definitions up, to avoid colliding with change below.
9338         (static_inline) [HAVE_INLINE]: New macro.
9339         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
9340         Provide extern decls when !HAVE_INLINE.  Do not define unless
9341         static_inline is defined, either by us or by xmalloc.c.  Use
9342         static_inline rather than static inline.
9343         (XCALLOC): Optimize sizeof(T) = 1 case.
9344         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
9345
9346 2006-11-07  Bruno Haible  <bruno@clisp.org>
9347
9348         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
9349         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
9350         AC_C_INLINE.
9351         * modules/xalloc (Files): Add m4/inline.m4.
9352
9353 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9354
9355         * README: Fix typo.
9356         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
9357         (Miscellanous Notes): ...from this.
9358
9359 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
9360
9361         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
9362         Mention that offsetof should be used instead of sizeof.
9363         From Bruno Haible.
9364
9365 2006-11-07  Bruno Haible  <bruno@clisp.org>
9366
9367         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
9368
9369 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
9370
9371         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
9372         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
9373         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
9374         (gl_tree_add_before, gl_tree_add_after):
9375         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
9376         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
9377         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
9378         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
9379         (gl_linked_add_after, gl_linked_add_at): Likewise.
9380         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
9381         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
9382         (gl_tree_add_before, gl_tree_add_after): Likewise.
9383         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
9384         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
9385         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
9386
9387 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9388
9389         * lib/gl_oset.h: Use C comment style, not C++ comment style.
9390
9391 2006-11-06  Bruno Haible  <bruno@clisp.org>
9392
9393         * m4/inline.m4: New file.
9394         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
9395         * modules/list (Files): Add m4/inline.m4.
9396         * modules/oset (Files): Likewise.
9397
9398 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
9399
9400         * lib/idcache.c: Include <stddef.h>, for offsetof.
9401         (struct userid.name): Change from char * to a flexible array member.
9402         All uses changed.
9403         * modules/idcache (Depends-on): Add flexmember.
9404
9405         * MODULES.html.sh (Core language properties): New module flexmember.
9406         * modules/flexmember, m4/flexmember.m4: New files.
9407
9408         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
9409         inline functions that are identical with the old xnmalloc_inline,
9410         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
9411         that we can avoid some unnecessary integer multiplications and
9412         divisions in the common case where the element size is known at
9413         compile time.
9414         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
9415         needed.
9416         (xnboundedmalloc): Remove.
9417         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
9418         arguments, for consistency with rest of this header.
9419         (xcharalloc): Rewrite using XNMALLOC.
9420         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
9421         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
9422         versions have been moved to lib/xalloc.h and renamed to be the
9423         non-*_inline versions.
9424         (xmalloc, xrealloc): Implement without reference to the xnmalloc
9425         and xnrealloc functions, since those functions are now inline and
9426         now call us.
9427         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
9428         renaming described above.
9429         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
9430         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
9431         captures the dependency in AC_C_INLINE.
9432
9433         New module canonicalize-lgpl, proposed by Charles Wilson in
9434         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
9435         with a few small changes afterwards.
9436         * MODULES.html.sh (File system functions): New module
9437         canonicalize-lgpl.
9438         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
9439         and canonicalize_file_name.
9440         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
9441         * modules/canonicalize-lgpl: New files.
9442
9443 2006-11-05  Bruno Haible  <bruno@clisp.org>
9444
9445         * gnulib-tool (func_import, func_create_testdir): Create directories
9446         also for files in subdirectories of lib/.
9447
9448 2006-11-05  Bruno Haible  <bruno@clisp.org>
9449
9450         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
9451         ANSI C compliant.
9452
9453 2006-11-03  Bruno Haible  <bruno@clisp.org>
9454
9455         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
9456         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
9457         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
9458         (xnboundedmalloc): New inline function.
9459         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
9460         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
9461         xmalloc.
9462         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
9463         xmalloc.
9464         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
9465         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
9466         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
9467         xmalloc.
9468         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
9469         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
9470         xmalloc.
9471         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
9472         gl_tree_add_after): Use XMALLOC instead of xmalloc.
9473         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
9474         xmalloc.
9475         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
9476         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
9477         gl_tree_add_after): Use XMALLOC instead of xmalloc.
9478         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
9479         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
9480         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
9481         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
9482
9483 2006-11-03  Bruno Haible  <bruno@clisp.org>
9484
9485         * lib/c-ctype.h [C++]: Define functions without name mangling.
9486         * lib/fwriteerror.h [C++]: Likewise.
9487         * lib/gcd.h [C++]: Likewise.
9488         * lib/linebreak.h [C++]: Likewise.
9489
9490 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
9491
9492         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
9493         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
9494         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
9495         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
9496         Check for functions and headers just once.
9497         Check for declaration of canonicalize_file_name.
9498         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
9499
9500 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
9501
9502         * gnulib-tool (func_import): Fix typo in actioncmd.
9503
9504 2006-11-02  Bruno Haible  <bruno@clisp.org>
9505
9506         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
9507         newline sequence in the Makefile.am snippet as a space, like "make"
9508         does.
9509         Reported by Roger Persson <perrog@gmail.com>.
9510
9511 2006-11-01  Bruno Haible  <bruno@clisp.org>
9512
9513         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
9514         already declared in <string.h>.
9515         * lib/strcase.h (strncasecmp): Don't declare it if yes.
9516
9517 2006-11-01  Bruno Haible  <bruno@clisp.org>
9518
9519         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
9520         * lib/strcase.h: Include <string.h>.
9521         (strcasecmp): Define to rpl_strcasecmp here.
9522
9523 2006-11-01  Bruno Haible  <bruno@clisp.org>
9524
9525         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
9526
9527 2006-11-01  Eric Blake  <ebb9@byu.net>
9528
9529         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
9530
9531         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
9532
9533 2006-10-29  Bruno Haible  <bruno@clisp.org>
9534
9535         Make it compile in C++ mode.
9536         * lib/full-write.c (full_rw): Add a cast.
9537
9538 2006-11-01  Bruno Haible  <bruno@clisp.org>
9539
9540         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
9541         be POSIX compliant.
9542         Reported by Roger Persson <perrog@gmail.com>.
9543
9544 2006-11-01  Eric Blake  <ebb9@byu.net>
9545
9546         * lib/getopt_.h: Fix comments.
9547
9548 2006-10-31  Eric Blake  <ebb9@byu.net>
9549
9550         * modules/tmpdir (Depends-on): Add sys_stat.
9551         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
9552         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
9553         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
9554         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
9555         tempname.
9556
9557 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
9558
9559         Avoid some C++ diagnostics reported by Bruno Haible.
9560         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
9561         xmalloc.
9562         (quotearg_alloc): Use xcharalloc rather than xmalloc.
9563         (struct slotvec): Move to top level.
9564         (quotearg_n_options): Rewrite to avoid xmalloc.
9565         * lib/xalloc.h (xcharalloc): New function.
9566         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
9567         [defined __cplusplus]: Add function template that provides result
9568         type propagation.  This part of the change is from Bruno Haible.
9569
9570 2006-10-29  Bruno Haible  <bruno@clisp.org>
9571
9572         Make it compile in C++ mode.
9573         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
9574         * lib/strnlen1.c (strnlen1): Cast memchr result.
9575         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
9576         * lib/clean-temp.c (string_equals, string_hash): Add casts.
9577         (create_temp_dir): Rename local variable 'template'.
9578         (compile_csharp_using_sscli): Add cast.
9579         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
9580         * lib/findprog.c (find_in_path): Likewise.
9581         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
9582         * lib/wait-process.c (register_slave_subprocess): Likewise.
9583
9584 2006-10-22  Bruno Haible  <bruno@clisp.org>
9585
9586         * modules/tsearch: New file.
9587         * lib/tsearch.h: New file.
9588         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
9589         * m4/tsearch.m4: New file.
9590         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
9591
9592 2006-10-29  Eric Blake  <ebb9@byu.net>
9593
9594         * lib/arcfour.c: Assume config.h.
9595         * lib/arctwo.c: Likewise.
9596         * lib/base64.c: Likewise.
9597         * lib/check-version.c: Likewise.
9598         * lib/crc.c: Likewise.
9599         * lib/des.c: Likewise.
9600         * lib/gc-gnulib.c: Likewise.
9601         * lib/gc-libgcrypt.c: Likewise.
9602         * lib/gc-pbkdf2-sha1.c: Likewise.
9603         * lib/getaddrinfo.c: Likewise.
9604         * lib/getdelim.c: Likewise.
9605         * lib/getline.c: Likewise.
9606         * lib/hmac-md5.c: Likewise.
9607         * lib/hmac-sha1.c: Likewise.
9608         * lib/iconvme.c: Likewise.
9609         * lib/md2.c: Likewise.
9610         * lib/md4.c: Likewise.
9611         * lib/memxor.c: Likewise.
9612         * lib/read-file.c: Likewise.
9613         * lib/readline.c: Likewise.
9614         * lib/rijndael-alg-fst.c: Likewise.
9615         * lib/rijndael-api-fst.c: Likewise.
9616         * lib/xgetdomainname.c: Likewise.
9617
9618 2006-10-28  Eric Blake  <ebb9@byu.net>
9619
9620         * lib/xstrndup.c: Assume config.h.
9621
9622 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
9623
9624         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
9625         stat-macros.h is now for our own macros, whereas stat_h is for
9626         macros in the <sys/stat.h> name space.
9627         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
9628         (STAT_MACROS_H): Remove.
9629         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
9630         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
9631         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
9632         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
9633         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
9634         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
9635         Move these macros to ...
9636         * lib/stat_.h: here.  Don't include stat-macros.h.
9637         * lib/canonicalize.c: Don't include stat-macros.h.
9638         * lib/chown.c: Likewise.
9639         * lib/euidaccess.c: Likewise.
9640         * lib/file-type.c: Likewise.
9641         * lib/filemode.c: Likewise.
9642         * lib/glob.c: Likewise.
9643         * lib/isapipe.c: Likewise.
9644         * lib/lchown.c: Likewise.
9645         * lib/lstat.c: Likewise.
9646         * lib/mkdir-p.c: Likewise.
9647         * lib/rmdir.c: Likewise.
9648         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
9649         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
9650         unless mkdir isn't declared, to speed up 'configure'.
9651         Always create sys/stat.h, since it's unlikely any real sys/stat.h
9652         would define all the S_* symbols.
9653         * modules/canonicalize (Depends-on):
9654         Depend on sys_stat, not stat-macros.
9655         * modules/chown: Likewise.
9656         * modules/euidaccess: Likewise.
9657         * modules/filemode: Likewise.
9658         * modules/file-type: Likewise.
9659         * modules/glob: Likewise.
9660         * modules/isapipe: Likewise.
9661         * modules/lchown: Likewise.
9662         * modules/lstat: Likewise.
9663         * modules/mkancesdirs: Likewise.
9664         * modules/rmdir: Likewise.
9665         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
9666         * modules/modechange: Likewise.
9667         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
9668         (configure.ac): Remove gl_STAT_MACROS.
9669         * modules/sys_stat (Depends-on): Remove stat-macros.
9670
9671 2006-10-27  Bruno Haible  <bruno@clisp.org>
9672
9673         * m4/signed.m4: Remove file.
9674         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
9675         invocation.
9676         * modules/vasnprintf (Files): Remove m4/signed.m4.
9677
9678 2006-10-27  Bruno Haible  <bruno@clisp.org>
9679
9680         Update to GNU gettext 0.16.
9681         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
9682         m4/inttypes-h.m4, m4/signed.m4.
9683         * m4/gettext.m4: Update to GNU gettext 0.16.
9684         * m4/intl.m4: New file, from GNU gettext.
9685         * m4/intldir.m4: New file, from GNU gettext.
9686         * config/srclist.txt: Update
9687
9688 2006-10-27  Eric Blake  <ebb9@byu.net>
9689
9690         * MODULES.html.sh: Document tempname.
9691         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
9692         dependencies.
9693         (Files): Move lib/tempname.c...
9694         * modules/tempname: ...to this new module.
9695         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
9696         (gl_PREREQ_TEMPNAME): Move...
9697         * m4/tempname.m4: ...to this new file.
9698         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
9699         * modules/sys_stat (Depends-on): Add stat-macros.
9700         * lib/stat_.h (includes): Pick up stat macros.
9701         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
9702         if stat macros are broken.
9703         * lib/tempname.c (includes): No need to include "stat-macros.h".
9704         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
9705         (direxists, __path_search) [!_LIBC]: Don't compile these in
9706         gnulib; the tmpdir module covers that.
9707         * lib/tempname.h: New file.
9708
9709 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
9710
9711         * COPYING: Explain how gnulib-tool converts licence headers.
9712         Almost all wording by Eric Blake.
9713
9714 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
9715
9716         * lib/mbchar.h (is_basic_table): Make read-only.
9717         * lib/mbchar.c (is_basic_table): Likewise.
9718         Reported by John Darrington.
9719
9720 2006-10-25  Bruno Haible  <bruno@clisp.org>
9721
9722         * lib/progname.h (set_program_name): Undefine before defining.
9723
9724 2006-10-25  Bruno Haible  <bruno@clisp.org>
9725
9726         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
9727         false for non-gcc C++ compilers.
9728         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
9729
9730 2006-10-24  Bruno Haible  <bruno@clisp.org>
9731
9732         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
9733         iconv implementations like Irix iconv.
9734
9735 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
9736
9737         * modules/vararrays: New file.
9738         * m4/vararrays.m4: New file, taken from diffutils.
9739         * MODULES.html.sh: New module vararrays.
9740
9741 2006-10-24  Karl Berry  <karl@gnu.org>
9742
9743         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
9744         Don't call GNU Unix.
9745
9746 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9747
9748         * users.txt: Add Libtool.
9749
9750         Sync from Libtool:
9751
9752         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
9753
9754         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
9755         to gnulib's policy of including config.h unconditionally.
9756
9757 2006-10-24  Bruno Haible  <bruno@clisp.org>
9758
9759         * modules/wcwidth (Files): Add m4/wint_t.m4.
9760         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
9761         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
9762
9763 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
9764
9765         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
9766         to pacify GCC with some -W flags enabled.  Problem reported by
9767         Bruno Haible.
9768
9769 2006-10-24  Jim Meyering  <jim@meyering.net>
9770
9771         * MODULES.html.sh: Remove uinttostr.  It's not a module.
9772         Reported by Karl Berry.
9773
9774 2006-10-23  Bruno Haible  <bruno@clisp.org>
9775
9776         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
9777
9778 2006-10-24  Bruno Haible  <bruno@clisp.org>
9779
9780         * lib/gl_list.h: Use C comment style, not C++ comment style.
9781
9782 2006-10-23  Eric Blake  <ebb9@byu.net>
9783
9784         * lib/getaddrinfo.c (includes): Add missing include.
9785
9786 2006-10-23  Bruno Haible  <bruno@clisp.org>
9787             Paul Eggert  <eggert@cs.ucla.edu>
9788
9789         Ability to rename obstack_free.
9790         * lib/obstack.h (__obstack_free): New macro. Declare instead of
9791         obstack_free.
9792         (obstack_free): Invoke the __obstack_free macro.
9793         * lib/obstack.c (obstack_free): Use __obstack_free macro.
9794
9795 2006-10-23  Bruno Haible  <bruno@clisp.org>
9796             Paul Eggert  <eggert@cs.ucla.edu>
9797
9798         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
9799         __argc, __argv from the declaration. (They are defined as macros on
9800         mingw.)
9801
9802 2006-10-22  Bruno Haible  <bruno@clisp.org>
9803
9804         * doc/gnulib-intro.texi: New file.
9805         * doc/gnulib.texi: Include it.
9806
9807 2006-10-21  Bruno Haible  <bruno@clisp.org>
9808
9809         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
9810         "Introduction", "Miscellanous Notes", "Particular Modules".
9811
9812 2006-10-21  Bruno Haible  <bruno@clisp.org>
9813
9814         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9815         Change mostlyclean-local rule to avoid sh syntax error from bash
9816         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
9817
9818 2006-10-23  Jim Meyering  <jim@meyering.net>
9819
9820         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
9821         in place of snprintf.
9822
9823         * modules/inttostr (Files): Add lib/uinttostr.c.
9824         * lib/uinttostr.c (inttostr): New file/function.
9825         * lib/inttostr.h (uinttostr): Declare.
9826         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
9827         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
9828         Add uinttostr.
9829         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
9830
9831 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
9832
9833         * lib/canonicalize.c (ELOOP): Define if not already defined.
9834         Problem reported by Bruno Haible in
9835         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
9836
9837 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
9838
9839         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
9840         Problem reported by Perry Smith and Ville Laurikari.
9841
9842         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
9843         uses.
9844
9845 2006-10-19  Bruno Haible  <bruno@clisp.org>
9846
9847         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
9848         for mingw.
9849
9850 2006-10-19  Bruno Haible  <bruno@clisp.org>
9851
9852         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
9853         Needed for mingw.
9854
9855 2006-10-19  Bruno Haible  <bruno@clisp.org>
9856
9857         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
9858
9859 2006-10-19  Bruno Haible  <bruno@clisp.org>
9860
9861         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
9862         it.
9863
9864 2006-10-19  Bruno Haible  <bruno@clisp.org>
9865
9866         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
9867         invocation.
9868
9869 2006-10-19  Bruno Haible  <bruno@clisp.org>
9870
9871         * gnulib-tool (func_create_testdir): Don't include ftruncate and
9872         mountlist by default.
9873
9874 2006-10-16  Bruno Haible  <bruno@clisp.org>
9875
9876         * lib/c-strstr.c: Include c-strstr.h.
9877
9878 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
9879
9880         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
9881         in a slash.
9882
9883 2006-10-18  Bruno Haible  <bruno@clisp.org>
9884
9885         * lib/lock.h [C++]: Wrap definitions in extern "C".
9886
9887 2006-10-18  Bruno Haible  <bruno@clisp.org>
9888
9889         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
9890         gl_LIBOBJS list.
9891
9892 2006-10-18  Bruno Haible  <bruno@clisp.org>
9893
9894         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
9895
9896 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
9897
9898         * lib/xstrtol.h: Include gettext.h.
9899         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
9900         Problem reported by Eric Blake.
9901         * modules/xstrtol (Depends-on): Add gettext-h.
9902
9903 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
9904
9905         * lib/strftime.c (advance): New macro.
9906         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
9907         incomplete type, so you can't add 0 to it.  Problem and patch
9908         reported by Eelco Dolstra for dietlibc.
9909
9910 2006-10-18  Jim Meyering  <jim@meyering.net>
9911
9912         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
9913         type for a local, and rename it: s/up/user_proc/.
9914
9915 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
9916
9917         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
9918         READ_UTMP_USER_PROCESS.
9919         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
9920
9921 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
9922
9923         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
9924         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
9925
9926 2006-10-17  Eric Blake  <ebb9@byu.net>
9927
9928         * lib/sigprocmask.c (sigprocmask): Fix typo.
9929
9930         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
9931
9932         * modules/clean-temp (Makefile.am): Don't add to make output...
9933         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
9934         config.h.
9935
9936 2006-10-17  Bruno Haible  <bruno@clisp.org>
9937
9938         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
9939         differently if DEFAULT_TEXT_DOMAIN is set.
9940
9941 2006-10-16  Bruno Haible  <bruno@clisp.org>
9942
9943         * lib/clean-temp.c: Include fwriteerror.h.
9944
9945 2006-10-16  Bruno Haible  <bruno@clisp.org>
9946
9947         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
9948
9949 2006-10-16  Bruno Haible  <bruno@clisp.org>
9950
9951         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
9952         * lib/sigprocmask.h: Include <sys/types.h>.
9953         (sigset_t): Use the system's definition if present.
9954
9955 2006-10-17  Eric Blake  <ebb9@byu.net>
9956
9957         * lib/xvasprintf.c (includes): Assume config.h.
9958         * lib/xasprintf.c (includes): Likewise.
9959
9960 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
9961
9962         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
9963         at least as wide as intmax_t.
9964
9965 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
9966
9967         (Imported from Automake.)
9968         * build-aux/gnupload: Update to version 1.1 of directive file.
9969
9970 2006-10-16  Eric Blake  <ebb9@byu.net>
9971
9972         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
9973         match Automake 1.10a.
9974
9975 2006-10-14  Bruno Haible  <bruno@clisp.org>
9976
9977         * modules/sigprocmask: New file.
9978         * lib/sigprocmask.h: New file.
9979         * lib/sigprocmask.c: New file.
9980         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
9981         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
9982         request sigprocmask.o.
9983         (gl_PREREQ_SIGPROCMASK): New macro.
9984         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
9985         (Depends-on): Add sigprocmask.
9986         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
9987         gt_SIGNALBLOCKING. Test for 'raise' only once.
9988         * lib/fatal-signal.c: Include sigprocmask.h.
9989         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
9990         unblock_fatal_signals): Define always.
9991         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
9992         sigprocmask.
9993
9994 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
9995
9996         Sync from Automake.
9997         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
9998         which incorrectly sets the mode of an existing destination
9999         directory.  In some cases the unpatched install-sh could do the
10000         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
10001         system.  We hope this is rare in practice, but it's clearly worth
10002         fixing.  Problem reported by Alex Unleashed in
10003         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
10004         Also, don't bother to check for -m bugs unless we're using -m;
10005         suggested by Stepan Kasal.
10006
10007 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10008
10009         Sync from Automake.
10010         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
10011         `-c' flag, so they appear at the same position as in %FASTDEP%
10012         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
10013         which ignores unknown options only after the first non-option.
10014         Bug report against M4 by Nelson H. F. Beebe.
10015
10016 2006-10-13  Jim Meyering  <jim@meyering.net>
10017
10018         Fix a bug in yesterday's change.
10019         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
10020         p->fts_statp->st_dev would be used uninitialized.
10021         Ensures that we always call fts_stat on the very first entry.
10022         Miklos Szeredi reported that find -xdev stopped working.
10023
10024 2006-10-12  Bruno Haible  <bruno@clisp.org>
10025
10026         * gnulib-tool (func_get_automake_snippet): Append an automatically
10027         computed EXTRA_DIST augmentation.
10028         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
10029         * modules/alloca-opt (Makefile.am): Likewise.
10030         * modules/allocsa (Makefile.am): Likewise.
10031         * modules/arcfour (Makefile.am): Likewise.
10032         * modules/arctwo (Makefile.am): Likewise.
10033         * modules/argmatch (Makefile.am): Likewise.
10034         * modules/argz (Makefile.am): Likewise.
10035         * modules/atexit (Makefile.am): Likewise.
10036         * modules/backupfile (Makefile.am): Likewise.
10037         * modules/byteswap (Makefile.am): Likewise.
10038         * modules/c-strtod (Makefile.am): Likewise.
10039         * modules/c-strtold (Makefile.am): Likewise.
10040         * modules/calloc (Makefile.am): Likewise.
10041         * modules/canon-host (Makefile.am): Likewise.
10042         * modules/canonicalize (Makefile.am): Likewise.
10043         * modules/chdir-long (Makefile.am): Likewise.
10044         * modules/chdir-safer (Makefile.am): Likewise.
10045         * modules/check-version (Makefile.am): Likewise.
10046         * modules/chown (Makefile.am): Likewise.
10047         * modules/cloexec (Makefile.am): Likewise.
10048         * modules/close-stream (Makefile.am): Likewise.
10049         * modules/closeout (Makefile.am): Likewise.
10050         * modules/crc (Makefile.am): Likewise.
10051         * modules/csharpexec (Makefile.am): Likewise.
10052         * modules/cycle-check (Makefile.am): Likewise.
10053         * modules/des (Makefile.am): Likewise.
10054         * modules/dev-ino (Makefile.am): Likewise.
10055         * modules/dirfd (Makefile.am): Likewise.
10056         * modules/dirname (Makefile.am): Likewise.
10057         * modules/dup2 (Makefile.am): Likewise.
10058         * modules/eealloc (Makefile.am): Likewise.
10059         * modules/error (Makefile.am): Likewise.
10060         * modules/euidaccess (Makefile.am): Likewise.
10061         * modules/exclude (Makefile.am): Likewise.
10062         * modules/exitfail (Makefile.am): Likewise.
10063         * modules/fcntl-safer (Makefile.am): Likewise.
10064         * modules/fcntl (Makefile.am): Likewise.
10065         * modules/file-type (Makefile.am): Likewise.
10066         * modules/fileblocks (Makefile.am): Likewise.
10067         * modules/filemode (Makefile.am): Likewise.
10068         * modules/filenamecat (Makefile.am): Likewise.
10069         * modules/fnmatch (Makefile.am): Likewise.
10070         * modules/fopen-safer (Makefile.am): Likewise.
10071         * modules/fpending (Makefile.am): Likewise.
10072         * modules/fprintftime (Makefile.am): Likewise.
10073         * modules/free (Makefile.am): Likewise.
10074         * modules/fsusage (Makefile.am): Likewise.
10075         * modules/ftruncate (Makefile.am): Likewise.
10076         * modules/fts (Makefile.am): Likewise.
10077         * modules/gc-arcfour (Makefile.am): Likewise.
10078         * modules/gc-des (Makefile.am): Likewise.
10079         * modules/gc-hmac-md5 (Makefile.am): Likewise.
10080         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
10081         * modules/gc-md4 (Makefile.am): Likewise.
10082         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
10083         * modules/gc-sha1 (Makefile.am): Likewise.
10084         * modules/gc (Makefile.am): Likewise.
10085         * modules/getaddrinfo (Makefile.am): Likewise.
10086         * modules/getcwd (Makefile.am): Likewise.
10087         * modules/getdelim (Makefile.am): Likewise.
10088         * modules/getdomainname (Makefile.am): Likewise.
10089         * modules/getgroups (Makefile.am): Likewise.
10090         * modules/gethostname (Makefile.am): Likewise.
10091         * modules/gethrxtime (Makefile.am): Likewise.
10092         * modules/getline (Makefile.am): Likewise.
10093         * modules/getloadavg (Makefile.am): Likewise.
10094         * modules/getlogin_r (Makefile.am): Likewise.
10095         * modules/getndelim2 (Makefile.am): Likewise.
10096         * modules/getopt (Makefile.am): Likewise.
10097         * modules/getpagesize (Makefile.am): Likewise.
10098         * modules/getpass-gnu (Makefile.am): Likewise.
10099         * modules/getpass (Makefile.am): Likewise.
10100         * modules/getsubopt (Makefile.am): Likewise.
10101         * modules/gettime (Makefile.am): Likewise.
10102         * modules/gettimeofday (Makefile.am): Likewise.
10103         * modules/getugroups (Makefile.am): Likewise.
10104         * modules/getusershell (Makefile.am): Likewise.
10105         * modules/glob (Makefile.am): Likewise.
10106         * modules/group-member (Makefile.am): Likewise.
10107         * modules/hard-locale (Makefile.am): Likewise.
10108         * modules/hash (Makefile.am): Likewise.
10109         * modules/hmac-md5 (Makefile.am): Likewise.
10110         * modules/hmac-sha1 (Makefile.am): Likewise.
10111         * modules/human (Makefile.am): Likewise.
10112         * modules/idcache (Makefile.am): Likewise.
10113         * modules/imaxabs (Makefile.am): Likewise.
10114         * modules/imaxdiv (Makefile.am): Likewise.
10115         * modules/inet_ntop (Makefile.am): Likewise.
10116         * modules/inet_pton (Makefile.am): Likewise.
10117         * modules/intprops (Makefile.am): Likewise.
10118         * modules/inttostr (Makefile.am): Likewise.
10119         * modules/inttypes (Makefile.am): Likewise.
10120         * modules/isapipe (Makefile.am): Likewise.
10121         * modules/javaversion (Makefile.am): Likewise.
10122         * modules/lchmod (Makefile.am): Likewise.
10123         * modules/lchown (Makefile.am): Likewise.
10124         * modules/localcharset (Makefile.am): Likewise.
10125         * modules/long-options (Makefile.am): Likewise.
10126         * modules/lstat (Makefile.am): Likewise.
10127         * modules/malloc (Makefile.am): Likewise.
10128         * modules/mathl (Makefile.am): Likewise.
10129         * modules/mbchar (Makefile.am): Likewise.
10130         * modules/md2 (Makefile.am): Likewise.
10131         * modules/md4 (Makefile.am): Likewise.
10132         * modules/md5 (Makefile.am): Likewise.
10133         * modules/memcasecmp (Makefile.am): Likewise.
10134         * modules/memchr (Makefile.am): Likewise.
10135         * modules/memcmp (Makefile.am): Likewise.
10136         * modules/memcoll (Makefile.am): Likewise.
10137         * modules/memcpy (Makefile.am): Likewise.
10138         * modules/memmem (Makefile.am): Likewise.
10139         * modules/memmove (Makefile.am): Likewise.
10140         * modules/mempcpy (Makefile.am): Likewise.
10141         * modules/memrchr (Makefile.am): Likewise.
10142         * modules/memset (Makefile.am): Likewise.
10143         * modules/memxor (Makefile.am): Likewise.
10144         * modules/mkancesdirs (Makefile.am): Likewise.
10145         * modules/mkdir-p (Makefile.am): Likewise.
10146         * modules/mkdir (Makefile.am): Likewise.
10147         * modules/mkdtemp (Makefile.am): Likewise.
10148         * modules/mkstemp (Makefile.am): Likewise.
10149         * modules/mktime (Makefile.am): Likewise.
10150         * modules/modechange (Makefile.am): Likewise.
10151         * modules/mountlist (Makefile.am): Likewise.
10152         * modules/nanosleep (Makefile.am): Likewise.
10153         * modules/obstack (Makefile.am): Likewise.
10154         * modules/openat (Makefile.am): Likewise.
10155         * modules/pagealign_alloc (Makefile.am): Likewise.
10156         * modules/pathmax (Makefile.am): Likewise.
10157         * modules/physmem (Makefile.am): Likewise.
10158         * modules/poll (Makefile.am): Likewise.
10159         * modules/posixtm (Makefile.am): Likewise.
10160         * modules/posixver (Makefile.am): Likewise.
10161         * modules/putenv (Makefile.am): Likewise.
10162         * modules/quote (Makefile.am): Likewise.
10163         * modules/quotearg (Makefile.am): Likewise.
10164         * modules/raise (Makefile.am): Likewise.
10165         * modules/read-file (Makefile.am): Likewise.
10166         * modules/readline (Makefile.am): Likewise.
10167         * modules/readlink (Makefile.am): Likewise.
10168         * modules/readtokens (Makefile.am): Likewise.
10169         * modules/readutmp (Makefile.am): Likewise.
10170         * modules/realloc (Makefile.am): Likewise.
10171         * modules/regex (Makefile.am): Likewise.
10172         * modules/rename-dest-slash (Makefile.am): Likewise.
10173         * modules/rename (Makefile.am): Likewise.
10174         * modules/rijndael (Makefile.am): Likewise.
10175         * modules/rmdir (Makefile.am): Likewise.
10176         * modules/rpmatch (Makefile.am): Likewise.
10177         * modules/safe-read (Makefile.am): Likewise.
10178         * modules/safe-write (Makefile.am): Likewise.
10179         * modules/same-inode (Makefile.am): Likewise.
10180         * modules/same (Makefile.am): Likewise.
10181         * modules/save-cwd (Makefile.am): Likewise.
10182         * modules/savedir (Makefile.am): Likewise.
10183         * modules/setenv (Makefile.am): Likewise.
10184         * modules/settime (Makefile.am): Likewise.
10185         * modules/sha1 (Makefile.am): Likewise.
10186         * modules/sig2str (Makefile.am): Likewise.
10187         * modules/snprintf (Makefile.am): Likewise.
10188         * modules/stat-macros (Makefile.am): Likewise.
10189         * modules/stat-time (Makefile.am): Likewise.
10190         * modules/stdbool (Makefile.am): Likewise.
10191         * modules/stdint (Makefile.am): Likewise.
10192         * modules/stdlib-safer (Makefile.am): Likewise.
10193         * modules/stpcpy (Makefile.am): Likewise.
10194         * modules/stpncpy (Makefile.am): Likewise.
10195         * modules/strcase (Makefile.am): Likewise.
10196         * modules/strcasestr (Makefile.am): Likewise.
10197         * modules/strchrnul (Makefile.am): Likewise.
10198         * modules/strcspn (Makefile.am): Likewise.
10199         * modules/strdup (Makefile.am): Likewise.
10200         * modules/strerror (Makefile.am): Likewise.
10201         * modules/strftime (Makefile.am): Likewise.
10202         * modules/strndup (Makefile.am): Likewise.
10203         * modules/strnlen (Makefile.am): Likewise.
10204         * modules/strpbrk (Makefile.am): Likewise.
10205         * modules/strsep (Makefile.am): Likewise.
10206         * modules/strstr (Makefile.am): Likewise.
10207         * modules/strtod (Makefile.am): Likewise.
10208         * modules/strtoimax (Makefile.am): Likewise.
10209         * modules/strtok_r (Makefile.am): Likewise.
10210         * modules/strtol (Makefile.am): Likewise.
10211         * modules/strtoll (Makefile.am): Likewise.
10212         * modules/strtoul (Makefile.am): Likewise.
10213         * modules/strtoull (Makefile.am): Likewise.
10214         * modules/strtoumax (Makefile.am): Likewise.
10215         * modules/strverscmp (Makefile.am): Likewise.
10216         * modules/sys_socket (Makefile.am): Likewise.
10217         * modules/sys_stat (Makefile.am): Likewise.
10218         * modules/sysexits (Makefile.am): Likewise.
10219         * modules/time_r (Makefile.am): Likewise.
10220         * modules/timegm (Makefile.am): Likewise.
10221         * modules/timespec (Makefile.am): Likewise.
10222         * modules/tmpfile-safer (Makefile.am): Likewise.
10223         * modules/trim (Makefile.am): Likewise.
10224         * modules/unistd-safer (Makefile.am): Likewise.
10225         * modules/unlinkdir (Makefile.am): Likewise.
10226         * modules/unlocked-io (Makefile.am): Likewise.
10227         * modules/userspec (Makefile.am): Likewise.
10228         * modules/utime (Makefile.am): Likewise.
10229         * modules/utimecmp (Makefile.am): Likewise.
10230         * modules/utimens (Makefile.am): Likewise.
10231         * modules/vasnprintf (Makefile.am): Likewise.
10232         * modules/vasprintf (Makefile.am): Likewise.
10233         * modules/vsnprintf (Makefile.am): Likewise.
10234         * modules/xalloc (Makefile.am): Likewise.
10235         * modules/xgetcwd (Makefile.am): Likewise.
10236         * modules/xnanosleep (Makefile.am): Likewise.
10237         * modules/xreadlink (Makefile.am): Likewise.
10238         * modules/xstrtod (Makefile.am): Likewise.
10239         * modules/xstrtol (Makefile.am): Likewise.
10240         * modules/xstrtold (Makefile.am): Likewise.
10241         * modules/yesno (Makefile.am): Likewise.
10242         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
10243
10244 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
10245
10246         * modules/error (Makefile.am): Distribute files through
10247         EXTRA_DIST, not lib_SOURCES.
10248
10249 2006-10-12  Eric Blake  <ebb9@byu.net>
10250
10251         * modules/error (Makefile.am): Distribute files in /lib.
10252         * modules/obstack (Makefile.am): Likewise.
10253
10254 2006-10-12  Bruno Haible  <bruno@clisp.org>
10255
10256         * modules/acl (Makefile.am): Distribute all files in lib/ through
10257         EXTRA_DIST.
10258         * modules/arcfour (Makefile.am): Likewise.
10259         * modules/arctwo (Makefile.am): Likewise.
10260         * modules/argmatch (Makefile.am): Likewise.
10261         * modules/argz (Makefile.am): Likewise.
10262         * modules/atexit (Makefile.am): Likewise.
10263         * modules/backupfile (Makefile.am): Likewise.
10264         * modules/c-strtod (Makefile.am): Likewise.
10265         * modules/c-strtold (Makefile.am): Likewise.
10266         * modules/calloc (Makefile.am): Likewise.
10267         * modules/canon-host (Makefile.am): Likewise.
10268         * modules/canonicalize (Makefile.am): Likewise.
10269         * modules/chdir-long (Makefile.am): Likewise.
10270         * modules/chdir-safer (Makefile.am): Likewise.
10271         * modules/check-version (Makefile.am): Likewise.
10272         * modules/chown (Makefile.am): Likewise.
10273         * modules/cloexec (Makefile.am): Likewise.
10274         * modules/close-stream (Makefile.am): Likewise.
10275         * modules/closeout (Makefile.am): Likewise.
10276         * modules/crc (Makefile.am): Likewise.
10277         * modules/cycle-check (Makefile.am): Likewise.
10278         * modules/des (Makefile.am): Likewise.
10279         * modules/dirfd (Makefile.am): Likewise.
10280         * modules/dirname (Makefile.am): Likewise.
10281         * modules/dup2 (Makefile.am): Likewise.
10282         * modules/euidaccess (Makefile.am): Likewise.
10283         * modules/exclude (Makefile.am): Likewise.
10284         * modules/exitfail (Makefile.am): Likewise.
10285         * modules/fcntl-safer (Makefile.am): Likewise.
10286         * modules/file-type (Makefile.am): Likewise.
10287         * modules/fileblocks (Makefile.am): Likewise.
10288         * modules/filemode (Makefile.am): Likewise.
10289         * modules/filenamecat (Makefile.am): Likewise.
10290         * modules/fnmatch (Makefile.am): Likewise.
10291         * modules/fopen-safer (Makefile.am): Likewise.
10292         * modules/fpending (Makefile.am): Likewise.
10293         * modules/fprintftime (Makefile.am): Likewise.
10294         * modules/free (Makefile.am): Likewise.
10295         * modules/fsusage (Makefile.am): Likewise.
10296         * modules/ftruncate (Makefile.am): Likewise.
10297         * modules/fts (Makefile.am): Likewise.
10298         * modules/gc (Makefile.am): Likewise.
10299         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
10300         * modules/getaddrinfo (Makefile.am): Likewise.
10301         * modules/getcwd (Makefile.am): Likewise.
10302         * modules/getdelim (Makefile.am): Likewise.
10303         * modules/getdomainname (Makefile.am): Likewise.
10304         * modules/getgroups (Makefile.am): Likewise.
10305         * modules/gethostname (Makefile.am): Likewise.
10306         * modules/gethrxtime (Makefile.am): Likewise.
10307         * modules/getline (Makefile.am): Likewise.
10308         * modules/getloadavg (Makefile.am): Likewise.
10309         * modules/getlogin_r (Makefile.am): Likewise.
10310         * modules/getopt (Makefile.am): Likewise.
10311         * modules/getpass (Makefile.am): Likewise.
10312         * modules/getpass-gnu (Makefile.am): Likewise.
10313         * modules/getsubopt (Makefile.am): Likewise.
10314         * modules/gettime (Makefile.am): Likewise.
10315         * modules/gettimeofday (Makefile.am): Likewise.
10316         * modules/getugroups (Makefile.am): Likewise.
10317         * modules/getusershell (Makefile.am): Likewise.
10318         * modules/glob (Makefile.am): Likewise.
10319         * modules/group-member (Makefile.am): Likewise.
10320         * modules/hard-locale (Makefile.am): Likewise.
10321         * modules/hash (Makefile.am): Likewise.
10322         * modules/hmac-md5 (Makefile.am): Likewise.
10323         * modules/hmac-sha1 (Makefile.am): Likewise.
10324         * modules/human (Makefile.am): Likewise.
10325         * modules/idcache (Makefile.am): Likewise.
10326         * modules/imaxabs (Makefile.am): Likewise.
10327         * modules/imaxdiv (Makefile.am): Likewise.
10328         * modules/inet_ntop (Makefile.am): Likewise.
10329         * modules/inet_pton (Makefile.am): Likewise.
10330         * modules/inttostr (Makefile.am): Likewise.
10331         * modules/isapipe (Makefile.am): Likewise.
10332         * modules/lchown (Makefile.am): Likewise.
10333         * modules/long-options (Makefile.am): Likewise.
10334         * modules/lstat (Makefile.am): Likewise.
10335         * modules/malloc (Makefile.am): Likewise.
10336         * modules/mathl (Makefile.am): Likewise.
10337         * modules/mbchar (Makefile.am): Likewise.
10338         * modules/md2 (Makefile.am): Likewise.
10339         * modules/md4 (Makefile.am): Likewise.
10340         * modules/md5 (Makefile.am): Likewise.
10341         * modules/memcasecmp (Makefile.am): Likewise.
10342         * modules/memchr (Makefile.am): Likewise.
10343         * modules/memcmp (Makefile.am): Likewise.
10344         * modules/memcoll (Makefile.am): Likewise.
10345         * modules/memcpy (Makefile.am): Likewise.
10346         * modules/memmem (Makefile.am): Likewise.
10347         * modules/memmove (Makefile.am): Likewise.
10348         * modules/mempcpy (Makefile.am): Likewise.
10349         * modules/memrchr (Makefile.am): Likewise.
10350         * modules/memset (Makefile.am): Likewise.
10351         * modules/memxor (Makefile.am): Likewise.
10352         * modules/mkancesdirs (Makefile.am): Likewise.
10353         * modules/mkdir (Makefile.am): Likewise.
10354         * modules/mkdir-p (Makefile.am): Likewise.
10355         * modules/mkdtemp (Makefile.am): Likewise.
10356         * modules/mkstemp (Makefile.am): Likewise.
10357         * modules/mktime (Makefile.am): Likewise.
10358         * modules/modechange (Makefile.am): Likewise.
10359         * modules/mountlist (Makefile.am): Likewise.
10360         * modules/nanosleep (Makefile.am): Likewise.
10361         * modules/openat (Makefile.am): Likewise.
10362         * modules/pagealign_alloc (Makefile.am): Likewise.
10363         * modules/physmem (Makefile.am): Likewise.
10364         * modules/poll (Makefile.am): Likewise.
10365         * modules/posixtm (Makefile.am): Likewise.
10366         * modules/posixver (Makefile.am): Likewise.
10367         * modules/putenv (Makefile.am): Likewise.
10368         * modules/quote (Makefile.am): Likewise.
10369         * modules/quotearg (Makefile.am): Likewise.
10370         * modules/raise (Makefile.am): Likewise.
10371         * modules/read-file (Makefile.am): Likewise.
10372         * modules/readline (Makefile.am): Likewise.
10373         * modules/readlink (Makefile.am): Likewise.
10374         * modules/readtokens (Makefile.am): Likewise.
10375         * modules/readutmp (Makefile.am): Likewise.
10376         * modules/realloc (Makefile.am): Likewise.
10377         * modules/regex (Makefile.am): Likewise.
10378         * modules/rename (Makefile.am): Likewise.
10379         * modules/rename-dest-slash (Makefile.am): Likewise.
10380         * modules/rijndael (Makefile.am): Likewise.
10381         * modules/rmdir (Makefile.am): Likewise.
10382         * modules/rpmatch (Makefile.am): Likewise.
10383         * modules/safe-read (Makefile.am): Likewise.
10384         * modules/safe-write (Makefile.am): Likewise.
10385         * modules/same (Makefile.am): Likewise.
10386         * modules/save-cwd (Makefile.am): Likewise.
10387         * modules/savedir (Makefile.am): Likewise.
10388         * modules/setenv (Makefile.am): Likewise.
10389         * modules/settime (Makefile.am): Likewise.
10390         * modules/sha1 (Makefile.am): Likewise.
10391         * modules/sig2str (Makefile.am): Likewise.
10392         * modules/snprintf (Makefile.am): Likewise.
10393         * modules/stdlib-safer (Makefile.am): Likewise.
10394         * modules/stpcpy (Makefile.am): Likewise.
10395         * modules/stpncpy (Makefile.am): Likewise.
10396         * modules/strcase (Makefile.am): Likewise.
10397         * modules/strcasestr (Makefile.am): Likewise.
10398         * modules/strchrnul (Makefile.am): Likewise.
10399         * modules/strcspn (Makefile.am): Likewise.
10400         * modules/strdup (Makefile.am): Likewise.
10401         * modules/strerror (Makefile.am): Likewise.
10402         * modules/strftime (Makefile.am): Likewise.
10403         * modules/strndup (Makefile.am): Likewise.
10404         * modules/strnlen (Makefile.am): Likewise.
10405         * modules/strpbrk (Makefile.am): Likewise.
10406         * modules/strsep (Makefile.am): Likewise.
10407         * modules/strstr (Makefile.am): Likewise.
10408         * modules/strtod (Makefile.am): Likewise.
10409         * modules/strtoimax (Makefile.am): Likewise.
10410         * modules/strtok_r (Makefile.am): Likewise.
10411         * modules/strtol (Makefile.am): Likewise.
10412         * modules/strtoll (Makefile.am): Likewise.
10413         * modules/strtoul (Makefile.am): Likewise.
10414         * modules/strtoull (Makefile.am): Likewise.
10415         * modules/strtoumax (Makefile.am): Likewise.
10416         * modules/strverscmp (Makefile.am): Likewise.
10417         * modules/time_r (Makefile.am): Likewise.
10418         * modules/timegm (Makefile.am): Likewise.
10419         * modules/tmpfile-safer (Makefile.am): Likewise.
10420         * modules/unistd-safer (Makefile.am): Likewise.
10421         * modules/unlinkdir (Makefile.am): Likewise.
10422         * modules/userspec (Makefile.am): Likewise.
10423         * modules/utime (Makefile.am): Likewise.
10424         * modules/utimecmp (Makefile.am): Likewise.
10425         * modules/utimens (Makefile.am): Likewise.
10426         * modules/vasnprintf (Makefile.am): Likewise.
10427         * modules/vasprintf (Makefile.am): Likewise.
10428         * modules/vsnprintf (Makefile.am): Likewise.
10429         * modules/xalloc (Makefile.am): Likewise.
10430         * modules/xgetcwd (Makefile.am): Likewise.
10431         * modules/xnanosleep (Makefile.am): Likewise.
10432         * modules/xreadlink (Makefile.am): Likewise.
10433         * modules/xstrtod (Makefile.am): Likewise.
10434         * modules/xstrtol (Makefile.am): Likewise.
10435         * modules/xstrtold (Makefile.am): Likewise.
10436         * modules/yesno (Makefile.am): Likewise.
10437
10438 2006-10-12  Jim Meyering  <jim@meyering.net>
10439
10440         * m4/getloadavg.m4: Revert the change below.
10441
10442         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
10443         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
10444         fail with a symlink, which is what coreutils' ./bootstrap now
10445         creates by default.
10446
10447 2006-10-12  Bruno Haible  <bruno@clisp.org>
10448
10449         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
10450         mingw.
10451         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
10452         MSVC and mingw explicitly.
10453
10454 2006-10-11  Simon Josefsson  <jas@extundo.com>
10455             Bruno Haible  <bruno@clisp.org>
10456
10457         Add support for multiple gnulib-tool invocations in the scope of a
10458         single configure.ac file.
10459         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
10460         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
10461         with the same contents as the _LIBADD variable.
10462         (func_emit_initmacro_start, func_emit_initmacro_end,
10463         func_emit_initmacro_done): New functions.
10464         (func_import, func_create_testdir): Invoke them. Allow the identifiers
10465         gl_LIBOBJS and gl_LTLIBOBJS.
10466
10467 2006-10-11  Bruno Haible  <bruno@clisp.org>
10468
10469         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
10470         (func_create_testdir): Don't create po/Makefile.am, don't invoke
10471         autoreconf. Instead, invoke autopoint explicitly but move back the
10472         *.m4 files from gnulib.
10473
10474 2006-10-11  Bruno Haible  <bruno@clisp.org>
10475
10476         * gnulib-tool (func_usage): Make module names after --create-testdir
10477         optional.
10478         (func_create_testdir): If no module was specified, use nearly all
10479         modules.
10480
10481 2006-10-12  Jim Meyering  <jim@meyering.net>
10482
10483         Big performance improvement for fts-based tools that use FTS_NOSTAT.
10484         Avoid spurious inode-mismatch problems on non-POSIX file systems.
10485         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
10486         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
10487         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
10488         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
10489         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
10490         (fts_set_stat_required): New function.
10491         (fts_open): Defer the calls to fts_stat, if possible or requested.
10492         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
10493         into fts_stat itself.
10494         (fts_read): Perform any required (deferred) fts_stat call.
10495         (fts_build): Likewise, for the directory we're about to open and read.
10496         In the readdir loop, carefully decide whether each entry will require
10497         an eventual call to fts_stat, using dirent.d_type info if available.
10498         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
10499         a command line argument into this function.  Update all callers.
10500         Map a return value of FTS_DOT to FTS_D for a command line argument.
10501         * modules/fts (Depends-on): Add d-type.  Alphabetize.
10502         Thanks to Miklos Szeredi for his tenacity and for the initial
10503         bug report about "find" failing on a FUSE-based file system.
10504
10505         * lib/fts.c (fts_open): Use consistent indentation.
10506
10507 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
10508
10509         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
10510         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
10511         reported by Jim Meyering.  All uses of cache variables renamed
10512         to match Autoconf's.
10513         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
10514         the other one.
10515
10516         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
10517         Fix misspelling in diagnostic.
10518
10519 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
10520
10521         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
10522         defined.  Problem reported by Matthew Woehlke.
10523
10524         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
10525         Add support for Tandem NonStop R series.
10526         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
10527         Use new macro.
10528
10529         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
10530         (has_trailing_slash): Omit size arg; all callers changed.
10531         Omit 'inline', since it doesn't help performance and we'd
10532         need to configure it.
10533         Don't count //, ///, etc. as having a trailing slash.
10534         As a side effect, this removes a C99ism reported by Matthew Woehlke.
10535         (rpl_rename_dest_slash): On failure, use rename's errno rather
10536         than (in some cases) an incorrect or junk errno.
10537         Simplify code by removing need to compute length; this does
10538         cause it to make two passes instead of one over the file name,
10539         but it's worth it.
10540
10541         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
10542         change, since Autoconf's version may no longer be appropriate now
10543         that we are using CVS Autoconf's version.  Add support for Tandem.
10544
10545 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
10546             Bruno Haible  <bruno@clisp.org>
10547
10548         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
10549         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
10550         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
10551         gl_AC_TYPE_LONG_LONG.
10552
10553         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
10554         instead of HAVE_LONG_LONG.
10555         * lib/printf-args.c (printf_fetchargs): Likewise.
10556         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
10557         * lib/vasnprintf.c (VASNPRINTF): Likewise.
10558         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
10559         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
10560         gl_AC_TYPE_LONG_LONG.
10561
10562 2006-10-11  Bruno Haible  <bruno@clisp.org>
10563
10564         * m4/longlong.m4: Add comments.
10565         * m4/ulonglong.m4: Likewise.
10566
10567 2006-10-10  Bruno Haible  <bruno@clisp.org>
10568
10569         Make it possible to #define stpcpy, strdup to aliases.
10570         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
10571         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
10572
10573 2006-10-10  Bruno Haible  <bruno@clisp.org>
10574
10575         Make it possible to #define gcd to an alias.
10576         * lib/gcd.c: Include config.h.
10577
10578 2006-10-10  Bruno Haible  <bruno@clisp.org>
10579
10580         Make it possible to #define c_isascii to an alias.
10581         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
10582         defined. Undefine the macros before defining them, to avoid gcc
10583         warnings.
10584         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
10585         define NO_C_CTYPE_MACROS early.
10586
10587 2006-10-10  Bruno Haible  <bruno@clisp.org>
10588
10589         Make it possible to #define set_program_name to an alias.
10590         * lib/progname.c: Don't undefine set_program_name; instead, undefine
10591         ENABLE_RELOCATABLE early.
10592
10593 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
10594
10595         Port to Tandem NSK OSS, which has 64-bit signed int but at most
10596         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
10597         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
10598         More generally, don't assume that 64-bit signed int is available
10599         if unsigned int is, and vice versa.
10600         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
10601         unsigned symbols, not on their signed counterparts.
10602         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
10603         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
10604         (UINT64_C, UINTMAX_C):
10605         Likewise.
10606         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
10607         unsigned counterparts.
10608         (Have_long_long, Unsigned): New macros.
10609         (Int): Renamed from INT.
10610         (strtoimax): Use the new macros.
10611         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
10612         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
10613         * modules/inttypes (inttypes.h): Substitute
10614         HAVE_UNSIGNED_LONG_LONG_INT.
10615         * modules/stdint (stdint.h): Likewise.
10616         (Files): Add m4/ulonglong.m4.
10617
10618 2006-10-10  Bruno Haible  <bruno@clisp.org>
10619
10620         Fix a gcc -Wshadow warning.
10621         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
10622         to 'bucket'.
10623         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
10624         gl_linked_indexof_from_to): Likewise.
10625         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
10626         Likewise.
10627         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
10628         Likewise.
10629         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
10630         Reported by Eric Blake.
10631
10632 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
10633
10634         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
10635         for NetBSD.  Problem reported by Bruno Haible.
10636
10637 2006-10-09  Jim Meyering  <jim@meyering.net>
10638
10639         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
10640         Patch from Bruno Haible.
10641
10642 2006-10-09  Jim Meyering  <jim@meyering.net>
10643
10644         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
10645         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
10646         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
10647
10648 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
10649
10650         Don't include <config.h> twice; this doesn't work in some cases,
10651         e.g., when config.h has "#define intmax_t long long int" and
10652         we include <config.h>, <inttypes.h>, <config.h> in that order.
10653         Problem reported by Matthew Woehlke in:
10654         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
10655         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
10656         * lib/fts-cycle.c: Don't include config.h.
10657         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
10658         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
10659         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
10660         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
10661         inttypes.h.
10662         * lib/xstrtoumax.c: Likewise.
10663         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
10664         __strtol and the like, so that this module is more like its siblings.
10665         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
10666         Remove; no longer needed now that we assume gnulib inttypes.h.
10667
10668 2006-10-08  Bruno Haible  <bruno@clisp.org>
10669
10670         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
10671         option.
10672
10673 2006-10-07  Jim Meyering  <jim@meyering.net>
10674
10675         * modules/inttypes (inttypes.h): Revert what seems to have been
10676         an inadvertent part of today's change: use "|", not "/" in the
10677         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
10678
10679 2006-10-07  Bruno Haible  <bruno@clisp.org>
10680
10681         * modules/sublist: New file.
10682
10683 2006-10-07  Bruno Haible  <bruno@clisp.org>
10684
10685         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
10686         * modules/argz (argz.h): Likewise.
10687         * modules/arpa_inet (arpa/inet.h): Likewise.
10688         * modules/byteswap (byteswap.h): Likewise.
10689         * modules/configmake (configmake.h): Likewise.
10690         * modules/fcntl (fcntl.h): Likewise.
10691         * modules/fnmatch (fnmatch.h): Likewise.
10692         * modules/getopt (getopt.h): Likewise.
10693         * modules/glob (glob.h): Likewise.
10694         * modules/inttypes (inttypes.h): Likewise.
10695         * modules/netinet_in (netinet/in.h): Likewise.
10696         * modules/poll (poll.h): Likewise.
10697         * modules/stdbool (stdbool.h): Likewise.
10698         * modules/stdint (stdint.h): Likewise.
10699         * modules/sys_select (sys/select.h): Likewise.
10700         * modules/sys_socket (sys/socket.h): Likewise.
10701         * modules/sys_stat (sys/stat.h): Likewise.
10702         * modules/sysexits (sysexits.h): Likewise.
10703         * modules/unistd (unistd.h): Likewise.
10704         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
10705         Add a "DO NOT EDIT" comment to the generated file.
10706         (func_import): Likewise for gnulib-comp.m4.
10707
10708 2006-10-07  Bruno Haible  <bruno@clisp.org>
10709
10710         * lib/gl_sublist.h: New file.
10711         * lib/gl_sublist.c: New file.
10712
10713 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
10714
10715         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
10716         name (relative to the original working directory) and the file
10717         name component (relative to the temporary working directory).  All
10718         callers changed.
10719         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
10720         * lib/mkdir-p.c (make_dir_parents): Likewise.
10721         * lib/mkdir-p.h (make_dir_parents): Likewise.
10722
10723 2006-10-06  Eric Blake  <ebb9@byu.net>
10724
10725         Define several macros for use by the clean-temp module.
10726         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
10727         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
10728         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
10729
10730         * lib/clean-temp.h (close_stream_temp): New declaration.
10731         * lib/clean-temp.c (includes): Pull in headers according to what
10732         other modules are in use.
10733         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
10734
10735 2006-10-06  Bruno Haible  <bruno@clisp.org>
10736
10737         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
10738         instead of fopen, fwriteerror.
10739
10740 2006-10-06  Bruno Haible  <bruno@clisp.org>
10741
10742         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
10743         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
10744         int.
10745         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
10746         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
10747         Return an error indicator.
10748         Suggested by Eric Blake.
10749
10750 2006-10-06  Bruno Haible  <bruno@clisp.org>
10751
10752         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
10753         Reported by Eric Blake.
10754
10755 2006-10-06  Bruno Haible  <bruno@clisp.org>
10756
10757         * modules/closeout (Description): Mention stderr too.
10758
10759 2006-10-06  Bruno Haible  <bruno@clisp.org>
10760         and Paul Eggert  <eggert@cs.ucla.edu>
10761
10762         * lib/closeout.c (close_stdout): Also close stderr.
10763         * lib/closeout.h: Update comment.
10764
10765 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
10766
10767         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
10768         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
10769         * lib/dirchownmod.c: Include lchown.h.
10770         * lib/lchown.c: Don't include files that lchown.h now includes.
10771         Don't declare chown, since lchown.h now does that.
10772         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
10773         (lchown): Define to rpl_chown if lchown is declared but
10774         does not exist.  Declare using a prototype if lchown is not
10775         declared.  Add a copyright notice.
10776         * lib/mkstemp.h: Include <unistd.h>.
10777         * lib/openat.c: Include lchown.h.
10778
10779         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
10780         we now test for that separately.
10781         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
10782         rather than O_NOFOLLOW, when testing whether it's possible to
10783         avoid a race condition reliably.
10784         * lib/savewd.c (savewd_chdir): Likewise.
10785
10786         Remove macros that are no longer needed now that stdint.h is
10787         reliable.
10788         * lib/fsusage.c (UINTMAX_MAX): Remove.
10789         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
10790         * lib/utimecmp.c (SIZE_MAX): Remove.
10791
10792         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
10793
10794         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
10795         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
10796         O_NOATIME works.
10797
10798 2006-10-05  Bruno Haible  <bruno@clisp.org>
10799
10800         * lib/gl_list.h (gl_sortedlist_search_from_to,
10801         gl_sortedlist_indexof_from_to): New declarations.
10802         (gl_list_implementation): New fields sortedlist_search_from_to,
10803         sortedlist_indexof_from_to.
10804         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
10805         inline functions.
10806         * lib/gl_list.c (gl_sortedlist_search_from_to,
10807         gl_sortedlist_indexof_from_to): New functions.
10808         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
10809         function.
10810         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
10811         (gl_array_sortedlist_search_from_to): New function.
10812         (gl_array_list_implementation): Update.
10813         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
10814         function.
10815         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
10816         (gl_carray_sortedlist_search_from_to): New function.
10817         (gl_carray_list_implementation): Update.
10818         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
10819         gl_linked_sortedlist_indexof_from_to): New functions.
10820         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
10821         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
10822         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
10823         gl_tree_sortedlist_indexof_from_to): New functions.
10824         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
10825         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
10826         Update.
10827         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
10828         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
10829         Update.
10830
10831 2006-10-05  Bruno Haible  <bruno@clisp.org>
10832
10833         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
10834         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
10835         (struct gl_list_implementation): Add fields search_from_to,
10836         indexof_from_to. Remove fields search, indexof.
10837         (gl_list_search): Use the search_from_to method.
10838         (gl_list_search_from, gl_list_search_from_to): New functions.
10839         (gl_list_indexof): Use the indexof_from_to method.
10840         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
10841         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
10842         (gl_list_search_from, gl_list_search_from_to): New functions.
10843         (gl_list_indexof): Use the indexof_from_to method.
10844         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
10845         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
10846         gl_array_indexof. Add start_index, end_index arguments.
10847         (gl_array_search_from_to): Renamed from gl_array_search. Add
10848         start_index, end_index arguments.
10849         (gl_array_remove, gl_array_list_implementation): Update.
10850         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
10851         gl_carray_indexof. Add start_index, end_index arguments.
10852         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
10853         start_index, end_index arguments.
10854         (gl_carray_remove, gl_carray_list_implementation): Update.
10855         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
10856         gl_linked_search. Add start_index, end_index arguments.
10857         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
10858         start_index, end_index arguments.
10859         (gl_linked_remove): Update.
10860         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
10861         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
10862         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
10863         field to 'size_t'.
10864         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
10865         gl_tree_search. Add start_index, end_index arguments.
10866         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
10867         start_index, end_index arguments.
10868         (gl_tree_remove): Update.
10869         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
10870         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
10871         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
10872         function.
10873         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
10874         gl_tree_search. Add start_index, end_index arguments.
10875         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
10876         start_index, end_index arguments.
10877         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
10878         Update.
10879         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
10880
10881 2006-10-05  Bruno Haible  <bruno@clisp.org>
10882
10883         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
10884
10885         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
10886         fwriteerror_temp): New declarations.
10887         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
10888         (descriptors): New variable.
10889         (cleanup): First, close the descriptors.
10890         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
10891         fclose_temp, fwriteerror_temp): New functions.
10892
10893 2006-10-04  Jim Meyering  <jim@meyering.net>
10894
10895         * lib/fts.c (fts_open): Tiny comment change.
10896
10897 2006-10-04  Bruno Haible  <bruno@clisp.org>
10898
10899         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
10900         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
10901         gl_LOCK_BODY.
10902         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
10903         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
10904         gl_LOCK_EARLY_BODY.
10905         (gl_LOCK): Require gl_LOCK_BODY.
10906
10907 2006-10-04  Bruno Haible  <bruno@clisp.org>
10908
10909         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
10910         (gl_oset_search_atleast): New declaration.
10911         (struct gl_oset_implementation): Add field 'search_atleast'.
10912         (gl_oset_search_atleast): New inline function.
10913         * lib/gl_oset.c (gl_oset_search_atleast): New function.
10914         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
10915         (gl_array_oset_implementation): Update.
10916         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
10917         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
10918         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
10919
10920 2006-10-04  Bruno Haible  <bruno@clisp.org>
10921
10922         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
10923
10924 2006-10-03  Bruno Haible  <bruno@clisp.org>
10925
10926         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
10927         from gl_avltreehash_list_implementation.
10928
10929 2006-10-03  Bruno Haible  <bruno@clisp.org>
10930
10931         * lib/gl_oset.c (gl_oset_add): Fix return type.
10932
10933 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
10934
10935         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
10936
10937 2006-10-02  Eric Blake  <ebb9@byu.net>
10938
10939         * modules/strnlen (Depends-on): Add extensions.
10940
10941 2006-10-02  Eric Blake  <ebb9@byu.net>
10942
10943         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
10944         definition in 2.60+.
10945
10946 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
10947
10948         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
10949         checks.
10950
10951 2006-10-02  Bruno Haible  <bruno@clisp.org>
10952
10953         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
10954         to the AUTOMAKE_OPTIONS.
10955         Reported by Jim Meyering.
10956
10957 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
10958
10959         Work around bug in Solaris 10 /proc file system:
10960         /proc/self/fd/NNN/.. isn't the parent directory of
10961         the directory whose file descriptor is NNN.  This needs to
10962         be worked around at run time, not compile time, since a
10963         program might be built on Solaris 8, where things work, and
10964         run on Solaris 10.
10965         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
10966         to use the following interface instead:
10967         (OPENAT_BUFFER_SIZE): New macro.
10968         (openat_proc_name): New function.
10969         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
10970         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
10971         Likewise.
10972         * lib/openat-proc.c: New file.
10973         * modules/openat (Files): Add lib/openat-proc.c.
10974         (Depends-on): Add same-inode, stdbool.
10975         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
10976
10977 2006-09-29  Bruno Haible  <bruno@clisp.org>
10978
10979         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
10980         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
10981         argument. Set stdout_closed before testing for ferror, not after.
10982         (fwriteerror, fwriteerror_no_ebadf): New functions.
10983
10984 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10985
10986         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
10987
10988 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
10989
10990         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
10991         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
10992
10993 2006-09-28  Jim Meyering  <jim@meyering.net>
10994
10995         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
10996         Include <unistd.h>.
10997
10998 2006-09-28  Bruno Haible  <bruno@clisp.org>
10999
11000         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
11001         * modules/linkedhash-list (Depends-on): Likewise.
11002         * modules/rbtreehash-list (Depends-on): Likewise.
11003
11004 2006-09-28  Bruno Haible  <bruno@clisp.org>
11005
11006         * lib/strndup.h: Simplify the redefinition of strndup.
11007         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
11008         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
11009
11010 2006-09-28  Bruno Haible  <bruno@clisp.org>
11011
11012         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
11013         * lib/gl_linkedhash_list.c: Likewise.
11014         * lib/gl_rbtreehash_list.c: Likewise.
11015
11016 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
11017
11018         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
11019         getaddrinfo.
11020
11021         * lib/__fpending.h: Don't include <stdio_ext.h> unless
11022         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
11023         it causes <stdio_ext.h> to cause a compile-time error.
11024         Problem reported by Nelson H. F. Beebe.
11025         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
11026         of HAVE_DECL___PENDING.
11027
11028         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
11029         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
11030         declaration.
11031
11032 2006-09-27  Jim Meyering  <jim@meyering.net>
11033
11034         This file could end up with a definition for a function
11035         named __strndup, rather than rpl_strndup on a system with
11036         incomplete weak_alias support.
11037         * lib/strndup.c (strndup): Rename from __strndup.
11038         Remove #defines that used to map __strndup to strndup.
11039         Don't use K&R prototypes.
11040         Remove LIBC-related code, since this file is not sync'd with glibc.
11041         * lib/strndup.h: Revamp, accordingly.
11042         * m4/strndup.m4: Modernize.
11043
11044 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
11045
11046         * modules/savewd (Depends-on): Add 'raise'.
11047         * lib/savewd.c: Include <signal.h>, for 'raise'.
11048
11049 2006-09-26  Jim Meyering  <jim@meyering.net>
11050
11051         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
11052         when we detect Darwin 8.7.0's acl_get_file bug.
11053         Rearrange to perform the new (below) run-test while $LIBS
11054         contains any acl-related library.  Set USE_ACL at the end.
11055         (gl_ACL_GET_FILE): New function.
11056
11057 2006-09-26  Eric Blake  <ebb9@byu.net>
11058
11059         * lib/verror.c: Include <config.h> unconditionally.
11060
11061 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
11062
11063         * modules/clock-time (Maintainer): Add self.
11064         * modules/getlogin_r (Depends-on): Add extensions.
11065
11066 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11067
11068         * modules/clock-time: New module.
11069         * modules/nanosleep (Depends-on): Add clock-time.
11070         * modules/gethrxtime (Depends-on): Likewise.
11071         * modules/gettime (Depends-on): Likewise.
11072         * modules/settime (Depends-on): Likewise.
11073
11074         * modules/fts-lgpl: Depend on openat.
11075         * modules/mkancesdirs: Depend on savewd.
11076         * modules/mkdir-p: Likewise.
11077
11078 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11079
11080         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
11081
11082         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
11083         `gl_have_arbitrary_file_name_length_limit' to
11084         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
11085         actually works between configure runs.
11086
11087 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11088             Bruno Haible  <bruno@clisp.org>
11089
11090         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
11091
11092 2006-09-25  Jim Meyering  <jim@meyering.net>
11093
11094         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
11095         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
11096
11097 2006-09-25  Eric Blake  <ebb9@byu.net>
11098
11099         * gnulib-tool (func_import, func_create_testdir): Fix typos in
11100         exec's in 2006-09-18 patch when shuffling fds.
11101
11102 2006-09-25  Bruno Haible  <bruno@clisp.org>
11103
11104         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
11105         Reported by Jim Meyering.
11106
11107 2006-09-24  Jim Meyering  <jim@meyering.net>
11108
11109         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
11110         compare a pointer against a literal "0".  That caused failures with
11111         at least HP-UX's hpcc.
11112
11113 2006-09-22  Simon Josefsson  <jas@extundo.com>
11114
11115         * modules/gc-sha1:
11116         * modules/gc-md4:
11117         * modules/gc-hmac-sha1:
11118         * modules/gc-hmac-md5:
11119         * modules/gc-des:
11120         * modules/gc-arcfour: Distribute more files.
11121
11122 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11123
11124         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
11125         (gl_linked_iterator_from_to): Initialize struct completely.
11126         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
11127         (gl_tree_iterator_from_to): Likewise
11128         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
11129         * lib/gl_array_list.c [lint] (gl_array_iterator)
11130         (gl_array_iterator_from_to): Likewise.
11131         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
11132         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
11133         (gl_carray_iterator_from_to): Likewise.
11134
11135         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
11136         * lib/md4.c (md4_process_block): Remove unused variable.
11137         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
11138         parentheses for clarity.
11139
11140 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11141
11142         * modules/bison-i18n (Depends-on): Add gettext.
11143
11144 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11145
11146         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
11147         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
11148         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
11149         also add missing comma that caused broken test.
11150         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
11151         stdlib.h, for `abort'.
11152         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
11153         variables.
11154         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
11155         include unistd.h if present, for `rmdir'.
11156         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
11157         variables.
11158         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
11159         in the process include standard headers for prototypes.
11160         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
11161         gets declared on GNU/Linux.
11162         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
11163         unistd.h, for `rmdir'.
11164         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
11165
11166         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
11167         always true.
11168         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
11169
11170         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
11171
11172 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11173
11174         * gnulib-tool (func_version): Create output all at once.  This
11175         may help avoid triggering unnecessary SIGPIPEs, and at any
11176         rate it doesn't hurt.
11177
11178 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11179             Bruno Haible  <bruno@clisp.org>
11180
11181         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
11182         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
11183         * m4/signed.m4 (bh_C_SIGNED): Likewise.
11184
11185         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
11186         (gl_FUNC_VASPRINTF): Invoke it.
11187
11188 2006-09-22  Bruno Haible  <bruno@clisp.org>
11189
11190         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
11191         getloadavg.c as first argument.
11192
11193 2006-09-22  Bruno Haible  <bruno@clisp.org>
11194
11195         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
11196         at the beginning of the gl_INIT macro.
11197         * modules/getloadavg (configure.ac): Pass $gl_source_base to
11198         gl_GETLOADAVG.
11199
11200 2006-09-22  Bruno Haible  <bruno@clisp.org>
11201
11202         * gnulib-tool (func_create_megatestdir): Don't include the config-h
11203         module.
11204         Suggested by Ralf Wildenhues.
11205
11206 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
11207
11208         Import this patch from libc:
11209
11210         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
11211
11212         * lib/regex_internal.c (re_string_reconstruct): Handle
11213         offset < pstr->valid_raw_len && pstr->offsets_needed case.
11214         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
11215         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
11216         re_string_context_at.
11217
11218         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
11219         now requires it.
11220         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
11221         gl_REGEX now does it for us.
11222         (gl_REGEX): Add test taken from
11223         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
11224
11225         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
11226         Check that large offsets work.  Modernize Autoconf usages.
11227         Prefer "yes" to mean a good thing rather than a bad.
11228         Don't put "#define mkstemp" in config.h, as this might interfere
11229         with standard system headers that "#define mkstemp mkstemp64".
11230
11231         * modules/mkstemp (Depends-on): Add extensions, so that
11232         mkstemp is visible on some platforms.
11233         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
11234         (Include): Change to "mkstemp.h" from <stdlib.h>.
11235         (Files): Add mkstemp.h.
11236
11237         * lib/mkstemp.h: New file, since some standard headers
11238         #define mkstemp.
11239         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
11240         Include "mkstemp.h".
11241         Make the _LIBC code resemble glibc original more,
11242         e.g., use K&R style.
11243         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
11244         (mkstemp): Remove, since mkstemp.h does this for us.
11245         * lib/stdlib--.h: Include mkstemp.h.
11246
11247         Import this patch from libc:
11248
11249         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
11250
11251         * lib/tempname.c (__gen_tempname): Change attempts_min
11252         into a macro.  Use preprocessor to decide how to initialize
11253         attempts [Coverity CID 67].
11254
11255 2006-09-20  Bruno Haible  <bruno@clisp.org>
11256
11257         * lib/mkdtemp.c: Import from libc.
11258         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
11259                 * sysdeps/posix/tempname.c (__gen_tempname): Change
11260                 attempts_min into a macro.  Use preprocessor to decide how to
11261                 initialize attempts [Coverity CID 67].
11262         2001-11-27  Paul Eggert  <eggert@twinsun.com>
11263                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
11264                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
11265
11266 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11267
11268         * gnulib-tool (func_exit): New function, to allow to pass the
11269         exit status portably through the trap.  Use everywhere.
11270         (--help, --version): Signal a write error.
11271         (trap): catch SIGPIPE, for write errors.
11272         Exit at the end of the trap, with the correct exit status.
11273
11274 2006-09-19  Karl Berry  <karl@gnu.org>
11275
11276         * doc/gnulib.texi: note about the license texinfo files.
11277
11278 2006-09-19  Eric Blake  <ebb9@byu.net>
11279
11280         * gnulib-tool: Avoid space-tab.
11281
11282 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
11283
11284         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
11285         that prevented coreutils 6.1 from building.  Problem reported
11286         by Petter Reinholdtsen.
11287
11288 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
11289
11290         * gnulib-tool (avoidlist): Fix typo that broke options like
11291         --avoid=lock that are used by coreutils bootstrap.
11292
11293 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
11294
11295         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
11296         more systematically.
11297
11298 2006-09-18  Jim Meyering  <jim@meyering.net>
11299
11300         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
11301
11302 2006-09-18  Bruno Haible  <bruno@clisp.org>
11303
11304         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
11305
11306 2006-09-18  Bruno Haible  <bruno@clisp.org>
11307
11308         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
11309         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
11310         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
11311         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
11312         * m4/gettext.m4: Require autoconf >= 2.52.
11313         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
11314         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
11315         of gl_cv_header_inttypes_h.
11316
11317 2006-09-18  Bruno Haible  <bruno@clisp.org>
11318
11319         * lib/javaversion.c: Include configmake.h.
11320
11321 2006-09-18  Bruno Haible  <bruno@clisp.org>
11322
11323         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
11324         avoid that the while loops be executed in a subshell.
11325
11326 2006-09-18  Bruno Haible  <bruno@clisp.org>
11327
11328         * MODULES.html.sh (func_module): Break long lines.
11329         Suggested by Bruce Korb <bkorb@gnu.org>.
11330
11331 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11332
11333         Speed up by a factor of 1.12.
11334         * gnulib-tool (nl): New variable.
11335         (func_import): Rewrite include directive extraction to only read each
11336         directive once.
11337
11338 2006-09-17  Bruno Haible  <bruno@clisp.org>
11339
11340         * modules/javaversion (Makefile.am): Remove DEFS setting.
11341         (Depends-on): Add configmake, for PKGDATADIR definition.
11342
11343 2006-09-17  Bruno Haible  <bruno@clisp.org>
11344
11345         * gnulib-tool (func_create_testdir): Rewrite all files at once.
11346
11347 2006-09-17  Bruno Haible  <bruno@clisp.org>
11348
11349         * gnulib-tool (func_append): New function, stolen from libtool.m4.
11350         (func_modules_transitive_closure, func_modules_add_dummy,
11351         func_modules_to_filelist, func_import, func_create_testdir,
11352         func_create_megatestdir, ...): Use it wherever possible.
11353         Suggested by Ralf Wildenhues.
11354
11355 2006-09-16  Karl Berry  <karl@gnu.org>
11356
11357         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
11358         to avoid sectioning errors.
11359         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
11360         [ifinfo]: blank line after @center-ed titles.
11361         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
11362         Spell FSF address consistently with others.
11363         (These changes approved by rms.)
11364
11365 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11366
11367         Speed up by a factor of 1.61.
11368         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
11369         already checked module names again.
11370
11371 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11372
11373         Speed up by a factor of 1.13.
11374         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
11375         for new_files, and the input to func_add_or_update.
11376
11377 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11378
11379         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
11380         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
11381
11382 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
11383
11384         * modules/mkancesdirs (Depends-on): Add fcntl.
11385         * modules/savewd: New file.
11386         * MODULES.html.sh (File system functions): Add savewd.
11387
11388         * modules/configmake (Makefile.am): Add support for the
11389         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
11390
11391 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
11392
11393         * m4/savewd.m4: New file.
11394
11395 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
11396
11397         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
11398         (dirchownmod): New arg FD.  All callers changed.
11399         Use FD rather than opening the directory ourself, as opening is
11400         now the caller's responsibility.
11401         * lib/dirchownmod.h: Likewise.
11402         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
11403         hosts that require <sys/types.h> before <sys/stat.h>.  Include
11404         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
11405         (test_dir): Remove.
11406         (mkancesdirs): Return length of prefix of FILE that has already
11407         been made, or -2 if there is a child doing the work.  Redo
11408         algorithm so that it is O(N) rather than O(N**2).  Optimize away
11409         ".", and treat ".." specially since it might stray back into
11410         already-created areas.  Use a subprocess if necessary.  New arg
11411         WD; all users changed.  MAKE_DIR function should now return 1
11412         if it creates a directory that is not readable.  Return -2 if
11413         a child process is spun off.
11414         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
11415         Adjust signature to match code.
11416         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
11417         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
11418         all users changed.
11419         * lib/savewd.c, lib/savewd.h: New files.
11420
11421 2006-09-15  Jim Meyering  <jim@meyering.net>
11422
11423         * modules/rename-dest-slash: New module.
11424         * MODULES.html.sh (posix_compat): Add it here.
11425
11426         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
11427
11428 2006-09-15  Jim Meyering  <jim@meyering.net>
11429
11430         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
11431         file.
11432
11433         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
11434
11435 2006-09-15  Jim Meyering  <jim@meyering.net>
11436
11437         * lib/rename-dest-slash.c (has_trailing_slash): Use
11438         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
11439         (rpl_rename_dest_slash): Perform the cheaper trailing slash
11440         test before testing whether SRC is a directory.
11441         Suggestions from Bruno Haible.
11442
11443         Avoid a warning about an unused variable.
11444         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
11445         into the #ifdef block where it's used.
11446
11447         * lib/rename-dest-slash.c: New file.
11448
11449 2006-09-14  Bruno Haible  <bruno@clisp.org>
11450
11451         * lib/allocsa.c: Include <config.h> unconditionally.
11452         * lib/asnprintf.c: Likewise.
11453         * lib/asprintf.c: Likewise.
11454         * lib/c-strcasecmp.c: Likewise.
11455         * lib/c-strcasestr.c: Likewise.
11456         * lib/c-strncasecmp.c: Likewise.
11457         * lib/c-strstr.c: Likewise.
11458         * lib/classpath.c: Likewise.
11459         * lib/clean-temp.c: Likewise.
11460         * lib/concatpath.c: Likewise.
11461         * lib/copy-file.c: Likewise.
11462         * lib/csharpcomp.c: Likewise.
11463         * lib/csharpexec.c: Likewise.
11464         * lib/execute.c: Likewise.
11465         * lib/fatal-signal.c: Likewise.
11466         * lib/findprog.c: Likewise.
11467         * lib/fwriteerror.c: Likewise.
11468         * lib/gl_array_list.c: Likewise.
11469         * lib/gl_array_oset.c: Likewise.
11470         * lib/gl_avltree_list.c: Likewise.
11471         * lib/gl_avltree_oset.c: Likewise.
11472         * lib/gl_avltreehash_list.c: Likewise.
11473         * lib/gl_carray_list.c: Likewise.
11474         * lib/gl_linked_list.c: Likewise.
11475         * lib/gl_linkedhash_list.c: Likewise.
11476         * lib/gl_list.c: Likewise.
11477         * lib/gl_oset.c: Likewise.
11478         * lib/gl_rbtree_list.c: Likewise.
11479         * lib/gl_rbtree_oset.c: Likewise.
11480         * lib/gl_rbtreehash_list.c: Likewise.
11481         * lib/imaxabs.c: Likewise.
11482         * lib/imaxdiv.c: Likewise.
11483         * lib/javacomp.c: Likewise.
11484         * lib/javaexec.c: Likewise.
11485         * lib/javaversion.c: Likewise.
11486         * lib/linebreak.c: Likewise.
11487         * lib/localcharset.c: Likewise.
11488         * lib/lock.c: Likewise.
11489         * lib/mbchar.c: Likewise.
11490         * lib/mbswidth.c: Likewise.
11491         * lib/mkdtemp.c: Likewise.
11492         * lib/pipe.c: Likewise.
11493         * lib/printf-args.c: Likewise.
11494         * lib/printf-parse.c: Likewise.
11495         * lib/progname.c: Likewise.
11496         * lib/progreloc.c: Likewise.
11497         * lib/readlink.c: Likewise.
11498         * lib/sh-quote.c: Likewise.
11499         * lib/stpcpy.c: Likewise.
11500         * lib/stpncpy.c: Likewise.
11501         * lib/strcasecmp.c: Likewise.
11502         * lib/strcasestr.c: Likewise.
11503         * lib/strcspn.c: Likewise.
11504         * lib/striconv.c: Likewise.
11505         * lib/strncasecmp.c: Likewise.
11506         * lib/strnlen1.c: Likewise.
11507         * lib/strstr.c: Likewise.
11508         * lib/strtok_r.c: Likewise.
11509         * lib/tls.c: Likewise.
11510         * lib/tmpdir.c: Likewise.
11511         * lib/unicodeio.c: Likewise.
11512         * lib/unsetenv.c: Likewise.
11513         * lib/vasnprintf.c: Likewise.
11514         * lib/vasprintf.c: Likewise.
11515         * lib/wait-process.c: Likewise.
11516         * lib/xallocsa.c: Likewise.
11517         * lib/xsetenv.c: Likewise.
11518         * lib/xstriconv.c: Likewise.
11519
11520 2006-09-13  Simon Josefsson  <jas@extundo.com>
11521
11522         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
11523         that internally, suggested by Ralf Wildenhues
11524         <Ralf.Wildenhues@gmx.de>.
11525
11526 2006-09-13  Simon Josefsson  <jas@extundo.com>
11527
11528         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
11529         @LIBOBJS@.
11530         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
11531
11532 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
11533
11534         * lib/_fpending.c: Include <config.h> unconditionally, since we no
11535         longer worry about uses that don't define HAVE_CONFIG_H.
11536         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
11537         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
11538         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
11539         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
11540         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
11541         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
11542         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
11543         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
11544         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
11545         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
11546         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
11547         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
11548         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
11549         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
11550         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
11551         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
11552         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
11553         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
11554         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
11555         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
11556         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
11557         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
11558         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
11559         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
11560         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
11561         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
11562         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
11563         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
11564         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
11565         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
11566         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
11567         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
11568         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
11569         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
11570         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
11571         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
11572         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
11573         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
11574         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
11575         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
11576         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
11577         Likewise.
11578
11579 2006-09-13  Eric Blake  <ebb9@byu.net>
11580
11581         * lib/getopt.c: Fix typo in last commit.
11582
11583 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
11584
11585         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
11586         dgettext.
11587
11588 2006-09-12  Jim Meyering  <jim@meyering.net>
11589
11590         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
11591         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
11592         Reported by Nelson H. F. Beebe.
11593
11594 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
11595
11596         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
11597         program_invocation_name and program_invocation_short_name are
11598         initialized.
11599         * lib/argp-namefrob.h: Move declarations of program_invocation_name
11600         and program_invocation_short_name to argp.h, so they are visible
11601         to user programs.
11602         * lib/argp.h: Likewise
11603
11604 2006-09-10  Bruno Haible  <bruno@clisp.org>
11605
11606         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
11607         m4/inttypes_h.m4, m4/uintmax_t.m4.
11608
11609 2006-09-10  Bruno Haible  <bruno@clisp.org>
11610
11611         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
11612         gl_AC_TYPE_UINTMAX_T.
11613
11614 2006-09-10  Bruno Haible  <bruno@clisp.org>
11615
11616         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
11617
11618 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
11619
11620         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
11621         convention.  Text proposed by Bruno Haible.
11622         (struct argp_option): Document the use of N_() wrappers.
11623
11624         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
11625         '\v', and translate the two parts separately, instead of feeding
11626         the whole string to gettext.  This allows to exclude
11627         '\v' from the strings visible to the translator by writing doc
11628         strings as N_("..") "\v" N_("..").
11629
11630 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
11631
11632         * config/srclist.txt: Undo latest change; the bug was fixed.
11633
11634 2006-09-09  Bruno Haible  <bruno@clisp.org>
11635
11636         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
11637         assignments if building a library without libtool.
11638         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
11639         in func_emit_lib_Makefile_am.
11640         (func_import): When building a static library libfoo.a, arrange to
11641         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
11642         (func_create_testdir): Likewise.
11643         * modules/gc (configure.ac, Makefile.am): If building statically,
11644         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
11645         * modules/iconvme (configure.ac, Makefile.am): Likewise.
11646         * modules/striconv (configure.ac, Makefile.am): Likewise.
11647         Based on a suggestion by Ralf Wildenhues.
11648
11649 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11650
11651         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
11652         Check for unistd.h too, since Autoconf doesn't assume POSIX.
11653         Also:
11654
11655         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11656         Add year_2050_test to catch glibc bug 2821
11657         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
11658
11659         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
11660         Prefer #ifdef to #if.
11661
11662         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
11663         Return from 'main' instead of calling 'exit'.
11664
11665 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11666
11667         * lib/mktime.c (guess_time_tm): Fix bug where mktime
11668         returned the maximum time_t value rather than (time_t) -1.
11669         Problem originally reported by William Bardwell
11670         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
11671
11672         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
11673         Moved to here ...
11674         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
11675         ... from here.
11676
11677 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11678
11679         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
11680         2821 is fixed.
11681
11682 2006-09-08  Jim Meyering  <jim@meyering.net>
11683
11684         Don't make generated files read-only.  That would bother too many
11685         people.  However, do retain the ability to work when targets are
11686         read-only: remove the destination and temporary files before writing
11687         them (when generated via sed or echo), or by using the -f option for
11688         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
11689         * modules/alloca-opt, modules/argz, modules/arpa_inet:
11690         * modules/byteswap, modules/configmake, modules/fcntl:
11691         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
11692         * modules/localcharset, modules/netinet_in, modules/poll:
11693         * modules/stdbool, modules/stdint, modules/sys_select:
11694         * modules/sys_socket, modules/sys_stat, modules/sysexits:
11695
11696 2006-09-08  Jim Meyering  <jim@meyering.net>
11697
11698         Avoid new build failure on FreeBSD 6.0.
11699         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
11700         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
11701         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
11702
11703 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11704
11705         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
11706
11707 2006-09-07  Jim Meyering  <jim@meyering.net>
11708
11709         Fix global typo in last change: use chmod u-w, not chmod u-x.
11710         Spotted by Paul Eggert and Bruce Korb.
11711         * modules/alloca-opt, modules/argz, modules/arpa_inet:
11712         * modules/byteswap, modules/configmake, modules/fcntl:
11713         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
11714         * modules/localcharset, modules/netinet_in, modules/poll:
11715         * modules/stdbool, modules/stdint, modules/sys_select:
11716         * modules/sys_socket, modules/sys_stat, modules/sysexits:
11717
11718 2006-09-06  Jim Meyering  <jim@meyering.net>
11719
11720         Make generated files be read-only.
11721         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
11722         Ensure that each generated file is now read-only.
11723         * modules/argz: Likewise.
11724         * modules/arpa_inet: Likewise.
11725         * modules/byteswap: Likewise.
11726         * modules/configmake: Likewise.
11727         * modules/fcntl: Likewise.
11728         * modules/fnmatch: Likewise.
11729         * modules/getopt: Likewise.
11730         * modules/glob: Likewise.
11731         * modules/inttypes: Likewise.
11732         * modules/netinet_in: Likewise.
11733         * modules/poll: Likewise.
11734         * modules/stdbool: Likewise.
11735         * modules/stdint: Likewise.
11736         * modules/sys_select: Likewise.
11737         * modules/sys_socket: Likewise.
11738         * modules/sys_stat: Likewise.
11739         * modules/sysexits: Likewise.
11740         * modules/localcharset: Same as above, but continue using temporary
11741         file named "t-$@" (why different?) rather than the "$@-t" used
11742         everywhere else.
11743
11744         * modules/sysexits (Makefile.am): Replace literal occurrences
11745         of "sysexit.h" more readable, and more consistent, "$@".
11746
11747 2006-09-06  Bruno Haible  <bruno@clisp.org>
11748
11749         * modules/striconv: New file.
11750         * modules/xstriconv: New file.
11751         * MODULES.html.sh (Internationalization functions): Add striconv,
11752         xstriconv.
11753
11754 2006-09-06  Bruno Haible  <bruno@clisp.org>
11755
11756         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
11757         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
11758         not using libtool correctly.
11759
11760 2006-09-06  Bruno Haible  <bruno@clisp.org>
11761
11762         * lib/striconv.h: New file.
11763         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
11764         iconvstring.c.
11765         * lib/xstriconv.h: New file.
11766         * lib/xstriconv.c: New file.
11767
11768 2006-09-06  Bruno Haible  <bruno@clisp.org>
11769
11770         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
11771         lib_..._LDFLAGS.
11772
11773 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11774
11775         * lib/argz_.h: Sync from Libtool.
11776
11777         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
11778                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11779
11780         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
11781
11782 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
11783
11784         * modules/trim: New file.
11785
11786 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
11787
11788         * lib/trim.h: New file.
11789         * lib/trim.c: New file.
11790
11791 2006-09-05  Bruno Haible  <bruno@clisp.org>
11792
11793         * MODULES.html.sh (String handling): Add trim.
11794
11795 2006-09-04  Karl Berry  <karl@gnu.org>
11796
11797         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
11798         until next release.
11799
11800 2006-09-03  Bruno Haible  <bruno@clisp.org>
11801
11802         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
11803         correctly.
11804
11805 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
11806
11807         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
11808         not gl_GETLOADAVG.  Omit unneeded semicolons.
11809         Problems reported by Ralf Wildenhues in
11810         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
11811         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
11812         at the end, which is the usual gnulib style.
11813
11814         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
11815         of doing all the work ourselves.
11816         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
11817         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
11818
11819 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
11820
11821         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
11822         Problem reported by Ralf Wildenhues in
11823         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
11824
11825         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
11826         HAVE_STRUCT_STATFS_F_FSTYPENAME.
11827
11828 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
11829
11830         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
11831         yesterday's patch by changing test -n to test -z.
11832
11833 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11834
11835         * modules/getloadavg (Files): Add m4/getloadavg.m4.
11836         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
11837         the former is now obsolescent.
11838
11839         * modules/chdir-long (Depends-on): Add fcntl.
11840
11841 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11842
11843         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
11844         obsolescent, and programs should use gnulib instead.
11845         * m4/getloadavg.m4: New file, with contents taken from Autoconf
11846         but with prefixes changed.
11847
11848 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11849
11850         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
11851         or stdbool.h, because they might not exist while configuring.
11852
11853         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
11854         Don't include unistd.h or limits.h; not needed, since chdir-long.h
11855         does that for us.
11856         (O_DIRECTORY): Remove.
11857
11858 2006-08-31  Eric Blake  <ebb9@byu.net>
11859
11860         * gnulib-tool: Don't let emacs change spaces to TAB.
11861
11862 2006-08-31  Bruno Haible  <bruno@clisp.org>
11863
11864         * gnulib-tool: When calling func_import more than once, do it in a
11865         subshell.
11866         Reported by Eric Blake <ebb9@byu.net>.
11867
11868 2006-08-31  Bruno Haible  <bruno@clisp.org>
11869
11870         * gnulib-tool (nl): Remove variable.
11871         (sed_transform_lib_file): Use more robust test for config-h module.
11872         (func_import): Fix typo in 2006-08-25 patch.
11873
11874 2006-08-31  Bruno Haible  <bruno@clisp.org>
11875
11876         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
11877         specified, augment Makefile.am variables instead of assigning them.
11878
11879 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
11880
11881         Work around a bug in both the Linux and SunOS 64-bit kernels:
11882         nanosleep mishandles sleeps for longer than 2**31 seconds.
11883         Problem reported by Frank v Waveren in
11884         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
11885         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
11886         Check for nanosleep bug.
11887         (LIB_NANOSLEEP): Append clock_gettime library if needed.
11888
11889 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
11890
11891         Work around a bug in both the Linux and SunOS 64-bit kernels:
11892         nanosleep mishandles sleeps for longer than 2**31 seconds.
11893         Problem reported by Frank v Waveren in
11894         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
11895         * lib/nanosleep.c (BILLION): New constant.
11896         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
11897         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
11898         implementation.
11899
11900 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
11901
11902         * modules/nanosleep (Depends-on): Add gettime.
11903
11904 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
11905         and Simon Josefsson  <jas@extundo.com>
11906         and Oskar Liljeblad  <oskar@osk.mine.nu>
11907
11908         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
11909         * gnulib-tool (func_import): New license type 'unmodifiable license
11910         text'.
11911         * modules/fdl: Use it.  Longer description.
11912         * module/gpl, module/lgpl: New files.
11913
11914 2006-08-30  Jim Meyering  <jim@meyering.net>
11915
11916         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
11917         shadowing the parameter.
11918
11919 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11920
11921         Sync from Libtool:
11922
11923         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11924
11925         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
11926         sharing with gnulib.  Report by Eric Blake.
11927
11928 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
11929
11930         * modules/isapipe: New file.
11931         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
11932
11933 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
11934
11935         * modules/configmake (Makefile.am): Add a comment, and omit
11936         the CONFIGMAKE_ prefix from generated macro names.  Suggested
11937         by Bruno Haible.
11938
11939 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
11940
11941         * m4/isapipe.m4: New file.
11942
11943 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
11944
11945         * lib/isapipe.c, lib/isapipe.h: New files.
11946
11947 2006-08-29  Jim Meyering  <jim@meyering.net>
11948
11949         * modules/configmake (Makefile.am): Make configmake.h depend on
11950         Makefile.  Otherwise, a stale configmake.h could hang around.
11951
11952 2006-08-29  Eric Blake  <ebb9@byu.net>
11953
11954         * lib/error.c (error_at_line, print_errno_message): Match libc, after
11955         resolution of upstream bug 3044.
11956
11957 2006-08-29  Bruno Haible  <bruno@clisp.org>
11958
11959         * modules/localcharset (Depends-on): Add configmake.
11960         (Makefile.am): Remove setting of LIBDIR through DEFS.
11961
11962 2006-08-29  Bruno Haible  <bruno@clisp.org>
11963
11964         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
11965         defined.
11966
11967 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
11968
11969         * modules/fcntl: New file.
11970         * modules/chdir-safer (Depends-on): Add fcntl.
11971         * modules/fts: Likewise.
11972         * modules/mkdir-p: Likewise.
11973
11974         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
11975         This undoes the most recent change, since we're now addressing the
11976         problem in a different way.
11977
11978         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
11979         into output, since the output might be called Makefile.am even
11980         if $makefile_name is something different.
11981         (func_import): Use $makefile_am rather than
11982         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
11983         empty.
11984
11985         * modules/inttypes (Files): Add m4/inttypes-h.m4.
11986
11987 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
11988
11989         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
11990         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
11991         recent change to stdint.m4, since we're now addressing the problem in a
11992         different way.
11993
11994 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
11995
11996         * m4/fcntl_h.m4: New file.
11997
11998 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
11999
12000         * lib/fcntl_.h: New file.
12001         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
12002         the fcntl module.
12003         * lib/dirchownmod.c: Likewise.
12004         * lib/fts.c: Likewise.
12005
12006         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
12007         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
12008         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
12009         just before including <inttypes.h>, to avoid circular inclusion.
12010
12011 2006-08-28  Jim Meyering  <jim@meyering.net>
12012
12013         * doc/visibility.texi: Actually read and correct the grammar of the
12014         sentence affected by yesterday's change.
12015
12016 2006-08-28  Eric Blake  <ebb9@byu.net>
12017
12018         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
12019         needs wrapper.
12020
12021 2006-08-28  Eric Blake  <ebb9@byu.net>
12022
12023         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
12024
12025 2006-08-28  Eric Blake  <ebb9@byu.net>
12026
12027         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
12028
12029 2006-08-28  Bruno Haible  <bruno@clisp.org>
12030
12031         * modules/c-strstr: New file, from GNU gettext.
12032         * MODULES.html.sh (String handling): Add c-strstr.
12033
12034 2006-08-28  Bruno Haible  <bruno@clisp.org>
12035
12036         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
12037         macros.
12038         Reported by Eric Blake.
12039
12040 2006-08-28  Bruno Haible  <bruno@clisp.org>
12041
12042         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
12043         (VASNPRINTF): Return a string of length > INT_MAX without failing.
12044         * lib/vasprintf.c: Include errno.h, limits.h.
12045         (EOVERFLOW): New fallback definition.
12046         (vasprintf): Test here whether the string length is > INT_MAX.
12047         * lib/vsnprintf.c: Include errno.h, limits.h.
12048         (EOVERFLOW): New fallback definition.
12049         (vsnprintf): Fix bug when generated string was too long for the buffer.
12050         Test here whether the string length is > INT_MAX.
12051
12052 2006-08-28  Bruno Haible  <bruno@clisp.org>
12053
12054         * lib/inttypes_.h (SCNX*): Remove definitions.
12055         Reported by Eric Blake.
12056
12057 2006-08-28  Bruno Haible  <bruno@clisp.org>
12058
12059         * lib/c-strstr.h: New file, from GNU gettext.
12060         * lib/c-strstr.c: New file, from GNU gettext.
12061
12062 2006-08-28  Bruno Haible  <bruno@clisp.org>
12063
12064         * gnulib-tool: Reorder some statements.
12065
12066 2006-08-28  Bruno Haible  <bruno@clisp.org>
12067
12068         * gnulib-tool: New option --makefile-name.
12069         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
12070         $makefile_name.
12071         (func_import): Write $makefile_name to the cache file, and read it from
12072         there unless explicitly specified. Use $makefile_name as file name
12073         instead of Makefile.am. Adjust the recommendations accordingly.
12074
12075 2006-08-28  Bruno Haible  <bruno@clisp.org>
12076
12077         * gnulib-tool (func_verify_module): Check against misapplying patch.
12078
12079 2006-08-28  Bruno Haible  <bruno@clisp.org>
12080
12081         * gnulib-tool (func_relativize, func_relconcat): New functions.
12082         Give an error if --local-dir is given with --update.
12083         Remove trailing slashes from $local_gnulib_dir.
12084         (func_import): Store the relativized $local_gnulib_dir in
12085         gnulib-cache.m4, and read it from there if not specified explicitly.
12086
12087 2006-08-28  Bruno Haible  <bruno@clisp.org>
12088
12089         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
12090         is the current directory. Respect also $local_gnulib_dir.
12091
12092 2006-08-28  Bruno Haible  <bruno@clisp.org>
12093             Simon Josefsson  <jas@extundo.com>
12094
12095         BeOS portability.
12096         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
12097
12098 2006-08-27  Jim Meyering  <jim@meyering.net>
12099
12100         * doc/visibility.texi: Remove duplicate word: "pointer".
12101
12102 2006-08-26  Bruno Haible  <bruno@clisp.org>
12103
12104         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
12105         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
12106         (Makefile.am): Create inttypes.h from inttypes_.h.
12107         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
12108
12109         * modules/imaxabs: New file.
12110
12111         * modules/imaxdiv: New file.
12112
12113 2006-08-26  Bruno Haible  <bruno@clisp.org>
12114
12115         * m4/inttypes.m4: New file.
12116         * m4/_inttypes_h.m4: Remove file.
12117         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
12118         PRI_MACROS_BROKEN.
12119         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
12120
12121         * m4/imaxabs.m4: New file.
12122
12123         * m4/imaxdiv.m4: New file.
12124
12125 2006-08-26  Bruno Haible  <bruno@clisp.org>
12126
12127         * lib/inttypes_.h: New file.
12128         * lib/inttypes.h: Remove file.
12129         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
12130
12131         * lib/imaxabs.c: New file.
12132
12133         * lib/imaxdiv.c: New file.
12134
12135 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12136
12137         New config-h module, so that "make" output needn't be cluttered
12138         by -DHAVE_CONFIG_H.
12139         * MODULES.html.sh (Support for building libraries and executables):
12140         Add config-h.
12141         * modules/config-h: New file.
12142         * gnulib-tool (nl, sed_transform_lib_file): New vars.
12143         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
12144         the config-h module is used.
12145
12146         New configmake module, so that "make" output needn't be cluttered
12147         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
12148         * MODULES.html.sh (Support for building libraries and executables):
12149         Add configmake.
12150         * modules/configmake: New file.
12151
12152 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12153
12154         * m4/config-h.m4: New file.
12155
12156 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12157
12158         * config/srclist.txt: Add elisp-comp.
12159
12160 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12161
12162         * MODULES.html.sh (Support for building libraries and executables):
12163         Add elisp-comp.
12164         * build-aux/elisp-comp: New file.
12165         * modules/elisp-comp: New file.
12166
12167 2006-08-24  Bruno Haible  <bruno@clisp.org>
12168
12169         * gnulib-tool (func_create_testdir): Use non-default values of
12170         sourcebase and m4base.
12171
12172 2006-08-24  Bruno Haible  <bruno@clisp.org>
12173
12174         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
12175         HTML structure.
12176
12177 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
12178
12179         * modules/openat (Depends-on): Add lchown.
12180
12181 2006-08-23  Bruno Haible  <bruno@clisp.org>
12182
12183         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
12184         of gl_LOCK_EARLY instead of gl_LOCK.
12185
12186 2006-08-23  Bruno Haible  <bruno@clisp.org>
12187
12188         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
12189         on OSF/1 to no.
12190         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
12191
12192 2006-08-23  Bruno Haible  <bruno@clisp.org>
12193
12194         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
12195         as unusable.
12196
12197         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
12198         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
12199         (gl_LOCK): New macro.
12200
12201 2006-08-22  Simon Josefsson  <jas@extundo.com>
12202
12203         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
12204         to md5 module.
12205
12206 2006-08-22  Simon Josefsson  <jas@extundo.com>
12207
12208         * MODULES.html.sh: Add "Support for maintaining and release
12209         projects".
12210
12211         * build-aux/gnupload: New file, from coreutils.
12212
12213 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
12214
12215         Avoid the need for AC_LIBSOURCES in m4 macros.
12216         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
12217         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
12218         * modules/check-version (EXTRA_DIST): Add check-version.h.
12219         * modules/crc (EXTRA_DIST): Add crc.h.
12220         * modules/des (EXTRA_DIST): Add des.h.
12221         * modules/gc (EXTRA_DIST): Add gc.h.
12222         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
12223         * modules/getline (EXTRA_DIST): Add getline.h.
12224         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
12225         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
12226         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
12227         * modules/md2 (EXTRA_DIST): Add md2.h.
12228         * modules/md4 (EXTRA_DIST): Add md4.h.
12229         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
12230         * modules/read-file (EXTRA_DIST): Add read-file.h.
12231         * modules/readline (EXTRA_DIST): Add readline.h.
12232         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
12233         rijndael-api-fst.h.
12234
12235 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
12236
12237         * m4/rijndael.m4 (gl_ARCFOUR):
12238         * m4/arctwo.m4 (gl_ARCTWO):
12239         * m4/check-version.m4 (gl_CHECK_VERSION):
12240         * m4/crc.m4 (gl_CRC):
12241         * m4/des.m4 (gl_DES):
12242         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
12243         * m4/gc.m4 (gl_GC):
12244         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
12245         * m4/getline.m4 (gl_FUNC_GETLINE):
12246         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
12247         * m4/hmac-md5.m4 (gl_HMAC_MD5):
12248         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
12249         * m4/md2.m4 (gl_MD2):
12250         * m4/md4.m4 (gl_MD4):
12251         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
12252         * m4/read-file.m4 (gl_FUNC_READ_FILE):
12253         * m4/readline.m4 (gl_FUNC_READLINE):
12254         * m4/rijndael.m4 (gl_RIJNDAEL):
12255         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
12256         to get the necessary .h files and whatnot.
12257
12258 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
12259
12260         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
12261         gnulib rather than the other way around.
12262         * config/srclistvars.sh (COREUTILS): Remove.
12263
12264 2006-08-22  Jim Meyering  <jim@meyering.net>
12265
12266         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
12267
12268         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
12269
12270 2006-08-22  Eric Blake  <ebb9@byu.net>
12271
12272         * modules/regexprops-generic: New file.
12273         * MODULES.html.sh (Support for building documentation): List it.
12274
12275 2006-08-22  Eric Blake  <ebb9@byu.net>
12276
12277         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
12278         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
12279         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
12280         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
12281
12282 2006-08-22  Bruno Haible  <bruno@clisp.org>
12283
12284         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
12285         and lib_LTLIBRARIES like the other lib_* variables.
12286
12287 2006-08-22  Bruno Haible  <bruno@clisp.org>
12288
12289         * build-aux/x-to-1.in: New file, from GNU gettext.
12290
12291 2006-08-22  Bruno Haible  <bruno@clisp.org>
12292
12293         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
12294         <utmpx.h> exists.
12295
12296 2006-08-22  Bruno Haible  <bruno@clisp.org>
12297
12298         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
12299         <utmpx.h> exists.
12300
12301 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
12302
12303         BeOS portability.
12304         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
12305         exist.
12306         Problem reported by Bruno Haible.
12307
12308 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
12309
12310         Avoid the need for AC_LIBSOURCES in m4 macros.
12311         * modules/acl (EXTRA_DIST): Add acl.h.
12312         * modules/argmatch (Files): Add m4/argmatch.m4.
12313         (configure.ac): Add gl_ARGMATCH.
12314         (EXTRA_DIST): Renamed from lib_SOURCES, for
12315         consistency with the other modules.  Remove argmatch.c.
12316         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
12317         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
12318         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
12319         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
12320         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
12321         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
12322         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
12323         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
12324         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
12325         * modules/closeout (EXTRA_DIST): Add closeout.h.
12326         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
12327         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
12328         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
12329         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
12330         dirname.h; remove basename.c and stripslash.c.
12331         * modules/exclude (EXTRA_DIST): Add exclude.h.
12332         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
12333         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
12334         * modules/file-type (EXTRA_DIST): Add file-type.h.
12335         * modules/filemode (EXTRA_DIST): Add filemode.h.
12336         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
12337         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
12338         * modules/fpending (EXTRA_DIST): Add __fpending.h.
12339         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
12340         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
12341         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
12342         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
12343         * modules/getdate (EXTRA_DIST): Add getdate.c.
12344         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
12345         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
12346         * modules/getpass (EXTRA_DIST): Add getpass.h.
12347         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
12348         * modules/group-member (EXTRA_DIST): Add group-member.h.
12349         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
12350         * modules/hash (EXTRA_DIST): Add hash.h.
12351         * modules/human (EXTRA_DIST): Add human.h.
12352         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
12353         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
12354         * modules/lchown (EXTRA_DIST): Add lchown.h.
12355         * modules/long-options (EXTRA_DIST): Add long-options.h.
12356         * modules/lstat (EXTRA_DIST): Add lstat.h.
12357         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
12358         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
12359         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
12360         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
12361         * modules/memxor (EXTRA_DIST): Add memxor.h.
12362         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
12363         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
12364         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
12365         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
12366         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
12367         * modules/physmem (EXTRA_DIST): Add physmem.h.
12368         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
12369         * modules/posixver (EXTRA_DIST): Add posixver.h.
12370         * modules/quote (EXTRA_DIST): Add quote.h.
12371         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
12372         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
12373         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
12374         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
12375         regex_internal.h regexec.c.
12376         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
12377         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
12378         * modules/same (EXTRA_DIST): Add same.h.
12379         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
12380         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
12381         * modules/savedir (EXTRA_DIST): Add savedir.h.
12382         * modules/sha1 (EXTRA_DIST): Add sha1.h.
12383         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
12384         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
12385         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
12386         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
12387         * modules/strdup (EXTRA_DIST): Add strdup.h.
12388         * modules/strftime (EXTRA_DIST): Add strftime.h.
12389         * modules/strndup (EXTRA_DIST): Add strndup.h.
12390         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
12391         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
12392         * modules/time_r (EXTRA_DIST): Add time_r.h.
12393         * modules/timespec (EXTRA_DIST): Add timespec.h.
12394         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
12395         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
12396         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
12397         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
12398         * modules/userspec (EXTRA_DIST): Add userspec.h.
12399         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
12400         * modules/utimens (EXTRA_DIST): Add utimens.h.
12401         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
12402         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
12403         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
12404         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
12405         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
12406         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
12407         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
12408         * modules/yesno (EXTRA_DIST): Add yesno.h.
12409
12410 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
12411
12412         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
12413
12414         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
12415         * m4/dev-ino.m4, same-inode.m4: Remove.
12416
12417         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
12418         * m4/acl.m4 (AC_FUNC_ACL):
12419         * m4/backupfile.m4 (gl_BACKUPFILE):
12420         * m4/c-strtod.m4 (gl_C99_STRTOLD):
12421         * m4/canon-host.m4 (gl_CANON_HOST):
12422         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
12423         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
12424         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
12425         * m4/cloexec.m4 (gl_CLOEXEC):
12426         * m4/close-stream.m4 (gl_CLOSE_STREAM):
12427         * m4/closeout.m4 (gl_CLOSEOUT):
12428         * m4/dirfd.m4 (gl_FUNC_DIRFD):
12429         * m4/dirname.m4 (gl_DIRNAME):
12430         * m4/exclude.m4 (gl_EXCLUDE):
12431         * m4/exitfail.m4 (gl_EXITFAIL):
12432         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
12433         * m4/file-type.m4 (gl_FILE_TYPE):
12434         * m4/filemode.m4 (gl_FILEMODE):
12435         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
12436         * m4/fpending.m4 (gl_FUNC_FPENDING):
12437         * m4/fprintftime.m4 (gl_FPRINTFTIME):
12438         * m4/fts.m4 (gl_FUNC_FTS):
12439         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
12440         * m4/getdate.m4 (gl_GETDATE):
12441         * m4/gethrxtime.m4 (gl_GETHRXTIME):
12442         * m4/getpagesize.m4 (gl_GETPAGESIZE):
12443         * m4/getpass.m4 (gl_FUNC_GETPASS):
12444         * m4/gettime.m4 (gl_GETTIME):
12445         * m4/getugroups.m4 (gl_GETUGROUPS):
12446         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
12447         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
12448         * m4/hard-locale.m4 (gl_HARD_LOCALE):
12449         * m4/hash.m4 (gl_HASH):
12450         * m4/idcache.m4 (gl_IDCACHE):
12451         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
12452         * m4/lchown.m4 (gl_FUNC_LCHOWN):
12453         * m4/long-options.m4 (gl_LONG_OPTIONS):
12454         * m4/lstat.m4 (gl_FUNC_LSTAT):
12455         * m4/md5.m4 (gl_MD5):
12456         * m4/memcasecmp.m4 (gl_MEMCASECMP):
12457         * m4/memcoll.m4 (gl_MEMCOLL):
12458         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
12459         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
12460         * m4/memxor.m4 (gl_MEMXOR):
12461         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
12462         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
12463         * m4/modechange.m4 (gl_MODECHANGE):
12464         * m4/mountlist.m4 (gl_MOUNTLIST):
12465         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
12466         * m4/openat.m4 (gl_FUNC_OPENAT):
12467         * m4/pathmax.m4 (gl_PATHMAX):
12468         * m4/physmem.m4 (gl_PHYSMEM):
12469         * m4/posixtm.m4 (gl_POSIXTM):
12470         * m4/posixver.m4 (gl_POSIXVER):
12471         * m4/quote.m4 (gl_QUOTE):
12472         * m4/quotearg.m4 (gl_QUOTEARG):
12473         * m4/readtokens.m4 (gl_READTOKENS):
12474         * m4/readutmp.m4 (gl_READUTMP):
12475         * m4/regex.m4 (gl_REGEX):
12476         * m4/safe-read.m4 (gl_SAFE_READ):
12477         * m4/safe-write.m4 (gl_SAFE_WRITE):
12478         * m4/same.m4 (gl_SAME):
12479         * m4/save-cwd.m4 (gl_SAVE_CWD):
12480         * m4/savedir.m4 (gl_SAVEDIR):
12481         * m4/settime.m4 (gl_SETTIME):
12482         * m4/sha1.m4 (gl_SHA1):
12483         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
12484         * m4/stat-macros.m4 (gl_STAT_MACROS):
12485         * m4/stat-time.m4 (gl_STAT_TIME):
12486         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
12487         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
12488         * m4/strdup.m4 (gl_FUNC_STRDUP):
12489         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
12490         * m4/strndup.m4 (gl_FUNC_STRNDUP):
12491         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
12492         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
12493         * m4/time_r.m4 (gl_TIME_R):
12494         * m4/timespec.m4 (gl_TIMESPEC):
12495         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
12496         * m4/unlinkdir.m4 (gl_UNLINKDIR):
12497         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
12498         * m4/userspec.m4 (gl_USERSPEC):
12499         * m4/utimecmp.m4 (gl_UTIMECMP):
12500         * m4/utimens.m4 (gl_UTIMENS):
12501         * m4/xalloc.m4 (gl_XALLOC):
12502         * m4/xgetcwd.m4 (gl_XGETCWD):
12503         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
12504         * m4/xreadlink.m4 (gl_XREADLINK):
12505         * m4/xstrtod.m4 (gl_XSTRTOD):
12506         * m4/yesno.m4 (gl_YESNO):
12507         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
12508         to get the necessary .h files and whatnot.
12509
12510 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
12511             Bruno Haible  <bruno@clisp.org>
12512
12513         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
12514         /bin/sh understanding of '!' conditional negation.
12515
12516 2006-08-21  Jim Meyering  <jim@meyering.net>
12517
12518         * modules/openat (Depends-on): Really alphabetize.
12519
12520         * modules/acl (Depends-on): Add error and quote.
12521
12522         * check-module (find_included_lib_files): Add at-func.c to the
12523         ok-to-include-more-than-once white list.
12524
12525         * modules/openat (Depends-on): Add lstat.  Alphabetize.
12526
12527 2006-08-21  Bruno Haible  <bruno@clisp.org>
12528
12529         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
12530         Emit a pkgdata_DATA variable only if some snippets add contents to it.
12531         Reported by Martin Lambers <marlam@marlam.de>.
12532
12533 2006-08-21  Bruno Haible  <bruno@clisp.org>
12534
12535         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
12536         specify an installation location, don't emit a noinst_LIBRARIES or
12537         noinst_LTLIBRARIES assignment.
12538
12539 2006-08-21  Bruno Haible  <bruno@clisp.org>
12540
12541         BeOS portability.
12542         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
12543         BeOS has mbrtowc() but no <wctype.h>.
12544
12545 2006-08-21  Bruno Haible  <bruno@clisp.org>
12546
12547         BeOS portability.
12548         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
12549         exist.
12550
12551 2006-08-21  Bruno Haible  <bruno@clisp.org>
12552
12553         BeOS portability.
12554         * lib/mbchar.h: Include <wctype.h> only if it exists.
12555
12556 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12557
12558         Remove files that are no longer needed by their respective modules.
12559         * m4/obstack.m4: Remove.
12560         * m4/strerror_r.m4: Remove.
12561         * m4/uint32_t.m4: Remove.
12562         * m4/uintptr_t.m4: Remove.
12563         * m4/ullong_max.m4: Remove.
12564         * m4/xstrtoimax.m4: Remove.
12565         * m4/xstrtoumax.m4: Remove.
12566
12567         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
12568         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
12569         dependencies now capture this.
12570
12571         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
12572         Do not use AC_LIBSOURCES, since gnulib modules now do this.
12573         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
12574         * m4/human.m4 (gl_HUMAN): Likewise.
12575         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
12576         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
12577
12578         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
12579
12580         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
12581         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
12582         stdint.
12583         * m4/human.m4 (gl_HUMAN): Likewise.
12584         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
12585         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
12586         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
12587         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
12588         * m4/xstrtol (gl_XSTRTOL): Likewise.
12589
12590         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
12591         AC_TYPE_LONG_LONG_INT.
12592         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
12593         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
12594         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
12595         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
12596
12597         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
12598         on stdbool.
12599
12600         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
12601         (gl_PREREQ_XSTRTOUL): Remove.
12602
12603         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
12604
12605         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
12606         mode.
12607
12608 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12609
12610         Add and change modules to make it easier for coreutils to use
12611         gnulib-tool.
12612         * modules/backupfile (Files): Remove m4/d-ino.m4.
12613         (Depends-on): Add d-ino.
12614         * modules/cycle-check (Depends-on): Add stdint.
12615         (lib_SOURCES): Add cycle-check.h.
12616         * modules/d-ino: New module.
12617         * modules/d-type: New module.
12618         * modules/error (Files): Remove m4/strerror_r.m4.
12619         * modules/filemode (Files): Add m4/st_dm_mode.m4.
12620         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
12621         m4/inttypes_h.m4, m4/uintmax_t.m4.
12622         (Depends-on): Add stdint.
12623         (lib_SOURCES): Add fsusage.h.
12624         * modules/getcwd (Files): Remove d-ino.m4.
12625         (Depends-on): Add d-ino.
12626         * modules/getndelim2 (Depends-on): Add stdint.
12627         * modules/glob (Files): Remove m4/d-type.m4.
12628         (Depends-on): Add d-type.
12629         * modules/host-os: New module.
12630         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
12631         m4/inttypes_h.m4, m4/uintmax_t.m4.
12632         * Depends-on: Add stdint.
12633         (lib_SOURCES): Add human.h.
12634         * modules/inttostr (Files): Remove m4/intmax_t.m4,
12635         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
12636         m4/uintmax_t.m4, m4/ulonglong.m4.
12637         (Depends-on): Add stdint.
12638         (EXTRA_DIST): Add inttostr.h.
12639         * modules/lchmod: New module.
12640         * modules/link-follow: New module.
12641         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
12642         (Depends-on): Add lchmod.
12643         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
12644         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
12645         (Depends-on): Add stdint.
12646         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
12647         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
12648         (Depends-on): Add stdint.
12649         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
12650         * modules/perl: New module.
12651         * modules/regex (Depends-on): Add stdint.
12652         * modules/rmdir-errno: New module.
12653         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
12654         m4/intmax_t.m4.
12655         (Depends-on): Add stdint.
12656         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
12657         m4/uintmax_t.m4.
12658         (Depends-on): Add stdint.
12659         * modules/unlink-busy: New module.
12660         * modules/utimecmp (Depends-on): Add stdint.
12661         * modules/uptime: New module.
12662         * modules/winsz-ioctl: New module.
12663         * modules/winsz-termios: New module.
12664         * modules/xnanosleep (Depends-on): Add nanosleep.
12665         * modules/ullong_max: Remove.
12666         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
12667         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
12668         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
12669         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
12670         (Depends-on): Add inttypes.
12671         (lib_SOURCES): Add xstrtol.h.
12672         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
12673         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
12674         * MODULES.html.sh: Move 'assert' into the assert section.
12675         Move 'dummy' into the linking section.
12676         Remove ullong_max.
12677         Add section for compatibility checks for POSIX:2001 functions,
12678         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
12679         winsz-ioctl, and winsz-termios into it.
12680         Add lchmod.
12681         Add top-level Misc section and put host-os, perl, and uptime
12682         into it.
12683
12684 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12685
12686         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
12687         now assume the stdint module.  Do not include inttypes.h.
12688         * lib/fsusage.h: Likewise.
12689         * lib/getndelim2.c: Likewise.
12690         * lib/human.h: Likewise.
12691         * lib/inttostr.h: Likewise.
12692         * lib/obstack.c: Likewise.
12693         * lib/regex_internal.h: Likewise.
12694         * lib/tempname.c: Likewise.
12695         * lib/utimecmp.c: Likewise.
12696         * lib/xstrtol.h: Likewise.
12697
12698         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
12699
12700         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
12701         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
12702         * lib/xtime.h: Likewise.
12703
12704 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12705
12706         * modules/openat (Files): Add lib/fchmodat.c.
12707         Fixes problem reported by Jay Youngman.
12708
12709 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12710
12711         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
12712         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
12713
12714 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
12715             Bruno Haible  <bruno@clisp.org>
12716
12717         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
12718         and is a script that invokes bison. Tighten the code. Add comments.
12719
12720 2006-08-18  Jim Meyering  <jim@meyering.net>
12721
12722         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
12723         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
12724         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
12725         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
12726
12727 2006-08-18  Bruno Haible  <bruno@clisp.org>
12728
12729         * modules/bison-i18n: New file.
12730         * MODULES.html.sh (Internationalization functions): Add it.
12731
12732 2006-08-18  Bruno Haible  <bruno@clisp.org>
12733
12734         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
12735         sys/statvfs.h. When getmntinfo was found, check its declaration and
12736         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
12737
12738 2006-08-18  Bruno Haible  <bruno@clisp.org>
12739
12740         * m4/bison-i18n.m4: New file, from bison.
12741
12742 2006-08-18  Bruno Haible  <bruno@clisp.org>
12743
12744         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
12745         (ME_DUMMY): Treat "kernfs" as a dummy.
12746         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
12747
12748 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
12749
12750         Update from coreutils.
12751
12752         2006-08-15  Jim Meyering  <jim@meyering.net>
12753
12754         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
12755
12756         2006-01-17  Jim Meyering  <jim@meyering.net>
12757
12758         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
12759
12760         2006-01-11  Jim Meyering  <jim@meyering.net>
12761
12762         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
12763         Check for the lchmod function.
12764
12765 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
12766
12767         Update from coreutils.
12768
12769         * lib/__fpending.h: Add copyright notice.
12770         * lib/fprintftime.h: Likewise.
12771         * lib/savedir.c: Use (C) in copyright notice.
12772         * lib/savedir.h: Likewise.
12773
12774         2006-08-15  Jim Meyering  <jim@meyering.net>
12775
12776         * lib/at-func.c: New file, with the logic of all emulated at-functions.
12777         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
12778         in support of the EXPECTED_ERRNO macro.
12779         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
12780         definitions.  Instead, define the appropriate symbols and include
12781         "at-func.c".
12782         * lib/mkdirat.c (mkdirat): Likewise.
12783         * lib/fchmodat.c (fchmodat): Likewise.
12784         (ENOSYS): Remove definition.
12785         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
12786         it.  Don't include "unistd--.h" -- it wasn't ever used.
12787
12788         2006-01-17  Jim Meyering  <jim@meyering.net>
12789
12790         Rewrite fts.c not to change the current working directory,
12791         by using openat, fstatat, fdopendir, etc..
12792
12793         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
12794         (HAVE_OPENAT_SUPPORT): Define.
12795         [_LIBC] (fchdir): Don't undef or define; no longer used.
12796         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
12797         Now, this `function' always succeeds, and consumes its file descriptor
12798         parameter -- so callers must not close such FDs.  Update callers.
12799         (diropen_fd, opendirat, cwd_advance_fd): New functions.
12800         (diropen): Add parameter, SP.  Adjust all callers.
12801         Implement using diropen_fd, rather than open.
12802         (fts_open): Initialize new member, fts_cwd_fd.
12803         Remove fts_rft-setting code.
12804         (fts_close): Close fts_cwd_fd, if necessary.
12805         (__opendir2): Define in terms of opendir or opendirat,
12806         depending on whether the FST_NOCHDIR flag is set.
12807         (fts_build): Since fts_safe_changedir consumes its FD, and since
12808         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
12809         and close the dup'd file descriptor upon failure.
12810         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
12811         (fts_safe_changedir): Tweak semantics to reflect that this function
12812         now calls cwd_advance_fd and hence consumes its FD argument.
12813         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
12814         [struct FTS] (fts_rft): Remove now-unused member.
12815         [struct FTS] (fts_cycle.state): Improve comment.
12816
12817         * lib/openat.c (openat_needs_fchdir): New function.
12818         * lib/openat.h (openat_needs_fchdir): Declare it.
12819
12820 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
12821
12822         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
12823         Problem and fix reported by Pádraig Brady in
12824         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
12825
12826 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
12827
12828         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
12829
12830 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
12831
12832         * lib/memcoll.c (memcoll): Optimize for the common case where the
12833         arguments are bytewise equal.
12834
12835 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
12836
12837         * doc/regexprops-generic.texi: Add a copyright notice.
12838
12839 2006-08-15  Bruno Haible  <bruno@clisp.org>
12840
12841         * modules/tmpdir (License): Change to LGPL.
12842
12843 2006-08-15  Bruno Haible  <bruno@clisp.org>
12844
12845         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
12846         module.
12847
12848 2006-08-14  Simon Josefsson  <jas@extundo.com>
12849
12850         * config/srclist.txt: Add gnupload.
12851
12852 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
12853
12854         Change copyright notice from LGPL 2 to GPL 2, since that's the
12855         standard form used in the gnulib repository.
12856         * tests/test-lock.c: Likewise.
12857         * tests/test-stdint.c: Likewise.
12858         * tests/test-tls.c: Likewise.
12859
12860         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
12861         prelude-manager.  User shorter URLs for GNU projects, without '?'.
12862         Add copyright notice.
12863
12864         * check-module: Add copyright notice.  Output a copyright
12865         notice if "--version" is specified.
12866         * modules/COPYING: New file.
12867         * tests/test-getaddrinfo.c: Add copyright notice.
12868         * tests/test-verify.c: Likewise.
12869
12870 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
12871
12872         Change copyright notice from LGPL 2 to GPL 2, since that's the
12873         standard form used in the gnulib repository.
12874         * lib/lock.c: LGPL -> GPL.
12875         * lib/lock.h: Likewise.
12876         * lib/strnlen1.c: Likewise.
12877         * lib/strnlen1.h: Likewise.
12878         * lib/tls.c: Likewise.
12879         * lib/tls.h: Likewise.
12880         * lib/tmpdir.c: Likewise.
12881
12882         * lib/TODO: Remove; this belongs only in coreutils.
12883
12884 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
12885
12886         Add copyright notices to long-enough files that lack them, since
12887         otherwise the files aren't clearly free.  Use the same notice that
12888         getdate.texi already uses.
12889         * doc/alloca-opt.texi: Add copyright notice.
12890         * doc/alloca.texi: Likewise.
12891         * doc/ctime.texi: Likewise.
12892         * doc/functions.texi: Likewise.
12893         * doc/gcd.texi: Likewise.
12894         * doc/gnulib-tool.texi: Likewise.
12895         * doc/inet_ntoa.texi: Likewise.
12896         * doc/visibility.texi: Likewise.
12897
12898         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
12899         * doc/quote.texi: Add copyright notice.
12900
12901         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
12902         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
12903         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
12904         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
12905         is now obsolete, and give a pointer to the Sun list.
12906         Add copyright notice.
12907
12908 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
12909
12910         * config/srclistvars.sh: Add copyright notice.
12911
12912 2006-08-14  Eric Blake  <ebb9@byu.net>
12913
12914         Import the following change from libc:
12915
12916         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
12917
12918         Upstream bug 2997.
12919         * lib/misc/error.c: Add space between program name and message if file
12920         name is missing.
12921
12922 2006-08-12  Karl Berry  <karl@gnu.org>
12923
12924         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
12925         remove, these originate in gnulib now.
12926
12927 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12928
12929         * doc/Makefile (standards.info standards.html standards.dvi):
12930         Also depend on make-stds.texi.
12931
12932 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
12933
12934         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
12935         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
12936
12937         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
12938         in wchar_t.  Problem reported by Eric Blake.
12939
12940         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
12941         LEN is smaller than SIZE.  Suggested by Bruno Haible.
12942         Also, help the compiler to keep LEN in a register.
12943
12944 2006-08-11  Eric Blake  <ebb9@byu.net>
12945
12946         * users.txt: Sort.  Add tar.
12947
12948 2006-08-11  Bruno Haible  <bruno@clisp.org>
12949
12950         * users.txt: New file.
12951
12952 2006-08-11  Bruno Haible  <bruno@clisp.org>
12953
12954         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
12955         before <wchar.h>. Needed for OSF/1 and BSD/OS.
12956
12957 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
12958
12959         * modules/snprintf (Depends-on): Remove minmax.
12960         (Maintainer): Add self and Bruno.
12961
12962 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
12963
12964         * lib/.cppi-disable: Add snprintf.h, socket_.h.
12965         * lib/snprintf.c: Include <errno.h> and <limits.h>.
12966         (EOVERFLOW): Define if the system does not.
12967         Do not include "minmax.h"; it wasn't used.
12968         (snprintf): Don't assume size_t promotes to an unsigned type.
12969         Fix bug when generated string was too long for the buffer: the
12970         buffer's contents are supposed to be the initial prefix of the
12971         output.  Don't assume vasnprintf returns EOVERFLOW if the size
12972         exceeds INT_MAX; do the check ourselves.
12973
12974         Import the following changes from libc:
12975
12976         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
12977
12978         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
12979         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
12980         set wc to the byte which couldn't be converted.
12981         (re_string_reconstruct): Don't clear valid_raw_len before calling
12982         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
12983         tip_context using re_string_context_at.
12984
12985         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
12986
12987         * lib/posix/regex.h: g++ still cannot handled [restrict].
12988
12989         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
12990
12991         * lib/posix/regex.h: Remove special handling for VMS.
12992
12993 2006-08-10  Jim Meyering  <jim@meyering.net>
12994
12995         * modules/same-inode: New module.
12996         * modules/dev-ino: New module.
12997         * modules/cycle-check: Depend on these modules, rather than simply
12998         including their .h files.
12999         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
13000         required via m4/cycle-check.m4.
13001         * modules/same: Depend on new same-inode module, rather than
13002         including same-inode.h.
13003         * modules/chdir-safer: New file.
13004
13005         * modules/chown (Depends-on): Add stat-macros.
13006
13007 2006-08-10  Jim Meyering  <jim@meyering.net>
13008
13009         * m4/cycle-check.m4: New file.
13010         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
13011         * m4/dev-ino.m4, m4/same-inode.m4: New files.
13012
13013 2006-08-10  Eric Blake  <ebb9@byu.net>
13014
13015         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
13016         in from original proposal.
13017
13018 2006-08-10  Eric Blake  <ebb9@byu.net>
13019         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13020
13021         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
13022         namespace.
13023
13024 2006-08-10  Bruno Haible  <bruno@clisp.org>
13025
13026         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
13027         as well.
13028
13029 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
13030
13031         Sync from coreutils.
13032
13033         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
13034
13035         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
13036         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
13037
13038 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
13039
13040         * modules/restrict: Remove; no longer needed now that we assume
13041         Autoconf 2.59 or later.
13042         * MODULES.html.sh: Remove 'restrict'.
13043         * modules/argp (Depends-on): Remove 'restrict'.
13044         * modules/base64 (Depends-on): Likewise.
13045         * modules/gc (Depends-on): Likewise.
13046         * modules/getaddrinfo (Depends-on): Likewise.
13047         * modules/glob (Depends-on): Likewise.
13048         * modules/inet_ntop (Depends-on): Likewise.
13049         * modules/inet_pton (Depends-on): Likewise.
13050         * modules/memxor (Depends-on): Likewise.
13051         * modules/regex (Depends-on): Likewise.
13052         * modules/strtok_r (Depends-on): Likewise.
13053         * modules/time_r (Depends-on): Likewise.
13054
13055 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
13056
13057         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
13058         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
13059         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
13060         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
13061         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
13062         * m4/memxor.m4 (gl_MEMXOR): Likewise.
13063         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
13064         gl_C_RESTRICT replaced by AC_C_RESTRICT.
13065
13066         Merge from coreutils.
13067         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
13068         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
13069         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
13070         * m4/time_r.m4 (gl_TIME_R): Likewise.
13071
13072 2006-08-09  Karl Berry  <karl@gnu.org>
13073
13074         * config/srclist.txt: no more gettext-tools, per Bruno.
13075
13076 2006-08-08  Eric Blake  <ebb9@byu.net>
13077
13078         * modules/verror: New module.
13079         * MODULES.html.sh: Document it.
13080
13081 2006-08-08  Eric Blake  <ebb9@byu.net>
13082
13083         * lib/verror.h, lib/verror.c: New files.
13084
13085 2006-08-08  Eric Blake  <ebb9@byu.net>
13086
13087         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
13088         verror_at_line output complies with GNU Coding Standards even when
13089         file is NULL.
13090
13091 2006-08-07  Bruno Haible  <bruno@clisp.org>
13092
13093         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
13094         versions of AIX.
13095         Reported by Ralf Wildenhues.
13096
13097 2006-08-07  Bruno Haible  <bruno@clisp.org>
13098
13099         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
13100         in an AC_DEFUN. Needed so that the autoconf snippets can use
13101         AC_REQUIRE.
13102
13103 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13104
13105         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
13106         Initialize pkgdata_DATA.
13107         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
13108         overriding it.
13109
13110 2006-08-06  Eric Blake  <ebb9@byu.net>
13111
13112         * lib/error.h: Fold in some upstream changes from glibc.
13113         * lib/error.c: Likewise.
13114
13115 2006-08-04  Bruno Haible  <bruno@clisp.org>
13116
13117         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
13118         Make the mostlyclean-local rule depend on mostlyclean-generic.
13119         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
13120
13121 2006-07-31  Bruno Haible  <bruno@clisp.org>
13122
13123         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
13124         <stdlib.h>, <string.h>.
13125
13126 2006-07-30  Bruno Haible  <bruno@clisp.org>
13127
13128         * modules/readlink (License): Change to LGPL.
13129
13130 2006-07-30  Bruno Haible  <bruno@clisp.org>
13131
13132         * modules/javaversion (Makefile.am): Distribute javaversion.java and
13133         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
13134         set PKGDATADIR to point to it.
13135
13136 2006-07-30  Bruno Haible  <bruno@clisp.org>
13137
13138         * modules/csharpexec (configure.ac): Comment out macro invocation.
13139         * modules/javaexec (configure.ac): Likewise.
13140         * modules/javacomp-script (configure.ac): Likewise.
13141
13142         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
13143
13144 2006-07-30  Bruno Haible  <bruno@clisp.org>
13145
13146         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
13147         linked-list.
13148
13149 2006-07-30  Bruno Haible  <bruno@clisp.org>
13150
13151         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
13152
13153 2006-07-30  Bruno Haible  <bruno@clisp.org>
13154
13155         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
13156         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
13157         get removed.
13158
13159 2006-07-29  Bruno Haible  <bruno@clisp.org>
13160
13161         Make it possible for gnulib-tool to work with locally modified or
13162         augmented gnulib repositories.
13163         * gnulib-tool (func_usage): Document --local-dir option.
13164         (local_gnulib_dir): New variable.
13165         Handle --local-dir option.
13166         (func_lookup_file): New function.
13167         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
13168         (func_get_description, func_get_filelist, func_get_description,
13169         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
13170         func_get_automake_snippet, func_get_include_directive,
13171         func_get_license, func_get_maintainer): Use func_lookup_file.
13172         (func_import, func_create_testdir): Use func_lookup_file.
13173
13174 2006-07-29  Bruno Haible  <bruno@clisp.org>
13175
13176         * modules/setenv (Depends-on): Add unistd.
13177
13178 2006-07-29  Bruno Haible  <bruno@clisp.org>
13179
13180         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
13181
13182 2006-07-29  Bruno Haible  <bruno@clisp.org>
13183
13184         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
13185
13186 2006-07-29  Bruno Haible  <bruno@clisp.org>
13187
13188         * gnulib-tool (import, update): If there is no Makefile.am, look at
13189         aclocal.m4, instead of bailing out.
13190
13191 2006-07-29  Bruno Haible  <bruno@clisp.org>
13192
13193         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
13194         Categorize the options by when they are useful.
13195
13196 2006-07-29  Bruno Haible  <bruno@clisp.org>
13197
13198         * gnulib-tool (func_usage): Document option --no-libtool.
13199         Handle option --no-libtool.
13200         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
13201         for changed semantics of $libtool variable.
13202         (func_import): Likewise. If libtool is not used, show this through
13203         an option --no-libtool.
13204         (func_create_testdir): Update.
13205
13206 2006-07-29  Bruno Haible  <bruno@clisp.org>
13207
13208         * gnulib-tool (func_import): Extend error message about missing
13209         --doc-base.
13210
13211 2006-07-29  Bruno Haible  <bruno@clisp.org>
13212
13213         * gnulib-tool (func_import): Don't create the $docbase directory if
13214         there is no file to store there.
13215
13216 2006-07-29  Bruno Haible  <bruno@clisp.org>
13217
13218         * gnulib-tool (autoconf_minversion): If a --dir option is given and
13219         relevant, look for configure.ac there, not in the current directory.
13220         Also use a simple search for AC_PREREQ, not "autoconf --trace".
13221
13222 2006-07-29  Bruno Haible  <bruno@clisp.org>
13223
13224         * gnulib-tool (SORT): New variable.
13225         (func_usage): Undocument --assume-autoconf option.
13226         Remove --assume-autoconf option handling.
13227         (autoconf_minversion): Determine from the contents of configure.ac.
13228         (func_import): Remove autoconf_minversion handling.
13229         Suggested by Eric Blake.
13230
13231 2006-07-29  Bruno Haible  <bruno@clisp.org>
13232
13233         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
13234
13235 2006-07-29  Bruno Haible  <bruno@clisp.org>
13236
13237         * config/srclist.txt (*setenv.[ch]): Remove rules.
13238
13239 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13240
13241         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
13242
13243 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13244
13245         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
13246         arpa/inet.h.
13247
13248 2006-07-28  Simon Josefsson  <jas@extundo.com>
13249
13250         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
13251         * modules/inet_pton (Depends-on): Likewise.
13252
13253 2006-07-28  Simon Josefsson  <jas@extundo.com>
13254
13255         * m4/netinet_in_h.m4: New file.
13256
13257 2006-07-28  Simon Josefsson  <jas@extundo.com>
13258
13259         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
13260         #include's.
13261
13262 2006-07-28  Simon Josefsson  <jas@extundo.com>
13263
13264         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
13265         #include's.
13266
13267 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
13268
13269         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
13270         setgid on directories only if they set these bits.
13271         * lib/modechange.h: Remove obsolete comment about masks.
13272
13273 2006-07-28  Eric Blake  <ebb9@byu.net>
13274
13275         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
13276         macro expansion.
13277
13278 2006-07-28  Bruno Haible  <bruno@clisp.org>
13279
13280         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
13281
13282 2006-07-28  Bruno Haible  <bruno@clisp.org>
13283
13284         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
13285
13286 2006-07-28  Bruno Haible  <bruno@clisp.org>
13287
13288         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
13289         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
13290         Define fallbacks.
13291         Avoids link error on FreeBSD 4.x.
13292         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
13293
13294         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
13295         encoding.
13296         * lib/mbswidth.c (iswcntrl): Likewise.
13297
13298 2006-07-27  Bruno Haible  <bruno@clisp.org>
13299
13300         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
13301         test.
13302
13303 2006-07-27  Bruno Haible  <bruno@clisp.org>
13304
13305         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
13306         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
13307         defined.
13308
13309 2006-07-26  Eric Blake  <ebb9@byu.net>
13310
13311         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
13312
13313 2006-07-26  Eric Blake  <ebb9@byu.net>
13314
13315         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
13316         like mingw that lack mkstemp.
13317         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
13318         avoid compilation warning on mingw.
13319
13320 2006-07-26  Bruno Haible  <bruno@clisp.org>
13321
13322         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
13323         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
13324         INT_FAST*_MIN, INTPTR_MIN.
13325
13326 2006-07-25  Bruno Haible  <bruno@clisp.org>
13327
13328         * modules/version-etc (Depends-on): Add stdarg.
13329
13330 2006-07-25  Bruno Haible  <bruno@clisp.org>
13331
13332         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
13333         complex commands.
13334
13335 2006-07-25  Bruno Haible  <bruno@clisp.org>
13336
13337         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
13338         defined in <stdarg.h> or config.h.
13339
13340 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
13341
13342         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
13343         (gl_STDIO_SAFER): Remove.
13344
13345 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
13346
13347         * MODULES.html.sh (File stream based Input/Output):
13348         Add fopen-safer, tmpfile-safer; remove stdio-safer.
13349         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
13350         * modules/fopen-safer, modules/tmpfile-safer: New files.
13351         * modules/stdio-safer: Remove.
13352
13353 2006-07-24  Bruno Haible  <bruno@clisp.org>
13354
13355         * modules/tmpdir: New file.
13356         * MODULES.html.sh (File system functions): Add it.
13357
13358 2006-07-24  Bruno Haible  <bruno@clisp.org>
13359
13360         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
13361         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
13362
13363 2006-07-24  Bruno Haible  <bruno@clisp.org>
13364
13365         * modules/clean-temp: New file.
13366
13367 2006-07-24  Bruno Haible  <bruno@clisp.org>
13368
13369         * m4/tmpdir.m4: New file, from GNU gettext.
13370
13371 2006-07-24  Bruno Haible  <bruno@clisp.org>
13372
13373         * lib/tmpdir.h: New file, from GNU gettext.
13374         * lib/tmpdir.c: New file, from GNU gettext.
13375
13376 2006-07-24  Bruno Haible  <bruno@clisp.org>
13377
13378         * lib/clean-temp.h: New file, from GNU gettext.
13379         * lib/clean-temp.c: New file, from GNU gettext.
13380
13381 2006-07-23  Eric Blake  <ebb9@byu.net>
13382
13383         * modules/stdio-safer (Files): Add tmpfile-safer.c.
13384         (Depends-on): Add binary-io.
13385
13386 2006-07-23  Eric Blake  <ebb9@byu.net>
13387
13388         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
13389
13390 2006-07-23  Eric Blake  <ebb9@byu.net>
13391
13392         * lib/tmpfile-safer.c: New file.
13393         * lib/stdio-safer.h (fopen_safer): Add prototype.
13394         * lib/stdio--.h (tmpfile): Make safer.
13395
13396 2006-07-23  Bruno Haible  <bruno@clisp.org>
13397
13398         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
13399         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
13400         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
13401         gl_linked_remove_at): Use it.
13402
13403 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13404         and Simon Josefsson <jas@extundo.com>
13405
13406         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
13407
13408         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
13409
13410 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
13411
13412         * modules/close-stream: New file.
13413         * modules/closeout (Description): Make it clear that it exits
13414         with a diagnostic on error.
13415         (Depends-on): Add close-stream.  Remove fpending, stdbool.
13416         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
13417
13418 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
13419
13420         * m4/close-stream.m4: New file.
13421
13422 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
13423
13424         * lib/close-stream.c, lib/close-stream.h: New files.
13425
13426 2006-07-22  Bruno Haible  <bruno@clisp.org>
13427
13428         Merge from GNU gettext 0.15.
13429
13430         2006-05-01  Bruno Haible  <bruno@clisp.org>
13431
13432                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
13433
13434         2006-07-22  Bruno Haible  <bruno@clisp.org>
13435
13436                 * modules/javaversion: New file.
13437                 * MODULES.html.sh (Java): Add javaversion.
13438
13439         2006-03-12  Bruno Haible  <bruno@clisp.org>
13440
13441                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
13442
13443         2005-12-04  Bruno Haible  <bruno@clisp.org>
13444
13445                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
13446                 (untested).
13447
13448         2006-06-21  Bruno Haible  <bruno@clisp.org>
13449
13450                 Avoid warnings from recent versions of mcs.
13451                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
13452                 -o, -L, -r any more. Use options documented since mcs-1.0
13453                 instead. Similarly for -g.
13454
13455         2005-12-04  Bruno Haible  <bruno@clisp.org>
13456
13457                 * build-aux/csharpcomp.sh.in: Suffix for resources is
13458                 .resources, not .resource.
13459
13460         2005-07-09  Bruno Haible  <bruno@clisp.org>
13461
13462                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
13463                 add a .dll suffix.
13464                 Reported by Mark Junker <mjscod@gmx.de>.
13465
13466         2006-07-22  Bruno Haible  <bruno@clisp.org>
13467
13468                 * modules/gettext: Upgrade to gettext-0.15.
13469                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
13470                 m4/visibility.m4.
13471                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
13472
13473 2006-07-22  Bruno Haible  <bruno@clisp.org>
13474
13475         Merge from GNU gettext 0.15.
13476
13477         2006-03-25  Bruno Haible  <bruno@clisp.org>
13478
13479                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
13480
13481         2006-07-21  Bruno Haible  <bruno@clisp.org>
13482
13483                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
13484                 "1.1".
13485
13486         2006-05-09  Bruno Haible  <bruno@clisp.org>
13487
13488                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
13489                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
13490                 for the conftestver execution.
13491
13492         2006-05-01  Bruno Haible  <bruno@clisp.org>
13493
13494                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
13495                 optional target-version argument. Verify that the compiler
13496                 groks source of the specified source-version, or add -source
13497                 option as necessary. Verify that the compiler produces
13498                 bytecode in the specified target-version, or add -target and
13499                 -source options as necessary. Make the result of the test
13500                 available as variable CONF_JAVAC. Also log error output in
13501                 config.log.
13502
13503         2006-03-11  Bruno Haible  <bruno@clisp.org>
13504
13505                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
13506
13507         2006-05-09  Bruno Haible  <bruno@clisp.org>
13508
13509                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
13510                 CLASSPATH_SEPARATOR to a semicolon.
13511
13512         2006-03-12  Bruno Haible  <bruno@clisp.org>
13513
13514                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
13515                 available as variable CONF_JAVA, for subsequent autoconf
13516                 tests. Also log error output in config.log.
13517
13518         2006-07-19  Bruno Haible  <bruno@clisp.org>
13519
13520                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
13521                 that getline works on glibc2 systems. Needed to avoid trouble
13522                 in relocatable.c.
13523                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
13524
13525         2005-12-04  Bruno Haible  <bruno@clisp.org>
13526
13527                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
13528                 launcher (untested).
13529
13530         2005-12-04  Bruno Haible  <bruno@clisp.org>
13531
13532                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
13533
13534         2006-07-22  Bruno Haible  <bruno@clisp.org>
13535
13536                 * gettext.m4: Update from GNU gettext-0.15.
13537                 * nls.m4: Likewise.
13538                 * po.m4: Likewise.
13539                 * inttypes-pri.m4: Likewise.
13540                 * inttypes-h.m4: Renamed from inttypes.m4.
13541                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
13542
13543 2006-07-22  Bruno Haible  <bruno@clisp.org>
13544
13545         Merge from GNU gettext 0.15.
13546
13547         2005-07-05  Bruno Haible  <bruno@clisp.org>
13548
13549                 * printf-args.c (printf_fetchargs): Work around broken
13550                 definition of wint_t on mingw.
13551
13552         2005-02-12  Bruno Haible  <bruno@clisp.org>
13553
13554                 * xallocsa.h: Add extern "C" for C++.
13555
13556         2006-05-17  Bruno Haible  <bruno@clisp.org>
13557
13558                 Cygwin portability.
13559                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
13560
13561         2006-04-30  Bruno Haible  <bruno@clisp.org>
13562
13563                 * progreloc.c: Include <mach-o/dyld.h> if available.
13564                 (find_executable): Use _NSGetExecutablePath when possible.
13565
13566         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
13567
13568                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
13569                 function.
13570
13571         2005-12-29  Bruno Haible  <bruno@clisp.org>
13572
13573                 * progreloc.c (set_program_name_and_installdir): Fix
13574                 compilation error.
13575
13576         2005-12-04  Bruno Haible  <bruno@clisp.org>
13577
13578                 Cygwin portability.
13579                 * progreloc.c: Include <windows.h> also on Cygwin.
13580                 (find_executable): Add support for Cygwin.
13581                 (set_program_name_and_installdir): Handle also platforms with
13582                 nonempty EXEEXT.
13583
13584         2006-07-11  Bruno Haible  <bruno@clisp.org>
13585
13586                 * javacomp.c: Fix a comment.
13587                 Reported by Jim Meyering.
13588
13589         2006-04-30  Bruno Haible  <bruno@clisp.org>
13590
13591                 * javacomp.h (compile_java_class): Add source_version,
13592                 target_version arguments.
13593                 * javacomp.c: Rewritten to choose only a compiler that
13594                 respects the specified source_version and target_version.
13595
13596         2006-06-27  Bruno Haible  <bruno@clisp.org>
13597
13598                 Assume correct S_ISDIR macro.
13599                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
13600
13601         2006-07-22  Bruno Haible  <bruno@clisp.org>
13602
13603                 * javaversion.h: New file, from GNU gettext.
13604                 * javaversion.c: New file, from GNU gettext.
13605                 * javaversion.java: New file, from GNU gettext.
13606                 * javaversion.class: New file, from GNU gettext.
13607
13608         2006-05-17  Bruno Haible  <bruno@clisp.org>
13609
13610                 Cygwin portability.
13611                 * javaexec.c (execute_java_class): Test for jview program
13612                 also on Cygwin.
13613
13614         2006-04-09  Bruno Haible  <bruno@clisp.org>
13615
13616                 * fatal-signal.c: Don't include string.h.
13617                 (at_fatal_signal): Use a copying loop instead of memcpy.
13618
13619         2005-12-04  Bruno Haible  <bruno@clisp.org>
13620
13621                 * csharpexec.c: Add support for 'clix' launcher (untested).
13622                 (execute_csharp_using_sscli): New function.
13623                 (execute_csharp_program): Call it.
13624
13625         2006-06-21  Bruno Haible  <bruno@clisp.org>
13626
13627                 Avoid warnings from recent versions of mcs.
13628                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
13629                 -o, -L, -r any more. Use options documented since mcs-1.0
13630                 instead. Similarly for -g.
13631
13632         2005-07-09  Bruno Haible  <bruno@clisp.org>
13633
13634                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
13635                 add a .dll suffix.
13636                 Reported by Mark Junker <mjscod@gmx.de>.
13637
13638         2006-06-17  Bruno Haible  <bruno@clisp.org>
13639
13640                 * config.charset: Update for NetBSD 3.0.
13641
13642         2006-05-17  Bruno Haible  <bruno@clisp.org>
13643
13644                 Cygwin portability.
13645                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
13646
13647         2006-05-16  Bruno Haible  <bruno@clisp.org>
13648
13649                 * localcharset.c [CYGWIN]: Include <windows.h>.
13650                 (get_charset_aliases): For Cygwin, return the same CPxxx
13651                 aliases list as under WIN32.
13652                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
13653                 the environment variables. Fall back to GetACP().
13654
13655         2006-04-05  Bruno Haible  <bruno@clisp.org>
13656
13657                 * config.charset: Update Juan Manuel Guerrero's address.
13658
13659         2005-02-12  Bruno Haible  <bruno@clisp.org>
13660
13661                 * allocsa.h: Add extern "C" for C++.
13662
13663         2005-02-10  Bruno Haible  <bruno@clisp.org>
13664
13665                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
13666                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
13667
13668         2006-07-22  Bruno Haible  <bruno@clisp.org>
13669
13670                 * gettext.h: Update to GNU gettext-0.15.
13671
13672 2006-07-22  Bruno Haible  <bruno@clisp.org>
13673
13674         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
13675         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
13676         lib-prefix.m4, longdouble.m4, ssize_t.m4.
13677
13678 2006-07-21  Eric Blake  <ebb9@byu.net>
13679
13680         * modules/stdlib-safer: New file.
13681         * MODULES.html.sh (File stream based Input/Output): Add
13682         stdlib-safer.
13683
13684 2006-07-21  Eric Blake  <ebb9@byu.net>
13685
13686         * lib/stdlib-safer.h: New file from coreutils, required by
13687         stdlib--.h.
13688
13689 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
13690
13691         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
13692
13693 2006-07-20  Bruno Haible  <bruno@clisp.org>
13694
13695         * gnulib-tool: Recognize new option --assume-autoconf.
13696         (autoconf_minversion): New variable.
13697         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
13698
13699 2006-07-20  Bruno Haible  <bruno@clisp.org>
13700
13701         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
13702
13703 2006-07-19  Derek R. Price  <derek@ximbiot.com>
13704
13705         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
13706         Reindent and repaginate.
13707
13708 2006-07-19  Derek Price  <derek@ximbiot.com>
13709
13710         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
13711         Correct grammar.
13712
13713 2006-07-17  Bruno Haible  <bruno@clisp.org>
13714
13715         * modules/list: New file.
13716         * modules/array-list: New file.
13717         * modules/carray-list, modules/carray-list-tests: New files.
13718         * modules/linked-list, modules/linked-list-tests: New files.
13719         * modules/avltree-list, modules/avltree-list-tests: New files.
13720         * modules/rbtree-list, modules/rbtree-list-tests: New files.
13721         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
13722         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
13723         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
13724         * modules/oset: New file.
13725         * modules/array-oset: New file.
13726         * modules/avltree-oset, modules/avltree-oset-tests: New files.
13727         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
13728         * tests/test-carray_list.c: New file.
13729         * tests/test-linked_list.c: New file.
13730         * tests/test-avltree_list.c: New file.
13731         * tests/test-rbtree_list.c: New file.
13732         * tests/test-linkedhash_list.c: New file.
13733         * tests/test-avltreehash_list.c: New file.
13734         * tests/test-rbtreehash_list.c: New file.
13735         * tests/test-avltree_oset.c: New file.
13736         * tests/test-rbtree_oset.c: New file.
13737         * MODULES.html.sh (Container data structures): New section.
13738
13739 2006-07-17  Bruno Haible  <bruno@clisp.org>
13740
13741         * m4/gl_list.m4: New file.
13742
13743 2006-07-17  Bruno Haible  <bruno@clisp.org>
13744
13745         * lib/gl_list.h: New file.
13746         * lib/gl_list.c: New file.
13747         * lib/gl_array_list.h: New file.
13748         * lib/gl_array_list.c: New file.
13749         * lib/gl_carray_list.h: New file.
13750         * lib/gl_carray_list.c: New file.
13751         * lib/gl_linked_list.h: New file.
13752         * lib/gl_linked_list.c: New file.
13753         * lib/gl_anylinked_list1.h: New file.
13754         * lib/gl_anylinked_list2.h: New file.
13755         * lib/gl_avltree_list.h: New file.
13756         * lib/gl_avltree_list.c: New file.
13757         * lib/gl_anyavltree_list1.h: New file.
13758         * lib/gl_anyavltree_list2.h: New file.
13759         * lib/gl_rbtree_list.h: New file.
13760         * lib/gl_rbtree_list.c: New file.
13761         * lib/gl_anyrbtree_list1.h: New file.
13762         * lib/gl_anyrbtree_list2.h: New file.
13763         * lib/gl_anytree_list1.h: New file.
13764         * lib/gl_anytree_list2.h: New file.
13765         * lib/gl_linkedhash_list.h: New file.
13766         * lib/gl_linkedhash_list.c: New file.
13767         * lib/gl_anyhash_list1.h: New file.
13768         * lib/gl_anyhash_list2.h: New file.
13769         * lib/gl_avltreehash_list.h: New file.
13770         * lib/gl_avltreehash_list.c: New file.
13771         * lib/gl_rbtreehash_list.h: New file.
13772         * lib/gl_rbtreehash_list.c: New file.
13773         * lib/gl_anytreehash_list1.h: New file.
13774         * lib/gl_anytreehash_list2.h: New file.
13775
13776         * lib/gl_oset.h: New file.
13777         * lib/gl_oset.c: New file.
13778         * lib/gl_array_oset.h: New file.
13779         * lib/gl_array_oset.c: New file.
13780         * lib/gl_avltree_oset.h: New file.
13781         * lib/gl_avltree_oset.c: New file.
13782         * lib/gl_rbtree_oset.h: New file.
13783         * lib/gl_rbtree_oset.c: New file.
13784         * lib/gl_anytree_oset.h: New file.
13785
13786 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
13787
13788         * m4/mkancesdirs.m4: New file.
13789         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
13790         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
13791         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
13792         it.
13793
13794 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
13795
13796         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
13797         * lib/mkancesdirs.h: New files.
13798         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
13799         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
13800         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
13801         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
13802         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
13803         callers changed.  Revamp internals significantly, by not
13804         attempting to create directories that are temporarily more
13805         permissive than the final results.  Do not attempt to use
13806         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
13807         This removes some race conditions, fixes some bugs, and simplifies
13808         things.  Use new dirchownmod function to do owner and mode changes.
13809         * lib/mkdir-p.h: Likewise.
13810         * lib/modechange.c (octal_to_mode): New function.
13811         (struct mode_change): New member mentioned.
13812         (make_node_op_equals): New arg mentioned.  All callers changed.
13813         (mode_compile): Keep track of which mode bits the user has explicitly
13814         mentioned.
13815         (mode_adjust): New arg DIR, so that we implement the X op correctly.
13816         New arg PMODE_BITS, to keep track of which mode bits the user
13817         mentioned; it treats S_ISUID and S_ISGID speciall.
13818         All callers changed.
13819         * lib/modechange.h: Likewise.
13820
13821 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
13822
13823         * MODULES.html.sh: Add mkancestors.
13824         * modules/mkancesdirs: New module.
13825         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
13826         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
13827         The chdir-safer and afs files are now orphans; I'll remove them
13828         unless someone speaks up.
13829         Add lib/dirchownmod.c, lib/dirchownmod.h.
13830         (Depends-on): Remove alloca, chown, save-cwd, dirname.
13831         Add lchown, mkancesdirs.
13832         (Maintainer): Add self.
13833
13834 2006-07-15  Karl Berry  <karl@gnu.org>
13835
13836         * gnulib-tool: help message wording/arrangement.
13837
13838 2006-07-14  Simon Josefsson  <jas@extundo.com>
13839
13840         * doc/gnulib.texi (Libtool and Windows): New section.
13841
13842 2006-07-12  Simon Josefsson  <jas@extundo.com>
13843
13844         * modules/gendocs (License): Fix license, approved by Karl.
13845
13846 2006-07-12  Eric Blake  <ebb9@byu.net>
13847
13848         * MODULES.html.sh: Add gendocs.
13849
13850 2006-07-11  Eric Blake  <ebb9@byu.net>
13851
13852         * modules/fdl: New module, to install doc/fdl.texi.
13853         * MODULES.html.sh: Add new section for documentation modules.
13854         * gnulib-tool: Avoid space-tab.
13855         (--doc-base): New option, to manage files from doc.
13856
13857 2006-07-11  Eric Blake  <ebb9@byu.net>
13858
13859         * m4/absolute-header.m4: Fix comments to match recent change.
13860
13861 2006-07-11  Eric Blake  <ebb9@byu.net>
13862
13863         * gnulib-tool: List --doc-base before --tests-base.
13864
13865 2006-07-11  Derek R. Price  <derek@ximbiot.com>
13866
13867         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
13868
13869 2006-07-11  Bruno Haible  <bruno@clisp.org>
13870
13871         * README: Mention where to put documentation.
13872
13873 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13874
13875         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
13876
13877 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
13878
13879         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
13880         to stdint.m4.
13881
13882 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
13883
13884         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
13885         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
13886         "no/such/file/stdint.h" when there is no such file, so that
13887         the resulting C code can be parsed by dodgy compilers.
13888         Problems reported by Bob Proulx.
13889
13890 2006-07-10  Derek R. Price  <derek@ximbiot.com>
13891
13892         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
13893         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
13894         macros into the GNU _D_EXACT_NAMLEN.
13895         * lib/savedir.c:  Likewise.
13896         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
13897
13898 2006-07-10  Derek R. Price  <derek@ximbiot.com>
13899         and Paul Eggert  <eggert@cs.ucla.edu>
13900
13901         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
13902         * m4/savedir.m4:
13903         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
13904         macros into the GNU _D_EXACT_NAMLEN.
13905
13906 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
13907
13908         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
13909         around the absolute name, to work around a problem with the HP-UX
13910         11.23 native C compiler, reported by Bob Proulx.
13911
13912 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
13913
13914         * doc/maintain.texi, make-stds.texi: Sync from
13915         <http://savannah.gnu.org/projects/gnustandards>.
13916
13917 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
13918
13919         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
13920
13921 2006-07-09  Jim Meyering  <jim@meyering.net>
13922
13923         * m4/glob.m4: Remove a doubled word in a comment.
13924
13925 2006-07-09  Jim Meyering  <jim@meyering.net>
13926
13927         * lib/argp-pv.c: Remove a doubled word in a comment.
13928         * lib/check-version.c (check_version): Likewise.
13929         * lib/javacomp.c (compile_java_class): Likewise.
13930
13931 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
13932
13933         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
13934         for the benefit of people using Autoconf 2.60.  If you want to
13935         support older Autoconf versions you can copy m4/onceonly_2_57.m4
13936         (or m4/onceonly.m4, if pre-2.57) manually.
13937
13938 2006-07-08  Jim Meyering  <jim@meyering.net>
13939
13940         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
13941         comment.
13942         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
13943         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
13944         comment.
13945
13946 2006-07-08  Jim Meyering  <jim@meyering.net>
13947
13948         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
13949
13950 2006-07-07  Simon Josefsson  <jas@extundo.com>
13951
13952         * tests/test-crc.c: Change expected crc value, the test vector
13953         were probably computed using the old broken crc.c?
13954
13955 2006-07-06  Simon Josefsson  <jas@extundo.com>
13956
13957         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
13958         now the canonical place for the M4 file).
13959
13960         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
13961         from the sys_socket dependency now.
13962
13963         * modules/inet_pton (Files): Ditto.
13964
13965         * modules/inet_ntop (Files): Ditto.
13966
13967 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
13968
13969         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
13970         not gl_PREREQ_GETUSERSHELL.
13971
13972 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13973
13974         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
13975         with only one argument, for Autoconf 2.60.
13976         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
13977         expand to nothing, so add a shell command to avoid syntax error.
13978         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
13979
13980 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13981
13982         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
13983
13984 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
13985
13986         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
13987         no longer needed.  Check for isblank decl.
13988         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
13989         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
13990         of existence.
13991
13992 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
13993
13994         * lib/getloadavg.c: Use __VMS, not VMS.
13995         * lib/getopt.c: Likewise.
13996         * lib/getpagesize.h: Likewise.
13997         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
13998         and probably does not work.
13999
14000 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
14001
14002         * lib/.cppi-disable: Add wcwidth.
14003         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
14004         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
14005         (ISGRAPH): Remove.  All uses changed to isgraph.
14006         (FOLD) [!defined _LIBC]: Remove special case.
14007         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
14008         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
14009         HAVE_ISBLANK.
14010         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
14011         case.
14012
14013 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
14014
14015         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
14016         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
14017         brackets.  Other minor changes to suppress some compiler
14018         warnings.
14019
14020 2006-07-06  Derek R. Price  <derek@ximbiot.com>
14021         and Paul Eggert  <eggert@cs.ucla.edu>
14022
14023         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
14024         of invoking obsolescent AC_HEADER_DIRENT macro.
14025         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
14026         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
14027         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
14028         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
14029         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
14030         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
14031         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
14032         * m4/readdir.m4: Remove; no longer needed.
14033
14034 2006-07-06  Derek R. Price  <derek@ximbiot.com>
14035         and Paul Eggert  <eggert@cs.ucla.edu>
14036
14037         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
14038         Don't worry about this obsolete case any more.
14039         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
14040         directories.
14041         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
14042         worry about this obsolete case any more.
14043         * lib/fts.c: Likewise.
14044         * lib/getcwd.c: Likewise.
14045         * lib/glob.h: Likewise.
14046         * lib/savedir.c: Likewise.
14047
14048 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
14049
14050         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
14051         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
14052         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
14053         needed.
14054         All uses removed.
14055         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
14056         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
14057         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
14058         needed.
14059         * m4/getdate.m4 (gl_GETDATE): Likewise.
14060         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
14061         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
14062         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
14063         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
14064         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
14065         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
14066         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
14067         needed.
14068
14069 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
14070
14071         * lib/memcasecmp.c: Include <limits.h>.
14072         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
14073         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
14074         Don't assume isdigit succeeds only on '0' through '9'.
14075
14076 2006-07-05  Eric Blake  <ebb9@byu.net>
14077
14078         * modules/getaddrinfo (Depends-on): Add snprintf.
14079
14080 2006-07-05  Eric Blake  <ebb9@byu.net>
14081
14082         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
14083         to avoid 'header present but could not be compiled' on cygwin.
14084
14085 2006-07-05  Eric Blake  <ebb9@byu.net>
14086
14087         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
14088         missing from netdb.h.
14089         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
14090
14091 2006-07-05  Derek R. Price  <derek@ximbiot.com>
14092
14093         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
14094         no longer needed.
14095         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
14096         * m4/getdate.m4 (gl_GETDATE): Likewise.
14097         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
14098         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
14099         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
14100         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
14101         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
14102
14103 2006-07-05  Derek R. Price  <derek@ximbiot.com>
14104
14105         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
14106         All uses of is_space replaced by isspace.
14107         * lib/exit.h: Don't talk about STDC_HEADERS.
14108         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
14109         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
14110         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
14111         replaced by isprint etc.
14112         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
14113         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
14114         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
14115         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
14116         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
14117         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
14118
14119 2006-07-05  Bruno Haible  <bruno@clisp.org>
14120
14121         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
14122         the function exists, before testing against AIX.
14123         Reported by Martin Lambers <marlam@marlam.de>.
14124
14125 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
14126
14127         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
14128         From Mark D. Baushke.
14129
14130 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
14131
14132         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
14133         to the absolute name, not just one, to bypass Sun C 5.8's
14134         "warning: #include of /usr/include/... may be non-portable".
14135
14136 2006-07-04  Eric Blake  <ebb9@byu.net>
14137
14138         * modules/dirname-tests: New test module.
14139         * tests/test-dirname.c: New file, replacing dirname.c
14140         TEST_DIRNAME section that was recently deleted.
14141
14142 2006-07-04  Bruno Haible  <bruno@clisp.org>
14143
14144         Assume ANSI C header files and <ctype.h> functions.
14145         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
14146         (mbsnwidth): Use isprint, iscntrl instead.
14147
14148 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
14149
14150         Merge from coreutils.
14151         * MODULES.html.sh: Add xstrtold.
14152         * modules/xstrtold: New file.
14153         * modules/cycle-check (Files): Add lib/same-inode.h.
14154         * modules/dirname (Files): Add m4/double-slash-root.m4.
14155         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
14156         * modules/mkdir-p (Files): Add lib/same-inode.h.
14157         * modules/same (Files): Add lib/same-inode.h.
14158
14159 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
14160
14161         * m4/absolute-header.m4: Renamed from full-header-path.m4.
14162         This is to keep the terminology clean; POSIX talks about
14163         "absolute pathnames", not "full pathnames", but the GNU
14164         Coding Standards say to use "path" for something else;
14165         so use "absolute" to keep both sides happy.
14166         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
14167         Set gl_absolute_header, not gl_full_header_path.
14168         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
14169         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
14170         All uses changed.
14171
14172         Merge from coreutils.
14173
14174         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
14175
14176         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
14177         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
14178         want to require the building of c-strtod.o.
14179         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
14180         needs -lm directly.
14181         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
14182
14183         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
14184
14185         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
14186         --as-needed option if available.  Problem reported by Albert Chin in
14187         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
14188         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
14189         cc merely issues a bunch of annoying warnings for --as-needed
14190         (this problem was reported by Bob Proulx).  Also, try linking with
14191         -lm to detect a bug in binutils 2.16 (this problem was reported
14192         by Ralf Wildenhues).
14193
14194         2006-06-18  Jim Meyering  <jim@meyering.net>
14195
14196         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
14197         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
14198         macro.
14199         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
14200         also check for glibc-2.4's abort-inducing bug.
14201
14202         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
14203         Low-probability clean-up should be to use rmdir to get rid of
14204         the just-created directory, not unlink.
14205
14206         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
14207         configure fail, and request a bug report to inform us about it.
14208         Add a comment that, barring reports to the contrary, in 2007 we'll
14209         assume ftruncate is universally available.
14210
14211         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
14212
14213         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
14214
14215         2006-03-12  Jim Meyering  <jim@meyering.net>
14216
14217         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
14218         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
14219         * m4/same.m4 (gl_SAME): Likewise.
14220         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
14221
14222         2006-03-11  Eric Blake  <ebb9@byu.net>
14223
14224         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
14225         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
14226         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
14227         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
14228
14229 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
14230
14231         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
14232         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
14233         reported by Mark D. Baushke, one in
14234         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
14235
14236         Merge from coreutils.
14237
14238         * lib/.cppi-disable: Add stdint_.h.
14239         * lib/.cvsignore: Add stdint.h.
14240
14241         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
14242
14243         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
14244         both double and long double versions.
14245         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
14246         * lib/xstrtold.c: New file.
14247         * lib/xstrtod.h (xstrtold): New decl.
14248
14249         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
14250
14251         * lib/filemode.c (setst): Remove.
14252         (strmode): Rewrite to avoid setst.  This makes the code shorter,
14253         (arguably) clearer, and the generated code is a bit smaller on my
14254         Debian GNU/Linux stable x86 host.
14255
14256         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
14257
14258         * lib/filemode.c: Include "filemode.h" first, to test the interface.
14259         Assume that filemode.h includes sys/types.h and sys/stat.h.
14260         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
14261         (ftypelet): Reorder to put common cases first, for efficiency.
14262         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
14263         to do 'M'.
14264         (strmode): Renamed from mode_string, and now stores 12 bytes instead
14265         of 10, for compatibility with FreeBSD.  All callers changed.
14266         (filemodestring): Now stores 12 bytes instead of 10, and sets file
14267         types that can't be deduced solely from st_mode.  First arg is now a
14268         const pointer.
14269         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
14270         (strmode): Renamed from mode_string.
14271         (filemodestring): New decl.
14272         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
14273         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
14274         needed.
14275         (S_ISPORT, S_ISWHT): New macros, if not already defined.
14276
14277         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
14278
14279         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
14280         fsusage.h now does that.  Include fsusage.h first, to test interface.
14281         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
14282         at most one method (the old code could have generated decls that
14283         didn't conform to C89, not that this was ever exercised).
14284         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
14285
14286         2006-03-19  Jim Meyering  <jim@meyering.net>
14287
14288         Work even in a chroot where d_ino values for entries in "/"
14289         don't match the stat.st_ino values for the same names.
14290         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
14291         number, iterate through all entries again, using lstat instead.
14292         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
14293         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
14294
14295         * lib/getcwd.c (__getcwd): Clarify a comment.
14296         Use memcpy in place of a call to strcpy.
14297
14298         2006-03-12  Jim Meyering  <jim@meyering.net>
14299
14300         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
14301         matches that of the current directory (which we're about to chdir ".."
14302         out of), then save the dev-ino of the parent, instead.
14303
14304         * lib/same-inode.h (SAME_INODE): New file/macro.
14305         * lib/chdir-safer.c (SAME_INODE): Remove definition.
14306         Include "same-inode.h", instead.
14307         * lib/same.c: Likewise.
14308         * lib/cycle-check.h: Include "same-inode.h".
14309         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
14310         * lib/cycle-check.c (SAME_INODE): Remove definition.
14311         * lib/root-dev-ino.h: Include "same-inode.h".
14312
14313         2006-03-11  Eric Blake  <ebb9@byu.net>
14314
14315         * lib/same.c (same_name): s/base_name/last_component/
14316         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
14317         * lib/filenamecat.c (file_name_concat): Likewise.
14318
14319         2006-03-11  Eric Blake  <ebb9@byu.net>,
14320                     Paul Eggert  <eggert@cs.ucla.edu>
14321
14322         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
14323         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
14324         drive prefix.
14325         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
14326         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
14327         (last_component): New method.
14328         * lib/dirname.c (dir_len): Determine when drive letters need a
14329         subsequent slash.  Preserve // when it is special.
14330         (dir_name): Don't append dot when drive letter is absolute.
14331         [TEST_DIRNAME]: Move into a full-blown gnulib test.
14332         * lib/basename.c (base_name): New semantics - malloc the result.
14333         Preserve // when it is special.  Preserve relative files that look
14334         like drive letters.
14335         (base_len): Preserve // when it is special.
14336         (last_component): New method, similar to old base_name semantics.
14337         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
14338         base_name.  Strip redundant slashes from ///.
14339
14340 2006-07-03  Jim Meyering  <jim@meyering.net>
14341
14342         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
14343         macro is used before the first cycle_check call.
14344
14345 2006-07-03  Eric Blake  <ebb9@byu.net>
14346
14347         * modules/dirname (Depends-on): Add xstrndup.
14348
14349 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
14350
14351         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
14352         test cases, so that config.log is a bit easier to follow.
14353
14354 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
14355
14356         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
14357         both are 64 bits, since this seems to be the tradition, and this
14358         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
14359         we ever run into a host that prefers long long to long in this
14360         case, we'll need another configure-time test.  Problem reported by
14361         Jim Meyering.
14362
14363 2006-07-02  Eric Blake  <ebb9@byu.net>
14364
14365         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
14366
14367 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
14368
14369         * modules/inttypes (Depends-on): No longer depends on stdint.
14370         * modules/stdint (Description): Say more about assumptions.
14371         Say that the fast types might differ.  Say macros are used.
14372         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
14373         (Makefile.am): Revise list of substituted symbols to match
14374         new stdint.m4.
14375         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
14376         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
14377         * tests/test-stdint.c (verify_same_types)
14378         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
14379         the code conforms to C99/C89.
14380         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
14381         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
14382
14383 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
14384
14385         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
14386         but fix a bug, by requiring at least 64 bits.
14387         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
14388         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
14389         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
14390         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
14391
14392         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
14393         changes.  Make 2.59 a prerequisite.  Check and substitute for
14394         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
14395         inttypes.h.  Do not use special include files; just use the
14396         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
14397         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
14398         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
14399         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
14400         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
14401         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
14402         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
14403         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
14404         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
14405         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
14406         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
14407         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
14408         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
14409         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
14410         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
14411         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
14412         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
14413         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
14414         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
14415         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
14416         WINT_MAX.  Check for C99 conformance more strictly, by detecting
14417         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
14418         not check for things that C99 does not require, e.g., int8_t.  If
14419         a test isn't needed unless <stdint.h> isn't working, and is
14420         unlikely to be needed for any other reason, then don't do it
14421         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
14422         size_t, since we assume C89 freestanding at least.  Do not check
14423         for sig_atomic_t, wchar_t, or wint_t, since the code now does
14424         the right thing even if the types are not defined.  Instead use:
14425         (gl_STDINT_TYPE_PROPERTIES): New macro.
14426         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
14427         testing whether <sys/types.h> clashes, as Autoconf does this for
14428         us now.  All uses removed.
14429         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
14430         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
14431         (gl_CHECK_TYPE_SAME):
14432         Remove; no longer needed.
14433         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
14434         exists, since we'll return 0 anyway in that case.
14435         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
14436
14437 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
14438
14439         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
14440         possible collision with system files.
14441         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
14442         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
14443         WCHAR_MIN and WCHAR_MAX in this case.
14444         (<stddef.h>): Do not include; no longer needed.
14445         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
14446         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
14447         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
14448         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
14449         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
14450         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
14451         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
14452         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
14453         !defined(__c99))]: Include in this case too, since it's harmless
14454         now.
14455         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
14456         dangerous to do so.
14457         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
14458         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
14459         (_STDINT_MIN, _STDINT_MAX): New macros.
14460         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
14461         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
14462         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
14463         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
14464         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
14465         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
14466         macros, not typedefs; this simplifies things quite a bit.
14467         Use long int for all types narrower than int64_t.
14468         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
14469         Define in terms of long long int or int64_t or long int,
14470         not int64_t or int32_t.  This saves some compile-time testing.
14471         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
14472         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
14473         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
14474         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
14475         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
14476         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
14477         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
14478         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
14479         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
14480         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
14481         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
14482         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
14483         undef any previous version and define our own version, for
14484         simplicity and consistency with the new macros for types.
14485         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
14486         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
14487         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
14488         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
14489         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
14490         @WINT_T_SUFFIX@ to keep things simple here.
14491         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
14492         Simplify by assuming typical 8/16/32/64 host, since we're
14493         already doing that elsewhere anyway.
14494         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
14495         and assume long long int is 64 bits if available.  This
14496         speeds up 'configure'.
14497
14498 2006-07-01  Eric Blake  <ebb9@byu.net>
14499
14500         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
14501         Reported by Andreas Buening.
14502
14503 2006-07-01  Eric Blake  <ebb9@byu.net>
14504
14505         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
14506
14507 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
14508
14509         * lib/getaddrinfo.c: fixed typo
14510
14511 2006-06-29  Jim Meyering  <jim@meyering.net>
14512
14513         * modules/strftime (Maintainer): Add my name, since with the
14514         FPRINTFTIME changes strftime.c has forked from glibc.
14515
14516 2006-06-29  Eric Blake  <ebb9@byu.net>
14517
14518         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
14519
14520 2006-06-29  Eric Blake  <ebb9@byu.net>
14521
14522         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
14523
14524 2006-06-29  Eric Blake  <ebb9@byu.net>
14525
14526         * lib/stat_.h: New file.
14527
14528 2006-06-29  Eric Blake  <ebb9@byu.net>
14529
14530         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
14531         unused static function.
14532
14533 2006-06-29  Eric Blake  <ebb9@byu.net>
14534
14535         * doc/functions.texi (Function Portability): Document missing lstat
14536         on mingw.
14537
14538 2006-06-29  Eric Blake  <ebb9@byu.net>
14539
14540         * MODULES.html.sh: Add sys_stat.
14541         * modules/sys_stat: New module.
14542         * modules/mkstemp (Depends-on): Add sys_stat.
14543
14544 2006-06-29  Derek R. Price  <derek@ximbiot.com>
14545
14546         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
14547
14548 2006-06-29  Derek R. Price  <derek@ximbiot.com>
14549
14550         * m4/c-bs-a.m4: Removed.
14551
14552 2006-06-29  Derek R. Price  <derek@ximbiot.com>
14553
14554         * lib/strftime.c: Assume strftime() exists.
14555
14556 2006-06-29  Derek Price  <derek@ximbiot.com>
14557
14558         * modules/c-bs-a: Removed - \a is C89.
14559         * MODULES.html.sh: Remove c-bs-a.
14560
14561 2006-06-29  Bruno Haible  <bruno@clisp.org>
14562
14563         * modules/wcwidth (License): Change to LGPL.
14564
14565 2006-06-28  Simon Josefsson  <jas@extundo.com>
14566
14567         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
14568         on _WIN32.
14569
14570         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
14571         getnameinfo.
14572
14573 2006-06-28  Simon Josefsson  <jas@extundo.com>
14574
14575         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
14576
14577 2006-06-28  Simon Josefsson  <jas@extundo.com>
14578
14579         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
14580         functions there.  It will succeed on Windows XP, but on Windows
14581         2000 and (presumably) earlier, it will fail, and use the internal
14582         re-implementation.
14583         (use_win32_p): New function.
14584         (getaddrinfo): Use strtoul on servname, to support numeric ports.
14585         Support AI_NUMERICSERV to disable getservbyname.
14586         (getnameinfo): New function, only supports
14587         NI_NUMERICHOST|NI_NUMERICSERV for now.
14588
14589         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
14590         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
14591         getnameinfo.
14592
14593 2006-06-28  Eric Blake  <ebb9@byu.net>
14594
14595         * modules/wcwidth: New file.
14596         * modules/mbchar (Depends-on): Add wcwidth.
14597         * modules/mbswidth (Depends-on): Add wcwidth.
14598         * MODULES.html.sh: Add wcwidth.
14599
14600 2006-06-28  Eric Blake  <ebb9@byu.net>
14601
14602         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
14603         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
14604
14605 2006-06-28  Eric Blake  <ebb9@byu.net>
14606
14607         * lib/xvasprintf.h: Fix comments.
14608
14609 2006-06-28  Eric Blake  <ebb9@byu.net>
14610
14611         * lib/mbchar.h (wcwidth): Include wcwidth.h.
14612         * lib/mbswidth.c (wcwidth): Move from here...
14613         * lib/wcwidth.h: ...to this new file.
14614
14615 2006-06-28  Derek R. Price  <derek@ximbiot.com>
14616
14617         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
14618
14619         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
14620         it's obsolete.
14621         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
14622
14623 2006-06-28  Derek R. Price  <derek@ximbiot.com>
14624
14625         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
14626         Autoconf 2.60 says this stuff was obsolete.
14627
14628 2006-06-28  Bruno Haible  <bruno@clisp.org>
14629
14630         * modules/wcwidth (Files): Add m4/wchar_t.m4.
14631
14632 2006-06-28  Bruno Haible  <bruno@clisp.org>
14633
14634         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
14635         gt_TYPE_WCHAR_T.
14636
14637 2006-06-28  Bruno Haible  <bruno@clisp.org>
14638
14639         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
14640         declaration for wcwidth.
14641         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
14642
14643 2006-06-28  Bruno Haible  <bruno@clisp.org>
14644
14645         * lib/mkdtemp.c [MINGW]: Include <io.h>.
14646         (mkdir): Define using _mkdir.
14647
14648 2006-06-28  Bruno Haible  <bruno@clisp.org>
14649
14650         * lib/getaddrinfo.h: Fix POSIX URL.
14651         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
14652         _WIN32.
14653         (use_win32_p): Make static.
14654         (getaddrinfo): Reject service name if it is empty or does not consist
14655         solely of decimal digits, or if its value is > 65535.
14656         (getnameinfo): Remove useless casts.
14657
14658 2006-06-27  Simon Josefsson  <jas@extundo.com>
14659
14660         * modules/sys_select: New file, suggested by Bruno Haible, Paul
14661         Eggert and Martin Lambers.
14662
14663 2006-06-27  Simon Josefsson  <jas@extundo.com>
14664
14665         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
14666         Eggert and Martin Lambers.
14667
14668 2006-06-27  Bruno Haible  <bruno@clisp.org>
14669
14670         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
14671         result to 0, not to empty.
14672         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
14673
14674 2006-06-27  Bruno Haible  <bruno@clisp.org>
14675
14676         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
14677
14678 2006-06-26  Simon Josefsson  <jas@extundo.com>
14679
14680         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
14681         present.
14682
14683 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
14684
14685         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
14686         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
14687         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
14688
14689 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
14690
14691         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
14692
14693 2006-06-26  Bruno Haible  <bruno@clisp.org>
14694
14695         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
14696
14697 2006-06-26  Bruno Haible  <bruno@clisp.org>
14698
14699         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
14700
14701 2006-06-26  Bruno Haible  <bruno@clisp.org>
14702
14703         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
14704         SGI C compiler in pre-C99 mode.
14705         Suggested by Mark D. Baushke and Larry Jones.
14706
14707 2006-06-26  Bruno Haible  <bruno@clisp.org>
14708
14709         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
14710         WCHAR_MAX.
14711         Reported by Mark D. Baushke and Larry Jones.
14712
14713 2006-06-26  Bruno Haible  <bruno@clisp.org>
14714
14715         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
14716         in pre-C99 mode.
14717         Suggested by Mark D. Baushke and Larry Jones.
14718
14719 2006-06-23  Simon Josefsson  <jas@extundo.com>
14720             Bruno Haible  <bruno@clisp.org>
14721
14722         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
14723         Emit mostlyclean-local rule.
14724         (func_emit_tests_Makefile_am): Likewise.
14725         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
14726
14727 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
14728
14729         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
14730
14731 2006-06-23  Bruno Haible  <bruno@clisp.org>
14732
14733         * tests/test-stdint.c: Update to match ISO C 99 Technical
14734         Corrigendum 1.
14735
14736 2006-06-23  Bruno Haible  <bruno@clisp.org>
14737
14738         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
14739
14740 2006-06-23  Bruno Haible  <bruno@clisp.org>
14741
14742         * lib/stdint_.h: Treat IRIX like OpenBSD.
14743
14744 2006-06-23  Bruno Haible  <bruno@clisp.org>
14745
14746         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
14747         ISO C 99 Technical Corrigendum 1.
14748
14749 2006-06-22  Simon Josefsson  <jas@extundo.com>
14750
14751         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
14752         MinGW.
14753
14754 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
14755
14756         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
14757         needed.  Some compiler complained about some of them.  Problem reported
14758         by Larry Jones in
14759         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
14760
14761 2006-06-21  Simon Josefsson  <jas@extundo.com>
14762
14763         * tests/test-getaddrinfo.c: New file.
14764
14765         * modules/getaddrinfo-tests: New file.
14766
14767         * MODULES.html.sh: Add inet_pton.
14768
14769         * modules/inet_pton: New file.
14770
14771 2006-06-21  Simon Josefsson  <jas@extundo.com>
14772
14773         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
14774         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
14775         of using the (limited) gnulib implementation on Windows XP.
14776
14777         * m4/inet_pton.m4: New file.
14778
14779 2006-06-21  Simon Josefsson  <jas@extundo.com>
14780
14781         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
14782         variable.
14783
14784         * lib/socket_.h: Don't define WINVER.
14785
14786         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
14787         slightly modified to work in gnulib.
14788
14789 2006-06-21  Simon Josefsson  <jas@extundo.com>
14790
14791         * doc/gnulib.texi (Windows sockets): Add.
14792
14793 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
14794
14795         * lib/read-file.c (fread_file): Start with buffer allocation of
14796         0 bytes rather than 1 byte; this simplifies the code.
14797         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
14798         code to free buffer and save/restore errno.
14799         (internal_read_file): Remove unused local.
14800
14801 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
14802
14803         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
14804         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
14805         Problem reported by Denis Excoffier in
14806         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
14807
14808 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14809
14810         * modules/sys_socket, modules/socklen: Include sys/types since
14811         FreeBSD 4.x's sys/socket.h needs it.
14812
14813 2006-06-19  Simon Josefsson  <jas@extundo.com>
14814
14815         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
14816
14817 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
14818
14819         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
14820
14821 2006-06-19  Bruno Haible  <bruno@clisp.org>
14822
14823         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
14824         and FULL_PATH_INTTYPES_H in angle brackets.
14825         Reported by Mark D. Baushke <mdb@gnu.org>.
14826
14827 2006-06-17  Eric Blake  <ebb9@byu.net>
14828
14829         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
14830         errno.
14831
14832 2006-06-17  Bruno Haible  <bruno@clisp.org>
14833
14834         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
14835         <sys/inttypes.h>.
14836
14837 2006-06-17  Bruno Haible  <bruno@clisp.org>
14838
14839         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
14840         whether errno is declared. Assume <errno.h> declares errno.
14841
14842 2006-06-17  Bruno Haible  <bruno@clisp.org>
14843
14844         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
14845
14846 2006-06-17  Bruno Haible  <bruno@clisp.org>
14847
14848         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
14849         problem on Solaris 2.5.1.
14850
14851 2006-06-16  Eric Blake  <ebb9@byu.net>
14852
14853         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
14854         * lib/unicodeio.c [!defined errno]: Likewise.
14855         * lib/strtol.c [!defined errno]: Likewise.
14856         * lib/strtod.c [!defined errno]: Likewise.
14857
14858 2006-06-15  Eric Blake  <ebb9@byu.net>
14859
14860         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
14861
14862 2006-06-15  Eric Blake  <ebb9@byu.net>
14863
14864         * config/srclist.txt (ssize_t.m4): Lose sync.
14865
14866 2006-06-15  Bruno Haible  <bruno@clisp.org>
14867
14868         * modules/stdint (Files): Include m4/full-header-path.m4,
14869         m4/size_max.m4, m4/wchar_t.m4.
14870         (Makefile.am): Many more substitutions.
14871         * modules/stdint-tests: New file.
14872         * tests/test-stdint.c: New file.
14873
14874 2006-06-15  Bruno Haible  <bruno@clisp.org>
14875
14876         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
14877         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
14878         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
14879         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
14880         gl_CHECK_TYPE_SAME): New macros.
14881
14882 2006-06-15  Bruno Haible  <bruno@clisp.org>
14883
14884         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
14885
14886 2006-06-15  Bruno Haible  <bruno@clisp.org>
14887
14888         * lib/stdint_.h: Rewritten to be fully auto-configured.
14889         Fixes bug on HP-UX/IA64.
14890
14891 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
14892
14893         * lib/getdate.y (__attribute__): Don't define if already defined.
14894         Problem reported by Larry Jones.
14895         * lib/utimens.c (__attribute__): Likewise.
14896
14897 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
14898
14899         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
14900         reported by Andreas Schwab.
14901
14902 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14903             Bruno Haible  <bruno@clisp.org>
14904
14905         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
14906         check for the declaration of strnlen and a run test that exposes the
14907         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
14908         rpl_strndup.
14909
14910 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14911             Bruno Haible  <bruno@clisp.org>
14912
14913         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
14914
14915 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14916
14917         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
14918         compile test, for Tru64 4.0D.
14919
14920 2006-05-28  Karl Berry  <karl@gnu.org>
14921
14922         * config/srclist.txt (printf-args.c): lose sync.
14923
14924 2006-05-26  Martin Lambers  <marlam@marlam.de>
14925
14926         * lib/getpass.c: Updates the test for the native W32 API, and adds
14927         missing includes, thus fixing compilation warnings.
14928
14929 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
14930
14931         * lib/exclude.c (exclude_fnmatch): New function.
14932         (excluded_file_name): Call exclude_fnmatch.
14933         * lib/exclude.h (excluded_file_name): New prototype
14934
14935 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
14936
14937         * lib/tempname.c (small_open, large_open): New macros.
14938         (__open, __open64) [!_LIBC]: Remove.
14939         (__gen_tempname): Use small_open and large_open instead of __open
14940         and __open64.  This fixes a portability bug on HP-UX 11.11i
14941         reported by Simon Wing-Tang in
14942         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
14943
14944 2006-05-24  Bruno Haible  <bruno@clisp.org>
14945
14946         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
14947         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
14948         Reported by Thorsten Maerz <torte@netztorte.de> via
14949         Aaron Stone <aaron@serendipity.cx>.
14950
14951 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
14952
14953         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
14954         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
14955         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
14956         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
14957         not really conditional on the cache.
14958         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
14959
14960 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
14961
14962         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
14963         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
14964         (my_usleep): Don't mishandle maximum value.
14965
14966 2006-05-19  Jim Meyering  <jim@meyering.net>
14967
14968         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
14969
14970 2006-05-17  Bruno Haible  <bruno@clisp.org>
14971
14972         Cygwin portability.
14973         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
14974
14975 2006-05-17  Bruno Haible  <bruno@clisp.org>
14976
14977         * lib/stdint_.h: Fix recognition of Cygwin.
14978
14979 2006-05-15  Bruno Haible  <bruno@clisp.org>
14980
14981         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
14982         on libtool patch by Ralf Wildenhues.
14983
14984 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
14985
14986         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
14987         test for C99 conformance; (bool) 0.5 is an integer constant
14988         expression, but (bool) -0.5 is not.  Problem reported by Fedor
14989         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
14990
14991 2006-05-11  Simon Josefsson  <jas@extundo.com>
14992
14993         * m4/xvasprintf.m4: Fix obvious typo.
14994
14995 2006-05-11  Jim Meyering  <jim@meyering.net>
14996
14997         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
14998         James Lemley.
14999
15000 2006-05-10  Simon Josefsson  <jas@extundo.com>
15001
15002         * lib/md4.c: Typo fix, update copyright years.
15003         (K1, K2): Don't use L because it turn computations into 64-bit on
15004         64-bit platforms.
15005
15006 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
15007
15008         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
15009         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
15010         unwanted sign propagation, e.g., on hosts with 64-bit int.
15011         There still are some problems with reeelly weird theoretical hosts
15012         (e.g., 33-bit int) but it's not worth worrying about now.
15013         * lib/sha1.c (rol): Likewise.
15014         (K1, K2, K3, K4): Remove unnecessary L suffix.
15015
15016 2006-05-10  Bruno Haible  <bruno@clisp.org>
15017
15018         * lib/des.c: Cast to avoid warnings.
15019
15020 2006-05-09  Bruno Haible  <bruno@clisp.org>
15021
15022         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
15023         (Depends-on): Depend also on xsize, stdarg.
15024         (configure.ac): Add gl_XVASPRINTF.
15025
15026 2006-05-09  Bruno Haible  <bruno@clisp.org>
15027
15028         * m4/xvasprintf.m4: New file.
15029
15030 2006-05-09  Bruno Haible  <bruno@clisp.org>
15031
15032         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
15033         (EOVERFLOW): Define fallback value.
15034         (xstrcat): New function.
15035         (xvasprintf): Recognize the special case of a string concatenation.
15036
15037 2006-05-08  Eric Blake  <ebb9@byu.net>
15038
15039         * gnulib-tool (func_version): Base copyright year on CVS date.
15040         (func_emit_copyright_notice): New function.
15041         (func_emit_lib_Makefile_am): Use it.
15042         (func_emit_tests_Makefile_am): Likewise.
15043         (func_import): Likewise.
15044
15045 2006-05-08  Bruno Haible  <bruno@clisp.org>
15046
15047         * modules/stdarg: New file.
15048         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
15049
15050 2006-05-08  Bruno Haible  <bruno@clisp.org>
15051
15052         * m4/stdarg.m4: New file, from GNU gettext.
15053
15054 2006-05-08  Bruno Haible  <bruno@clisp.org>
15055
15056         * config/srclist.txt (build-aux/config.rpath): different from latest
15057         release.
15058
15059 2006-05-08  Bruno Haible  <bruno@clisp.org>
15060
15061         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
15062
15063 2006-05-05  Jim Meyering  <jim@meyering.net>
15064
15065         * m4/warning.m4: New file, derived from bison's file by the same name.
15066
15067 2006-05-03  Bruno Haible  <bruno@clisp.org>
15068
15069         * lib/stdint_.h: Shorter URL.
15070         * lib/inttypes.h: Likewise.
15071
15072 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
15073
15074         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
15075
15076 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
15077
15078         * lib/verify.h: Document the internals better.  Most of this change
15079         was written by Bruno Haible.
15080
15081 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
15082
15083         * doc/verify.texi: New file, partly based on a proposal by
15084         Bruno Haible.
15085
15086 2006-05-02  Bruno Haible  <bruno@clisp.org>
15087
15088         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
15089         test from here...
15090         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
15091
15092 2006-04-29  Bruno Haible  <bruno@clisp.org>
15093
15094         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
15095         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
15096
15097 2006-04-29  Bruno Haible  <bruno@clisp.org>
15098
15099         * gnulib-tool: Make --update option actually work.
15100
15101 2006-04-29  Bruno Haible  <bruno@clisp.org>
15102
15103         * doc/gcd.texi: New file.
15104         * doc/gnulib.texi: Include it.
15105
15106 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
15107
15108         * lib/getdate.y (get_date): When adding relative date, start with the
15109         initial time, not with the result of the first mktime call.
15110
15111 2006-04-25  Bruno Haible  <bruno@clisp.org>
15112
15113         * gnulib-tool (func_import): Output the include directives in three
15114         blocks, sorted separately.
15115         Reported by Ben Pfaff <blp@cs.stanford.edu>.
15116
15117 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
15118
15119         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
15120         to define main with arguments, for C++.  Reported by Eric Blake.
15121         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
15122         Prefer 'int main ()' to 'int main (void)', for C++.
15123         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
15124         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
15125         for 'main', for C99 and C++.
15126
15127 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
15128
15129         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
15130         Don't assume that exit status -1 is valid.
15131         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
15132         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
15133         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
15134         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
15135         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
15136         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
15137         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
15138         functions can be used without declaring them, or that you can
15139         exit with status -1.
15140         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
15141
15142 2006-04-24  Karl Berry  <karl@gnu.org>
15143
15144         * config/srclist.txt (longdouble.m4): sync lost.
15145
15146 2006-04-24  Eric Blake  <ebb9@byu.net>
15147
15148         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
15149
15150 2006-04-24  Bruno Haible  <bruno@clisp.org>
15151
15152         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
15153         poll() implementation in AIX.
15154         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
15155
15156 2006-04-24  Bruno Haible  <bruno@clisp.org>
15157
15158         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
15159         assigned exactly once.
15160
15161 2006-04-23  Claudio Fontana  <claudio@gnu.org>
15162             Bruno Haible  <bruno@clisp.org>
15163
15164         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
15165         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
15166         for AM_CPPFLAGS.
15167
15168 2006-04-23  Bruno Haible  <bruno@clisp.org>
15169
15170         * modules/copy-file: Depend on unistd.
15171         * modules/execute: Likewise.
15172         * modules/fatal-signal: Likewise.
15173         * modules/findprog: Likewise.
15174         * modules/mkdtemp : Likewise.
15175         * modules/pipe: Likewise.
15176         * modules/wait-process: Likewise.
15177
15178 2006-04-23  Bruno Haible  <bruno@clisp.org>
15179
15180         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
15181         condition was already detected.
15182         Reported by Ben Pfaff <blp@cs.stanford.edu>.
15183
15184 2006-04-23  Bruno Haible  <bruno@clisp.org>
15185
15186         * lib/copy-file.c: Include <unistd.h> unconditionally.
15187         * lib/execute.c: Likewise.
15188         * lib/fatal-signal.c: Likewise.
15189         * lib/findprog.c: Likewise.
15190         * lib/mkdtemp.c: Likewise.
15191         * lib/pipe.h: Likewise.
15192         * lib/pipe.c: Likewise.
15193         * lib/wait-process.h: Likewise.
15194
15195 2006-04-23  Bruno Haible  <bruno@clisp.org>
15196
15197         * gnulib-tool (func_usage): Fix --import description. Document
15198         --update.
15199         (func_import): Create temporary file in a temporary directory, if
15200         --dry-run is specified. Silence errors from 'grep' when there are no
15201         m4 files in $m4dir.
15202         (func_create_testdir): Silence errors from 'grep' when there are no
15203         m4 files in $m4dir.
15204         Reported by Karl Berry <karl@freefriends.org>.
15205
15206 2006-04-20  Bruno Haible  <bruno@clisp.org>
15207
15208         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
15209         one argument, so that the code will be portable to Autoconf 2.60.
15210         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
15211         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
15212         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
15213
15214 2006-04-19  Derek Price  <derek@ximbiot.com>
15215             Eric Blake  <ebb9@byu.net>
15216
15217         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
15218         rather than "/full/path.h".  Update comment to match.  Shorten &
15219         generalize m4_translit call via AS_TR_CPP.
15220
15221 2006-04-19  Derek Price  <derek@ximbiot.com>
15222             Eric Blake  <ebb9@byu.net>
15223
15224         * lib/inttypes.h: Correct grammar in comment.
15225
15226 2006-04-18  Derek Price  <derek@ximbiot.com>
15227             Paul Eggert  <eggert@cs.ucla.edu>
15228
15229         * modules/inttypes: New file.
15230         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
15231
15232 2006-04-18  Derek Price  <derek@ximbiot.com>
15233             Paul Eggert  <eggert@cs.ucla.edu>
15234
15235         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
15236         New files.
15237
15238 2006-04-18  Derek Price  <derek@ximbiot.com>
15239             Paul Eggert  <eggert@cs.ucla.edu>
15240
15241         * lib/inttypes.h: New file.
15242         * lib/strtoimax.c: Assume <inttypes.h>.
15243
15244 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
15245
15246         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
15247         isn't mounted.  Problem reported by Kir Kolyshkin.
15248
15249 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
15250
15251         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
15252         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
15253         Derek R. Price.
15254         * lib/regex.h (RE_DUP_MAX): Update comment to match current
15255         implementation.
15256
15257 2006-04-12  Eric Blake  <ebb9@byu.net>
15258
15259         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
15260         is now done automatically by the corresponding Autoconf macro.
15261
15262 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
15263
15264         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
15265         time_r.h.
15266
15267 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
15268
15269         Merge regex changes from libc, removing some of our
15270         POSIX-conformance changes that were rejected and redoing them in a
15271         less-intrusive way.
15272
15273         * lib/regcomp.c (re_compile_internal, init_dfa):
15274         Length arg is now size_t, not Idx.  All uses changed.
15275         (peek_token): Forward decl now says internal_function.
15276         (__re_error_msgid, __re_error_msgid_idx):
15277         Now static rather than extern with attribute_hidden.
15278         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
15279         For some reason libc prefers K&R style defns for external functions.
15280         (regerror) [!defined _LIBC]: Likewise.
15281         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
15282         (seek_collating_symbol_entry, lookup_collation_sequence_value):
15283         (build_range_exp, build_collating_symbol):
15284         Use K&R-style defn.
15285         (re_compile_fastmap): Use '\0' to memset, not 0.
15286         (utf8_sb_map): Make the calculations more obvious.
15287         (init_dfa, parse_bracket_exp, build_charclass_op):
15288         Call calloc and cast result, as glibc does.
15289         (init_word_char, fetch_token, peek_token, peek_token_bracket):
15290         (build_range_exp, build_collating_symbol):
15291         Now internal functions.
15292
15293         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
15294
15295         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
15296         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
15297         Don't depend on VMS; depend on __VMS instead, for POSIX
15298         namespace cleanness.
15299         (regoff_t): Define to ssize_t, not long int.
15300
15301         Remove the REG_ macros named below.  Instead, make the old names
15302         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
15303         __USE_GNU_REGEX.
15304         (REG_BACKSLASH_ESCAPE_IN_LISTS):
15305         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
15306         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
15307         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
15308         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
15309         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
15310         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
15311         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
15312         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
15313         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
15314         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
15315         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
15316         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
15317         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
15318         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
15319         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
15320         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
15321         (REG_NREGS):
15322         Remove.  All uses replaced by the old RE_* names.
15323         (RE_BACKSLASH_ESCAPE_IN_LISTS):
15324         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
15325         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
15326         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
15327         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
15328         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
15329         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
15330         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
15331         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
15332         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
15333         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
15334         Don't bother having these macros be independent of each others'
15335         values, since they no longer exist in the POSIX name space.
15336
15337         Rename the following member names back to their old names,
15338         unless !__USE_GNU_REGEX.  All uses changed back.
15339         (buffer): Renamed from re_buffer.
15340         (allocated): Renamed from re_allocated.
15341         (used): Renamed from re_used.
15342         (syntax): Renamed from re_syntax.
15343         (fastmap): Renamed from re_fastmap.
15344         (translate): Renamed from re_translate.
15345         (can_be_null): Renamed from re_can_be_null.
15346         (regs_allocated): Renamed from re_regs_allocated.
15347         (fastmap_accurate): Renamed from re_fastmap_accurate.
15348         (no_sub): Renamed from re_no_sub.
15349         (not_bol): Renamed from re_not_bol.
15350         (not_eol): Renamed from re_not_eol.
15351         (newline_anchor): Renamed from re_newline_anchor.
15352         (num_regs): Renamed from rm_num_regs.
15353         (start): Renamed from rm_start.
15354         (end): Renamed from rm_end.
15355
15356         (free_state): Move up a bit.
15357
15358         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
15359         #define to be empty.
15360         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
15361         when that is what is intended.
15362         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
15363         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
15364         (MAX): New macro.
15365         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
15366         All uses changed back to re_malloc, etc.  It's now the caller's
15367         responsibility to check for overflow; all callers changed.
15368         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
15369         (re_x2nrealloc): Remove.
15370         (free_state): Remove decl.
15371
15372         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
15373         (re_set_registers, re_exec):
15374         Use K&R-style defn.
15375
15376         2006-01-31  Roland McGrath  <roland@redhat.com>
15377
15378         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
15379         Reported by Mike Frysinger <vapier@gentoo.org>.
15380
15381         2006-01-15  Andreas Jaeger  <aj@suse.de>
15382
15383         [BZ #1950]
15384         * lib/regex_internal.c (re_string_reconstruct): Adjust for
15385         build_wcs_upper_buffer change.
15386         (build_wcs_upper_buffer): Change return type.
15387
15388         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
15389
15390         * lib/regex_internal.h: Include <stdint.h> if available.
15391
15392         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
15393
15394         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
15395
15396         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
15397
15398         * lib/regcomp.c: Adjust for changed secondary hash function.
15399
15400         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
15401
15402         * lib/regex.h: Pretty printing.
15403         Clean up namespace a bit.
15404
15405         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
15406
15407         * lib/regexec.c (update_cur_sifted_state, check_arrival,
15408         check_arrival_add_next_nodes): Avoid using uninitialized variable.
15409
15410         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
15411                     Ulrich Drepper  <drepper@redhat.com>
15412
15413         [BZ #1302]
15414         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
15415         changed.
15416         (bitset_word_t): Renamed from bitset_word.  All uses changed.
15417
15418         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
15419
15420         [BZ #281]
15421         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
15422         * lib/regcomp.c: Remove unnecessary uses of
15423         unsigned RE_TRANSLATE_TYPE.
15424         * lib/regex_internal.h: Likewise.
15425         * lib/regex_internal.c: Likewise.
15426         * lib/regexec.c: Likewise.
15427         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
15428
15429         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
15430
15431         * lib/regexec.c (find_recover_state): Remove unnecessary
15432         initialization.
15433         (transit_state_bkref): Make DFA a const pointer.
15434         (get_subexp): Likewise.
15435         (check_arrival): Likewise.
15436         (update_cur_sifted_state): Likewise.
15437         (re_search_internal): Likewise.
15438         (prune_impossible_nodes): Likewise.
15439         (acquire_init_state_context): Likewise.
15440         (proceed_next_node): Likewise.
15441         (set_regs): Likewise.
15442         (free_fail_stack_return): Likewise.
15443         (check_arrival_expand_ecl): Mark DFA parameter as const.
15444         (check_arrival_expand_ecl_sub): Likewise.
15445         (check_subexp_limits): Likewise.
15446         (sub_epsilon_src_nodes):  Likewise.
15447         (add_epsilon_src_nodes):  Likewise.
15448         (merge_state_array): Likewise.
15449         (update_regs): Likewise.
15450         (build_trtable): Likewise.
15451         (sift_states_backward): Mark MCTX parameter as const.
15452         (build_sifted_states): Likewise.
15453         (update_cur_sifted_state): Likewise.
15454         (sift_states_mkref): Likewise.
15455         (check_arrival_expand_ecl): Mark eclosure as const.
15456         (check_dst_limits_calc_pos_1): Likewise.
15457         * lib/regex_internal.h (re_match_context_t): Make dfa a const
15458         pointer.
15459
15460         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
15461
15462         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
15463         (transit_state_sb): Likewise.
15464         (transit_state_mb): Likewise.
15465         (sift_states_iter_mb): Likewise.
15466         (check_arrival_add_next_nodes): Likewise.
15467         (check_node_accept_bytes): Change first parameter to pointer-to-const.
15468         [_LIBC] (re_search_2_stub): Use mempcpy.
15469
15470         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
15471         mbrtowc for very simple UTF-8 case.
15472
15473         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
15474         a pointer-to-const.
15475         (re_acquire_state_context): Likewise.
15476         * lib/regex_internal.h: Adjust prototypes.
15477
15478         * lib/regex.c: Prevent using C++ compilers.
15479
15480         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
15481         (re_acquire_state_context): Likewise.
15482
15483 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
15484
15485         * modules/regex (Depends-on): Add ssize_t.
15486
15487 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
15488
15489         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
15490         translation table.
15491
15492 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
15493
15494         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
15495
15496 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
15497             Bruno Haible  <bruno@clisp.org>
15498
15499         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
15500         <sys/types.h> and <inttypes.h>.
15501
15502 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
15503
15504         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
15505         `__error_t_defined', so argp.h will not typedef the former.
15506
15507 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
15508
15509         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
15510         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
15511         glibc names.  Even if glibc is changed to conform to POSIX, the
15512         traditional names will be available anyway, since regex depends on
15513         the extensions module.  Also, fix a longstanding typo in the
15514         implementation of Spencer ERE test #75 from grep 2.3.  Problems
15515         reported by Emanuele Giaquinta.  Also, change sense of cached
15516         variable, so that the message makes sense.
15517
15518 2006-03-24  Simon Josefsson  <jas@extundo.com>
15519
15520         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
15521         including some doc fixes.
15522         (base64_encode_alloc): Fix +1 bug on allocation failures.
15523
15524 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
15525
15526         * lib/base64.c (base64_encode): Do not read past end of array with
15527         unsanitized input on systems with CHAR_BIT > 8.
15528
15529 2006-03-24  Eric Blake  <ebb9@byu.net>
15530
15531         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
15532
15533 2006-03-22  Karl Berry  <karl@gnu.org>
15534
15535         * config/srclist.txt (*setenv.[ch]): get from coreutils.
15536         * config/srclistvars.sh (COREUTILS): new var.
15537
15538 2006-03-17  Jim Meyering  <jim@meyering.net>
15539
15540         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
15541         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
15542
15543 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
15544
15545         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
15546         no longer needs it.  Instead, check that regoff_t is as least
15547         as wide as ptrdiff_t.
15548
15549         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
15550         so that our regex.h stays compatible with the installed regex.
15551         This is helpful for installers who configure --without-included-regex.
15552         Problem reported by Emanuele Giaquinta.
15553
15554 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
15555
15556         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
15557         Typedef to long int, not to off_, as POSIX will likely change
15558         in that direction.
15559
15560 2006-03-15  Eric Blake  <ebb9@byu.net>
15561
15562         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
15563
15564 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
15565
15566         * lib/argp-help.c (validate_uparams): Fix typo
15567         * lib/argp-parse.c (argp_default_options): Consistently begin help
15568         messages with a lowercase letter.
15569
15570 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
15571
15572         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
15573         overrun buffers and shouldn't be used (much as gets shouldn't be
15574         used).
15575         * lib/time_r.c (asctime_r, ctime_r): Likewise.
15576
15577 2006-03-08  Simon Josefsson  <jas@extundo.com>
15578
15579         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
15580         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
15581
15582 2006-03-08  Simon Josefsson  <jas@extundo.com>
15583
15584         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
15585         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
15586
15587 2006-03-08  Simon Josefsson  <jas@extundo.com>
15588
15589         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
15590         signal that configure disabled the device.
15591
15592 2006-03-08  Simon Josefsson  <jas@extundo.com>
15593
15594         * build-aux/maint.mk: Fix refresh-po, to handle no translated
15595         languages.
15596
15597 2006-03-07  Simon Josefsson  <jas@extundo.com>
15598
15599         * modules/getopt (Depends-on): Add unistd.
15600
15601         * modules/unistd: New file.
15602
15603 2006-03-07  Simon Josefsson  <jas@extundo.com>
15604
15605         * modules/gc-random: New file.
15606
15607 2006-03-07  Simon Josefsson  <jas@extundo.com>
15608
15609         * m4/unistd_h.m4: New file.
15610
15611 2006-03-07  Simon Josefsson  <jas@extundo.com>
15612
15613         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
15614         test to be side-effect free by storing the result in the cache
15615         variable gl_cv_lib_readline, and moving the assignment of
15616         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
15617         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
15618
15619 2006-03-07  Simon Josefsson  <jas@extundo.com>
15620
15621         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
15622         error on missing devices (the functions will return an error).
15623
15624         * m4/gc.m4: Move random stuff to gc-random.m4
15625
15626 2006-03-07  Simon Josefsson  <jas@extundo.com>
15627
15628         * lib/unistd_.h: New file.
15629
15630 2006-03-07  Simon Josefsson  <jas@extundo.com>
15631
15632         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
15633
15634 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
15635
15636         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
15637         Problem reported by Juan Manuel Guerrero.
15638
15639 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
15640
15641         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
15642         the unistd module.
15643         * lib/getlogin_r.c: Likewise.
15644         * lib/getlogin_r.h: Likewise.
15645         * lib/glob.c: Likewise.
15646         * lib/pagealign_alloc.c: Likewise.
15647         * lib/unistd_.h: Remove; no longer needed.
15648
15649 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
15650
15651         * MODULES.html.sh (Support for systems lacking POSIX:2001):
15652         Add unistd.
15653         * modules/c-stack (Depends-on): Add unistd.
15654         * modules/getlogin_r: Likewise.
15655         * modules/glob: Likewise.
15656         * modules/pagealign_alloc: Likewise.
15657         * modules/unistd (Files): Remove lib/unistd_.h.
15658         (EXTRA_DIST): Remove.
15659         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
15660         need unistd_.h.
15661         (MOSTLYCLEANFILES): Remove unistd.h-t.
15662
15663 2006-03-03  Simon Josefsson  <jas@extundo.com>
15664
15665         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
15666
15667 2006-03-03  Simon Josefsson  <jas@extundo.com>
15668
15669         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
15670         libidn and bison.
15671
15672 2006-03-03  Simon Josefsson  <jas@extundo.com>
15673
15674         * build-aux/maint.mk: Add indent target.
15675
15676 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
15677
15678         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
15679         our replacement poll.h in any case, to avoid a differing
15680         declaration from a system header.  Seen on AIX.
15681
15682 2006-03-01  Simon Josefsson  <jas@extundo.com>
15683
15684         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
15685         <kasal@ucw.cz>.
15686
15687 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15688
15689         * modules/gettime (Depends-on): Add extensions module.
15690         * modules/nanosleep (Depends-on): Likewise.
15691         * modules/settime (Depends-on): Likewise.
15692
15693 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15694
15695         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
15696         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
15697         pedantically.
15698         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
15699         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
15700
15701         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
15702         not "==".  Reported by Ralf Wildenhues.
15703
15704 2006-03-01  Karl Berry  <karl@gnu.org>
15705
15706         * doc/Copyright/request-*: new files, synced from gnuorg.
15707
15708 2006-03-01  Karl Berry  <karl@gnu.org>
15709
15710         * config/srclist.txt (Copyright/*): new entries.
15711
15712 2006-02-28  Simon Josefsson  <jas@extundo.com>
15713
15714         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
15715
15716 2006-02-27  Simon Josefsson  <jas@extundo.com>
15717
15718         * lib/base64.h: Indent #define's.  From Jim Meyering
15719         <jim@meyering.net>.
15720
15721 2006-02-27  Jim Meyering  <jim@meyering.net>
15722
15723         Revert the change of 2006-02-24, so these files can continue
15724         to be sync'd from gettext.
15725         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
15726         of `config.h'.
15727
15728 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
15729
15730         * modules/intprops: New file.
15731         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
15732         Add intprops.
15733         * modules/getloadavg (Files): Remove lib/intprops.h.
15734         (Depends-on): Add intprops.
15735         * modules/human: Likewise.
15736         * modules/inttostr: Likewise.
15737         * modules/openat: Likewise.
15738         * modules/sig2str: Likewise.
15739         * modules/userspec: Likewise.
15740         * modules/utimecmp: Likewise.
15741         * modules/xnanosleep: Likewise.
15742         * modules/xstrtol: Likewise.
15743
15744 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
15745
15746         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
15747         * modules/lock-tests (TESTS): Use $(EXEEXT).
15748         * modules/tls-tests: Likewise.
15749         * modules/argp-tests: Likewise.
15750         (check_PROGRAMS): New var, replacing...
15751         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
15752
15753 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
15754
15755         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
15756         `config.h'.
15757
15758 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
15759
15760         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
15761
15762 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
15763
15764         Sync from coreutils.
15765         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
15766         gl_CHDIR_SAFER.
15767
15768 2006-02-22  Jim Meyering  <jim@meyering.net>
15769
15770         Sync from coreutils.
15771         * m4/chdir-safer.m4: New file.
15772
15773 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
15774
15775         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
15776         AT_FDCWD exceeds INT_MAX.
15777         * lib/openat.h (AT_FDCWD): Likewise.
15778
15779 2006-02-17  Eric Blake  <address@hidden>
15780
15781         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
15782
15783 2006-02-16  Simon Josefsson  <jas@extundo.com>
15784
15785         * modules/getaddrinfo (Depends-on): Add sys_socket.
15786
15787 2006-02-15  Simon Josefsson  <jas@extundo.com>
15788
15789         * build-aux/maint.mk: Add dsyntax-check rule.
15790
15791 2006-02-15  Eric Blake  <ebb9@byu.net>
15792
15793         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
15794         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
15795         'present but cannot compile' warnings on cygwin.
15796         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
15797         use ws2tcpip.h if sys/socket.h works.
15798         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
15799         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
15800
15801 2006-02-14  Simon Josefsson  <jas@extundo.com>
15802
15803         * modules/maintainer-makefile (Files): Rename.
15804
15805         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
15806         and (the local) Makefile.cfg to maint-cfg.mk.
15807
15808         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
15809         to the latter.
15810
15811         * modules/maintainer-makefile: New module.
15812
15813         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
15814         severaly stripped to make it possible to build it up from scratch
15815         with reliable tests.
15816
15817         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
15818         fixes to permit overriding the default actions when configure and
15819         makefile are not available.
15820
15821 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
15822
15823         Sync from coreutils.
15824         * modules/lstat (Depends-on): Don't depend on xalloc.
15825         (License): Change from GPL to LGPL, since this is now simply a
15826         replacement for a libc function.
15827
15828 2006-02-14  Jim Meyering  <jim@meyering.net>
15829
15830         Sync from coreutils.
15831
15832         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
15833         failure on deficient systems, and simplify gnulib lgpl dependencies.
15834         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
15835         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
15836
15837         * lib/xalloc-die.c: Remove unused definition of N_.
15838
15839 2006-02-14  Jim Meyering  <jim@meyering.net>
15840
15841         Sync from coreutils.
15842         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
15843         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
15844         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
15845         double-quote uses of that variable, to accommodate the rare case in
15846         which getmntent is available in none of the libraries checked.  This
15847         happens at least on FreeBSD 5.0.
15848
15849 2006-02-13  Simon Josefsson  <jas@extundo.com>
15850
15851         * gnulib-tool (Usage): Fix --import, from
15852         karl@freefriends.org (Karl Berry).
15853
15854 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
15855
15856         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
15857
15858 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
15859
15860         * lib/argp-namefrob.h: Restore changes accidentally lost during the
15861         "autoupdate" on 2005-12-12.
15862
15863 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
15864
15865         * modules/closeout (Depends-on): Remove atexit.
15866
15867 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
15868
15869         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
15870         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
15871
15872 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
15873
15874         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
15875         __EXTENSIONS__ if this causes compilation to fail.  Problem
15876         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
15877         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
15878
15879 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
15880
15881         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
15882         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
15883         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
15884         All uses changed.
15885
15886 2006-01-26  Simon Josefsson  <jas@extundo.com>
15887
15888         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
15889         prototype is visible on mingw32.
15890
15891         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
15892         for mingw32.
15893
15894         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
15895         mingw32).
15896
15897 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
15898
15899         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
15900         attempt to open for write; this always fails, at least on POSIX
15901         hosts.  This reinstates the 2006-01-09 change, which was
15902         inadvertently removed.
15903
15904 2006-01-26  Bruno Haible  <bruno@clisp.org>
15905
15906         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
15907         Reported by Paul Eggert.
15908
15909 2006-01-26  Bruno Haible  <bruno@clisp.org>
15910             Paul Eggert  <eggert@cs.ucla.edu>
15911
15912         * lib/stdbool_.h (_Bool)
15913         [(! (defined __cplusplus || defined __BEOS__)
15914           && !defined __GNUC__
15915           && !(defined __HP_cc || defined __xlc__
15916                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
15917                || defined __sgi))]:
15918         #define to signed char in these cases too; this simplifies
15919         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
15920         etc., separately) and makes it more conservative.
15921
15922 2006-01-25  Simon Josefsson  <jas@extundo.com>
15923
15924         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
15925         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
15926         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
15927
15928 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
15929
15930         * lib/argp-namefrob.h: Bugfix. Remove stray #
15931
15932 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
15933
15934         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
15935         so that we test the test.
15936         Check for yet another HP-UX cc bug involving *bool |= bool.
15937
15938 2006-01-25  Karl Berry  <karl@gnu.org>
15939
15940         * config/srclist.txt (vasnprintf.c): sync lost.
15941
15942 2006-01-25  Jim Meyering  <jim@meyering.net>
15943
15944         Sync from the stable (b5) branch of coreutils:
15945
15946         * lib/fts.c (fts_children): Don't let close() clobber errno from
15947         failed fchdir().
15948
15949         * lib/fts.c (fts_stat): When following a symlink-to-directory,
15950         don't necessarily interpret stat-fails+lstat-succeeds as indicating
15951         a dangling symlink.  That can also happen at least for ELOOP.
15952         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
15953         FYI, this bug predates the inclusion of fts.c in coreutils.
15954
15955         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
15956         in their own block, so pre-c99 compilers don't object.
15957
15958         Avoid the double-free (first in fts_read, second in fts_close) that
15959         would occur when an `active' directory is made inaccessible (e.g.,
15960         via chmod a-x) during a traversal.
15961         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
15962         before returning.  Reproduce this failure by
15963         mkdir -p a/b; cd a; chmod a-x . b
15964         Reported by Stavros Passas.
15965
15966 2006-01-25  Jim Meyering  <jim@meyering.net>
15967
15968         * lib/fileblocks.c: Remove more useless parentheses.
15969         * lib/readutmp.h: Likewise.
15970
15971 2006-01-25  Bruno Haible  <bruno@clisp.org>
15972
15973         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
15974         warnings.
15975         Reported by Paul Eggert.
15976
15977 2006-01-25  Bruno Haible  <bruno@clisp.org>
15978
15979         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
15980         rid of a trap command. For Solaris sh.
15981         Reported by Mark D. Baushke <mdb@gnu.org>.
15982
15983 2006-01-24  Simon Josefsson  <jas@extundo.com>
15984
15985         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
15986         Bruno.
15987
15988 2006-01-24  Karl Berry  <karl@gnu.org>
15989
15990         * config/srclist.txt (argp-namefrob.h): sync lost.
15991
15992 2006-01-24  Jim Meyering  <jim@meyering.net>
15993
15994         * modules/openat (Files): Add lib/intprops.h.
15995         From Mark D. Baushke.
15996
15997 2006-01-24  Jim Meyering  <jim@meyering.net>
15998
15999         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
16000         Reported by Mark D. Baushke.
16001
16002 2006-01-24  Jim Meyering  <jim@meyering.net>
16003
16004         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
16005
16006 2006-01-24  Bruno Haible  <bruno@clisp.org>
16007
16008         * modules/strnlen (Maintainer): Change from glibc to all.
16009
16010 2006-01-24  Bruno Haible  <bruno@clisp.org>
16011
16012         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
16013         Patch by Paul Eggert.
16014
16015 2006-01-24  Bruno Haible  <bruno@clisp.org>
16016
16017         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
16018         already has it.
16019         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
16020         2005-11-26.
16021
16022         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
16023         'signed char' to avoid problems with the built-in _Bool type.
16024         Reported by Paul Eggert on 2005-11-26.
16025
16026 2006-01-24  Bruno Haible  <bruno@clisp.org>
16027
16028         * gnulib-tool (func_import): Avoid constructing complicated sed
16029         expressions inside backquote.
16030         Report and solution by Mark D. Baushke <mdb@gnu.org>.
16031
16032 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
16033
16034         These changes imported from libc.
16035         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
16036         test and two separate function calls.
16037         * lib/strndup.c (__strndup): Add libc_hidden_def.
16038
16039 2006-01-23  Simon Josefsson  <jas@extundo.com>
16040
16041         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
16042         Remove the test_*_SOURCES variable: automake infers it by default.
16043         * modules/tls-tests: Likewise.
16044
16045 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
16046
16047         Work around porting bugs reported by Dieter in
16048         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
16049         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
16050         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
16051         Include "getopt.h" first, to check interface.
16052         (getenv): Declare only if defined HAVE_DECL_GETENV &&
16053         !HAVE_DECL_GETENV.
16054         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
16055         (__strndup): Revert to K&R-style function dfns, the glibc style.
16056         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
16057         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
16058         Include strnlen.h first, to get prototype properly.
16059         (strnlen): Renamed from __strnlen.
16060         Remove weak alias.
16061
16062 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
16063
16064         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
16065
16066 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
16067
16068         * config/srclist.txt: Adjust to reflect glibc reorganization.
16069         This affects only comments.
16070
16071 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
16072
16073          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
16074          Reported by Bruce Korb <bkorb@gnu.org>.
16075
16076 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
16077
16078         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
16079         to pacify gcc -Wswitch-default.
16080
16081 2006-01-22  Bruno Haible  <bruno@clisp.org>
16082
16083         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
16084         temporary buffer for sprintf, take into account the precision also
16085         for 'd', 'i', 'u', 'o', 'x', 'X'.
16086
16087 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
16088
16089         * modules/argp-tests: New module
16090         * tests/test-argp.c: New file
16091         * tests/test-argp-2.sh: New file
16092
16093 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
16094
16095         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
16096         (__argp_base_name): Removed
16097         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
16098         typo.
16099         (__argp_base_name): Provide macro definition or extern declaration
16100         depending on the configuration
16101
16102 2006-01-20  Simon Josefsson  <jas@extundo.com>
16103
16104         * modules/inet_ntop (Depends-on): Depend on sys_socket.
16105
16106 2006-01-20  Simon Josefsson  <jas@extundo.com>
16107
16108         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
16109
16110 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
16111
16112         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
16113         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
16114         Suggested by Bruno Haible.
16115
16116 2006-01-20  Karl Berry  <karl@gnu.org>
16117
16118         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
16119         until changes propagate, I guess.
16120
16121 2006-01-19  Simon Josefsson  <jas@extundo.com>
16122
16123         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
16124
16125 2006-01-19  Simon Josefsson  <jas@extundo.com>
16126
16127         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
16128
16129 2006-01-19  Simon Josefsson  <jas@extundo.com>
16130
16131         * gnulib-tool: Set check_PROGRAMS.
16132
16133         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
16134         modules/des-tests, modules/gc-arcfour-tests,
16135         modules/gc-arctwo-tests, modules/gc-des-tests,
16136         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
16137         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
16138         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
16139         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
16140         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
16141         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
16142         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
16143         test_*_SOURCES.
16144
16145 2006-01-18  Simon Josefsson  <jas@extundo.com>
16146
16147         * modules/socklen (Depends-on): Depend on sys_socket.
16148
16149 2006-01-18  Simon Josefsson  <jas@extundo.com>
16150
16151         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
16152         modules/des-tests, modules/gc-arcfour-tests,
16153         modules/gc-arctwo-tests, modules/gc-des-tests,
16154         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
16155         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
16156         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
16157         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
16158         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
16159         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
16160         $(EXEEXT) to automake TESTS variable, for mingw32.
16161
16162 2006-01-17  Simon Josefsson  <jas@extundo.com>
16163
16164         * modules/socklen (Include): Need sys/socket.h.
16165
16166 2006-01-17  Bruno Haible  <bruno@clisp.org>
16167
16168         * modules/ssize_t (Include): Add <sys/types.h>.
16169
16170 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
16171
16172         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
16173         it's not portable and it doesn't work with cross-compiles.
16174         Problem reported by Bruno Haible.  Fix missing-$ typo in
16175         'test "gl_cv_ignore_unused_libraries" ...' that prevented
16176         -zignore from being used with Sun's C compiler.
16177
16178 2006-01-12  Simon Josefsson  <jas@extundo.com>
16179
16180         * lib/base64.c: Fix warning, reported by Bruno Haible
16181         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
16182
16183 2006-01-12  Bruno Haible  <bruno@clisp.org>
16184
16185         * modules/ldd: New file.
16186         * build-aux/ldd.sh.in: New file.
16187         * MODULES.html.sh (Support for building libraries and executables): Add
16188         ldd.
16189
16190 2006-01-12  Bruno Haible  <bruno@clisp.org>
16191
16192         * m4/ldd.m4: New file.
16193
16194 2006-01-12  Bruno Haible  <bruno@clisp.org>
16195
16196         * gnulib-tool (func_import, func_create_testdir): Don't go into an
16197         endless loop while replacing $auxdir with build-aux.
16198
16199 2006-01-11  Simon Josefsson  <jas@extundo.com>
16200
16201         * lib/stdint_.h (SIZE_MAX): Add missing (.
16202
16203 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
16204
16205         Sync from coreutils.
16206         * lib/md5.c: Fix commentary typos.
16207         (alignof, UNALIGNED_P): No need for a GCC-specific version.
16208         * lib/md5.h (__attribute__): Remove; unused.
16209         * lib/sha1.c: Fix commentary to match md5 better.
16210         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
16211         so that we don't need to worry about alignment.  All uses changed.
16212         This merges the 2005-10-28 md5 change into sha1.
16213
16214 2006-01-11  Jim Meyering  <jim@meyering.net>
16215
16216         Sync from coreutils.
16217         * lib/md5.c (OP): Fix spacing.
16218
16219 2006-01-11  Bruno Haible  <bruno@clisp.org>
16220
16221         Ensure automatic ordering between gl_LOCK and gl_ARGP.
16222         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
16223         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
16224
16225 2006-01-11  Bruno Haible  <bruno@clisp.org>
16226
16227         Ensure automatic ordering between gl_LOCK and gl_ARGP.
16228         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
16229         the "early" section as well.
16230
16231 2006-01-11  Bruno Haible  <bruno@clisp.org>
16232
16233         Avoid "ar: no archive members specified" error on MacOS X.
16234         * gnulib-tool (func_modules_add_dummy): New function.
16235         (func_import, func_create_testdir): Invoke it.
16236
16237 2006-01-11  Bruno Haible  <bruno@clisp.org>
16238
16239         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
16240         with $auxdir in AC_CONFIG_FILES statements.
16241
16242 2006-01-11  Bruno Haible  <bruno@clisp.org>
16243
16244         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
16245         Initialize also noinst_HEADERS to empty.
16246
16247 2006-01-11  Bruno Haible  <bruno@clisp.org>
16248
16249         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
16250         variables.
16251         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
16252         autoreconf.
16253
16254 2006-01-11  Bruno Haible  <bruno@clisp.org>
16255
16256         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
16257         overridable by the user.
16258         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
16259
16260 2006-01-10  Simon Josefsson  <jas@extundo.com>
16261
16262         * modules/sys_socket: New file.
16263
16264 2006-01-10  Simon Josefsson  <jas@extundo.com>
16265
16266         * m4/sys_socket_h.m4: New file.
16267
16268 2006-01-10  Simon Josefsson  <jas@extundo.com>
16269
16270         * lib/socket_.h: New file.
16271
16272 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
16273
16274         * modules/readutmp (Maintainer): Add myself.
16275
16276 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
16277
16278         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
16279         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
16280         People who are still concerned with buggy memcmp implementations
16281         can invoke gl_FUNC_MEMCMP themselves.
16282
16283 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
16284
16285         * lib/regex_internal.h (BITSET_WORD_BITS):
16286         Work around a bug in 64-bit PGC (before version 6.1-2), where the
16287         preprocessor mishandles large unsigned values as if they were signed.
16288         Problem reported by Claudio Fontana in
16289         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
16290
16291 2006-01-10  Jim Meyering  <jim@meyering.net>
16292
16293         Avoid the double-free (first in fts_read, second in fts_close) that
16294         would occur when an `active' directory is made inaccessible (e.g.,
16295         via chmod a-x) during a traversal.
16296         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
16297         before returning.  Reproduce this failure by
16298         mkdir -p a/b; cd a; chmod a-x . b
16299         Reported by Stavros Passas.
16300
16301         Sync from coreutils.
16302         * lib/sha1.c: Tweak grammar in a comment.
16303
16304 2006-01-10  Jim Meyering  <jim@meyering.net>
16305
16306         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
16307         Patch by Joerg Sonnenberger.
16308
16309 2006-01-10  Bruno Haible  <bruno@clisp.org>
16310
16311         * modules/readutmp: Depend on module free.
16312         * modules/strtok_r: Depend on module restrict.
16313
16314 2006-01-10  Bruno Haible  <bruno@clisp.org>
16315
16316         * modules/gettext (configure.ac): Add an invocation of
16317         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
16318
16319 2006-01-10  Bruno Haible  <bruno@clisp.org>
16320
16321         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
16322         Reported by Werner Lemberg <wl@gnu.org>.
16323
16324 2006-01-10  Bruno Haible  <bruno@clisp.org>
16325
16326         * lib/localcharset.c: Update from GNU gettext.
16327
16328 2006-01-10  Bruno Haible  <bruno@clisp.org>
16329
16330         * lib/argp.h (__const): Remove macro. Use const instead.
16331         * lib/argp-fmtstream.h (__const): Likewise.
16332         * lib/glob_.h (__const): Remove macro.
16333         * lib/glob-libc.h: Use const instead of __const.
16334
16335 2006-01-10  Bruno Haible  <bruno@clisp.org>
16336
16337         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
16338         variable.
16339         Needed to avoid an automake error regarding the 'gettext' module.
16340
16341 2006-01-09  Simon Josefsson  <jas@extundo.com>
16342
16343         * modules/inet_ntop (Depends-on): Add restrict.
16344
16345 2006-01-09  Simon Josefsson  <jas@extundo.com>
16346
16347         * modules/gc-rijndael-tests (License): Put under LGPL.
16348
16349         * modules/gc-des-tests (License): Likewise.
16350
16351         * modules/gc-arcfour-tests (License): Likewise.
16352
16353         * modules/gc-arctwo-tests (License): Likewise.
16354
16355         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
16356
16357         * modules/gc-hmac-sha1-tests (Files): Likewise.
16358
16359         * modules/gc-hmac-md5-tests (License): Likewise.
16360
16361         * modules/gc-sha1-tests (License): Likewise.
16362
16363         * modules/gc-md5-tests (License): Likewise.
16364
16365         * modules/gc-md4-tests (License): Likewise.
16366
16367         * modules/gc-md2-tests (License): Likewise.
16368
16369         * modules/gc-tests (License): Likewise.
16370
16371         * modules/des-tests (License): Likewise.
16372
16373         * modules/md4-tests (License): Likewise.
16374
16375         * modules/md2-tests (License): Likewise.
16376
16377 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
16378
16379         Sync from coreutils:
16380
16381         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
16382         * modules/lib-ignore: New file.
16383         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
16384         chdir-safer.m4, lchmod.m4.
16385         * modules/openat: Add mkdirat.c, openat-priv.h.
16386
16387 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
16388
16389         Sync from coreutils.
16390         * m4/lib-ignore.m4: New file.
16391         * m4/lchmod.m4: New file.
16392
16393 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
16394
16395         Sync from coreutils.
16396         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
16397         for write access: POSIX says that must fail.
16398         * lib/fts.c (diropen): Likewise.
16399         * lib/save-cwd.c (save_cwd): Likewise.
16400         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
16401         well, for minor improvements on hosts that lack O_DIRECTORY.
16402         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
16403         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
16404         Fall back on chown if open failed with EACCES.
16405
16406         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
16407         Report an error at compile-time if only a 1-second nominal clock
16408         resolution is found.
16409
16410         * lib/lchmod.h: New file.
16411         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
16412         (make_dir_parents): Use lchown rather than chown, and
16413         lchmod rather than chmod.
16414
16415         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
16416         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
16417         "proc" reported by n0dalus.
16418
16419         * lib/mountlist.c: Include <limits.h>.
16420         (dev_from_mount_options)
16421         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
16422         New function.  It no longer assumes "dev=" has the System V meaning
16423         on Linux (since it doesn't).  It also parses "dev=" more carefully.
16424         (read_file_system_list)
16425         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
16426         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
16427         dev= in that case.
16428
16429         * lib/posixtm.h (PDS_PRE_2000): New macro.
16430         * lib/posixtm.c (year): Arg is now syntax_bits rather than
16431         allow_century.  All usages changed.  Reject dates outside the range
16432         1969-1999 if PDS_PRE_2000 is used.
16433
16434 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
16435
16436         Sync from coreutils.
16437         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
16438         (Time of day items): Mention the possibility of leap seconds.
16439         Problem reported by Dr. David Alan Gilbert.
16440
16441 2006-01-09  Jim Meyering  <jim@meyering.net>
16442
16443         Sync from coreutils.
16444
16445         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
16446
16447         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
16448
16449         * lib/modechange.c (mode_compile): Reject an invalid mode string
16450         that starts with an octal digit.  From Andreas Gruenbacher.
16451
16452         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
16453         and dup to open_safer and dup_safer, respectively.
16454         (openat_permissive): Fix typo in comment.
16455
16456         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
16457         "gettext.h"; either no longer needed or are guaranteed by openat.h.
16458         (_): Remove; no longer needed.
16459         (openat): Renamed from rpl_openat; no need for rpl_openat
16460         since openat.h renames openat for us.
16461         Replace most of the body with a call to openat_permissive,
16462         to avoid duplicate code.
16463         Port to (probably hypothetical) environments were mode_t is
16464         wider than int.
16465         (openat_permissive): Require mode arg, so that we can check
16466         types better.  Put it just after flags.  Change cwd failure
16467         indicator from pointer-to-bool to pointer-to-errno-value.
16468         All callers changed.
16469         Invoke openat_save_fail and/or openat_restore_fail if
16470         cwd_errno is null, so that openat can call us.
16471         (openat_permissive, fdopendir, fstatat, unlinkat):
16472         Simplify errno handling to avoid some duplicate code,
16473         as it's OK to set errno on success.
16474         * lib/openat.h: Revamp code so that function macros depend on
16475         __OPENAT_PREFIX only, not also on AT_FDCWD.
16476         (openat_ro): Remove.  Caller changed to use openat_permissive.
16477         (openat_permissive): Now a macro, if not a function.
16478         (openat_restore_fail, openat_save_fail): Now always functions,
16479         since mkdirat needs them even if __OPENAT_PREFIX is defined.
16480
16481         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
16482         and openat.c.
16483         * lib/mkdirat.c: Include openat-priv.h.
16484         Remove definitions of macros defined therein.
16485         * lib/openat.c: Likewise.
16486
16487         * lib/mkdirat.c (mkdirat): New file and function.
16488         * lib/openat.h (mkdirat): Declare.
16489
16490         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
16491
16492         * lib/openat.h (openat_permissive): Declare.
16493         (openat_ro): Define.
16494
16495         * lib/openat.c (EXPECTED_ERRNO): New macro.
16496         (openat_permissive): New function -- used in remove.c rewrite.
16497         (all functions): Set errno just before returning, only if there
16498         was an actual failure.
16499         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
16500
16501         Emulate openat-family functions using Linux's procfs, if possible.
16502         Idea and some code based on Ulrich Drepper's glibc changes.
16503
16504         * lib/openat.c: (BUILD_PROC_NAME): New macro.
16505         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
16506         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
16507         before falling back on save_cwd and restore_cwd.
16508         (fdopendir, fstatat, unlinkat): Likewise.
16509
16510         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
16511         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
16512
16513         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
16514         as second argument to va_arg.  Otherwise, some versions of gcc
16515         warn that `if this code is reached, the program will abort'.
16516
16517 2006-01-09  Jim Meyering  <jim@meyering.net>
16518
16519         Sync from coreutils.
16520         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
16521         Require openat-priv.h.
16522
16523 2006-01-09  Bruno Haible  <bruno@clisp.org>
16524
16525         * modules/strnlen (Include): Use strnlen.h.
16526
16527 2006-01-09  Bruno Haible  <bruno@clisp.org>
16528
16529         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
16530
16531 2006-01-09  Bruno Haible  <bruno@clisp.org>
16532
16533         * lib/sysexit_.h (EX_OK): New macro.
16534         Suggested by Martin Lambers <marlam@marlam.de>.
16535
16536 2006-01-09  Bruno Haible  <bruno@clisp.org>
16537
16538         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
16539         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
16540
16541 2006-01-09  Bruno Haible  <bruno@clisp.org>
16542
16543         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
16544         numbers.
16545
16546 2006-01-09  Bruno Haible  <bruno@clisp.org>
16547
16548         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
16549         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
16550         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
16551         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
16552
16553 2006-01-09  Bruno Haible  <bruno@clisp.org>
16554
16555         * build-aux/javacomp.sh.in: New file, moved from lib/.
16556         * modules/javacomp-script (Files): Update.
16557         (configure.ac): Add AC_CONFIG_FILES invocation.
16558         (EXTRA_DIST): Remove variable.
16559
16560         * build-aux/javaexec.sh.in: New file, moved from lib/.
16561         * modules/javaexec (Files): Update.
16562         (configure.ac): Add AC_CONFIG_FILES invocation.
16563         (EXTRA_DIST): Remove javaexec.sh.in.
16564
16565         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
16566         * modules/csharpcomp-script (Files): Update.
16567         (configure.ac): Add AC_CONFIG_FILES invocation.
16568         (EXTRA_DIST): Remove variable.
16569
16570         * build-aux/csharpexec.sh.in: New file, moved from lib/.
16571         * modules/csharpexec (Files): Update.
16572         (configure.ac): Add AC_CONFIG_FILES invocation.
16573         (EXTRA_DIST): Remove csharpexec.sh.in.
16574
16575 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
16576
16577         Sync from coreutils.
16578
16579         Add POSIX ACL support
16580         * lib/acl.h (copy_acl, set_acl): Add declarations.
16581         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
16582         systems other than Linux.
16583         (chmod_or_fchmod): New function: use fchmod when possible,
16584         and chmod otherwise.
16585         (file_has_acl): Add a POSIX ACL implementation, with a
16586         Linux-specific subcase.
16587         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
16588         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
16589         acls are unsupported.
16590         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
16591         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
16592         are unsupported.
16593
16594 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
16595
16596         Sync from coreutils.
16597         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
16598
16599 2006-01-07  Bruno Haible  <bruno@clisp.org>
16600
16601         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
16602         gl_EARLY.
16603
16604 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
16605
16606         * lib/strftime.c (tzname): Don't declare if it is already #defined.
16607         Problem reported for Mingw by Mark Junker.
16608
16609 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
16610
16611         * README: Gnulib normally doesn't generate a tarball.
16612
16613 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
16614
16615         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
16616         long int, not int, for nanosecond counts, so that people who are
16617         used to POSIX struct timespec won't be surprised.  Reported by Jim
16618         Meyering.
16619
16620 2005-12-28  Bruno Haible  <bruno@clisp.org>
16621
16622         * build-aux/config.rpath: Update from GNU gettext.
16623
16624 2005-12-16  Jim Meyering  <jim@meyering.net>
16625
16626         * modules/fprintftime: New module.
16627         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
16628
16629 2005-12-16  Jim Meyering  <jim@meyering.net>
16630
16631         * m4/fprintftime.m4: New file.
16632
16633 2005-12-16  Jim Meyering  <jim@meyering.net>
16634
16635         * lib/fprintftime.c, lib/fprintftime.h: New files.
16636
16637 2005-12-15  Simon Josefsson  <jas@extundo.com>
16638
16639         * modules/socklen (configure.ac): Fix M4 macro name, to align with
16640         new m4/socklen.m4.
16641
16642 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
16643
16644         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
16645         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
16646
16647 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
16648
16649         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
16650         * lib/argp-help.c (fill_in_uparams): Check if the constructed
16651         struct uparams is valid. Fall back to the default values if it is
16652         not.
16653
16654 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
16655
16656         * modules/argp (Files): Add argp-pin.c
16657         (Depends-on): dirname
16658         (lib_SOURCES): Add argp-pin.c
16659
16660 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
16661
16662         * m4/argp.m4:  Check if program_invocation_name and
16663         program_invocation_short_name are declared and define appropriate
16664         macros if they are not.
16665
16666 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
16667
16668         * lib/argp-help.c (__argp_base_name): New function
16669         (__argp_short_program_name): Rewrite using __argp_base_name
16670         * lib/argp-namefrob.h: Define program_invocation_name and
16671         program_invocation_short_name if requested
16672         (__argp_base_name): Add prototype
16673         * lib/argp-parse.c (argp_def): Use gettext wrappers
16674         (argp_default_parser): Use __argp_base_name
16675         * lib/argp-pin.c: New file. Defines program_invocation_name and
16676         program_invocation_short_name on systems that lack them.
16677
16678 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
16679
16680         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
16681         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
16682         porting problem reported by Georg Schwarz in
16683         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
16684
16685 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
16686
16687         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
16688         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
16689         porting problem reported by Georg Schwarz in
16690         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
16691
16692 2005-12-05  Bruno Haible  <bruno@clisp.org>
16693
16694         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
16695         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
16696         Reported by Mark Junker <mjscod@gmx.de>.
16697
16698 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
16699
16700         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
16701         Use implementation from Albert Chin, with some
16702         comments/corrections by Stepan Kasal and myself.
16703
16704 2005-12-02  Bruno Haible  <bruno@clisp.org>
16705
16706         * gnulib-tool (func_import): Accept GPLed build tool modules when
16707         --lgpl is given.
16708         * modules/csharpcomp-script: New file.
16709         * modules/csharpcomp: Depend on it.
16710         * modules/javacomp-script: New file.
16711         * modules/javacomp: Depend on it.
16712         Suggested by Simon Josefsson.
16713
16714 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
16715
16716         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
16717         statement, to work around an HP-UX 10.20 compiler bug reported by
16718         Peter O'Gorman.
16719
16720 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
16721
16722         * modules/savedir (Depends-on): Add openat.
16723
16724 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
16725
16726         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
16727         (uintmax_t) [defined uintmax_t]: Do not declare.
16728         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
16729         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
16730         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
16731         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
16732         sake of portability to weird hosts that C allows (though we don't
16733         know of any practical examples).
16734
16735         * lib/savedir.h (fdsavedir): New decl.
16736         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
16737         contains most of the former guts of savedir.
16738         (savedir): Use savedirstream.
16739         Include "openat.h".
16740
16741 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
16742
16743         * modules/obstack (Files): Add m4/ulonglong.m4.
16744         Problem reported by Davide Angelocola.
16745
16746 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
16747
16748         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
16749         coreutils no longer futzes with rounding modes.
16750
16751 2005-11-14  Jim Meyering  <jim@meyering.net>
16752
16753         * lib/mkstemp-safer.c: Include <config.h>, required for possible
16754         replacement of mkstemp.
16755
16756 2005-11-10  Simon Josefsson  <jas@extundo.com>
16757
16758         * lib/readline.c: Remove EOL.
16759
16760 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16761
16762         * modules/gethrxtime (Depends-on): Add gettime.
16763
16764 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16765
16766         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
16767         or gettimeofday; no longer needed.
16768
16769 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16770
16771         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
16772         time business.
16773         (gethrxtime) [! (HAVE_NANOUPTIME
16774         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
16775         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
16776         our own approximation.
16777
16778 2005-11-08  Eric Blake  <ebb9@byu.net>
16779
16780         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
16781
16782 2005-11-08  Eric Blake  <ebb9@byu.net>
16783
16784         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
16785
16786 2005-11-04  Bruno Haible  <bruno@clisp.org>
16787
16788         * gnulib-tool: Implement --update mode.
16789
16790 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
16791
16792         Fix porting problem reported by Theodoros V. Kalamatianos.
16793         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
16794         Don't assume that futimes failing means we must fail.
16795
16796 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
16797
16798         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
16799         variables to suggest the intended function of the PATH_MAX check.
16800
16801 2005-10-30  Kean Johnston  <jkj@sco.com>
16802
16803         Trivial changes to support SCO systems.
16804         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
16805         as PATH_MAX.
16806         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
16807         where __ptr is null when no I/O is pending.
16808
16809 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
16810
16811         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
16812         leave errno alone.  Problem reported by Dmitry V. Levin.
16813
16814 2005-10-28  Simon Josefsson  <jas@extundo.com>
16815
16816         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
16817         Test more.
16818
16819         * tests/test-gc-md2.c, tests/test-md2.c: New files.
16820
16821         * modules/md2, modules/md2-tests: New files.
16822
16823 2005-10-28  Simon Josefsson  <jas@extundo.com>
16824
16825         * m4/inet_ntop.m4: More tests.
16826
16827         * m4/gc-md2.m4, md2.m4: New file.
16828
16829 2005-10-28  Simon Josefsson  <jas@extundo.com>
16830
16831         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
16832         "restrict" keywords, as per POSIX.  Protect the function
16833         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
16834         Don't use K&R prototypes.  Check the sprintf return values.
16835         Re-define EAFNOSUPPORT if not present.  Indent.
16836
16837         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
16838         suggested by Bruno Haible <bruno@clisp.org>.
16839
16840         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
16841
16842         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
16843
16844         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
16845         libgcrypt).
16846
16847         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
16848
16849         * lib/md2.h, lib/md2.c: New files.
16850
16851 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
16852
16853         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
16854         errno alone.  Problem reported by Frederic Jolliton.
16855
16856 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
16857
16858         * modules/verify (License): Change from GPL to LGPL.  This is a
16859         tiny module and there are apparently near-equivalents that are
16860         under the BSD license.
16861
16862 2005-10-24  Simon Josefsson  <jas@extundo.com>
16863
16864         * modules/sha1: Relicense to LGPL.
16865
16866 2005-10-24  Simon Josefsson  <jas@extundo.com>
16867
16868         * lib/md4.h: Shrink buffer size, now that we changed the type.
16869
16870 2005-10-23  Simon Josefsson  <jas@extundo.com>
16871
16872         * gnulib-tool (func_import): Fix --tests-base.
16873
16874 2005-10-22  Simon Josefsson  <jas@extundo.com>
16875
16876         * modules/arcfour (Depends-on): Need stdint.
16877
16878 2005-10-22  Simon Josefsson  <jas@extundo.com>
16879
16880         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
16881         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
16882
16883 2005-10-22  Simon Josefsson  <jas@extundo.com>
16884
16885         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
16886         suggested by Bruno Haible <bruno@clisp.org>.
16887
16888 2005-10-22  Simon Josefsson  <jas@extundo.com>
16889
16890         * lib/crc.h: Include stddef.h, for size_t.
16891
16892 2005-10-22  Simon Josefsson  <jas@extundo.com>
16893
16894         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
16895         arcfour_context struct (simplify test vector testing in GNU
16896         Shishi).
16897
16898 2005-10-21  Simon Josefsson  <jas@extundo.com>
16899
16900         * modules/des, modules/des-tests: New files.
16901
16902         * modules/gc-des, modules/gc-des-tests: New files.
16903
16904         * tests/test-des.c, tests/test-gc-des.c: New file.
16905
16906 2005-10-21  Simon Josefsson  <jas@extundo.com>
16907
16908         * modules/arctwo, modules/arctwo-tests: New files.
16909
16910         * tests/test-arctwo.c: New file.
16911
16912         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
16913
16914         * tests/test-gc-arctwo.c: New file.
16915
16916 2005-10-21  Simon Josefsson  <jas@extundo.com>
16917
16918         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
16919         Bruno Haible <bruno@clisp.org>.
16920
16921         * m4/gc-des.m4: New file.
16922
16923 2005-10-21  Simon Josefsson  <jas@extundo.com>
16924
16925         * m4/arctwo.m4: New file.
16926
16927         * m4/gc-arctwo.m4: New file.
16928
16929 2005-10-21  Simon Josefsson  <jas@extundo.com>
16930
16931         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
16932         block.
16933
16934 2005-10-21  Simon Josefsson  <jas@extundo.com>
16935
16936         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
16937         <bruno@clisp.org>.
16938
16939         * lib/hmac-sha1.c (hmac_sha1): Likewise.
16940
16941         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
16942         Bruno Haible <bruno@clisp.org>.
16943
16944         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
16945         <bruno@clisp.org>.
16946
16947 2005-10-21  Simon Josefsson  <jas@extundo.com>
16948
16949         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
16950
16951 2005-10-21  Simon Josefsson  <jas@extundo.com>
16952
16953         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
16954
16955 2005-10-21  Simon Josefsson  <jas@extundo.com>
16956
16957         * lib/des.h, lib/des.c: New files.
16958
16959         * lib/gc-gnulib.c: Support DES.c
16960
16961 2005-10-21  Simon Josefsson  <jas@extundo.com>
16962
16963         * lib/arctwo.h, lib/arctwo.c: New files.
16964
16965         * lib/gc-gnulib.c: Support ARCTWO.
16966
16967 2005-10-21  Simon Josefsson  <jas@extundo.com>
16968
16969         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
16970         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
16971
16972 2005-10-21  Simon Josefsson  <jas@extundo.com>
16973
16974         * gnulib-tool (func_import, func_create_testdir): Define automake
16975         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
16976         Makefile.am snippet),
16977         suggested by Bruno Haible <bruno@clisp.org>.
16978
16979         * modules/gc (Makefile.am): Use it.
16980
16981 2005-10-21  Bruno Haible  <bruno@clisp.org>
16982
16983         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
16984         patch.
16985
16986 2005-10-19  Simon Josefsson  <jas@extundo.com>
16987
16988         * tests/test-gc-rijndael.c: New file.
16989
16990         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
16991
16992 2005-10-19  Simon Josefsson  <jas@extundo.com>
16993
16994         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
16995         interface too.
16996
16997 2005-10-19  Simon Josefsson  <jas@extundo.com>
16998
16999         * tests/test-gc-arcfour.c: New file.
17000
17001         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
17002
17003 2005-10-19  Simon Josefsson  <jas@extundo.com>
17004
17005         * modules/gc-md4, modules/gc-md4-tests: New file.
17006
17007         * tests/test-gc-md4.c: New file.
17008
17009 2005-10-19  Simon Josefsson  <jas@extundo.com>
17010
17011         * m4/gc-md4.m4: New file.
17012
17013 2005-10-19  Simon Josefsson  <jas@extundo.com>
17014
17015         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
17016         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
17017         <kasal@ucw.cz>.
17018
17019 2005-10-19  Simon Josefsson  <jas@extundo.com>
17020
17021         * m4/gc-arcfour.m4: New file.
17022
17023         * m4/gc-rijndael.m4: New file.
17024
17025 2005-10-19  Simon Josefsson  <jas@extundo.com>
17026
17027         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
17028
17029 2005-10-19  Simon Josefsson  <jas@extundo.com>
17030
17031         * lib/gc-gnulib.c: Support ARCFOUR.
17032
17033 2005-10-19  Simon Josefsson  <jas@extundo.com>
17034
17035         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
17036         support.
17037
17038         * lib/gc.h: Add ECB enum type.
17039
17040         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
17041
17042 2005-10-18  Simon Josefsson  <jas@extundo.com>
17043
17044         * tests/test-md5.c: New file.
17045
17046         * modules/md5-tests: New file.
17047
17048 2005-10-18  Simon Josefsson  <jas@extundo.com>
17049
17050         * tests/test-md4.c: New file.
17051
17052         * modules/md4, modules/md4-tests: New files.
17053
17054 2005-10-18  Simon Josefsson  <jas@extundo.com>
17055
17056         * m4/md4.m4: New file.
17057
17058 2005-10-18  Simon Josefsson  <jas@extundo.com>
17059
17060         * lib/md4.h, lib/md4.c: New files, based on md5.?.
17061
17062 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
17063
17064         * gnulib-tool (func_create_testdir): Omit the second check whether
17065         BUILT_SOURCES in nonempty.
17066
17067 2005-10-17  Simon Josefsson  <jas@extundo.com>
17068
17069         * tests/test-rijndael.c: New file.
17070
17071 2005-10-17  Simon Josefsson  <jas@extundo.com>
17072
17073         * modules/sha1: Depend on stdint instead of md5.
17074
17075         * modules/md5: Depend on stdint, remove uint32_t.
17076
17077 2005-10-17  Simon Josefsson  <jas@extundo.com>
17078
17079         * modules/gc-sha1-tests: New file.
17080
17081         * tests/test-gc-sha1.c: New file.
17082
17083 2005-10-17  Simon Josefsson  <jas@extundo.com>
17084
17085         * m4/md5.m4: Remove call to uint32_t.m4.
17086
17087 2005-10-17  Simon Josefsson  <jas@extundo.com>
17088
17089         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
17090
17091         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
17092         md5.h.
17093
17094         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
17095
17096         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
17097
17098 2005-10-17  Simon Josefsson  <jas@extundo.com>
17099
17100         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
17101
17102 2005-10-17  Simon Josefsson  <jas@extundo.com>
17103
17104         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
17105
17106 2005-10-17  Simon Josefsson  <jas@extundo.com>
17107
17108         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
17109
17110         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
17111
17112 2005-10-17  Bruno Haible  <bruno@clisp.org>
17113
17114         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
17115         that it can also be used in a test.
17116
17117 2005-10-16  Bruno Haible  <bruno@clisp.org>
17118
17119         * gnulib-tool (func_emit_tests_Makefile_am): Also define
17120         TESTS_ENVIRONMENT, so that individual tests can augment it.
17121
17122         * gnulib-tool (func_create_testdir): Use an intermediate target for
17123         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
17124         macros, like $(ALLOCA_H), which cannot be passed through the command
17125         line.
17126
17127 2005-10-15  Simon Josefsson  <jas@extundo.com>
17128
17129         * modules/rijndael-tests: New file.
17130
17131         * modules/rijndael: New file.
17132
17133 2005-10-15  Simon Josefsson  <jas@extundo.com>
17134
17135         * m4/rijndael.m4: New file.
17136
17137 2005-10-15  Simon Josefsson  <jas@extundo.com>
17138
17139         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
17140
17141         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
17142
17143 2005-10-14  Simon Josefsson  <jas@extundo.com>
17144
17145         * tests/test-arcfour.c: New file.
17146
17147         * modules/arcfour, modules/arcfour-tests: New files.
17148
17149 2005-10-14  Simon Josefsson  <jas@extundo.com>
17150
17151         * m4/arcfour.m4: New file.
17152
17153 2005-10-14  Simon Josefsson  <jas@extundo.com>
17154
17155         * lib/arcfour.h, lib/arcfour.c: New files.
17156
17157 2005-10-14  Roland McGrath  <roland@redhat.com>
17158
17159         Import from libc.  [BZ #1331]
17160         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
17161         macro argument.
17162         Reported by Matej Vela <vela@debian.org>.
17163
17164 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
17165
17166         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
17167         include <wchar.h>; no longer needed.
17168
17169 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
17170
17171         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
17172
17173 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
17174         and  Ulrich Drepper  <drepper@redhat.com>
17175
17176         Import from libc.
17177         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
17178         instead of inline stream orientation test and two separate
17179         function calls.  Pay no attention to USE_IN_LIBIO.
17180
17181 2005-10-13  Simon Josefsson  <jas@extundo.com>
17182
17183         * modules/gc-hmac-md5-tests: New file.
17184
17185         * tests/test-gc-hmac-sha1.c: New file.
17186
17187         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
17188
17189         * modules/gc-hmac-md5-tests: New file.
17190
17191         * tests/test-gc-md5.c: New file.
17192
17193         * modules/gc-md5-tests: New file.
17194
17195 2005-10-13  Simon Josefsson  <jas@extundo.com>
17196
17197         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
17198         Move memory allocation outside of loop.
17199
17200 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
17201
17202         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
17203         intermediate directory is in a read-only file system.  Problem
17204         reported by Eric Blake.
17205
17206 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
17207
17208         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
17209
17210 2005-10-12  Simon Josefsson  <jas@extundo.com>
17211
17212         * tests/test-hmac-sha1.c: New file.
17213
17214         * modules/hmac-sha1-tests: New file.
17215
17216         * modules/hmac-sha1: New file.
17217
17218 2005-10-12  Simon Josefsson  <jas@extundo.com>
17219
17220         * modules/gc-sha1: New file.
17221
17222 2005-10-12  Simon Josefsson  <jas@extundo.com>
17223
17224         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
17225
17226         * tests/test-gc-pbkdf2-sha1.c: New file.
17227
17228 2005-10-12  Simon Josefsson  <jas@extundo.com>
17229
17230         * modules/gc-md5, modules/gc-hmac-md5: New files.
17231
17232         * modules/gc (Files): Remove md5, memxor and hmac files.
17233
17234 2005-10-12  Simon Josefsson  <jas@extundo.com>
17235
17236         * m4/gc-pbkdf2-sha1.m4: New file.
17237
17238         * m4/gc-hmac-sha1.m4: New file.
17239
17240         * m4/gc-sha1: New file.
17241
17242         * m4/hmac-sha1.m4: New file.
17243
17244 2005-10-12  Simon Josefsson  <jas@extundo.com>
17245
17246         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
17247
17248         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
17249
17250 2005-10-12  Simon Josefsson  <jas@extundo.com>
17251
17252         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
17253         suggested by Bruno Haible <bruno@clisp.org>.
17254
17255 2005-10-12  Simon Josefsson  <jas@extundo.com>
17256
17257         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
17258
17259 2005-10-12  Simon Josefsson  <jas@extundo.com>
17260
17261         * lib/gc-pbkdf2-sha1.c: New file.
17262
17263         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
17264
17265 2005-10-12  Simon Josefsson  <jas@extundo.com>
17266
17267         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
17268
17269         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
17270
17271 2005-10-12  Simon Josefsson  <jas@extundo.com>
17272
17273         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
17274         GC_USE_HMAC_MD5, respectively.
17275
17276         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
17277         (gc_md5): Fix typo.
17278
17279         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
17280
17281         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
17282
17283         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
17284
17285 2005-10-12  Bruno Haible  <bruno@clisp.org>
17286
17287         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
17288         Reported by Stepan Kasal <kasal@ucw.cz>.
17289
17290 2005-10-11  Simon Josefsson  <jas@extundo.com>
17291
17292         * tests/test-crc.c: New file.
17293
17294         * modules/crc, modules/crc-tests: New files.
17295
17296 2005-10-11  Simon Josefsson  <jas@extundo.com>
17297
17298         * m4/crc.m4: New file.
17299
17300 2005-10-11  Simon Josefsson  <jas@extundo.com>
17301
17302         * lib/gc.h: Add gc_hash and gc_hash_buffer.
17303
17304         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
17305
17306         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
17307
17308 2005-10-11  Simon Josefsson  <jas@extundo.com>
17309
17310         * lib/crc.h, lib/crc.c: New files.
17311
17312         * lib/gc.h (gc_hash_buffer): Add doc.
17313
17314 2005-10-11  Bruno Haible  <bruno@clisp.org>
17315
17316         * modules/c-strcasestr: New file.
17317         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
17318
17319 2005-10-11  Bruno Haible  <bruno@clisp.org>
17320
17321         * modules/c-strcase: New file.
17322         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
17323
17324 2005-10-11  Bruno Haible  <bruno@clisp.org>
17325
17326         * lib/strcasecmp.c: Include limits.h.
17327         (strcasecmp): Avoid integer overflow on exotic platforms.
17328         * lib/strncasecmp.c: Include limits.h.
17329         (strncasecmp): Avoid integer overflow on exotic platforms.
17330         Reported by Paul Eggert.
17331
17332 2005-10-11  Bruno Haible  <bruno@clisp.org>
17333
17334         * lib/c-strcasestr.h: New file, from GNU gettext.
17335         * lib/c-strcasestr.c: New file, from GNU gettext.
17336
17337 2005-10-11  Bruno Haible  <bruno@clisp.org>
17338
17339         * lib/c-strcase.h: New file, from GNU gettext.
17340         * lib/c-strcasecmp.c: New file, from GNU gettext.
17341         * lib/c-strncasecmp.c: New file, from GNU gettext.
17342
17343 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
17344
17345         * modules/mempcpy (License): GPL -> LGPL.
17346         * modules/strchrnul (License): Likewise.
17347         * modules/sysexits (License): Likewise.
17348
17349 2005-10-08  Simon Josefsson  <jas@extundo.com>
17350
17351         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
17352
17353 2005-10-07  Simon Josefsson  <jas@extundo.com>
17354
17355         * m4/memxor.m4: Remove gl_C_RESTRICT call.
17356
17357 2005-10-06  Simon Josefsson  <jas@extundo.com>
17358
17359         * tests/test-hmac-md5.c: New file.
17360
17361         * modules/hmac-md5-tests: New file.
17362
17363         * modules/hmac-md5: New file.
17364
17365 2005-10-06  Simon Josefsson  <jas@extundo.com>
17366
17367         * m4/hmac-md5.m4: New file.
17368
17369         * m4/memxor.m4: Require gl_C_RESTRICT.
17370
17371 2005-10-06  Simon Josefsson  <jas@extundo.com>
17372
17373         * lib/memxor.c (memxor): Avoid casts and warnings.
17374
17375 2005-10-06  Simon Josefsson  <jas@extundo.com>
17376
17377         * lib/hmac-md5.c: New file.
17378
17379         * lib/hmac.h: New file.
17380
17381 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
17382
17383         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
17384         promotes to int, not unsigned int, to catch the AIX 5.3
17385         compiler bug.
17386
17387 2005-10-05  Simon Josefsson  <jas@extundo.com>
17388
17389         * modules/memxor: New file.
17390
17391         * modules/iconv (Files): Move config.rpath to havelib, it is used
17392         there.
17393
17394         * modules/havelib (Files): Add config.rpath.
17395
17396 2005-10-05  Simon Josefsson  <jas@extundo.com>
17397
17398         * m4/memxor.m4: New file.
17399
17400 2005-10-05  Simon Josefsson  <jas@extundo.com>
17401
17402         * lib/memxor.c (memxor): Fix compiler error.
17403
17404         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
17405         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
17406
17407         * lib/memxor.h, lib/memxor.c: New files.
17408
17409         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
17410         we assume all systems have it, suggested by Jim Meyering
17411         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
17412         any systems lack sys/socket.h; mingw32 is known to lack it, but we
17413         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
17414         same reasons.
17415
17416 2005-10-05  Simon Josefsson  <jas@extundo.com>
17417
17418         * config/srclist.txt: Add glibc bug 1423 for md5.h.
17419
17420 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
17421
17422         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
17423         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
17424         needed, since the source code now assumes these .h files.
17425
17426 2005-10-05  Derek Price  <derek@ximbiot.com>
17427
17428         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
17429
17430 2005-10-05  Bruno Haible  <bruno@clisp.org>
17431
17432         * modules/stdint (License): Change to LGPL.
17433
17434 2005-10-04  Simon Josefsson  <jas@extundo.com>
17435
17436         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
17437         D. Baushke" <mdb@gnu.org>.
17438
17439 2005-10-04  Bruno Haible  <bruno@clisp.org>
17440
17441         * lib/verify.h (verify_true): Provide alternative definition for C++.
17442
17443 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
17444
17445         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
17446         (SSIZE_MAX): New macro, if not already defined.
17447         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
17448         than 2 GiB.
17449
17450 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
17451
17452         Sync from coreutils.
17453         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
17454         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
17455         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
17456         ULLONG_MAX doesn't work with 2.7.2.1.
17457
17458 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
17459
17460         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
17461         From Ben Pfaff.
17462
17463         * modules/exclude (Depends-on): Depend on verify.
17464         * modules/strtoimax (Depends-on): Likewise.
17465         * modules/utimecmp (Depends-on): Likewise.
17466
17467 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
17468
17469         * lib/exclude.c: Include verify.h.
17470         (verify): Remove.  All callers changed to use verify.h's version.
17471         * lib/strtoimax.c: Likewise.
17472         * lib/utimecmp.c: Likewis.e
17473
17474         Sync from coreutils.
17475         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
17476         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
17477         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
17478         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
17479         bother returning ENOSYS if settimeofday or stime fails; just let
17480         them return whatever errno they want to return.
17481         * lib/utimens.c: Include unistd.h, for dup2.
17482         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
17483         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
17484
17485 2005-10-02  Jim Meyering  <jim@meyering.net>
17486
17487         Sync from coreutils.
17488         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
17489         from glibc-2.2.5 that fails for read-only files.
17490
17491 2005-10-02  Jim Meyering  <jim@meyering.net>
17492
17493         Sync from coreutils.
17494         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
17495         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
17496         `#if HAVE_CONFIG_H'.
17497         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
17498         Remove AT_FDCWD test.
17499         Do not consume the fd unless successful.
17500         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
17501         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
17502         block, so that we don't even try to compile it if settimeofday is
17503         available.  This works around a compilation failure on OSF1 V5.1,
17504         due to stime requiring a `long int*' while tv_sec is `int'.
17505
17506 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
17507
17508         Sync from coreutils.
17509         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
17510         against `yes', rather than just testing for nonempty.
17511
17512 2005-10-01  Simon Josefsson  <jas@extundo.com>
17513
17514         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
17515         and Darwin.
17516
17517         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
17518         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
17519         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
17520         freeaddrinfo and gai_strerror are declared by the POSIX headers.
17521         Check if struct addrinfo is declared.
17522
17523 2005-10-01  Simon Josefsson  <jas@extundo.com>
17524
17525         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
17526         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
17527         AI_* and EAI_* definitions.  Protect function declarations.
17528
17529 2005-10-01  Jim Meyering  <jim@meyering.net>
17530
17531         Sync from coreutils.
17532
17533         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
17534         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
17535         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
17536         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
17537         in the inet and nsl libraries.  Required on Solaris 5.7.
17538
17539 2005-10-01  Jim Meyering  <jim@meyering.net>
17540
17541         Sync from coreutils.
17542         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
17543         in the inet and nsl libraries.  Required on Solaris 5.7.
17544
17545 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
17546
17547         * lib/getdelim.c (getdelim): Remove unused variables.
17548
17549 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
17550
17551         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
17552         so that the code works even with ancient cpp.  Portability problem
17553         with GCC 2.7.2.1 reported by Thomas M.Ott.
17554
17555 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
17556
17557         * modules/regex (Depends-on): Add strcase.
17558
17559         * modules/gethostname (Licence): Change from GPL to LGPL, since
17560         gethostname.c is a trivial implementation of a standard library
17561         function.
17562         * modules/poll (License): Change from GPL to LGPL, since it's
17563         derived from LGPL code.
17564
17565 2005-09-27  Jim Meyering  <jim@meyering.net>
17566
17567         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
17568         HAVE_CONFIG_H.
17569
17570         * lib/intprops.h (signed_type_or_expr__): Define.
17571         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
17572         for unsigned types.
17573
17574 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
17575
17576         * lib/verify.h (verify_expr): Remove, replacing with:
17577         (verify_true): New macro that returns true instead of void.
17578         (verify_type__): Remove.
17579         (verify): Use verify_true rather than verify_type__.
17580
17581 2005-09-26  Bruno Haible  <bruno@clisp.org>
17582
17583         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
17584         is necessary.
17585         (lib_SOURCES): Remove mbchar.c.
17586         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
17587         (Files): Add m4/mbrtowc.m4.
17588         * modules/mbiter: Likewise.
17589         * modules/mbuiter: Likewise.
17590
17591 2005-09-26  Bruno Haible  <bruno@clisp.org>
17592
17593         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
17594         compile mbchar.c if they are not both present.
17595         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
17596         * m4/mbiter.m4 (gl_MBITER): Likewise.
17597         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
17598         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
17599         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
17600
17601 2005-09-25  Jim Meyering  <jim@meyering.net>
17602
17603         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
17604         also uses socklen_t.
17605
17606 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
17607
17608         * lib/utimens.c (ENOSYS): Define if not already defined.
17609         (futimens): Support having a null PATH if the file descriptor
17610         is nonnegative.
17611
17612         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
17613         Remove.
17614         (__attribute): Define to empty unless GCC 3.1 or later.
17615         This works around a core dump on OpenBSD 3.4, which has GCC
17616         2.95.3, which dumps core when given __attribute__(()).  It also
17617         simplifies other tests, since we really don't want to bother with
17618         worrying about which ancient version of GCC supported what.
17619         Original problem reported by Yoann Vandoorselaere, with part of
17620         the fix suggested by Derek Price.
17621
17622 2005-09-24  Jim Meyering  <jim@meyering.net>
17623
17624         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
17625         so we can once again use a positive bitfield width of 1 -- now we
17626         don't have to explain why we were using a bitfield width of 2.
17627
17628 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
17629
17630         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
17631         and similarly for the other external symbols.  Problem reported
17632         by James Gallager.
17633
17634         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
17635         bug reported by Jim Meyering.
17636
17637         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
17638         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
17639         not needed, since socklen is a prerequisite module.
17640
17641 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
17642
17643         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
17644         Problem reported by Eric Blake.
17645         (getaddrinfo): Initialize se so that it's not garbage.
17646         Redo internal storage allocation so that it doesn't make unportable
17647         assumptions about alignment.
17648         Fix a memory leak.
17649
17650         * lib/utimens.c (futimens): Use futimesat if available.
17651         Prefer it to futimes since it doesn't have the futimes bug.
17652
17653         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
17654         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
17655         Instead, declare a function that returns a pointer to an array,
17656         and use verify_type__ to declare the size of the array.
17657         Problem and germ of a solution reported by Bruno Haible.
17658         (verify_type__): Use 2, not 1, for bitfield size, to avoid
17659         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
17660
17661 2005-09-23  Jim Meyering  <jim@meyering.net>
17662
17663         Sync from coreutils.
17664         Correct build failure (socklen_t not defined) on at least
17665         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
17666         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
17667
17668 2005-09-23  Jim Meyering  <jim@meyering.net>
17669
17670         * modules/getaddrinfo (Depends-on): Add socklen.
17671
17672 2005-09-23  Bruno Haible  <bruno@clisp.org>
17673
17674         * tests/test-verify.c: New file.
17675
17676 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
17677
17678         Sync from coreutils.
17679
17680         * modules/argmatch (Depends-on): Add verify.
17681         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
17682         unistd-safer.
17683         * modules/save-cwd (Depends-on): Likewise.
17684
17685         * modules/openat (Files): Add lib/openat-die.c.
17686         (Depends-on): Remove error, exitfail.
17687         Add dirname.
17688
17689         * modules/verify: New file.
17690         * MODULES.html.sh (Diagnostics <assert.h>): New section,
17691         with "verify" module.
17692
17693 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
17694
17695         Sync from coreutils.
17696
17697         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
17698         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
17699         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
17700         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
17701         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
17702         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
17703         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
17704         Don't bother checking for string.h, stdlib.h, unistd.h.
17705         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
17706         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
17707         module's job.
17708         * m4/jm-macros.m4 (gl_MACROS): Likewise.
17709         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
17710
17711         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
17712         (gl_GETDATE): Use it.
17713
17714         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
17715
17716 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
17717
17718         Sync from coreutils.
17719
17720         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
17721         stat-time.h.
17722         * lib/argmatch.h: Include verify.h
17723         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
17724         (ARGMATCH_ASSERT): Remove; unused.
17725         * lib/canonicalize.c: Assume STDC_HEADERS.
17726         * lib/exclude.c: Include "strcase.h".
17727         * lib/regex_internal.h [!defined _LIBC]: Likewise.
17728         * lib/getusershell.c: Include stdio--.h rather than stdio.h
17729         and stdio-safer.h.
17730         (getusershell): Call fopen, not fopen_safer.
17731         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
17732         Do not include unistd-safer.h.
17733         (save_cwd): Don't call fd_safer; no longer needed
17734         now that we include fcntl--.h.
17735
17736         * lib/getdate.y (relative_time): New type.
17737         (RELATIVE_TIME_0): New constant.
17738         (parser_control): Use relative_time instead of doing it ourselves.
17739         (%union): Add new relative_time rel member.
17740         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
17741         Now typeless.
17742         (relunit, relunit_snumber): Now of type rel.
17743         (zone, rel, relunit, get_date): Adjust to above changes.
17744
17745         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
17746         Do not include unistd-safer.h.
17747         (getloadavg): Don't call fd_safer; no longer needed
17748         now that we include fcntl--.h.
17749
17750         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
17751         (make_dir_parents): Treat ENOSYS like EEXIST.
17752
17753         Improve quality of diagnostics on restore_cwd failure.
17754         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
17755         (make_dir_parents): Last arg is now int * (for errno), not bool *.
17756         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
17757         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
17758         each time through the loop.  Do not diagnose restore_cwd failure;
17759         that is the caller's job (and perhaps the caller does not care).
17760
17761         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
17762         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
17763         If the file already exists but is not a directory, don't bother
17764         to try to make its parents.
17765         Close potential file descriptor leak if we can't chdir("/") (!).
17766         Don't always return true if chdir($PWD) fails; return true only
17767         if the requested action was done successfully (except for the
17768         chdir($PWD)).
17769         Don't log final directory unless we actually made it.
17770         Refactor to avoid duplicate code to fix up permissions.
17771         Don't attempt to fix up parent permissions if chdir($PWD) fails.
17772
17773         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
17774         to make it a bit faster and (I hope) clearer.
17775         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
17776         Fix bug in formats like %2N.
17777
17778         * lib/verify.h: New file.
17779
17780 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
17781
17782         Sync from coreutils.
17783         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
17784
17785 2005-09-22  Jim Meyering  <jim@meyering.net>
17786
17787         Sync from coreutils.
17788
17789         * m4/lstat.m4 (gl_FUNC_LSTAT):
17790         Use AC_LIBSOURCES to require lstat.c and lstat.h.
17791         Remove obsolete comment.
17792         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
17793         * m4/xstrtod.m4: Likewise.
17794
17795         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
17796
17797 2005-09-22  Jim Meyering  <jim@meyering.net>
17798
17799         Sync from coreutils.
17800
17801         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
17802
17803         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
17804         the .tm_year member, since otherwise gcc-4.0 would now warn about
17805         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
17806
17807         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
17808         order to avoid an unsuppressible warning from gcc on 64-bit systems.
17809
17810         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
17811         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
17812         when run in a time zone for which daylight savings time is in effect
17813         for the starting date.
17814
17815         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
17816         stop us from restricting permissions of just-created absolute-named
17817         directories.
17818         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
17819         to restore initial working directory.
17820         * lib/mkdir-p.c (make_dir_parents): New parameter:
17821         different_working_dir, to tell caller if/when we change the working
17822         directory and are unable to return to the initial one.
17823         * lib/mkdir-p.h (make_dir_parents): Update prototype.
17824         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
17825         `return false'.  This fixes a bug introduced on 2004-07-30.
17826
17827         * lib/openat.c (fdopendir): Be sure to close the supplied
17828         file descriptor before returning.  This makes our replacement
17829         implementation a little closer to Solaris's, where fdopendir
17830         ties the file descriptor to the returned DIR* pointer.
17831         * lib/openat.c (unlinkat): New function.
17832         * lib/openat.h (unlinkat): Add prototype.
17833         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
17834         (openat_restore_fail): Rename from openat_restore_die.
17835         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
17836
17837         Provide an alternative to exiting immediately upon save_cwd or
17838         restore_cwd failure.  Now, an application can arrange e.g.,
17839         to perform a longjump in that case.
17840         * lib/openat.c: Include dirname.h.
17841         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
17842         (rpl_openat, fdopendir, fstatat): Call openat_save_die
17843         and openat_restore_die rather than calling error directly.
17844         Don't include "error.h" or "exitfail.h"; they're no longer needed.
17845
17846         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
17847         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
17848         define.
17849
17850         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
17851         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
17852                             int utc, int nanoseconds);
17853         Background:
17854         date should not have to allocate a megabyte of virtual memory to
17855         handle a format argument like +%1048575T.  When implemented with
17856         strftime, it must allocate such a buffer, use strftime to fill it
17857         in, print it, then free it.
17858         With fprintftime, it simply prints everything and exits.
17859         With no need for memory allocation, that's one fewer way to fail.
17860         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
17861         optional field width, not before, so we accept %9:z, not %:9z.
17862         (my_strftime): Be sure to use L_('x') for literals.
17863
17864         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
17865         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
17866         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
17867         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
17868         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
17869         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
17870         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
17871         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
17872         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
17873         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
17874         * lib/xgethostname.c, lib/xreadlink.c:
17875         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
17876
17877         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
17878         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
17879         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
17880         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
17881         and don't include <sys/file.h>).
17882
17883 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
17884
17885         Sync from coreutils.
17886
17887         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
17888         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
17889         [!LDAV_DONE]: Avoid unused variable warning.
17890
17891 2005-09-21  Bruno Haible  <bruno@clisp.org>
17892
17893         * lib/unicodeio.h (unicode_to_mb): New declaration.
17894
17895 2005-09-20  Derek Price  <derek@ximbiot.com>
17896
17897         * lib/getaddrinfo.c: Don't include <netdb.h> included from
17898         getaddrinfo.h.
17899
17900 2005-09-20  Bruno Haible  <bruno@clisp.org>
17901
17902         * gnulib-tool: Remove trailing slashes from the values specified for
17903         --source-base, --m4-base, --tests-base, --aux-dir.
17904         Suggested by Simon Josefsson <jas@extundo.com>.
17905
17906 2005-09-20  Bruno Haible  <bruno@clisp.org>
17907
17908         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
17909         func_modules_to_filelist, func_import, func_create_testdir): Make all
17910         sorting results locale-independent, so that gnulib-cache.m4 doesn't
17911         change when gnulib-tool is invoked in a different locale.
17912
17913 2005-09-19  Simon Josefsson  <jas@extundo.com>
17914
17915         * m4/socklen.m4: Fix typo.
17916
17917 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
17918
17919         Use a consistent style for including <config.h>.
17920         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
17921         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
17922         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
17923         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
17924         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
17925         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
17926         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
17927         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
17928         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
17929         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
17930         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
17931         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
17932         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
17933         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
17934         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
17935         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
17936         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
17937         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
17938         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
17939         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
17940         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
17941         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
17942         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
17943         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
17944         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
17945         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
17946         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
17947         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
17948         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
17949         lib/xstrtoumax.c, lib/yesno.c:
17950         Standardize inclusion of config.h.
17951         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
17952         lib/inttostr.h:  Removed inclusion of config.h from header files.
17953         * lib/inttostr.c:  Adjusted in-tree users.
17954         * lib/timespec.h: Remove superfluous warning to include config.h.
17955         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
17956         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
17957         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
17958         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
17959         config.h with HAVE_CONFIG_H.
17960
17961 2005-09-19  Jim Meyering  <jim@meyering.net>
17962
17963         * modules/pathmax (License): Change to LGPL.
17964
17965 2005-09-19  Derek Price  <derek@ximbiot.com>
17966
17967         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
17968
17969 2005-09-19  Bruno Haible  <bruno@clisp.org>
17970
17971         * gnulib-tool (import): Provide default for --tests-base.
17972
17973 2005-09-19  Bruno Haible  <bruno@clisp.org>
17974
17975         * doc/quote.texi: New file, extracted from gnulib.texi.
17976         * doc/ctime.texi: New file, extracted from gnulib.texi.
17977         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
17978         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
17979         * doc/gnulib.texi: Include them.
17980
17981 2005-09-18  Bruno Haible  <bruno@clisp.org>
17982
17983         Portability fix.
17984         * gnulib-tool (func_readlink): New function.
17985         (func_ln_if_changed): Use it.
17986
17987 2005-09-18  Bruno Haible  <bruno@clisp.org>
17988
17989         * gnulib-tool: Support --with-tests also with --import.
17990         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
17991         (func_import): Use variables $testsbase and $inctests. Emit a
17992         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
17993         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
17994         SUBDIRS += $testsdir.
17995         (func_create_testdir): Update.
17996
17997 2005-09-18  Bruno Haible  <bruno@clisp.org>
17998
17999         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
18000         instead of $dry_run.
18001         (func_cp_if_changed, func_mv_if_changed): Remove functions.
18002         (func_ln_if_changed): Don't handle dry-run here.
18003         (func_import): In dry-run mode, detect more precisely which actions
18004         would be performed, and don't use "...ing" verbs.
18005
18006 2005-09-18  Bruno Haible  <bruno@clisp.org>
18007
18008         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
18009         (func_import): Use join on two temporary files instead of three nested
18010         loops, in order to determine which files are new or old.
18011
18012 2005-09-18  Bruno Haible  <bruno@clisp.org>
18013
18014         * gnulib-tool (func_import): Comment out code that spits out the
18015         new files with --dry-run.
18016
18017 2005-09-18  Bruno Haible  <bruno@clisp.org>
18018
18019         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
18020
18021 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
18022
18023         * lib/stat-time.h: New file.
18024         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
18025         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
18026         in a different way.
18027         (timespec_cmp): New function.
18028         * lib/utimecmp.c: Include stat-time.h.
18029         (SYSCALL_RESOLUTION): Depend on whether various struct stat
18030         members exist, not on the obsolescent ST_MTIM_NSEC.
18031         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
18032
18033 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
18034
18035         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
18036
18037 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
18038
18039         * MODULES.html.sh (File system functions): Add stat-time.
18040         * modules/stat-time: New file.
18041         * modules/timespec (Files): Remove m4/st_mtim.m4; this
18042         is now done in a different way, by the stat-time module.
18043         * modules/utimecmp (Depends-on): Add stat-time.
18044
18045 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
18046
18047         * m4/st_mtim.m4: Remove.  Superseded by...
18048         * m4/stat-time.m4: New file.
18049         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
18050         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
18051
18052 2005-09-15  Derek Price  <derek@ximbiot.com>
18053
18054         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
18055
18056 2005-09-15  Derek Price  <derek@ximbiot.com>
18057
18058         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
18059         * lib/regex_internal.c: Ditto, using this...
18060         (__GNUC_PREREQ): ...new macro.
18061         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
18062         using...
18063         (__GNUC_PREREQ): ...this new macro.
18064
18065         * lib/strstr.h: Include string.h. Define strstr as a macro here.
18066
18067 2005-09-15  Derek Price  <derek@ximbiot.com>
18068             Paul Eggert  <eggert@cs.ucla.edu>
18069
18070         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
18071         changes, consolidating in...
18072         * lib/regex_internal.h: ...this file.
18073
18074 2005-09-13  Jim Meyering  <jim@meyering.net>
18075
18076         * lib/canon-host.c: Filter through gnu indent and reword comments
18077         slightly.
18078         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
18079
18080 2005-09-13  Derek Price  <derek@ximbiot.com>
18081
18082         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
18083         failure.
18084         Reported by Jim Meyering  <jim@meyering.net>.
18085
18086 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
18087
18088         * lib/base64.c: Typo.
18089         (base64_encode): Put b64str in initialized data section.
18090
18091 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
18092
18093         Merge glibc and coreutils changes into gnulib, plus a few
18094         extra fixes.
18095         * lib/md5.c: Use #error rather than a string.
18096         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
18097         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
18098         (__attribute__): Define to empty for non recent-GCC.
18099         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
18100         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
18101         Renamed from their non-__ counterparts, with new macros replacing
18102         them if not _LIBC.  Add __THROW attribute.
18103         (rol): Remove.
18104         (struct md5_ctx): Align buffer if using GCC.
18105         * lib/sha1.h (struct sha1_ctx): Likewise.
18106         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
18107         The old name was backwards.
18108         (NOTSWAP): Remove; not used.
18109         (rol): New macro, moved here from md5.h.
18110         (sha1_process_block): Remove a FIXME that doesn't make sense.
18111
18112 2005-09-12  Derek Price  <derek@ximbiot.com>
18113
18114         Return usable errors from canon-host.
18115         * lib/canon-host.h: New file.
18116         * lib/canon-host.c (canon_host): Wrap...
18117         (canon_host_r): ...this new function, which now relies exclusively on
18118         getaddrinfo.
18119         (ch_strerror): New function.
18120         (last_cherror): New global.
18121         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
18122         interface.
18123         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
18124         void *.
18125         (freeaddrinfo): Free ai->ai_canonname when set.
18126
18127 2005-09-12  Derek Price  <derek@ximbiot.com>
18128
18129         Make canon-host require getaddrinfo.
18130         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
18131         AC_LIBSOURCE canon-host.h.  Call...
18132         (gl_PREREQ_CANON_HOST): ...this new function, which requires
18133         gl_GETADDRINFO.
18134         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
18135
18136 2005-09-12  Derek Price  <derek@ximbiot.com>
18137
18138         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
18139         LGPL.
18140         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
18141
18142 2005-09-12  Derek Price  <derek@ximbiot.com>
18143
18144         * lib/gai_strerror.c: Include config.h when available.  Include
18145         getaddrinfo.h before other headers to test interface.
18146         Reported by Larry Jones <lawrence.jones@ugs.com>.
18147
18148 2005-09-12  Derek Price  <derek@ximbiot.com>
18149             Paul Eggert  <eggert@cs.ucla.edu>
18150
18151         * modules/glob (Files): Add glob-libc.h.
18152
18153 2005-09-12  Derek Price  <derek@ximbiot.com>
18154             Paul Eggert  <eggert@cs.ucla.edu>
18155
18156         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
18157         glob_.h, glob-libc.h.
18158         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
18159
18160 2005-09-12  Derek Price  <derek@ximbiot.com>
18161             Paul Eggert  <eggert@cs.ucla.edu>
18162
18163         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
18164         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
18165         protecting things that should be done only in gnulib contexts.
18166         * lib/glob_.h: New file, containing only the glob things needed for
18167         gnulib.
18168         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
18169         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
18170         (glob, globfree, glob_pattern_p): Now defined simply in terms of
18171         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
18172         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
18173         and to respect the namespace rules better.
18174
18175 2005-09-08  Simon Josefsson  <jas@extundo.com>
18176
18177         * modules/socklen: New file.
18178
18179 2005-09-08  Simon Josefsson  <jas@extundo.com>
18180
18181         * m4/socklen.m4: New file.
18182
18183 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
18184
18185         * modules/utimens (Files): Add m4/utimbuf.m4, since
18186         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
18187         Reported by Sergey Poznyakoff.
18188
18189 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
18190
18191         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
18192         definitions, since that's the preferred style in glibc.
18193         Fix a minor spacing issue, and update copyright notice to match
18194         glibc's.
18195
18196 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
18197
18198         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
18199
18200 2005-09-06  Simon Josefsson  <jas@extundo.com>
18201
18202         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
18203         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
18204
18205 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
18206
18207         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
18208         warning.
18209
18210 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
18211
18212         * config/srclist.txt: Add glibc bug 1302.
18213
18214 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
18215
18216         Change bitset word type from unsigned int to unsigned long int,
18217         as this has better performance on typical 64-bit hosts.
18218         Port bitset code to hosts with unusual word sizes.
18219         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
18220         (build_collating_symbol):
18221         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
18222         argument is a bitset.  This is merely a style issue, but it makes
18223         it clearer that an entire array is expected.
18224         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
18225         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
18226         Port to the case where bitset_word is not the same as unsigned int.
18227         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
18228         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
18229         Likewise.
18230         * lib/regexec.c (check_dst_limits_calc_pos_1,
18231         check_subexp_matching_top):
18232         (build_trtable, group_nodes_into_DFAstates):
18233         Likewise.
18234         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
18235         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
18236         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
18237         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
18238         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
18239         * lib/regcomp.c (optimize_subexps, lower_subexp):
18240         Work even if bitset_word has holes in its bitwise representation.
18241         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
18242         * lib/regexec.c (check_dst_limits_calc_pos_1,
18243         check_subexp_matching_top):
18244         Likewise.
18245         * lib/regex_internal.c (re_string_reconstruct):
18246         Don't assume UCHAR_MAX == 255.
18247         * lib/regex_internal.h (bitset_set_all): Likewise.
18248         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
18249         All uses changed.
18250         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
18251         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
18252         All uses changed.
18253         (BITSET_WORD_MAX): New macro.
18254         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
18255         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
18256         (bitset_empty, bitset_copy):
18257         Prefer sizeof (bitset) to multiplying it out ourselves.
18258         (bitset_not_merge): Remove; unused.
18259         (bitset_contain): Return bool, not unsigned int with one bit on.
18260         All callers changed.
18261         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
18262         alignment than re_node_set; do this by defining a new internal
18263         type struct dests_alloc and using it to allocate memory.
18264
18265 2005-09-05  Bruno Haible  <bruno@clisp.org>
18266
18267         * gnulib-tool (func_import): Fix comparison in handling of symbolic
18268         links.
18269
18270 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
18271
18272         * modules/size_max (Makefile.am): Add size_max.h
18273
18274 2005-09-04  Derek Price  <derek@ximbiot.com>
18275
18276         * gnulib-tool (func_import): Fix reversed $symbolic logic.
18277
18278 2005-09-03  Simon Josefsson  <jas@extundo.com>
18279
18280         * gnulib-tool: Fix typo.
18281
18282 2005-09-03  Simon Josefsson  <jas@extundo.com>
18283
18284         * config/srclist.txt: Add glibc bug 1293.
18285
18286 2005-09-03  Derek Price  <derek@ximbiot.com>
18287
18288         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
18289         From Larry Jones <lawrence.jones@ugs.com>.
18290
18291 2005-09-02  Simon Josefsson  <jas@extundo.com>
18292
18293         * modules/socklen: New file.
18294
18295 2005-09-02  Simon Josefsson  <jas@extundo.com>
18296
18297         * modules/havelib: New module.
18298
18299         * modules/gettext, modules/iconv, modules/lock, modules/readline:
18300         Use havelib.
18301
18302 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
18303
18304         Check for arithmetic overflow when calculating sizes, to prevent
18305         some buffer-overflow issues.  These patches are conservative, in the
18306         sense that when I couldn't determine whether an overflow was possible,
18307         I inserted a run-time check.
18308         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
18309         macros.
18310         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
18311         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
18312         (re_xnrealloc, re_x2nrealloc): New inline functions.
18313         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
18314         parse_bracket_exp):
18315         (build_equiv_class, build_charclass): Check for arithmetic overflow
18316         in size expression calculations.
18317         * lib/regex_internal.c (re_string_realloc_buffers):
18318         (build_wcs_upper_buffer, re_node_set_add_intersect):
18319         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
18320         (re_dfa_add_node, register_state): Likewise.
18321         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
18322         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
18323         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
18324         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
18325
18326 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
18327
18328         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
18329         m4/ulonglong.m4.  Problem reported by Martin Lambers.
18330
18331 2005-09-02  Bruno Haible  <bruno@clisp.org>
18332
18333         Support for lib vs. lib64 distinction on biarch platforms.
18334         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
18335         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
18336         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
18337
18338 2005-09-02  Bruno Haible  <bruno@clisp.org>
18339
18340         * gnulib-tool (import): In the other first-use case, provide defaults
18341         as well.
18342
18343 2005-09-02  Bruno Haible  <bruno@clisp.org>
18344
18345         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
18346         patches not yet found in the latest gettext release.
18347
18348 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
18349
18350         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
18351         to avoid a collision with bits/local_lim.h in glibc.
18352         All uses changed.  Problem reported by Dmitry V. Levin in
18353         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
18354
18355         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
18356         bugs in int versus size_t comparisons.
18357         (re_string_context_at): Fix bug where the code assumed that
18358         Idx is signed.
18359
18360         Use bool where appropriate.
18361         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
18362         All callers changed.
18363         (calc_eclosure_iter): Likewise, for ROOT arg.
18364         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
18365         (build_charclass_op): Likewise, for NON_MATCH arg.
18366         * lib/regex_internal.c (re_string_allocate, re_string_construct):
18367         (re_string_construct_common): Likewise, for ICASE arg.
18368         * lib/regexec.c (re_search_2_stub, re_search_stub):
18369         Likewise, for RET_LEN arg.
18370         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
18371         (set_regs): Likewise, for FL_BACKTRACK arg.
18372         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
18373         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
18374         (calc_eclosure_iter, parse_bracket_exp):
18375         Use bool for internal variables that are booleans.
18376         * lib/regexec.c (re_search_internal, check_matching,
18377         proceed_next_node):
18378         (set_regs, build_sifted_states, sift_states_bkref):
18379         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
18380         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
18381         (find_collation_sequence_value):
18382         Likewise.
18383         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
18384         (re_node_set_compare):
18385         Return bool, not int. All callers changed.
18386         * lib/regexec.c (check_halt_node_context, check_dst_limits):
18387         (build_trtable, check_node_accept): Likewise.
18388         * lib/regex_internal.h: Include stdbool.h.
18389
18390         Fix bugs uncovered when converting to bool.
18391         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
18392         failure instead of charging ahead blindly.
18393         * lib/regex_internal.c (register_state): Likewise.
18394         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
18395         for freeing internal storage.
18396         (group_nodes_into_DFA_states): Use unsigned int, not int, for
18397         bitset pieces used as boolean, to avoid undefined behavior
18398         on hosts that do int overflow checking.
18399
18400 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
18401
18402         * config/srclist.txt: Add glibc bugs 1285-1287.
18403
18404 2005-09-01  Jim Meyering  <jim@meyering.net>
18405
18406         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
18407         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
18408         Require gl_STAT_MACROS, too.
18409
18410 2005-09-01  Bruno Haible  <bruno@clisp.org>
18411
18412         * gnulib-tool (import): In the first-use case, provide defaults.
18413
18414 2005-09-01  Bruno Haible  <bruno@clisp.org>
18415
18416         * gnulib-tool (func_import): Remove the .tmp files.
18417
18418 2005-09-01  Bruno Haible  <bruno@clisp.org>
18419
18420         * gnulib-tool (func_import): Fix handling of symbolic links.
18421
18422 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
18423
18424         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
18425         old glibc regex code mishandles strings longer than 2**31 bytes.
18426         This patch fixes this when the regex code is used in gnulib
18427         (i.e., outside glibc).
18428
18429         This patch should not affect the use of the regex code inside
18430         glibc.  No doubt this problem also needs to be handled for glibc
18431         as well, but the result will be an incompatible change to the
18432         glibc ABI, and the old ABI will have to be supported too.  That
18433         can be the the subject for another patch.
18434
18435         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
18436         governing whether the rest of this patch is active.  By default,
18437         the macro is disabled and the patch has no effect.
18438         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
18439         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
18440         (struct re_pattern_buffer, re_search, re_search_2, re_match):
18441         (re_match_2, re_set_registers): Use the new types.
18442         * lib/regex_internal.h (Idx, re_hashval_t): New types.
18443         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
18444         New macros.
18445         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
18446         (re_string_context_at, bin_tree_t, re_dfastate_t):
18447         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
18448         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
18449         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
18450         (re_string_char_size_at, re_string_wchar_at):
18451         (re_string_elem_size_at):
18452         Use the new types and macros to port to 64-bit hosts.
18453         Use unsigned types for internal values, so that the code
18454         mostly works even for arrays larger than SSIZE_MAX.
18455         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
18456         (search_duplicated_node, calc_eclosure_iter, fetch_number):
18457         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
18458         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
18459         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
18460         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
18461         (calc_inveclosure, parse_dup_op, build_range_exp):
18462         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
18463         (fetch_number, create_token_tree, mark_opt_subexp):
18464         Likewise.
18465         * lib/regex_internal.c (re_string_construct_common,
18466         create_ci_newstate):
18467         (create_cd_newstate, re_string_allocate, re_string_construct):
18468         (re_string_realloc_buffers, build_wcs_upper_buffer):
18469         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
18470         (re_string_reconstruct, re_string_peek_byte_case):
18471         (re_string_fetch_byte_case, re_string_context_at):
18472         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
18473         (re_node_set_init_copy, re_node_set_add_intersect):
18474         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
18475         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
18476         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
18477         (re_acquire_state, re_acquire_state_context, register_state):
18478         Likewise.
18479         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
18480         search_cur_bkref_entry):
18481         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
18482         (re_search_internal, re_search_2_stub, re_search_stub)
18483         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
18484         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
18485         (update_cur_sifted_state, check_dst_limits):
18486         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
18487         (check_subexp_limits, sift_states_bkref, merge_state_array):
18488         (check_subexp_matching_top, get_subexp, get_subexp_sub):
18489         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
18490         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
18491         (expand_bkref_cache, check_node_accept_bytes):
18492         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
18493         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
18494         (acquire_init_state_context, check_halt_node_context):
18495         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
18496         (sift_states_backward, clean_state_log_if_needed):
18497         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
18498         (find_recover_state, transit_state_sb, transit_state_mb):
18499         (transit_state_bkref, build_trtable, match_ctx_clean):
18500         Likewise.
18501         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
18502         to work around an assumption that REG_MISSING is negative.
18503
18504         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
18505         (seek_collating_symbol_entry) [defined _LIBC]:
18506         (lookup_collation_sequence_value) [defined _LIBC]:
18507         (build_range_exp, build_collating_symbol) [defined _LIBC]:
18508         Use prototypes rather than old-style function definitions.
18509         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
18510         (transit_state_sb) [0]:
18511         (find_collation_sequence_value) [defined _LIBC]: Likewise.
18512
18513         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
18514         rm_eo.
18515
18516         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
18517         (optimize_subexps, lower_subexp):
18518         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
18519         since the signed shift might overflow.  Use 1u<<31 instead.
18520         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
18521         Likewise.
18522         * lib/regexec.c (check_dst_limits_calc_pos_1,
18523         check_subexp_matching_top): Likewise.
18524
18525         * lib/regcomp.c (optimize_subexps, lower_subexp):
18526         Use CHAR_BIT rather than 8, for clarity.
18527         * lib/regexec.c (check_dst_limits_calc_pos_1):
18528         (check_subexp_matching_top): Likewise.
18529         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
18530         have to worry about portability issues when shifting it left.
18531         Remove no-longer-needed test for table_size > 0.
18532         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
18533         in a word, as the resulting behavior is undefined.
18534         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
18535         in one case, a <= should have been an <, and in another case the
18536         whole test was missing.
18537         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
18538         the standard name CHAR_BIT.
18539         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
18540         this is not true on one's complement and signed-magnitude hosts.
18541
18542         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
18543         next_last_offset.
18544         (struct re_dfa_t): Remove unused member states_alloc.
18545         * lib/regcomp.c (init_dfa): Don't initialize unused members.
18546
18547 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
18548
18549         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
18550         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
18551         and large-file glibc and in 32-bit large-file Solaris.
18552
18553 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
18554
18555         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
18556         lengths fit in regoff_t; this isn't true if regoff_t is the same
18557         width as size_t.
18558         * lib/regex.c (re_search_internal): 5th arg is LAST_START
18559         (= START + RANGE) instead of RANGE.  This avoids overflow
18560         problems when regoff_t is the same width as size_t.
18561         All callers changed.
18562         (re_search_2_stub): Check for overflow when adding the
18563         sizes of the two strings.
18564         (re_search_stub): Check for overflow when adding START
18565         to RANGE; if it occurs, substitute the extreme value.
18566
18567 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
18568
18569         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
18570
18571 2005-08-31  Jim Meyering  <jim@meyering.net>
18572
18573         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
18574         a pointer-to-const.
18575         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
18576         (register_state): Likewise.
18577         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
18578         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
18579         (group_nodes_into_DFAstates): Likewise.
18580
18581 2005-08-31  Jim Meyering  <jim@meyering.net>
18582
18583         * check-module: Add a FIXME comment.
18584
18585 2005-08-31  Eric Blake  <ebb9@byu.net>
18586
18587         * modules/unistd-safer (Files): Add unistd--.h.
18588         * modules/stdio-safer (Files): Add stdio--.h.
18589
18590 2005-08-31  Derek Price  <derek@ximbiot.com>
18591
18592         * lib/getdelim.c (getdelim): Return EOF on EOF.
18593         Reported by Larry Jones <lawrence.jones@ugs.com>.
18594
18595 2005-08-31  Bruno Haible  <bruno@clisp.org>
18596
18597         Avoid unnecessary diffs in the generated lib/Makefile.am.
18598         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
18599         the generated files.
18600         (func_import): Don't set cmd.
18601
18602 2005-08-31  Bruno Haible  <bruno@clisp.org>
18603
18604         * lib/strstr.c: Include <stddef.h>, for NULL.
18605         * lib/strcasestr.c: Likewise.
18606         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
18607
18608 2005-08-31  Bruno Haible  <bruno@clisp.org>
18609
18610         * gnulib-tool: New option --macro-prefix.
18611         (func_import): Use macro_prefix.
18612         (import): Handle option --macro-prefix.
18613
18614 2005-08-31  Bruno Haible  <bruno@clisp.org>
18615
18616         * gnulib-tool (import): Rename most ac_* variables to cached_*.
18617         Also use new variables cached_lgpl, cached_libtool.
18618
18619 2005-08-31  Bruno Haible  <bruno@clisp.org>
18620
18621         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
18622         always instantiating them.
18623
18624 2005-08-31  Bruno Haible  <bruno@clisp.org>
18625
18626         * gnulib-tool (func_import): Read the previous cached settings
18627         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
18628         earlier added by gnulib but are now dropped. Warn when a gnulib file
18629         overwrites a non-gnulib file.
18630
18631 2005-08-31  Bruno Haible  <bruno@clisp.org>
18632
18633         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
18634         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
18635         projects that don't keep autogenerated files in CVS. Put into
18636         actioncmd only the specified modules, not the transitive closure.
18637
18638 2005-08-31  Bruno Haible  <bruno@clisp.org>
18639
18640         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
18641         Create directories that shall be filled.
18642         (import): Don't look for gl_* macros in configure.ac. Recurse across
18643         all directories containing a gnulib-cache.m4 files, if meaningful.
18644
18645 2005-08-31  Bruno Haible  <bruno@clisp.org>
18646
18647         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
18648         (import): Set seen_libtool when we see gl_LIBTOOL.
18649
18650 2005-08-31  Bruno Haible  <bruno@clisp.org>
18651
18652         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
18653         declaration macro definitions from generated gnulib.m4.
18654
18655 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
18656
18657         * lib/iconvme.h: Add prototype for iconv_alloc.
18658
18659 2005-08-29  Simon Josefsson  <jas@extundo.com>
18660
18661         * lib/iconvme.c: Fix errno.
18662
18663 2005-08-29  Bruno Haible  <bruno@clisp.org>
18664
18665         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
18666         that it works when the directory contains spaces.
18667
18668 2005-08-29  Bruno Haible  <bruno@clisp.org>
18669
18670         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
18671
18672 2005-08-29  Bruno Haible  <bruno@clisp.org>
18673
18674         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
18675         Emit more advice.
18676
18677 2005-08-29  Bruno Haible  <bruno@clisp.org>
18678         and Stepan Kasal  <kasal@ucw.cz>
18679
18680         * check-module: If more parameters are given, check each of them
18681         separately; add more exceptions, as noted by Jim Meyering.
18682         (check_module): New procedure.
18683         (%exempt_header): Now contains all exceptions.
18684
18685 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
18686
18687         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
18688
18689 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
18690
18691         * lib/iconvme.c: Split iconv_string into iconv_alloc.
18692
18693 2005-08-28  Bruno Haible  <bruno@clisp.org>
18694
18695         * m4/gnulib-tool.m4: New file.
18696
18697 2005-08-27  Jim Meyering  <jim@meyering.net>
18698
18699         * modules/unistd-safer (Files): Add pipe-safer.c.
18700         * modules/fcntl-safer (Files): Add creat-safer.c.
18701
18702 2005-08-27  Jim Meyering  <jim@meyering.net>
18703
18704         * m4/stdlib-safer.m4: New file.  From coreutils.
18705         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
18706         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
18707         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
18708         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
18709         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
18710
18711 2005-08-27  Jim Meyering  <jim@meyering.net>
18712
18713         * lib/fopen-safer.c: Merge minor changes from coreutils.
18714         * lib/dup-safer.c: Likewise.
18715         * lib/fd-safer.c: Likewise.
18716
18717         Merge from coreutils.
18718         * lib/stdio--.h: New file.
18719         * lib/stdlib--.h: New file.
18720         * lib/mkstemp-safer.c: New file.
18721
18722         GNU tar needs these.
18723         * lib/pipe-safer.c: New file.
18724         * lib/creat-safer.c: New file.
18725         * lib/fcntl--.h (creat): Define to creat_safer.
18726         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
18727         * lib/unistd--.h (pipe): Define to pipe_safer.
18728         * lib/unistd-safer.h: Declare pipe_safer.
18729
18730 2005-08-26  Simon Josefsson  <jas@extundo.com>
18731
18732         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
18733         Haible <bruno@clisp.org>.
18734
18735 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
18736
18737         * lib/regex_internal.h: Remove all references to
18738         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
18739         or better.
18740         (bitset_not, bitset_merge, bitset_not_merge):
18741         (bitset_mask, re_string_allocate, re_string_construct):
18742         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
18743         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
18744         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
18745         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
18746         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
18747         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
18748         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
18749         (re_acquire_state_context):
18750         Remove unnecessary forward decls.
18751         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
18752         Put __attribute at function definition,
18753         now that the function decl has been removed.
18754         * lib/regex_internal.c (re_string_peek_byte_case):
18755         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
18756         Likewise.
18757
18758 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
18759
18760         * m4/regex.m4: Add AC_PREREQ(2.50).
18761         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
18762
18763 2005-08-25  Simon Josefsson  <jas@extundo.com>
18764
18765         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
18766         __fsetlocking.
18767
18768 2005-08-25  Simon Josefsson  <jas@extundo.com>
18769
18770         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
18771         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
18772         GLIBC specific code.
18773
18774 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
18775
18776         Make regex safe for g++.  This fixes one real bug (an "err"
18777         that should have been "*err").  g++ problem reported by
18778         Sam Steingold.
18779         * lib/regex_internal.h (re_calloc): New macro, consistent with
18780         re_malloc etc.  All callers of calloc changed to use re_calloc.
18781         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
18782         not int.  All callers changed.
18783         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
18784         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
18785         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
18786         (find_recover_state): Change "err" to "*err"; this fixes what
18787         appears to be a real bug.
18788         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
18789         versus int.
18790
18791 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
18792
18793         * modules/regex (Depends-on): Add malloc, since the code
18794         assumes that !malloc(0) means failure.
18795
18796 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
18797
18798         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
18799
18800         alloca modernization/simplification for regex.
18801         * lib/regex.c: Remove portability cruft for alloca.  This no longer
18802         needs to be at the start of the file, and can be moved into
18803         regex_internal.h and simplified.
18804         * lib/regex_internal.h: Include <alloca.h>.
18805         (__libc_use_alloca) [!defined _LIBC]: New macro.
18806         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
18807         now works outside glibc.
18808
18809 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
18810
18811         * config/srclist.txt: Add glibc bugs 1241, 1245.
18812
18813 2005-08-25  Jim Meyering  <jim@meyering.net>
18814
18815         * lib/open-safer.c: Include <config.h>.
18816         Otherwise, we'd lose LARGEFILE support in any file using
18817         e.g. "fcntl--.h"
18818
18819 2005-08-25  Bruno Haible  <bruno@clisp.org>
18820
18821         * m4/minmax.m4: Require autoconf 2.52.
18822         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
18823         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
18824         alternatives of translit over the alphabet.
18825         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
18826
18827 2005-08-24  Simon Josefsson  <jas@extundo.com>
18828
18829         * tests/test-getpass.c: New file.
18830
18831 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
18832
18833         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
18834         for GNU regex features.
18835
18836 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
18837
18838         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
18839         * lib/regex.h (regerror): Likewise.
18840
18841         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
18842         requires this.  (The code never needed it.)
18843
18844         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
18845         All uses of recently-renamed identifiers changed to use the new,
18846         POSIX-compliant names.  The code will build and run just fine
18847         without these changes, but it's better to eat our own dog food
18848         and use the standard-conforming names.
18849
18850         * lib/regex.h: Fix a multitude of POSIX name space violations.
18851         These changes have an effect only for programs that define
18852         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
18853         do not change anything for programs compiled in the normal way.
18854         Also, there is no effect on the ABI.
18855
18856         (_REGEX_SOURCE): New macro.
18857         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
18858         defined and _GNU_SOURCE is not; this fixes a name space violation.
18859
18860         Rename the following macros to obey POSIX requirements.
18861         The old names are still visible as macros if _REGEX_SOURCE is defined.
18862         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
18863         RE_BACKSLASH_ESCAPE_IN_LISTS.
18864         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
18865         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
18866         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
18867         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
18868         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
18869         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
18870         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
18871         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
18872         (REG_INTERVALS): renamed from RE_INTERVALS.
18873         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
18874         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
18875         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
18876         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
18877         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
18878         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
18879         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
18880         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
18881         RE_UNMATCHED_RIGHT_PAREN_ORD.
18882         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
18883         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
18884         (REG_DEBUG): renamed from RE_DEBUG.
18885         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
18886         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
18887         unusual, since we can't clash with the POSIX REG_ICASE.
18888         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
18889         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
18890         (REG_NO_SUB): renamed from RE_NO_SUB.
18891         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
18892         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
18893         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
18894         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
18895         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
18896         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
18897         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
18898         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
18899         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
18900         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
18901         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
18902         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
18903         RE_SYNTAX_POSIX_MINIMAL_BASIC.
18904         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
18905         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
18906         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
18907         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
18908         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
18909         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
18910         (REG_FIXED): Renamed from REGS_FIXED.
18911         (REG_NREGS): Renamed from RE_NREGS.
18912
18913         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
18914         of other REG_* macros, since POSIX says the user is allowed to
18915         #undef these macros selectively.
18916
18917         (reg_errcode_t): Update comment stating what other tables need
18918         to be consistent.
18919
18920         Rename the following enum values to obey POSIX requirements.
18921         The old names are still visible as macros.
18922         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
18923         is not defined, since GNU is supposed to be a superset of POSIX as
18924         much as possible, and since we want reg_errcode_t to be a signed
18925         type for implementation consistency.
18926         (_REG_NOERROR): Renamed from REG_NOERROR.
18927         (_REG_NOMATCH): Renamed from REG_NOMATCH.
18928         (_REG_BADPAT): Renamed from REG_BADPAT.
18929         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
18930         (_REG_ECTYPE): Renamed from REG_ECTYPE.
18931         (_REG_EESCAPE): Renamed from REG_EESCAPE.
18932         (_REG_ESUBREG): Renamed from REG_ESUBREG.
18933         (_REG_EBRACK): Renamed from REG_EBRACK.
18934         (_REG_EPAREN): Renamed from REG_EPAREN.
18935         (_REG_EBRACE): Renamed from REG_EBRACE.
18936         (_REG_BADBR): Renamed from REG_BADBR.
18937         (_REG_ERANGE): Renamed from REG_ERANGE.
18938         (_REG_ESPACE): Renamed from REG_ESPACE.
18939         (_REG_BADRPT): Renamed from REG_BADRPT.
18940         (_REG_EEND): Renamed from REG_EEND.
18941         (_REG_ESIZE): Renamed from REG_ESIZE.
18942         (_REG_ERPAREN): Renamed from REG_ERPAREN.
18943         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
18944         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
18945         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
18946         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
18947
18948         (_REG_RE_NAME, _REG_RM_NAME): New macros.
18949         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
18950         changed.  But support the old name if the new one is not defined
18951         and if _REGEX_SOURCE.
18952
18953         Change the following member names in struct re_pattern_buffer.
18954         The old names are still supported if !_REGEX_SOURCE.
18955         The new names are always supported, regardless of _REGEX_SOURCE.
18956         (re_buffer): Renamed from buffer.
18957         (re_allocated): Renamed from allocated.
18958         (re_used): Renamed from used.
18959         (re_syntax): Renamed from syntax.
18960         (re_fastmap): Renamed from fastmap.
18961         (re_translate): Renamed from translate.
18962         (re_can_be_null): Renamed from can_be_null.
18963         (re_regs_allocated): Renamed from regs_allocated.
18964         (re_fastmap_accurate): Renamed from fastmap_accurate.
18965         (re_no_sub): Renamed from no_sub.
18966         (re_not_bol): Renamed from not_bol.
18967         (re_not_eol): Renamed from not_eol.
18968         (re_newline_anchor): Renamed from newline_anchor.
18969
18970         Change the following member names in struct re_registers.
18971         The old names are still supported if !_REGEX_SOURCE.
18972         The new names are always supported, regardless of _REGEX_SOURCE.
18973         (rm_num_regs): Renamed from num_regs.
18974         (rm_start): Renamed from start.
18975         (rm_end): Renamed from end.
18976
18977         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
18978         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
18979         Prepend __ to parameter names.
18980
18981         Undo yesterday's changes.
18982
18983 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
18984
18985         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
18986         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
18987         lib/regex.c.
18988
18989 2005-08-24  Jim Meyering  <jim@meyering.net>
18990
18991         Sync from coreutils.
18992         * m4/fcntl-safer.m4: New file.
18993
18994         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
18995         and object files for this module.
18996
18997 2005-08-24  Jim Meyering  <jim@meyering.net>
18998
18999         Sync from coreutils.
19000         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
19001
19002 2005-08-24  Jim Meyering  <jim@meyering.net>
19003
19004         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
19005         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
19006
19007 2005-08-24  Jim Meyering  <jim@meyering.net>
19008
19009         * modules/fcntl-safer: New module.
19010         * modules/fts (Depends-on): Add fcntl-safer.
19011         * MODULES.html.sh (File descriptor based Input/Output):
19012         Add fcntl-safer.
19013
19014 2005-08-24  Bruno Haible  <bruno@clisp.org>
19015
19016         Support for unit test modules.
19017         * modules/README: Mention tests modules.
19018         * modules/TEMPLATE-TESTS: New file.
19019         * gnulib-tool: New options --extract-tests-module, --with-tests and
19020         --tests-base (unused for the moment).
19021         (testsbase, inctests): New variables.
19022         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
19023         (func_verify_module): Exclude TEMPLATE-TESTS.
19024         (func_verify_nontests_module, func_verify_tests_module): New functions.
19025         (func_get_dependencies): Add implicit dependency for tests modules.
19026         (func_get_tests_module): New function.
19027         (func_modules_transitive_closure): When --with-tests was specified,
19028         include the unit tests as well, unless explicitly avoided.
19029         (func_emit_lib_Makefile_am): Ignore the tests modules here.
19030         (func_emit_tests_Makefile_am): New function.
19031         (func_create_testdir): When --with-tests was specified, emit a
19032         tests/ directory.
19033         * MODULES.html.sh (Future developments): Update.
19034
19035 2005-08-24  Bruno Haible  <bruno@clisp.org>
19036
19037         * modules/tls-tests: New file.
19038         * tests/test-tls.c: New file, from GNU gettext.
19039
19040 2005-08-24  Bruno Haible  <bruno@clisp.org>
19041
19042         * modules/lock-tests: New file.
19043         * tests/test-lock.c: New file, from GNU gettext.
19044
19045 2005-08-24  Bruno Haible  <bruno@clisp.org>
19046
19047         * lib/lock.h: Add multiple inclusion guard.
19048         * lib/tls.h: Add multiple inclusion guard.
19049
19050 2005-08-24  Bruno Haible  <bruno@clisp.org>
19051
19052         * gnulib-tool: Add support for the --aux-dir option to
19053         --create-testdir, --create-megatestdir, --test, --megatest.
19054         (func_create_testdir, func_create_megatestdir): Optionally emit a
19055         AC_CONFIG_AUX_DIR directive.
19056         (create-testdir, create-megatestdir, test, megatest): Provide a
19057         default value for $auxdir.
19058
19059 2005-08-24  Bruno Haible  <bruno@clisp.org>
19060
19061         * gnulib-tool (import): Use compound statement instead of subshell
19062         where possible.
19063
19064 2005-08-24  Bruno Haible  <bruno@clisp.org>
19065
19066         * gnulib-tool (import): Change --aux-dir default to "build-aux".
19067
19068 2005-08-24  Bruno Haible  <bruno@clisp.org>
19069
19070         * gnulib-tool (func_version): Update.
19071
19072 2005-08-24  Bruno Haible  <bruno@clisp.org>
19073
19074         * gnulib-tool (func_import, func_create_testdir,
19075         func_create_megatestdir): Quote all autoconf macro arguments.
19076
19077 2005-08-24  Bruno Haible  <bruno@clisp.org>
19078
19079         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
19080         option --force, because --force causes the aclocal.m4 of each
19081         subdirectory to be newer than the corresponding config.h.in.
19082
19083 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
19084
19085         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
19086         All contents moved to gl_REGEX.
19087         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
19088         assume that it does.
19089
19090 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
19091
19092         * lib/regex.h (REG_NOSYS)
19093         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
19094         Define, since POSIX requires it as of 2001.
19095         (_REG_ENOSYS)
19096         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
19097         New private symbol, used to keep the enum signed in all cases.
19098         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
19099         Youngman in
19100         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
19101
19102         * lib/regex_internal.c (re_string_skip_chars, register_state):
19103         (calc_state_hash):
19104         Remove forward decls; no longer needed now that we use prototypes.
19105         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
19106         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
19107         (clean_state_log_if_needed): Likewise.
19108
19109 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
19110
19111         * config/srclist.txt: Add glibc bugs 1231-1233.
19112
19113 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
19114
19115         Fix problems reported by Sam Steingold in
19116         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
19117         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
19118         assumed that reg_errcode_t is a signed type, which is not
19119         necessarily true if _XOPEN_SOURCE is not defined.
19120         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
19121         since some compilers warn about it otherwise.
19122
19123 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
19124
19125         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
19126         (init_word_char, create_initial_state, duplicate_node_closure):
19127         (fetch_token, peek_token_bracket, build_range_exp):
19128         (build_collating_symbol): Remove forward decls; no longer needed
19129         now that we use prototypes.
19130
19131         * lib/regcomp.c:
19132         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
19133         (re_compile_fastmap_iter, regcomp, regerror, regfree):
19134         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
19135         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
19136         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
19137         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
19138         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
19139         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
19140         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
19141         (build_range_exp, build_collating_symbol, parse_bracket_exp):
19142         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
19143         (build_charclass, build_charclass_op, fetch_number, create_tree):
19144         (create_token_tree, mark_opt_subexp, duplicate_tree):
19145         Use prototypes rather than old-style definitions.
19146
19147         * lib/regex_internal.c:
19148         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
19149         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
19150         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
19151         (re_string_reconstruct, re_string_peek_byte_case):
19152         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
19153         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
19154         (re_node_set_init_copy, re_node_set_add_intersect):
19155         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
19156         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
19157         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
19158         (re_acquire_state, re_acquire_state_context, register_state):
19159         (create_ci_newstate, create_cd_newstate, free_state):
19160         Likewise.
19161         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
19162         re_search_2):
19163         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
19164         (re_search_internal, prune_impossible_nodes):
19165         (acquire_init_state_context, check_matching, static):
19166         (check_halt_node_context, check_halt_state_context, proceed_next_node):
19167         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
19168         (update_regs, sift_states_backward, build_sifted_states):
19169         (clean_state_log_if_needed, merge_state_array):
19170         (update_cur_sifted_state, add_epsilon_src_nodes):
19171         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
19172         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
19173         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
19174         (find_recover_state, check_subexp_matching_top, transit_state_mb):
19175         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
19176         (check_arrival, check_arrival_add_next_nodes):
19177         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
19178         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
19179         (check_node_accept_bytes, check_node_accept, extend_buffers):
19180         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
19181         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
19182         (sift_ctx_init):
19183         Likewise.
19184
19185         * lib/regex_internal.h:
19186         (re_string_allocate, re_string_construct, re_string_reconstruct):
19187         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
19188         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
19189         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
19190         (re_string_context_at, re_string_peek_byte_case):
19191         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
19192         is defined, since we now use prototypes always.
19193
19194         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
19195         C89 or better.  All uses removed.
19196
19197 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
19198
19199         * config/srclist.txt: Add glibc bugs 1220-1227.
19200
19201 2005-08-20  Jim Meyering  <jim@meyering.net>
19202
19203         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
19204         of unused local, dfa.
19205
19206 2005-08-20  Bruno Haible  <bruno@clisp.org>
19207
19208         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
19209
19210 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
19211
19212         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
19213         (re_node_set_insert_last, re_dfa_add_node):
19214         Rename local variables to avoid GCC shadowing warnings.
19215
19216 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
19217
19218         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
19219         [defined lint]: Suppress bogus uninitialized-variable warnings.
19220
19221         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
19222         and let the caller return REG_ESPACE if out of space.  This
19223         removes an uninitialied-variable warning with GCC 4.0.1, and also
19224         avoids taking the address of a local variable.  All callers
19225         changed.
19226
19227 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
19228
19229         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
19230         $LIBCSRC/posix/regexec.c.
19231         Add glibc bug 1217 for regcomp.c.
19232
19233 2005-08-19  Jim Meyering  <jim@meyering.net>
19234
19235         * lib/regexec.c (proceed_next_node): Redo local variables to
19236         avoid GCC shadowing warnings.
19237
19238 2005-08-18  Bruno Haible  <bruno@clisp.org>
19239
19240         * lib/strstr.c (strstr): Fix return value in multibyte case.
19241         * lib/strcasestr.c (strcasestr): Likewise.
19242
19243 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
19244
19245         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
19246
19247 2005-08-17  Jim Meyering  <jim@meyering.net>
19248
19249         Make the %s format (seconds since the epoch) work for a negative
19250         number and when used with a zero-padded field width, e.g. %015s.
19251
19252         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
19253         label so that it precedes the code to set `digits'.  Otherwise,
19254         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
19255         print `00-22'.  Now, it prints `-0022', as it should.
19256
19257 2005-08-17  Bruno Haible  <bruno@clisp.org>
19258
19259         * modules/strstr (Files): Add m4/mbrtowc.m4.
19260         (Depends-on): Add mbuiter.
19261
19262 2005-08-17  Bruno Haible  <bruno@clisp.org>
19263
19264         * modules/strcasestr: New file.
19265         * MODULES.html.sh (String handling, based on ANSI C 89): Add
19266         strcasestr.
19267
19268 2005-08-17  Bruno Haible  <bruno@clisp.org>
19269
19270         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
19271
19272 2005-08-17  Bruno Haible  <bruno@clisp.org>
19273
19274         * modules/mbuiter: New file.
19275         * MODULES.html.sh (Extended multibyte and wide character utilities):
19276         Add mbuiter.
19277
19278 2005-08-17  Bruno Haible  <bruno@clisp.org>
19279
19280         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
19281         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
19282
19283 2005-08-17  Bruno Haible  <bruno@clisp.org>
19284
19285         * m4/strcasestr.m4: New file.
19286
19287 2005-08-17  Bruno Haible  <bruno@clisp.org>
19288
19289         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
19290         * lib/strstr.c: Completely rewritten, with multibyte locale support.
19291
19292 2005-08-17  Bruno Haible  <bruno@clisp.org>
19293
19294         * lib/strcasestr.h: New file.
19295         * lib/strcasestr.c: New file.
19296
19297 2005-08-17  Bruno Haible  <bruno@clisp.org>
19298
19299         * lib/strcasecmp.c: Use mbuiter.h.
19300
19301 2005-08-17  Bruno Haible  <bruno@clisp.org>
19302
19303         * lib/mbuiter.h: New file.
19304
19305 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
19306
19307         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
19308         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
19309         and gl_GETOPT are both invoked via different paths (as happens
19310         with GNU tar CVS because it uses both argp and getopt), the former
19311         wins.
19312
19313 2005-08-16  Bruno Haible  <bruno@clisp.org>
19314
19315         * modules/tls: New file.
19316         * MODULES.html.sh (Multithreading): Add tls.
19317
19318 2005-08-16  Bruno Haible  <bruno@clisp.org>
19319
19320         * modules/strnlen1: New file.
19321         * MODULES.html.sh (String handling): Add strnlen1.
19322
19323 2005-08-16  Bruno Haible  <bruno@clisp.org>
19324
19325         * modules/strcase (Files): Add m4/mbrtowc.m4.
19326         (Depends-on): Add strnlen1, mbchar.
19327
19328 2005-08-16  Bruno Haible  <bruno@clisp.org>
19329
19330         * modules/mbiter: New file.
19331         * MODULES.html.sh (Extended multibyte and wide character utilities):
19332         Add mbiter.
19333
19334 2005-08-16  Bruno Haible  <bruno@clisp.org>
19335
19336         * modules/mbfile: New file.
19337         * MODULES.html.sh (Extended multibyte and wide character utilities):
19338         Add mbfile.
19339
19340 2005-08-16  Bruno Haible  <bruno@clisp.org>
19341
19342         * modules/mbchar: New file.
19343         * MODULES.html.sh (Extended multibyte and wide character utilities):
19344         New section.
19345
19346 2005-08-16  Bruno Haible  <bruno@clisp.org>
19347
19348         * m4/tls.m4: New file, from GNU gettext.
19349
19350 2005-08-16  Bruno Haible  <bruno@clisp.org>
19351
19352         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
19353         always.
19354         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
19355
19356 2005-08-16  Bruno Haible  <bruno@clisp.org>
19357
19358         * m4/mbiter.m4: New file.
19359
19360 2005-08-16  Bruno Haible  <bruno@clisp.org>
19361
19362         * m4/mbfile.m4: New file.
19363
19364 2005-08-16  Bruno Haible  <bruno@clisp.org>
19365
19366         * m4/mbchar.m4: New file.
19367
19368 2005-08-16  Bruno Haible  <bruno@clisp.org>
19369
19370         * lib/tls.h: New file, from GNU gettext.
19371         * lib/tls.c: New file, from GNU gettext.
19372
19373 2005-08-16  Bruno Haible  <bruno@clisp.org>
19374
19375         * lib/strnlen1.h: New file.
19376         * lib/strnlen1.c: New file.
19377
19378 2005-08-16  Bruno Haible  <bruno@clisp.org>
19379
19380         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
19381         (mbi_init): Update.
19382         (mbi_avail, mbi_advance): Let the iteration end before the terminating
19383         NUL byte, not after it.
19384
19385 2005-08-16  Bruno Haible  <bruno@clisp.org>
19386
19387         * lib/strcase.h (strcasecmp): Add note in comments.
19388         * lib/strncasecmp.c: Use code from strcasecmp.c.
19389         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
19390         (strcasecmp): Work correctly in multibyte locales.
19391
19392 2005-08-16  Bruno Haible  <bruno@clisp.org>
19393
19394         * lib/mbiter.h: New file.
19395
19396 2005-08-16  Bruno Haible  <bruno@clisp.org>
19397
19398         * lib/mbfile.h: New file.
19399
19400 2005-08-16  Bruno Haible  <bruno@clisp.org>
19401
19402         * lib/mbchar.h: New file.
19403         * lib/mbchar.c: New file.
19404
19405 2005-08-16  Bruno Haible  <bruno@clisp.org>
19406
19407         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
19408         the valid ones. Makes the comparison operations transitive:
19409         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
19410         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
19411
19412 2005-08-15  Simon Josefsson  <jas@extundo.com>
19413
19414         * modules/ssize_t (License): Change to 'unlimited'.
19415
19416         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
19417
19418 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
19419
19420         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
19421         Add comments for each pending glibc patch.
19422
19423 2005-08-15  Bruno Haible  <bruno@clisp.org>
19424
19425         * lib/regex.h (__restrict_arr): Don't define to __restrict if
19426         __cplusplus is defined.
19427
19428 2005-08-14  Jim Meyering  <jim@meyering.net>
19429
19430         Sync from coreutils.
19431
19432         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
19433         Use the hash-table-based cycle-detection code not just when
19434         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
19435         Reported by James Youngman in
19436         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
19437         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
19438         FTS_TIGHT_CYCLE_CHECK.
19439         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
19440         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
19441         once again.
19442         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
19443         * lib/fts.c (fd_safer): Remove decl.
19444         Include fcntl--.h rather than unistd-safer.h
19445         (fts_safe_changedir): Don't call fd_safer; no longer needed
19446         now that we include fcntl--.h.
19447
19448 2005-08-12  Simon Josefsson  <jas@extundo.com>
19449
19450         * modules/getndelim2: Use ssize_t module.
19451         * modules/getnline: Likewise.
19452         * modules/safe-read: Likewise.
19453         * modules/xreadlink: Likewise.
19454
19455         * modules/ssize_t: New file.
19456
19457 2005-08-12  Simon Josefsson  <jas@extundo.com>
19458
19459         * m4/readline.m4: Look for termcap, curses or ncurses if required.
19460
19461 2005-08-12  Simon Josefsson  <jas@extundo.com>
19462
19463         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
19464         ssize_t.
19465
19466 2005-08-12  Simon Josefsson  <jas@extundo.com>
19467
19468         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
19469         readline, getdelim and check_version.
19470         (Support for systems lacking ISO C 99: Sizes of integer types):
19471         Add size_max.
19472
19473 2005-08-12  Bruno Haible  <bruno@clisp.org>
19474
19475         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
19476
19477 2005-08-11  Simon Josefsson  <jas@extundo.com>
19478
19479         * modules/readline: New file.
19480
19481         * modules/strnlen (Files): Add strnlen.h.
19482
19483 2005-08-11  Simon Josefsson  <jas@extundo.com>
19484
19485         * m4/readline.m4: New file.
19486
19487 2005-08-11  Simon Josefsson  <jas@extundo.com>
19488
19489         * lib/readline.h, readline.c: New file.
19490
19491 2005-08-11  Simon Josefsson  <jas@extundo.com>
19492
19493         * doc/gnulib.texi (Initial import, Finishing touches): Mention
19494         gl_AVOID.
19495
19496 2005-08-11  Bruno Haible  <bruno@clisp.org>
19497
19498         * lib/strnlen.h (strnlen): Change parameter name to match comment.
19499
19500 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
19501
19502         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
19503
19504 2005-08-10  Simon Josefsson  <jas@extundo.com>
19505
19506         * tests/test-iconvme.c: New file.
19507
19508 2005-08-10  Simon Josefsson  <jas@extundo.com>
19509
19510         * m4/strnlen.m4: New file.
19511
19512         * m4/strndup.m4: Don't check for strnlen declaration, done in
19513         strnlen.m4.
19514
19515 2005-08-10  Simon Josefsson  <jas@extundo.com>
19516
19517         * lib/strndup.c: Use strnlen.h.
19518
19519         * lib/strnlen.h: New file.
19520
19521 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
19522
19523         * README: Typos.
19524
19525 2005-08-02  Simon Josefsson  <jas@extundo.com>
19526
19527         * modules/readline: New file.
19528
19529 2005-08-02  Simon Josefsson  <jas@extundo.com>
19530
19531         * modules/getdelim: New file.
19532
19533         * modules/getline: Rewrite, don't use getndelim2.
19534
19535 2005-08-02  Simon Josefsson  <jas@extundo.com>
19536
19537         * m4/getline.m4: Separate out getdelim stuff into separate module.
19538
19539         * m4/getdelim.m4: New file.
19540
19541 2005-08-02  Simon Josefsson  <jas@extundo.com>
19542
19543         * lib/getline.h, getline.c: Rewrite.
19544
19545         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
19546
19547 2005-07-31  Bruno Haible  <bruno@clisp.org>
19548
19549         * lib/lock.h (gl_lock_initializer): New macro.
19550         (gl_lock_define_initialized): Use it.
19551         (gl_rwlock_initializer): New macro.
19552         (gl_rwlock_define_initialized): Use it.
19553         (gl_recursive_lock_initializer): New macro.
19554         (gl_recursive_lock_define_initialized): Use it.
19555
19556 2005-07-30  Karl Berry  <karl@gnu.org>
19557
19558         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
19559         Report from Ben Pfaff, regarding getopt.
19560
19561 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
19562
19563         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
19564         normal way.
19565         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
19566         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
19567         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
19568         (gl_GETOPT): Use the new macros.  Most of the implementation
19569         is moved to the new macros.  This is for programs like Emacs
19570         that don't want all the functionality of gl_GETOPT.
19571
19572 2005-07-26  Bruno Haible  <bruno@clisp.org>
19573
19574         * m4/lock.m4: Update from GNU gettext.
19575
19576 2005-07-26  Bruno Haible  <bruno@clisp.org>
19577
19578         * lib/lock.h: Update from GNU gettext.
19579         * lib/lock.c: Update from GNU gettext.
19580
19581 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
19582
19583         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
19584         obsolescent AC_TRY_RUN.  Include the default includes files, for
19585         'exit'.
19586
19587 2005-07-24  Bruno Haible  <bruno@clisp.org>
19588
19589         * modules/visibility: New file.
19590         * MODULES.html.sh (Misc): Add visibility.
19591
19592 2005-07-24  Bruno Haible  <bruno@clisp.org>
19593
19594         * m4/visibility.m4: New file.
19595
19596 2005-07-24  Bruno Haible  <bruno@clisp.org>
19597
19598         * doc/visibility.texi: New file.
19599
19600 2005-07-22  Bruno Haible  <bruno@clisp.org>
19601
19602         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
19603         $(ALLOCA_H), redundant through BUILT_SOURCES.
19604         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
19605         redundant through BUILT_SOURCES.
19606         * modules/byteswap (Makefile.am): Remove explicit dependency on
19607         $(BYTESWAP_H), redundant through BUILT_SOURCES.
19608         * modules/fnmatch (Makefile.am): Remove explicit dependency on
19609         $(FNMATCH_H), redundant through BUILT_SOURCES.
19610         * modules/getopt (Makefile.am): Remove explicit dependency on
19611         $(GETOPT_H), redundant through BUILT_SOURCES.
19612         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
19613         redundant through BUILT_SOURCES.
19614         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
19615         redundant through BUILT_SOURCES.
19616         * modules/stdbool (Makefile.am): Remove explicit dependency on
19617         $(STDBOOL_H), redundant through BUILT_SOURCES.
19618         * modules/stdint (Makefile.am): Remove explicit dependency on
19619         $(STDINT_H), redundant through BUILT_SOURCES.
19620         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
19621         Remove explicit dependency on $(SYSEXITS_H).
19622         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
19623
19624 2005-07-18  Simon Josefsson  <jas@extundo.com>
19625
19626         * lib/check-version.c (check_version): Accept identical versions too.
19627
19628 2005-07-18  Bruno Haible  <bruno@clisp.org>
19629
19630         * modules/lock: New file.
19631         * MODULES.html.sh (Multithreading): New section.
19632
19633 2005-07-18  Bruno Haible  <bruno@clisp.org>
19634
19635         * m4/lock.m4: New file, from GNU gettext.
19636
19637 2005-07-18  Bruno Haible  <bruno@clisp.org>
19638
19639         * lib/lock.h: New file, from GNU gettext.
19640         * lib/lock.c: New file, from GNU gettext.
19641
19642 2005-07-18  Bruno Haible  <bruno@clisp.org>
19643
19644         * lib/lock.h (gl_once_t): New type.
19645         (gl_once_define, gl_once): New macros.
19646         * lib/lock.c (fresh_once): New variable.
19647         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
19648         functions.
19649
19650 2005-07-16  Simon Josefsson  <jas@extundo.com>
19651
19652         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
19653         workaround, suggested by Bruno.
19654
19655 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
19656
19657         * modules/xalloc (Depends-on): Add xalloc-die.
19658         * modules/xvasprintf (Depends-on): Add xalloc-die.
19659
19660 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
19661
19662         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
19663         with a minor change.
19664
19665 2005-07-15  Bruno Haible  <bruno@clisp.org>
19666
19667         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
19668         When using lib/poll.c, define poll as rpl_poll.
19669
19670 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
19671
19672         * modules/argp (Depends-on): Remove unlocked-io.
19673
19674 2005-07-14  Derek Price  <derek@ximbiot.com>
19675
19676         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
19677         for glob symlink bug.
19678
19679 2005-07-14  Bruno Haible  <bruno@clisp.org>
19680
19681         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
19682         Instead, test for *_unlocked function declarations directly.
19683
19684 2005-07-11  Simon Josefsson  <jas@extundo.com>
19685
19686         * modules/size_max: New file.
19687
19688         * modules/xsize: Depend on size_max module for size_max.m4.
19689
19690 2005-07-11  Simon Josefsson  <jas@extundo.com>
19691
19692         * lib/size_max.h: New file.
19693
19694 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
19695
19696         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
19697         copyright symbol and the year.
19698         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
19699         (version_etc_va): Use parameterized copyright notice.
19700         Reword to conform to the current GNU coding standards.
19701
19702 2005-07-11  Karl Berry  <karl@gnu.org>
19703
19704         * doc/gnulib.texi (Quoting): new node.
19705         (Initial import): more info, from Patrice.
19706
19707 2005-07-11  Bruno Haible  <bruno@clisp.org>
19708
19709         * gnulib-tool (func_usage): Document option --avoid.
19710         (Command line options): Handle --avoid.
19711         (func_acceptable): New function.
19712         (func_modules_transitive_closure): Use it.
19713
19714 2005-07-11  Bruno Haible  <bruno@clisp.org>
19715
19716         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
19717         Reported by Jim Meyering.
19718
19719 2005-07-10  Bruno Haible  <bruno@clisp.org>
19720
19721         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
19722         Needed when size_t is smaller than 'unsigned int'.
19723         Reported by Paul Eggert.
19724
19725 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
19726
19727         * modules/argp (Depends-on): Add unlocked-io
19728
19729 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
19730
19731         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
19732         block of defines.
19733
19734 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
19735
19736         * config/srclist.txt: Comment out regcomp.c, since we have a porting
19737         fix now.
19738
19739 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
19740         and Paul Eggert  <eggert@cs.ucla.edu>
19741
19742         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
19743         in wint_t, not wchar_t.  Remove now-unnecessary cast.
19744
19745 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
19746
19747         * modules/regex (Files): Add lib/regex_internal.c,
19748         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
19749         (Depends-on): Add extensions.
19750         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
19751
19752 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
19753
19754         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
19755         pathconf.
19756         * m4/same.m4 (gl_SAME): Likewise.
19757         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
19758
19759         * m4/regex.m4: Adjust to new libc regex implementation.
19760         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
19761         all the .c and .h parts of (the new) regex.
19762         Quote the m4 stuff better.
19763         Check for RE_ICASE bug of old gnulib.
19764         Check for REG_STARTEND of recent libc.
19765         Rename local variables from jm_* to gl_*.
19766         Quote operand of "test -f".
19767         Say "recent enough" version of libc, not "version 2".
19768         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
19769         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
19770         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
19771         Remove check for btowc, isascii.
19772         Require AM_LANGINFO_CODESET.
19773
19774 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
19775
19776         * lib/regex.c, regex.h: Sync from libc.
19777         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
19778         * lib/regexec.c:
19779         New files, synced from libc, except that regex_internal.h
19780         currently has a small porting fix.
19781
19782 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
19783
19784         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
19785         regex_internal.c, regexec.c.
19786         Add regex_internal.h too, but as a comment, since the libc version
19787         is currently broken in gnulib mode.
19788
19789 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
19790
19791         Support programs like Emacs that use gnulib but not gettext.
19792         * MODULES.html.sh (Internationalization functions): Add gettext-h.
19793         * modules/gettext-h: New file.
19794         * modules/gettext (Files): Remove lib/gettext.h.
19795         (Depends-on): Add gettext-h.
19796         (Makefile.am): Remove lib_SOURCES.
19797         * modules/argmatch, modules/c-stack, modules/closeout:
19798         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
19799         * modules/execute, modules/file-type, modules/getaddrinfo:
19800         * modules/getopt, modules/human, modules/javacomp:
19801         * modules/javaexec, modules/mkdir-p, modules/obstack:
19802         * modules/openat, modules/pagealign_alloc, modules/pipe:
19803         * modules/quotearg, modules/regex, modules/rpmatch:
19804         * modules/unicodeio, modules/userspec, modules/version-etc:
19805         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
19806         * modules/xsetenv:
19807         Depend on gettext-h, not gettext.
19808
19809 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
19810
19811         * gnulib-tool (func_import): Add support for 'public domain' license.
19812         * modules/alloca, modules/atexit, modules/memmove:
19813         Now public domain, not GPL.
19814         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
19815         * modules/realloc, modules/strerror, modules/strtod:
19816         Now LGPL, not GPL.
19817
19818 2005-07-05  Bruno Haible  <bruno@clisp.org>
19819
19820         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
19821         autoconf CVS. Needed for mingw.
19822
19823 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
19824
19825         Remove the dependency of the strftime module on the tzset module.
19826         * modules/strftime (Depends-on): Remove dependency on tzset.
19827
19828 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
19829
19830         Remove the dependency of the strftime module on the tzset module.
19831         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
19832         gl_FUNC_TZSET_CLOBBER.
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         * lib/strftime.c (my_strftime)
19838         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
19839         Copy the input structure, to work around some of the bug with
19840         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
19841         Solaris releases, you should also use the tzset module, but we won't
19842         require it as a dependency any more since we don't want LGPLed code
19843         to depend on GPLed code.
19844
19845 2005-07-02  Jim Meyering  <jim@meyering.net>
19846
19847         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
19848         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
19849         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
19850         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
19851
19852 2005-07-02  Jim Meyering  <jim@meyering.net>
19853
19854         * lib/backupfile.c (backup_args): Change a `0' to NULL.
19855
19856 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
19857
19858         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
19859         declares only 'struct timespec;' (!).
19860
19861 2005-07-01  Jim Meyering  <jim@meyering.net>
19862
19863         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
19864         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
19865         * lib/save-cwd.c, tempname.c:
19866         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
19867         and don't include <sys/file.h>).
19868
19869 2005-06-29  Jim Meyering  <jim@meyering.net>
19870
19871         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
19872         type name.  Use the variable name instead.
19873         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
19874         Likewise.
19875
19876 2005-06-28  Simon Josefsson  <jas@extundo.com>
19877
19878         * modules/check-version (Files): Add check-version.m4.
19879
19880 2005-06-28  Simon Josefsson  <jas@extundo.com>
19881
19882         * m4/check-version.m4: New file, suggested by Jim Meyering
19883         <jim@meyering.net>.
19884
19885 2005-06-28  Simon Josefsson  <jas@extundo.com>
19886
19887         * lib/check-version.h, lib/check-version.c: New files.
19888
19889 2005-06-28  Simon Josefsson  <jas@extundo.com>
19890
19891         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
19892         collision with global variable.  Better indentation.  Don't
19893         increment buffer pointer beyond buffer end.  Based on comments
19894         from Paul Eggert <eggert@cs.ucla.edu>.
19895
19896         * lib/base64.h: Indent.
19897
19898 2005-06-28  Simon Josefsson  <jas@extundo.com>
19899
19900         * doc/gnulib.texi (Library version handling): New section.
19901
19902 2005-06-28  Jim Meyering  <jim@meyering.net>
19903
19904         * check-module (find_included_lib_files): Hard-code another
19905         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
19906         but modules/fts-lgpl (correctly) does not list those files.
19907
19908         * modules/canonicalize (Files): Add lib/pathmax.h.
19909
19910 2005-06-25  Simon Josefsson  <jas@extundo.com>
19911
19912         * modules/check-version: New file.
19913
19914 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
19915
19916         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
19917         initializer of struct addrinfo, as an indication that we don't
19918         care how many members the structure has.
19919
19920 2005-06-24  Derek Price  <derek@ximbiot.com>
19921         and Bruno Haible  <bruno@clisp.org>
19922
19923         Remove stat module & update lstat.
19924         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
19925         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
19926         * m4/stat.m4: Remove this file.
19927
19928 2005-06-24  Derek Price  <derek@ximbiot.com>
19929         and Bruno Haible  <bruno@clisp.org>
19930
19931         Remove stat module & update lstat.
19932         * lib/stat.c: Remove this file...
19933         (slash_aware_lstat): ...moving this content and its support...
19934         * lib/lstat.c (rpl_lstat): ...into here.
19935         * lib/lstat.h: New file.
19936
19937 2005-06-24  Derek Price  <derek@ximbiot.com>
19938         and Bruno Haible  <bruno@clisp.org>
19939
19940         Remove stat module & update lstat.
19941         * config/srclist.txt (libc sources): Remove stat.
19942
19943 2005-06-24  Derek Price  <derek@ximbiot.com>
19944         and Bruno Haible  <bruno@clisp.org>
19945
19946         Remove stat module & update lstat.
19947         * MODULES.html.sh (stat): Remove.
19948         * MODULES.html: Regenerated.
19949         * modules/lstat (Description): Correct function name.
19950         (Files): Add "lstat.h".
19951         (Depends-on): Remove stat, add xalloc, stat-macros.
19952         * modules/stat: Remove this file.
19953         (Include): Add "lstat.h", remove <sys/stat.h>.
19954
19955 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
19956
19957         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
19958         (ranged_convert): Don't save conversion in a temporary struct.
19959         This causes a warning with GCC 4.0.0, and anyway in the typical
19960         case it's not worth the extra 100 bytes or so of code.
19961         (ranged_convert, __mktime_internal): When calling a function via a
19962         pointer P, use P () rather than (*P) (), as we now assume C89 or
19963         better.
19964
19965 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
19966
19967         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
19968         "who -r" failed to give output.  Problem reported by Tim Waugh.
19969
19970         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
19971         (xcalloc): Use it to avoid needless tests.
19972         Problem reported by Jim Meyering.
19973
19974 2005-06-20  Derek Price  <derek@ximbiot.com>
19975
19976         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
19977         unnecessary for Autoconfs > 2.59c.
19978
19979 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
19980
19981         * lib/argp.h (__option_is_short): Check upper limit of
19982         __key. Isprint() requires its argument to have the value
19983         of an unsigned char or EOF.
19984
19985 2005-06-16  Jim Meyering  <jim@meyering.net>
19986
19987         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
19988         when either N or S is zero.
19989
19990 2005-06-16  Derek Price  <derek@ximbiot.com>
19991
19992         * m4/bison.m4: Declare YACC & YFLAGS precious.
19993
19994 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
19995
19996         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
19997         multibyte string or pattern, fall back on unibyte matching.
19998         Problem reported by James Youngman.
19999
20000 2005-06-08  Bruno Haible  <bruno@clisp.org>
20001
20002         * modules/csharpcomp: New file.
20003         * MODULES.html.sh (C#): Add csharpcomp.
20004
20005 2005-06-08  Bruno Haible  <bruno@clisp.org>
20006
20007         * m4/csharpcomp.m4: New file, from GNU gettext.
20008
20009 2005-06-08  Bruno Haible  <bruno@clisp.org>
20010
20011         * lib/csharpcomp.h: New file, from GNU gettext.
20012         * lib/csharpcomp.c: New file, from GNU gettext.
20013         * lib/csharpcomp.sh.in: New file, from GNU gettext.
20014
20015 2005-06-08  Bruno Haible  <bruno@clisp.org>
20016
20017         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
20018         warning on mingw.
20019
20020 2005-06-07  Derek Price  <derek@ximbiot.com>
20021
20022         Sync from CVS.
20023         * lib/glob_.h: Indent nested #ifdef.
20024
20025 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
20026
20027         Sync from coreutils.
20028         Use "file name" when talking about file names, instead of "filename"
20029         or "path", as per the GNU coding standards.
20030         * lib/mkdir-p.c: Renamed from makepath.c.
20031         (make_dir_parents): Renamed from make_path.  All callers changed.
20032         * lib/mkdir-p.h: Likewise.  All includers changed.
20033         * lib/filenamecat.c: Renamed from path-concat.c.
20034         (file_name_concat): Renamed from path_concat.  All callers changed.
20035         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
20036         * lib/filenamecat.h: Likewise.  All includers changed.
20037         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
20038         in comments or local variable names.
20039         * lib/basename.c: Likewise.
20040         * lib/canonicalize.c, canonicalize.h: Likewise.
20041         * lib/dirname.c, dirname.h: Likewise.
20042         * lib/euidaccess.c: Likewise.
20043         * lib/exclude.c: Likewise
20044         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
20045         * lib/fsusage.c, fsuage.h: Likewise.
20046         * lib/fts.c, fts_.h: Likewise.
20047         * lib/getcwd.c: Likewise.
20048         * lib/getloadavg.c: Likewise.
20049         * lib/mkstemp.c: Likewise.
20050         * lib/mountlist.c, mountlist.h: Likewise.
20051         * lib/openat.c, openat.h: Likewise.
20052         * lib/readlink-stub.c: Likewise.
20053         * lib/readutmp.c, readutmp.h: Likewise.
20054         * lib/rename.c: Likewise.
20055         * lib/rmdir.c: Likewise.
20056         * lib/same.c: Likewise.
20057         * lib/savedir.c: Likewise.
20058         * lib/stripslash.c: Likewise.
20059         * lib/tempname.c: Likewise.
20060         * lib/xreadlink.c: Likewise.
20061         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
20062         All uses changed.
20063         * lib/exclude.h: Likewise.
20064
20065         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
20066         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
20067         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
20068         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
20069         * lib/pathmax.h: Include <limits.h> unconditionally, since other
20070         files have been getting away with it for years (MORE/BSD 4.3
20071         is extinct now).
20072         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
20073         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
20074
20075         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
20076         Define to 256, not 255, as per modern POSIX.
20077
20078 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
20079
20080         Sync from coreutils.
20081         Use "file name" when talking about file names, instead of "filename"
20082         or "path", as per the GNU coding standards.
20083         * MODULES.html.sh: mkdir-p renamed from makepath.
20084         filenamecat renamed from path-concat.
20085         * modules/filenamecat: Renamed from modules/path-concat.
20086         (Files): filenamecat.h and filenamecat.c renamed from
20087         path-concat.h and path-concat.c.
20088         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
20089         (Include): filenamecat.h, not path-concat.h.
20090         * modules/mkdir-p: Renamed from modules/makepath.
20091         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
20092         makepath.c.
20093         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
20094         (Include): mkdir-p.h, not makepath.h.
20095
20096 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
20097
20098         Sync from coreutils.
20099         * m4/mkdir-p.m4: Renamed from makepath.m4.
20100         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
20101         Rename files from makepath.c to mkdir-p.c, and from
20102         makepath.h to mkdir-p.h.
20103         * m4/filenamecat.m4: Renamed from path-concat.m4.
20104         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
20105         Rename files from path-concat.c to filenamecat.c,
20106         and from path-concat.h to filenamecat.h.
20107         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
20108         "file name" in local variables or comments.
20109         * m4/rename.m4: Likewise.
20110
20111 2005-06-01  Bruno Haible  <bruno@clisp.org>
20112
20113         * modules/csharpexec: New file.
20114         * MODULES.html.sh (C#): New section.
20115
20116 2005-06-01  Bruno Haible  <bruno@clisp.org>
20117
20118         * m4/csharp.m4: New file, from GNU gettext.
20119         * m4/csharpexec.m4: New file, from GNU gettext.
20120
20121 2005-06-01  Bruno Haible  <bruno@clisp.org>
20122
20123         * lib/csharpexec.h: New file, from GNU gettext.
20124         * lib/csharpexec.c: New file, from GNU gettext.
20125         * lib/csharpexec.sh.in: New file, from GNU gettext.
20126
20127 2005-05-31  Derek Price  <derek@ximbiot.com>
20128             Paul Eggert  <eggert@cs.ucla.edu>
20129
20130         Sync from cvs.
20131         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
20132
20133 2005-05-31  Derek Price  <derek@ximbiot.com>
20134             Paul Eggert  <eggert@cs.ucla.edu>
20135
20136         Sync from cvs.
20137         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
20138
20139 2005-05-29  Derek Price  <derek@ximbiot.com>
20140
20141         * config/srclist.txt (glob_.h, glob.c): Add these files.
20142
20143 2005-05-29  Derek Price  <derek@ximbiot.com>
20144
20145         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
20146         * modules/glob: New file.
20147         * modules/getlogin_r: Add link to POSIX spec in description.
20148
20149 2005-05-29  Derek Price  <derek@ximbiot.com>
20150             Paul Eggert  <eggert@cs.ucla.edu>
20151
20152         * m4/glob.m4: New file.
20153
20154 2005-05-29  Derek Price  <derek@ximbiot.com>
20155             Paul Eggert  <eggert@cs.ucla.edu>
20156
20157         * lib/glob_.h, lib/glob.c: New files.
20158
20159 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
20160
20161         * modules/fts (Files): Remove m4/inttypes-pri.m4.
20162         * modules/fts-lgpl (Depends-on): Remove gettext.
20163
20164 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
20165
20166         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
20167         and don't require gt_INTTYPES_PRI.
20168
20169 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
20170
20171         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
20172
20173         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
20174         the configuration hassle isn't worth it.
20175         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
20176         (LONGEST_MODIFIER, PRIuMAX): Remove.
20177
20178 2005-05-27  Bruno Haible  <bruno@clisp.org>
20179
20180         * lib/getlogin_r.h: Remove second include of <stddef.h>.
20181
20182 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
20183
20184         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
20185         _POSIX_PTHREAD_SEMANTICS for Solaris.
20186
20187 2005-05-25  Derek Price  <derek@ximbiot.com>
20188
20189         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
20190
20191 2005-05-25  Derek Price  <derek@ximbiot.com>
20192             Paul Eggert  <eggert@cs.ucla.edu>
20193
20194         * modules/getlogin_r, m4/getlogin_r.m4: New files.
20195         * lib/getlogin_r.c, getlogin_r.h: New files.
20196
20197 2005-05-25  Bruno Haible  <bruno@clisp.org>
20198             Derek Price  <derek@ximbiot.com>
20199
20200         * lib/getlogin_r.h: Simplify API documentation.
20201
20202 2005-05-23  Derek Price  <derek@ximbiot.com>
20203
20204         * modules/minmax (Files): Add m4/minmax.m4.
20205         (configure.ac): Add gl_MINMAX.
20206
20207 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
20208
20209         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
20210         so that unistd-safer.h (GPL'ed code) need not be included.
20211
20212 2005-05-22  Bruno Haible  <bruno@clisp.org>
20213
20214         * m4/minmax.m4: New file.
20215         Based on a patch by Derek Price <derek@ximbiot.com>.
20216
20217 2005-05-22  Bruno Haible  <bruno@clisp.org>
20218
20219         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
20220         (INT64_MIN): Fix definition.
20221         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
20222
20223         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
20224         NEED_SIGNED_INT_TYPES.
20225
20226         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
20227         HAVE_SYSTEM_INTTYPES.
20228
20229 2005-05-22  Bruno Haible  <bruno@clisp.org>
20230
20231         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
20232         Also include <sys/param.h> if it defines MIN, MAX.
20233         Based on a patch by Derek Price <derek@ximbiot.com>.
20234
20235 2005-05-21  Jim Meyering  <jim@meyering.net>
20236
20237         * modules/fts (Files): Add m4/inttypes-pri.m4.
20238         (Depends-on): Add lstat and remove gettext.  Alphabetize.
20239
20240 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
20241
20242         New fts module.
20243         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
20244         (setup_dir, free_dir): New functions.
20245         (enter_dir, leave_dir): Define trivial
20246         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
20247         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
20248         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
20249         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
20250         Move to fts-cycle.c.
20251         (fts_open): Use setup_dir.
20252         (fts_close): Use free_dir.
20253         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
20254         This adds a label and some gotos, but the alternatives were messier.
20255         Check for memory allocation failure when entering a dir.
20256         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
20257         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
20258         (FTS): New member fts_cycle, that is a union that contains the
20259         old active_dir_ht and cycle_state.  All uses changed to mention
20260         fts_cycle.ht and fts_cycle.state.
20261         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
20262         fts.c, with the following changes:
20263         (setup_dir, free_dir): New functions.
20264         (enter_dir): Now returns bool.  Return true if successful, false
20265         if memory exhausted.  All callers changed.
20266         Do not bother partly cleaning up on
20267         memory allocation failure; that is free_dir's job.
20268         However, free ad if hash_insert fails, to avoid memory leak.
20269         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
20270         fts->fts_options to see which union member to use.
20271
20272 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
20273
20274         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
20275         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
20276
20277 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
20278
20279         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
20280
20281 2005-05-20  Jim Meyering  <jim@meyering.net>
20282
20283         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
20284         Now a macro, to pacify GCC.
20285
20286 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
20287
20288         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
20289         of -1.
20290
20291 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
20292
20293         * lib/chown.c (rpl_chown): Return -1 on failure.
20294
20295 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
20296
20297         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
20298         Don't check for stddef.h.
20299         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
20300         don't use its results.
20301         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
20302         since we include them unconditionally.  Don't require
20303         AM_STDBOOL_H, since stdbool is a prerequisite.
20304         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
20305         since we assume C89 or better.
20306         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
20307         as we don't use their results.
20308         Don't check for fchdir, memmove, memset, strrchr, as we use
20309         them unconditionally.
20310         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
20311         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
20312
20313 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
20314
20315         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
20316         Include <stddef.h> unconditionally, since we assume C89 now.
20317         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
20318         * lib/fts.c: Include fts_.h first, to check interface.
20319         Do not include intprops.h; no longer needed.
20320         Include cycle-check.h and hash.h, since fts_.h no longer does.
20321         Remove unnecessary casts of closedir to void.
20322         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
20323         decide whether to decrement nlinks.
20324         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
20325         (FTS): Use struct hash_table * instead of Hash_table, so that
20326         we no longer need to include hash.h here.
20327
20328 2005-05-18  Jim Meyering  <jim@meyering.net>
20329
20330         * modules/dirfd (License): Change to LGPL.  Most of the code
20331         is already in the public domain.
20332
20333 2005-05-18  Jim Meyering  <jim@meyering.net>
20334
20335         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
20336         Reported by Yoann Vandoorselaere.
20337
20338 2005-05-17  Jim Meyering  <jim@meyering.net>
20339
20340         * m4/fts.m4: New file, from coreutils.
20341
20342 2005-05-17  Jim Meyering  <jim@meyering.net>
20343
20344         * lib/fts.c, lib/fts_.h: New files, from coreutils.
20345
20346 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
20347
20348         Sync from coreutils.
20349         * m4/unlinkdir.m4: New file.
20350
20351 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
20352
20353         Sync from coreutils.
20354         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
20355         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
20356         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
20357         White space changes only.
20358         * lib/makepath.c (make_path): Port to hosts where leading "//" is
20359         special.
20360         * lib/yesno.c: Include getline.h, not ctype.h.
20361         (yesno): Don't remove leading white space; POSIX doesn't allow it.
20362         Use getline to remove arbitrary restriction on response length.
20363
20364 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
20365
20366         * config/srclist-update: Spell out "Street" in FSF postal
20367         mail address; this is the style the FSF seems to prefer.
20368
20369         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
20370         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
20371         this updates FSF postal mail address.
20372
20373         Sync from coreutils.
20374         * modules/unlinkdir: New file.
20375         * modules/yesno (Depends-on): Add getline.
20376         * MODULES.html.sh (File system functions): Add unlinkdir.
20377
20378 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
20379
20380         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
20381         lib/strsep.h:
20382         Change the initial comment to refer to GPL, not LGPL.
20383         gnulib-tool will change it to LGPL as needed.
20384
20385         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
20386         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
20387         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
20388         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
20389         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
20390         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
20391         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
20392         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
20393         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
20394         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
20395         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
20396         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
20397         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
20398         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
20399         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
20400         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
20401         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
20402         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
20403         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
20404         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
20405         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
20406         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
20407         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
20408         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
20409         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
20410         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
20411         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
20412         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
20413         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
20414         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
20415         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
20416         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
20417         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
20418         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
20419         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
20420         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
20421         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
20422         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
20423         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
20424         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
20425         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
20426         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
20427         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
20428         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
20429         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
20430         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
20431         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
20432         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
20433         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
20434         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
20435         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
20436         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
20437         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
20438         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
20439         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
20440         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
20441         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
20442         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
20443         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
20444         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
20445         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
20446         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
20447         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
20448         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
20449         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
20450         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
20451         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
20452         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
20453         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
20454         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
20455         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
20456         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
20457         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
20458         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
20459         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
20460         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
20461         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
20462         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
20463         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
20464         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
20465         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
20466         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
20467         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
20468         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
20469         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
20470         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
20471         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
20472         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
20473         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
20474         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
20475         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
20476         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
20477         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
20478         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
20479         lib/yesno.c, lib/yesno.h:
20480         Update FSF postal mail address.
20481
20482 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
20483
20484         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
20485         tests/test-memmem.c, tests/test-stpncpy.c:
20486         Update FSF postal mail address.
20487
20488 2005-05-13  Bruno Haible  <bruno@clisp.org>
20489
20490         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
20491         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
20492         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
20493         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
20494         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
20495         Add support for 64-bit integers in the MSVC compiler.
20496
20497 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20498
20499         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
20500
20501 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
20502
20503         * gnulib-tool (func_import): Sort and uniquify recommended includes.
20504
20505 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
20506
20507         * doc/getdate.texi (General date syntax): Don't say that date
20508         date --iso-8601=ns generates acceptable dates; it doesn't yet.
20509         Problem reported by Nic Ferrier.
20510
20511 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
20512
20513         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
20514         specified in ai_socktype. Fix invalid ai_protocol
20515         check. ai_protocol is usually set to 0 or depending on
20516         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
20517         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
20518         ai_socktype / ai_protocol in the returned addrinfo structure.
20519
20520 2005-05-10  Simon Josefsson  <jas@extundo.com>
20521
20522         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
20523         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
20524
20525 2005-05-10  Karl Berry  <karl@gnu.org>
20526
20527         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
20528         (from http://www.gnu.org/licenses).
20529         * doc/COPYING.LIB: also rename to COPYING.LESSER.
20530         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
20531         fdl.texi suffices.
20532
20533 2005-05-10  Karl Berry  <karl@gnu.org>
20534
20535         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
20536         (COPYING.DOC): remove.
20537
20538         * config/srclist-update: new FSF address.
20539
20540 2005-05-10  Derek Price  <derek@ximbiot.com>
20541
20542         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
20543         possible.
20544
20545 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
20546             Bruno Haible  <bruno@clisp.org>
20547
20548         * modules/inet_ntop: New file.
20549         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
20550         inet_ntop.
20551
20552 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
20553             Bruno Haible  <bruno@clisp.org>
20554
20555         * m4/inet_ntop.m4: New file.
20556
20557 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
20558             Bruno Haible  <bruno@clisp.org>
20559
20560         * lib/inet_ntop.h: New file.
20561         * lib/inet_ntop.c: New file, from glibc with modifications.
20562
20563 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
20564
20565         * modules/time_r (License): Change to LGPL.
20566         * modules/extensions (License): Change to LGPL.  Actually,
20567         the license is more permissive than that, but currently gnulib-tool
20568         doesn't know how to handle more-permissive licenses.
20569
20570         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
20571         Problem reported by Dave Love.
20572
20573 2005-05-08  Jim Meyering  <jim@meyering.net>
20574
20575         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
20576         blank.
20577
20578 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
20579
20580         * modules/argmatch (Depends-on): Add stdbool.
20581         * modules/backupfile (Depends-on): Likewise.
20582         * modules/chdir-long (Depends-on): Likewise.
20583         * modules/closeout (Depends-on): Likewise.
20584         * modules/cycle-check (Depends-on): Likewise.
20585         * modules/dirname (Depends-on): Likewise.
20586         * modules/fnmatch (Depends-on): Likewise.
20587         * modules/fsusage (Depends-on): Likewise.
20588         * modules/fwriteerror (Depends-on): Likewise.
20589         * modules/getcwd (Depends-on): Likewise.
20590         * modules/getloadavg (Depends-on): Likewise.
20591         * modules/hard-locale (Depends-on): Likewise.
20592         * modules/makepath (Depends-on): Likewise.
20593         * modules/mountlist (Depends-on): Likewise.
20594         * modules/nanosleep (Depends-on): Likewise.
20595         * modules/posixtm (Depends-on): Likewise.
20596         * modules/quotearg (Depends-on): Likewise.
20597         * modules/readtokens (Depends-on): Likewise.
20598         * modules/readtokens0 (Depends-on): Likewise.
20599         * modules/readutmp (Depends-on): Likewise.
20600         * modules/save-cwd (Depends-on): Likewise.
20601         * modules/strftime (Depends-on): Likewise.
20602         * modules/userspec (Depends-on): Likewise.
20603         * modules/utimecmp (Depends-on): Likewise.
20604         * modules/xgetcwd (Depends-on): Likewise.
20605         * modules/xnanosleep (Depends-on): Likewise.
20606         * modules/xstrtod (Depends-on): Likewise.
20607         * modules/yesno (Depends-on): Likewise.
20608
20609 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
20610
20611         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
20612         needless checks.
20613
20614 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
20615
20616         Merge from coreutils.  Among other things,
20617         add bulletproofing for cases where stdin, stdout, or stderr are closed.
20618         * lib/fd-safer.c: New file.
20619         * lib/fcntl-safer.h, open-safer.c: Remove.
20620         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
20621         * lib/dup-safer.c: Include unistd-safer.h first.
20622         Don't include errno.h.
20623         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
20624         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
20625         * lib/file-type.c: Rely on file-type.h change.
20626         * lib/getloadavg.c: Include unistd-safer.h.
20627         (getloadavg): Use safer open.
20628         * lib/getusershell.c: Include "stdio-safer.h".
20629         (getusershell): Use safer fopen.
20630         * lib/long-options.c (long_options): Use NULL rather than 0.
20631         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
20632         'free'.
20633         * lib/modechange.c: Likewise.
20634         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
20635         (MODE_DONE): New constant.
20636         (struct mode_change): Remove 'next' member.
20637         (make_node_op_equals): New function; like the old one of the
20638         same name, except it allocates an array.
20639         (mode_compile, mode_create_from_ref): Use it.
20640         (mode_compile): Allocate result as an array, not a linked list.
20641         Parse octal string ourself, so that we catch mistakes like "+0".
20642         (mode_adjust): Arg is an array, not a linked list.
20643         * lib/modechange.c: Include stat-macros.h, xalloc.h.
20644         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
20645         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
20646         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
20647         Remove.  This is now stat-macros.h's job.
20648         (talloc): Remove.  All callers replaced by xalloc, so that
20649         our invokers don't have to worry about reporting memory failures.
20650         (make_node_op_equals): Remove.
20651         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
20652         New constants.
20653         (struct mode_change): Moved here from modechange.h.
20654         (mode_append_entry): Remove.
20655         (mode_compile): Remove MASKED_OPS arg, since it encouraged
20656         apps to have incorrect behavior.  Use simpler algorithm for head
20657         and tail.  Don't futz with umask; that's now the job of mode_adjust.
20658         Detect more invalid usages rather than having somewhat-random behavior.
20659         Don't insert an "a=" action, as that leads to incorrect behavior.
20660         (mode_compile, mode_create_from_ref): Return NULL on error instead
20661         of an enum, since now there's only one way to have an error.  All
20662         callers changed.
20663         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
20664         at the correct time.  Simplify calculation of "+u" and its ilk.
20665         Don't mishandle "+X".
20666         (mode_free): Remove "register" and localize decls.
20667         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
20668         (struct mode_change): Move to modechange.c; callers don't
20669         need to see this stuff.
20670         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
20671         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
20672         (mode_change, mode_adjust): Reflect the new signatures noted above.
20673         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
20674         that might redefine system include files.
20675         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
20676         (my_usleep): Use NULL rather than (void *) 0.
20677         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
20678         Use siginterrupt to specify that system calls should be interrupted.
20679         (rpl_nanosleep): Move initialization of suspended closer to call of
20680         my_usleep.
20681         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
20682         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
20683         (desirable_utmp_entry): New function.
20684         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
20685         using x2nrealloc, to simplify logic.
20686         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
20687         size calculation.  Do not assume utmp file is a regular file.
20688         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
20689         (READ_UTMP_CHECK_PIDS): New constant.
20690         * lib/save-cwd.c: Include unistd-safer.h.
20691         (save_cwd): Use fd_safer.
20692         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
20693         [!_LIBC] Include "stat-macros.h" instead.
20694         * lib/unistd-safer.h (fd_safer): New decl.
20695
20696 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
20697
20698         * modules/getloadavg (Depends-on): Add unistd-safer.
20699         * modules/getusershell (Depends-on): Add stdio-safer.
20700         * modules/lstat (Depends-on): Remove xalloc.
20701         * modules/mkstemp (Depends-on): Add stat-macros.
20702         * modules/modechange (Depends-on): Remove xstrtol.
20703         Add stat-macros, xalloc.
20704         * modules/save-cwd (Depends-on): Add unistd-safer.
20705         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
20706         * modules/unistd-safer (Files): Add lib/fd-safer.c
20707         (Makefile.am): Remove lib_SOURCES.
20708
20709         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
20710         Remove fcntl-safer; unistd-safer supersedes it.
20711
20712 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
20713
20714         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
20715         AC_HEADER_STAT.
20716         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
20717         (gl_PREREQ_CHOWN): Remove.
20718         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
20719         it.  Don't require AC_HEADER_STAT.
20720         (gl_PREREQ_LSTAT): Remove.
20721         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
20722         Don't require AC_HEADER_STAT.
20723         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
20724         (gl_PREREQ_RMDIR): Remove.
20725         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
20726         mention stat-macros.h or AC_HEADER_STAT, since we'll make
20727         the stat-macros module a prerequisite.
20728         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
20729         * m4/filemode.m4 (gl_FILEMODE): Likewise.
20730         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
20731         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
20732         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
20733         variable names.
20734         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
20735         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
20736         variable prefixes.
20737         * m4/fcntl-safer.m4: Remove.
20738         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
20739         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
20740         Invoke gl_PREREQ_FD_SAFER.
20741         (gl_PREREQ_FD_SAFER): New macro.
20742         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
20743         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
20744         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
20745         Remove duplicate call to AC_LIBOBJ(readutmp).
20746         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
20747
20748         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
20749         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
20750
20751 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
20752
20753         * MODULES.html.sh (Misc): Add byteswap.
20754
20755 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
20756
20757         * modules/getcwd (Depends-on): Add extensions.
20758         * modules/openat (Depends-on): Likewise.
20759
20760 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
20761
20762         * modules/byteswap: New file.
20763
20764 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
20765
20766         * m4/byteswap.m4: New file.
20767
20768 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
20769
20770         * lib/byteswap_.h: New file.
20771
20772 2005-04-25  Karl Berry  <karl@gnu.org>
20773
20774         * m4/gettext.m4: Update from GNU gettext 0.14.4.
20775
20776 2005-04-25  Albert Chin  <china@thewrittenword.com>
20777
20778         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
20779         Toolkit C bug.
20780
20781 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
20782
20783         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
20784         (func_ln_if_changed) Remove forcibly for no error message
20785         in case file does not exist.
20786
20787 2005-04-19  Simon Josefsson  <jas@extundo.com>
20788
20789         * gnulib-tool (Options): Make --symlink mean --symbolic.
20790
20791 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
20792
20793         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
20794
20795 2005-04-16  Simon Josefsson  <jas@extundo.com>
20796
20797         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
20798
20799 2005-04-15  Simon Josefsson  <jas@extundo.com>
20800
20801         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
20802
20803 2005-04-15  Simon Josefsson  <jas@extundo.com>
20804
20805         * gnulib-tool: Rename --symlink to --symbolic.
20806
20807 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
20808
20809         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
20810         symbolic links to files instead of copying/moving.  Add --aux-dir,
20811         specifying directory relative --dir where auxiliary build tools
20812         are placed.
20813
20814 2005-04-14  Bruno Haible  <bruno@clisp.org>
20815
20816         * modules/allocsa (License): Change to LGPL.
20817         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
20818
20819 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
20820
20821         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
20822         that "UTC +1 second" continues to work.  Problem reported
20823         by Dmitry V. Levin.
20824         (relunit_snumber): New rule.
20825         (relunit): Use it.
20826
20827 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
20828
20829         * lib/getdate.y (universal_time_zone_table): New constant.
20830         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
20831         universal_time_zone_table.
20832         (lookup_zone): Prefer universal_time_zone_table to
20833         local_time_zone_table, so that "GMT" time stamps are allowed in
20834         London during the summer.  Problem reported by Ian Abbott.
20835
20836 2005-04-12  Jim Meyering  <jim@meyering.net>
20837
20838         * lib/human.c (humblock): Set *options even when returning due to
20839         xstrtoumax conversion failure.  Thanks to a used-uninitialized
20840         warning from gcc-4.
20841
20842 2005-04-09  Jim Meyering  <jim@meyering.net>
20843
20844         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
20845         -Wuninitialized: initialize tm0.tm_year.
20846
20847 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
20848
20849         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
20850         count, since there's no maximum.  All uses changed.
20851         Add member dsts_seen.
20852         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
20853         not being INT_MAX.
20854         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
20855         Use pc_rels_seen to decide whther a date is absolute.
20856
20857         * lib/getdate.y (number): Don't overwrite year.
20858         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
20859         check.
20860
20861 2005-04-02  Simon Josefsson  <jas@extundo.com>
20862
20863         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
20864         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
20865
20866 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
20867
20868         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
20869         where no absolute path name can be longer than PATH_MAX.
20870
20871 2005-03-27  Jim Meyering  <jim@meyering.net>
20872
20873         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
20874
20875 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
20876
20877         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
20878         "one's complement" -> "ones' complement" in comment, as per Knuth.
20879         "value of type" -> "type or expression" in comment.
20880         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
20881
20882 2005-03-26  Jim Meyering  <jim@meyering.net>
20883
20884         Comment nits.
20885         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
20886         Correct typos: s/or/of/.
20887
20888 2005-03-26  Jim Meyering  <jim@meyering.net>
20889
20890         * modules/check-include-files: Move to ../ and rename to...
20891         * check-module: ...this.
20892
20893 2005-03-25  Jim Meyering  <jim@meyering.net>
20894
20895         * modules/xvasprintf (Files): Add xalloc.h.
20896
20897 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
20898
20899         * modules/gettext (Files): config/config.rpath ->
20900         build-aux/config.rpath
20901         * modules/iconv (Files): Likewise.
20902         Problem reported by Oskar Liljeblad.
20903
20904 2005-03-23  Jim Meyering  <jim@meyering.net>
20905
20906         * modules/check-include-files: New script to check for
20907         missing dependencies, multiple includes, etc.
20908
20909         * modules/c-strtold (Depends-on): Add xalloc.
20910         * modules/c-strtod (Depends-on): Add xalloc.
20911         * modules/hash (Depends-on): Add xalloc.
20912         (Files): Remove lib/xalloc.h.
20913
20914         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
20915         * modules/userspec (Files): Add lib/inttostr.h.
20916
20917 2005-03-23  Jim Meyering  <jim@meyering.net>
20918
20919         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
20920
20921 2005-03-22  Jim Meyering  <jim@meyering.net>
20922
20923         * modules/stat-macros: New module.
20924         * modules/canonicalize, modules/euidaccess, modules/file-type,
20925         * modules/filemode, modules/lchown, modules/makepath,
20926         * modules/rmdir, modules/stat: Depend on new stat-macros module
20927         rather than listing lib/stat-macros.h manually.
20928         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
20929
20930 2005-03-22  Jim Meyering  <jim@meyering.net>
20931
20932         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
20933
20934 2005-03-22  Bruno Haible  <bruno@clisp.org>
20935
20936         * config/srclist.txt: Replace target directory 'config' with
20937         'build-aux'.
20938         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
20939         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
20940         ../build-aux/.
20941
20942 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
20943
20944         * modules/chdir-long (Depends-on): Add mempcpy.
20945
20946         * modules/acl, modules/backupfile, modules/c-strtod,
20947         modules/c-strtold, modules/canon-host, modules/canonicalize,
20948         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
20949         modules/exclude, modules/exitfail, modules/file-type,
20950         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
20951         modules/getdate, modules/getline, modules/getpagesize,
20952         modules/getpass, modules/getugroups, modules/group-member,
20953         modules/hard-locale, modules/hash, modules/human, modules/idcache,
20954         modules/inttostr, modules/long-options, modules/makepath,
20955         modules/md5, modules/memcasecmp, modules/memcoll,
20956         modules/modechange, modules/mountlist, modules/path-concat,
20957         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
20958         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
20959         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
20960         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
20961         modules/strftime, modules/strndup, modules/strverscmp,
20962         modules/timespec, modules/unlocked-io, modules/userspec,
20963         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
20964         modules/yesno:
20965         Remove lib_SOURCES line from Makefile.am section, as this is now
20966         done automatically by the corresponding Autoconf macro.
20967
20968 2005-03-21  Jim Meyering  <jim@meyering.net>
20969
20970         Changes imported from coreutils.
20971
20972         * lib/cycle-check.c: Don't include xalloc.h.
20973
20974         * lib/path-concat.c: Don't include assert.h.
20975         (path_concat): Remove assertion that would have triggered
20976         for ABASE starting with more than one slash.
20977         Reported by Andreas Schwab.
20978
20979         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
20980         properly when ABASE is an absolute file name.
20981         Correct the description of this function.
20982         Include <assert.h>.
20983         Add an assertion and a test driver.
20984         This fixes a bug introduced on 2004-07-02.
20985         Andreas Schwab reported the resulting failure of cp --parents:
20986         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
20987
20988 2005-03-21  Jim Meyering  <jim@meyering.net>
20989
20990         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
20991         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
20992
20993 2005-03-21  Jim Meyering  <jim@meyering.net>
20994         and  Paul Eggert  <eggert@cs.ucla.edu>
20995
20996         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
20997         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
20998         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
20999         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
21000         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
21001         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
21002         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
21003         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
21004         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
21005         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
21006         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
21007         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
21008         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
21009         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
21010         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
21011         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
21012         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
21013         for these modules.
21014
21015 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
21016
21017         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
21018         (which shouldn't happen), generate nothing instead of returning 0
21019         immediately, so that nstrftime (NULL, ...) doesn't return 0.
21020
21021 2005-03-16  Bruno Haible  <bruno@clisp.org>
21022
21023         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
21024         HAVE_LONGLONG_64BIT.
21025
21026 2005-03-16  Bruno Haible  <bruno@clisp.org>
21027
21028         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
21029         HAVE_LONGLONG_64BIT.
21030
21031 2005-03-16  Bruno Haible  <bruno@clisp.org>
21032
21033         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
21034         HAVE_LONGLONG_64BIT.
21035
21036 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
21037
21038         * lib/strftime.c (my_strftime): Prepend space to format so that we can
21039         reliably distinguish strftime failure from empty output on POSIX
21040         hosts.
21041
21042 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
21043
21044         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
21045         (iconv_string): Don't guess a size-zero buffer, as that might cause
21046         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
21047         result would be 'too large', where 'too large' is (heuristically)
21048         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
21049         overflow concerns.  This will prevent some unwanted malloc failures
21050         when the inputs are very large.
21051
21052 2005-03-15  Karl Berry  <karl@gnu.org>
21053
21054         * config/srclist.txt (config.rpath): from gettext.
21055         * config/config.rpath: update.
21056
21057 2005-03-15  Bruno Haible  <bruno@clisp.org>
21058
21059         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
21060         to 'negate'.
21061
21062         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
21063         variable.
21064
21065         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
21066         results.
21067
21068 2005-03-14  Simon Josefsson  <jas@extundo.com>
21069
21070         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
21071         <fx@gnu.org>.
21072
21073 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
21074
21075         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
21076         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
21077         intprops.h.
21078         * lib/strtol.c: Likewise.
21079
21080 2005-03-14  Jim Meyering  <jim@meyering.net>
21081
21082         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
21083         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
21084         to be nonzero so that we (and caller) can detect the difference
21085         between a valid zero-length expansion and an error return, even
21086         when the underlying strftime fails before writing anything into
21087         that location.
21088
21089 2005-03-14  Bruno Haible  <bruno@clisp.org>
21090
21091         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
21092         Update from GNU gettext 0.14.3.
21093
21094 2005-03-10  Jim Meyering  <jim@meyering.net>
21095
21096         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
21097
21098 2005-03-10  Jim Meyering  <jim@meyering.net>
21099
21100         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
21101         so that this module works on systems without fchdir.
21102
21103 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
21104
21105         Factor int-properties macros into a single file, except for
21106         glibc-related files.
21107         * lib/intprops.h: New file.
21108         * lib/getloadavg.c: Include it instead of limits.h.
21109         (INT_STRLEN_BOUND): Remove.
21110         * lib/human.c: Include intprops.h.
21111         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
21112         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
21113         302/1000.
21114         * lib/inttostr.h: Include intprops.h instead of limits.h.
21115         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
21116         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
21117         for consistency with intprops.h.
21118         (time_t_is_integer, twos_complement_arithmetic): Use them.
21119         * lib/sig2str.h: Include <signal.h>, intprops.h.
21120         (INT_STRLEN_BOUND): Remove.
21121         * lib/strftime.c (TYPE_SIGNED): Remove.
21122         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
21123         * lib/strtol.c: Adjust comments to match intprops.h.
21124         * lib/userspec.c: Include intprops.h.
21125         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
21126         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
21127         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
21128         instead of rolling our own expressions.
21129         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
21130
21131         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
21132         instead of int.
21133         (my_strftime): Do not mishandle years close to INT_MAX, by doing
21134         the right thing even if adding 1900 would overflow.  Similarly
21135         for tm_mon + 1 and tm_yday + 1.
21136         Make %Y always equivalent to %C%y, and similarly for %G and %g.
21137         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
21138         (DO_SIGNED_NUMBER): New macro.
21139         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
21140
21141 2005-03-07  Bruno Haible  <bruno@clisp.org>
21142
21143         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
21144
21145 2005-03-07  Bruno Haible  <bruno@clisp.org>
21146
21147         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
21148
21149 2005-03-04  Derek R. Price  <derek@ximbiot.com>
21150
21151         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
21152         (func_import): Only replace files via --import when they have actually
21153         changed.
21154
21155 2005-03-03  Derek R. Price  <derek@ximbiot.com>
21156
21157         * m4/mmap-anon.m4: New file.
21158         * m4/pagealign_alloc.m4: New file.
21159
21160 2005-03-03  Derek R. Price  <derek@ximbiot.com>
21161             Bruno Haible  <bruno@clisp.org>
21162
21163         * modules/pagealign_alloc: New file.
21164         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
21165
21166 2005-03-03  Derek R. Price  <derek@ximbiot.com>
21167             Bruno Haible  <bruno@clisp.org>
21168
21169         * lib/pagealign_alloc.h: New file.
21170         * lib/pagealign_alloc.c: New file.
21171
21172 2005-03-03  Bruno Haible  <bruno@clisp.org>
21173
21174         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
21175         Use an all-permissive copyright notice, recommended by RMS.
21176
21177 2005-03-02  Bruno Haible  <bruno@clisp.org>
21178
21179         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
21180         of AIX, the replacement has to be done only after <string.h> is
21181         included, therefore not in config.h. stpncpy.h does the replacement,
21182         and stpncpy.c uses it.
21183
21184 2005-03-02  Bruno Haible  <bruno@clisp.org>
21185
21186         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
21187         stpncpy.c uses it.
21188
21189 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
21190
21191         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
21192         The workaround isn't strictly needed for POSIX conformance, and
21193         it's too much of a pain to configure and maintain.  We'll ask
21194         people to fix their kernels instead.
21195         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
21196         (NANOSLEEP_BUG_WORKAROUND): Remove.
21197         (xnanosleep): Remove the workaround.
21198
21199 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
21200
21201         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
21202         Reported by Derek Price.
21203         (Include): Add "timespec.h".
21204
21205         * modules/xnanosleep (Depends-on): Remove gethrxtime.
21206
21207 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
21208
21209         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
21210         to detect nanosleep bug.
21211
21212 2005-03-01  Bruno Haible  <bruno@clisp.org>
21213
21214         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
21215
21216 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
21217
21218         * modules/gethrxtime: New file.
21219         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
21220         (Depends-on): Add gethrxtime.
21221         (configure.ac): Add gl_XNANOSLEEP.
21222         (Makefile.am): Remove lib_SOURCES line.
21223
21224 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
21225
21226         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
21227         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
21228
21229 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
21230
21231         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
21232         * lib/timespec.h (gettime): Return void, since it always
21233         succeeds now.  All uses changed.
21234         * lib/gettime.c (gettime) Likewise.
21235         [HAVE_NANOTIME]: Prefer nanotime.
21236         Assume gettimeofday succeeds, as POSIX requires.
21237         Assime time () succeeds, since other code already does.
21238         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
21239         (timespec_subtract): Remove.
21240         (NANOSLEEP_BUG_WORKAROUND): New constant.
21241         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
21242         things considerably.  Use it only on GNU/Linux hosts, since the
21243         workaround shouldn't be needed elsewhere.
21244
21245 2005-02-24  Bruno Haible  <bruno@clisp.org>
21246
21247         * modules/gettext (Files): Add m4/glibc2.m4.
21248
21249 2005-02-24  Bruno Haible  <bruno@clisp.org>
21250
21251         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
21252         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
21253         * m4/progtest.m4:
21254         Update from GNU gettext 0.14.2.
21255         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
21256
21257 2005-02-24  Bruno Haible  <bruno@clisp.org>
21258
21259         * lib/localcharset.c: Update from GNU gettext 0.14.2.
21260         * lib/config.charset: Update from GNU gettext 0.14.2.
21261
21262 2005-02-24  Bruno Haible  <bruno@clisp.org>
21263
21264         * lib/gettext.h: Update from GNU gettext 0.14.2.
21265
21266 2005-02-23  Simon Josefsson  <jas@extundo.com>
21267
21268         * m4/iconvme.m4: New file.
21269
21270 2005-02-23  Jim Meyering  <jim@meyering.net>
21271
21272         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
21273         change.
21274         Thanks to Bruno Haible for catching it.
21275
21276 2005-02-22  Simon Josefsson  <jas@extundo.com>
21277
21278         * modules/iconvme: New file.
21279
21280         * MODULES.html.sh: Add iconvme.
21281
21282 2005-02-22  Simon Josefsson  <jas@extundo.com>
21283
21284         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
21285
21286 2005-02-22  Simon Josefsson  <jas@extundo.com>
21287
21288         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
21289
21290 2005-02-22  Jim Meyering  <jim@meyering.net>
21291
21292         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
21293         s/ifndef/ifdef/.
21294
21295 2005-02-20  Neil Conway  <neilc@samurai.com>
21296
21297         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
21298         returned by OSX/Darwin if the specified buffer is not large
21299         enough for the hostname.
21300
21301 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21302
21303         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
21304         pass it to _help, otherwise the latter coredumps trying to
21305         dereference state.root_argp.
21306
21307 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
21308
21309         * modules/chdir-long (Depends-on): Add memrchr.
21310         * modules/memrchr (Files): Add lib/memrchr.h.
21311         (Include): "memrchr.h".
21312
21313 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
21314
21315         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
21316
21317 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
21318
21319         * lib/memrchr.h: New file.
21320         * lib/chdir-long.c: Include it.
21321         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
21322         Don't bother including stddef.h.
21323
21324 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
21325
21326         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
21327         inclusion.
21328         Include <sys/types.h>, for dev_t.
21329         (ME_DUMMY, ME_REMOTE): Move from here....
21330         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
21331         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
21332         Dmitry V. Levin.
21333         Include mountlist.h first, to test the interface.
21334
21335 2005-01-29  Bruno Haible  <bruno@clisp.org>
21336
21337         * lib/progname.c (program_name): Initialize.
21338         Needed when linking statically on MacOS X.
21339
21340 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
21341
21342         Sync from coreutils.
21343         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
21344         (Depends-on): Add c-strtod.
21345         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
21346
21347 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
21348
21349         Sync from coreutils.
21350         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
21351
21352         Remove files that are specific to coreutils.
21353         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
21354
21355 2005-01-28  Bruno Haible  <bruno@clisp.org>
21356
21357         * modules/javacomp: New file.
21358         * MODULES.html.sh (Java): Add javacomp.
21359
21360 2005-01-28  Bruno Haible  <bruno@clisp.org>
21361
21362         * m4/javacomp.m4: New file, from GNU gettext.
21363
21364 2005-01-28  Bruno Haible  <bruno@clisp.org>
21365
21366         * lib/javacomp.sh.in: New file, from GNU gettext.
21367         * lib/javacomp.h: New file, from GNU gettext.
21368         * lib/javacomp.c: New file, from GNU gettext.
21369
21370 2005-01-26  Simon Josefsson  <jas@extundo.com>
21371
21372         * lib/gai_strerror.c: Use GPL in header.
21373
21374 2005-01-26  Bruno Haible  <bruno@clisp.org>
21375
21376         * modules/javaexec: New file.
21377         * MODULES.html.sh (Java): Add javaexec.
21378
21379 2005-01-26  Bruno Haible  <bruno@clisp.org>
21380
21381         * m4/javaexec.m4: New file, from GNU gettext.
21382
21383 2005-01-26  Bruno Haible  <bruno@clisp.org>
21384
21385         * lib/javaexec.sh.in: New file, from GNU gettext.
21386         * lib/javaexec.h: New file, from GNU gettext.
21387         * lib/javaexec.c: New file, from GNU gettext.
21388
21389 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21390
21391         * modules/lchown (Depends-on): Remove lchown.h
21392
21393 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21394
21395         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
21396         must be defined if the header file was not found, in order
21397         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
21398
21399 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21400
21401         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
21402         initializers for struct pentry_state.
21403         (__argp_error): Check return value of __asprintf
21404         (__argp_failure): Translate error message
21405
21406         * lib/argp-parse.c: Removed braces around the expansion of N_()
21407
21408 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
21409
21410         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
21411         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
21412         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
21413         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
21414         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
21415         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
21416         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
21417         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
21418         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
21419         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
21420         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
21421         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
21422         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
21423         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
21424         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
21425         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
21426         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
21427         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
21428         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
21429         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
21430         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
21431         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
21432         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
21433         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
21434         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
21435         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
21436         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
21437         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
21438         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
21439         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
21440         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
21441         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
21442         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
21443         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
21444         xstrtol.m4, xstrtoumax.m4, yesno.m4:
21445         Use an all-permissive copyright notice, recommended by RMS.
21446
21447 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
21448
21449         * modules/chdir-long (Depends-on): Remove mempcpy.
21450
21451 2005-01-21  Jim Meyering  <jim@meyering.net>
21452
21453         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
21454         same value as for Solaris 9.
21455
21456         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
21457         component length.  This included changing the parameter to be
21458         of type `char *' rather than `char const *'.
21459         * lib/chdir-long.h (chdir_long): Update prototype.
21460
21461         * lib/openat.c (fdopendir, fstatat): New functions.
21462         * lib/openat.h: Include headers required for use of DIR and struct
21463         stat.
21464         [AT_SYMLINK_NOFOLLOW]: Define.
21465         (fdopendir, fstatat): Add prototypes.
21466
21467 2005-01-21  Bruno Haible  <bruno@clisp.org>
21468
21469         * modules/classpath: New file.
21470         * MODULES.html.sh (Java): Add classpath.
21471
21472 2005-01-21  Bruno Haible  <bruno@clisp.org>
21473
21474         * lib/classpath.h: New file, from GNU gettext.
21475         * lib/classpath.c: New file, from GNU gettext.
21476
21477 2005-01-20  Simon Josefsson  <jas@extundo.com>
21478
21479         * modules/version-etc-fsf: New file.
21480
21481 2005-01-20  Simon Josefsson  <jas@extundo.com>
21482
21483         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
21484         * lib/version-etc.c: Remove version_etc_copyright.
21485         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
21486         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
21487
21488 2005-01-20  Simon Josefsson  <jas@extundo.com>
21489
21490         * lib/base64.h (isbase64): Add.
21491
21492         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
21493         using a unsigned prototype, don't inline.
21494         (base64_decode): Use it.
21495
21496 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
21497
21498         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
21499         it.
21500
21501 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
21502
21503         * lib/save-cwd.c (save_cwd): Remove code to support the case
21504         where fchdir is missing or flaky.
21505
21506 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
21507
21508         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
21509
21510 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
21511
21512         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
21513         AC_LIBSOURCES now does this.
21514         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
21515         with new ullong_max module.
21516
21517 2005-01-19  Bruno Haible  <bruno@clisp.org>
21518
21519         * modules/sh-quote: New file.
21520         * MODULES.html.sh (Executing programs): Add sh-quote.
21521
21522 2005-01-19  Bruno Haible  <bruno@clisp.org>
21523
21524         * lib/sh-quote.h: New file, from GNU gettext.
21525         * lib/sh-quote.c: New file, from GNU gettext.
21526
21527 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
21528
21529         Merge from coreutils.
21530         * m4/ullong_max.m4: New file.
21531         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
21532         (gl_MACROS): Assume localeconv exists.
21533
21534 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
21535
21536         Merge changes from coreutils, as described below in several
21537         changelogs dated today.
21538
21539         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
21540         (O_DIRECTORY): Remove; not needed here, since "." must be
21541         a directory.  All uses removed.
21542         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
21543         universal on Suns, and we also need to test for IRIX.
21544         Revamp code to use 'if' rather than '#if'.
21545         Avoid unnecessary comparison of cwd->desc to 0.
21546
21547         * lib/utimens.c (futimens): Robustify the previous patch, by checking
21548         for known valid error numbers rather than observed invalid ones.
21549
21550 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
21551
21552         * modules/ullong_max: New file.
21553
21554         * modules/chdir-long, modules/openat: New files.
21555         * modules/save-cwd (Depends-on): Depend on chdir-long.
21556         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
21557
21558 2005-01-18  Jim Meyering  <jim@meyering.net>
21559
21560         Merge from coreutils.
21561         * m4/chdir-long.m4, m4/openat.m4: New files.
21562         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
21563         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
21564         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
21565         is sane and DOES follow symlinks.  Besides, testing 20 different
21566         systems found no broken chown implementations.
21567         Prompted by a change in rsync's copy of this macro.
21568         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
21569
21570         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
21571
21572         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
21573         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
21574         NULL-means-set-to-current-time semantics.
21575         Remove temporary file immediately, rather than waiting
21576         for configure's at-exit trap code to do it.
21577
21578 2005-01-18  Jim Meyering  <jim@meyering.net>
21579
21580         * lib/version-etc.c (version_etc_copyright): Update copyright date.
21581
21582         * lib/utimens.c (futimens): Account for the fact that futimes
21583         can also fail with errno == ENOSYS or errno == ENOENT.
21584         Patch from Dmitry V. Levin.
21585
21586         Change the name of the robust chdir function from chdir to chdir_long.
21587         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
21588         (restore_cwd): Use chdir_long, not chdir.
21589         * lib/chdir-long.c: Renamed from chdir.c.
21590         * lib/chdir-long.h: Renamed from chdir.h.
21591         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
21592         Hurd.
21593
21594 2005-01-18  Bruno Haible  <bruno@clisp.org>
21595
21596         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
21597         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
21598         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
21599         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
21600         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
21601         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
21602         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
21603         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
21604         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
21605         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
21606         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
21607         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
21608         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
21609         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
21610         Use an all-permissive copyright notice, recommended by RMS.
21611
21612 2005-01-18  Bob Proulx  <bob@proulx.com>
21613
21614         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
21615         simplify offsetof() macro construct to avoid compile failure with
21616         native HP-UX 11.0 ANSI C compiler.
21617
21618 2005-01-17  Bruno Haible  <bruno@clisp.org>
21619
21620         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
21621         redundant because stpncpy.m4 takes care of it.
21622
21623 2005-01-17  Bruno Haible  <bruno@clisp.org>
21624
21625         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
21626
21627 2005-01-17  Bruno Haible  <bruno@clisp.org>
21628
21629         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
21630         used.
21631
21632 2005-01-17  Bruno Haible  <bruno@clisp.org>
21633
21634         * lib/fwriteerror.h (fwriteerror): Change specification to include
21635         fclose.
21636         * lib/fwriteerror.c: Include <stdbool.h>.
21637         (fwriteerror): At the end, close the file stream. Record whether
21638         stdout was already closed.
21639
21640 2005-01-17  Bruno Haible  <bruno@clisp.org>
21641
21642         * lib/execute.c (environ): Declare if needed.
21643         * lib/pipe.c (environ): Likewise.
21644         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
21645
21646 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21647
21648         * modules/argp: Depend on vsnprintf
21649
21650 2005-01-10  Jim Meyering  <jim@meyering.net>
21651
21652         * modules/closeout (Depends-on): Add atexit.
21653
21654 2005-01-06  Bruno Haible  <bruno@clisp.org>
21655
21656         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
21657
21658 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
21659
21660         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
21661         definitions to be after all include files, to avoid collisions.
21662         Problem reported by Bob Proulx.
21663
21664 2005-01-04  Jim Meyering  <jim@meyering.net>
21665
21666         Changes imported from coreutils.
21667         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
21668         as the mkstemp template, use a temporary directory and an
21669         8.3-friendly template to avoid trouble on systems like DJGPP.
21670         Reported by Juan M. Guerrero via Stepan Kasal.
21671         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
21672         close. Remove the temporary directory right away, rather than waiting
21673         for configure's at-exit trap code to do it.
21674         Suggestion from Stepan Kasal.
21675
21676 2005-01-01  Simon Josefsson  <jas@extundo.com>
21677
21678         * gnulib-tool: Print #include directives when --import'ing.
21679
21680 2004-12-28  Simon Josefsson  <jas@extundo.com>
21681
21682         * tests/test-base64.c: Include required header files.  Remove
21683         unused variables.
21684
21685 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
21686
21687         * modules/error (Depends-on): Remove gettext.
21688
21689 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
21690
21691         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
21692         not needed.  This removes a dependency on the gettext module.
21693         [defined _LIBC]: Do not include <libintl.h>; not needed.
21694
21695 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
21696
21697         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
21698         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
21699
21700 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
21701
21702         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
21703         HAVE_DECL_STRTOLD.
21704
21705 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
21706
21707         * modules/getdate (Depends-on): Remove alloca-opt.
21708
21709 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
21710
21711         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
21712
21713 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
21714
21715         * lib/argp-parse.c: Include <stddef.h>.
21716         (alignof, alignto): New macros.
21717         (parser_init): Don't assume that void * is aligned sufficiently
21718         for struct option.
21719
21720         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
21721         need to extend the stack.
21722         (YYINITDEPTH): New macro, so that the initial stack isn't overly
21723         large.
21724
21725 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21726
21727         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
21728
21729 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
21730
21731         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
21732         (2004-10-24) change.  Apparently this was a false alarm.
21733
21734         * modules/getdate: Depend on alloca-opt, not alloca.
21735
21736 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
21737
21738         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
21739         Remove now-obsolete comment about AIX.
21740         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
21741         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
21742         (YYMAXDEPTH): New macro.
21743
21744 2004-12-18  Simon Josefsson  <jas@extundo.com>
21745
21746         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
21747
21748 2004-12-18  Bruno Haible  <bruno@clisp.org>
21749
21750         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
21751
21752 2004-12-18  Bruno Haible  <bruno@clisp.org>
21753
21754         * lib/fatal-signal.c (fatal_signals): Make non-const.
21755         (init_fatal_signals): New function.
21756         (uninstall_handlers, install_handlers): Ignore signals that were set to
21757         SIG_IGN.
21758         (at_fatal_signal): Call init_fatal_signals.
21759         (init_fatal_signal_set): Likewise. Ignore signals that were set to
21760         SIG_IGN.
21761         Reported by Paul Eggert.
21762
21763 2004-12-18  Bruno Haible  <bruno@clisp.org>
21764
21765         * doc/alloca.texi: New file.
21766         * doc/alloca-opt.texi: New file.
21767
21768 2004-12-17  Jim Meyering  <jim@meyering.net>
21769
21770         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
21771         Otherwise, install-sh could exit with improper exit status when
21772         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
21773
21774 2004-12-16  Simon Josefsson  <jas@extundo.com>
21775
21776         * tests/test-base64.c: Add license.
21777
21778 2004-12-15  Stepan Kasal  <address@hidden>
21779
21780         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
21781
21782 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
21783
21784         * modules/getcwd (Files): Add m4/d-ino.m4.
21785         Suggested by Mark D. Baushke.
21786
21787 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
21788
21789         * lib/getdate.y (textint): New member "negative".
21790         (time_zone_hhmm): New function.
21791         Expect 14 shift-reduce conflicts, not 13.
21792         (o_colon_minutes): New rule.
21793         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
21794         (yylex): Set the "negative" member of signed numbers.
21795
21796 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
21797
21798         * doc/getdate.texi (Time of day items, Time zone items):
21799         Describe new formats +00:00, UTC+00:00.
21800
21801 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
21802
21803         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
21804         spurious "-l"s.  Problem reported by Stepan Kasal.
21805
21806 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
21807
21808         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
21809         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
21810
21811 2004-12-04  Simon Josefsson  <jas@extundo.com>
21812
21813         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
21814         Vandoorselaere <yoann@prelude-ids.org>.
21815
21816 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
21817
21818         Changes imported from coreutils.
21819         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
21820         exist.
21821         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
21822
21823 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
21824
21825         Changes imported from coreutils.
21826         * lib/hard-locale.c: Assume <locale.h> exists.
21827         Include "strdup.h".
21828         (GLIBC_VERSION): New macro.
21829         (hard_locale): Assume setlocale exists.
21830         Rewrite to avoid #ifdef.
21831         Use strdup rather than malloc + strcpy.
21832         * lib/human.c: Assume <locale.h> exists.
21833         (human_readable): Assume localeconv exists.
21834
21835 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
21836
21837         * modules/hard-locale (Depends-on): Add strdup.
21838
21839 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
21840
21841         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
21842         convert T2, not T.  (Imported from libc.)
21843
21844 2004-11-30  Simon Josefsson  <jas@extundo.com>
21845
21846         * modules/restrict (License): Change to LGPL.
21847
21848 2004-11-30  Simon Josefsson  <jas@extundo.com>
21849
21850         * m4/restrict.m4: Add copyright and copying conditions.
21851
21852 2004-11-30  Simon Josefsson  <jas@extundo.com>
21853
21854         * m4/base64.m4: New file.
21855
21856 2004-11-30  Simon Josefsson  <jas@extundo.com>
21857
21858         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
21859         base64.
21860
21861         * tests/test-base64.c: New file.
21862
21863         * modules/base64: New file.
21864
21865 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
21866
21867         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
21868         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
21869
21870         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
21871
21872 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
21873
21874         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
21875         (__getcwd.c): Don't restore errno; glibc doesn't.
21876         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
21877         first, falling back to our code only if its results look suspicious.
21878         Ensure that the resulting buffer is only as large as necessary.
21879
21880         * lib/readutmp.c: Include readutmp.h first.
21881         Include <errno.h>, since readutmp.h no longer does that.
21882         * lib/readutmp.h: Don't include <errno.h>,
21883         <sys/param.h>, <time.h>; not needed to establish interface.
21884         (errno): Remove decl.
21885         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
21886         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
21887         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
21888
21889 2004-11-28  Simon Josefsson  <jas@extundo.com>
21890
21891         * lib/base64.h, base64.c: New file.
21892
21893 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
21894
21895         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
21896
21897 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
21898
21899         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
21900         (Depends-on): Remove pathmax, same.  Add mempcpy.
21901         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
21902         (Makefile.am): Append getcwd.h to lib_SOURCES.
21903         (Include): Add getcwd.h.
21904         (Maintainer): Change from Jim Meyering to "all, glibc",
21905         since getdate now uses intended-for-glibc code.
21906         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
21907         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
21908
21909 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
21910
21911         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
21912         HP's ANSI C compiler.
21913         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
21914         Declaring int functions causes warnings on some modern systems and
21915         shouldn't be needed to compile on ancient ones.
21916         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
21917         defined.
21918
21919         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
21920         with the following changes.
21921         (__set_errno): Parenthesize properly.
21922         Include <stdbool.h>.
21923         (MIN, MAX, MATCHING_INO): New macros.
21924         (__getcwd): Define with prototype, not K&R form.
21925         Use heuristics to allocate default buffer on stack if possible.
21926         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
21927         behavior, and to avoid the PATH_MAX limit when computing
21928         ../../../../...
21929         Use MATCHING_INO to compare inode number to file.
21930         Check for arithmetic overflow in size calculations.
21931         Fix bug in reallocation of dot array that caused getcwd to fail
21932         on directories nested deeper than 75.
21933         Be more careful about saving errno on error.
21934         Do not use realloc; use only free+malloc, as this is a bit
21935         more flexible and avoids a needless copy operation.
21936         Do not inspect st_dev and st_ino for symbolic links; POSIX
21937         doesn't specify the latter.
21938         Check for closedir errors.
21939         Avoid needless casts.
21940         Use "#ifdef weak_alias" around weak_alias, to be like other
21941         glibc code.
21942         The following changes to getcwd.c have effect only when used in
21943         gnulib; they have no effect inside glibc proper.
21944         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
21945         as alloca isn't used.
21946         (alloca, __alloca): Likewise.
21947         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
21948         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
21949         unconditionally, as gnulib assumes C89 or better.
21950         Do not include <sys/param.h>.
21951         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
21952         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
21953         better.
21954         (NULL) [!defined NULL]: Remove; we assume C89 or better.
21955         Include <dirent.h> in a way that is compatible with modern Autoconf.
21956         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
21957         New macros, if not already defined.
21958         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
21959         Use "_LIBC", not "defined _LIBC", for consistency.
21960         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
21961         a mempcpy module.
21962         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
21963         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
21964         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
21965         credit only to Jim Meyering and adjust the copyright dates.
21966         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
21967         <stdlib.h>, <unistd.h>, "pathmax.h".
21968         Instead, include "xgetcwd.h" (first) and "getcwd.h".
21969         (INITIAL_BUFFER_SIZE): Remove.
21970         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
21971
21972 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
21973
21974         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
21975         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
21976         Use the _ONCE methods, for efficiency.
21977         Check for fcntl.h.  In test program, include <errno.h>
21978         and <fcntl.h> if available.  Remove old K&R cruft from
21979         test program.  Check for common errors in GNU/Linux,
21980         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
21981         don't do AC_LIBOBJ, as that's getcwd.m4's job.
21982         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
21983         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
21984         name accordingly.
21985         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
21986         accommodate new getcwd.c.
21987         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
21988         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
21989         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
21990         that's all we need now.
21991
21992 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21993
21994         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
21995         argp-parse.c depends on getopt internals, that means we should
21996         always use our getopt, to be on the safe side.
21997         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
21998         order not to spoil the result of an eventual previous invocation
21999         of gl_GETOPT_SUBSTITUTE.
22000
22001 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
22002
22003         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
22004         redefinition warnings. To avoid them, include the defines
22005         in `#if !defined __need_getopt ... #endif'. The only place
22006         where __getopt_argv_const is used is in definitions
22007         of getopt_long and getopt_long_only below, which are as well
22008         protected by `#ifndef __need_getopt'.
22009         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
22010         __need_getopt after including <stdio.h> and <unistd.h> These
22011         headers might have defined it.
22012
22013 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
22014
22015         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
22016
22017 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
22018
22019         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
22020         (futimens): New function, which uses futimes if available.
22021         (futimens, utimens): Support timespec==NULL, with same semantics
22022         as utime and utimens.
22023         * lib/utimens.h (futimens): New decl.
22024
22025 2004-11-23  Jim Meyering  <jim@meyering.net>
22026
22027         * lib/getopt_.h: Remove trailing blanks.
22028
22029 2004-11-23  Jim Meyering  <jim@meyering.net>
22030
22031         * lib/__fpending.c: Add comment.
22032
22033 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
22034
22035         * modules/canonicalize (Depends-on): Add xreadlink.
22036         Problem reported by James Youngman.
22037
22038 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
22039
22040         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
22041         New macros.
22042         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
22043         optopt): Use them instead of invoking ## directly; otherwise, the
22044         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
22045
22046 2004-11-19  Bruno Haible  <bruno@clisp.org>
22047
22048         * lib/strtok_r.c: Move comments from here...
22049         * lib/strtok_r.h: ... to here.
22050
22051 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
22052
22053         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
22054         implementations that mishandle size_t overflow.
22055
22056 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
22057
22058         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
22059         might fail.  Problem reported by Yoann Vandoorselaere.
22060         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
22061         implementations that mishandle size_t overflow.
22062
22063 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
22064
22065         * modules/canon-host (Depends-on): Add strdup.
22066
22067 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
22068
22069         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
22070
22071 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
22072
22073         * lib/canon-host.c: Include "strdup.h".
22074         (canon_host): Use getaddrinfo if available, so that IPv6 works.
22075         Use strdup instead of malloc/strcpy to duplicate strings.
22076
22077         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
22078         (human_space_before_unit): New constant.
22079         * lib/human.c (human_readable): Support it.
22080
22081         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
22082         (xgetcwd): Set errno correctly when failing.
22083         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
22084         the failure is actually due to a PATH_MAX problem.
22085
22086         Further getopt changes to make it more likely that glibc will
22087         buy the changes back.
22088         * lib/getopt.c (POSIXLY_CORRECT): New constant.
22089         (getopt): Use it, so to preserve glibc semantic
22090         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
22091         when compiling for libc.
22092         * lib/getopt_.h (__getopt_argv_const): Bring it back.
22093         (getopt_long, getopt_long_only): Use it.
22094
22095         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
22096         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
22097         (getopt): Argv is now char * const *, as per standard.
22098         (_getopt_internal_r, _getopt_internal): Argv is now char **,
22099         not char *__getopt_argv_const *.
22100         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
22101         _getopt_long_only_r): Likewise.
22102         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
22103         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
22104         _getopt_long_r, _getopt_long_only_r): Likewise.
22105         * lib/getopt_.h (__getopt_argv_const): Remove.
22106         (getopt): Argv is now char * const *, as per standard.
22107
22108         * lib/getdate.y (tORDINAL): New token.
22109         (day, relunit): Allow it for relative times.
22110         (relative_time_table): Use tORDINAL for ordinals.
22111
22112 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
22113
22114         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
22115         Document that "second" isn't allowed as an ordinal number.
22116
22117 2004-11-16  Jim Meyering  <jim@meyering.net>
22118
22119         * modules/closeout (Depends-on): Add fpending.
22120
22121 2004-11-15  Jim Meyering  <jim@meyering.net>
22122
22123         * lib/closeout.c: Include "__fpending.h" once again.
22124         Include <stdbool.h>.
22125         (close_stdout): Don't fail just because stdout was closed initially,
22126         since some programs don't write to stdout in the normal course of
22127         operation (other than --version and --help), and we don't want this
22128         function to make e.g. `touch file >&-' fail.
22129         But do fail if it was closed and someone has tried to write to it.
22130         E.g., `printf foo >&-' must fail.
22131
22132 2004-11-13  Jim Meyering  <jim@meyering.net>
22133
22134         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
22135
22136 2004-11-12  Simon Josefsson  <jas@extundo.com>
22137
22138         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
22139         small doc fix is still pending.
22140
22141 2004-11-11  Simon Josefsson  <jas@extundo.com>
22142
22143         * modules/strtok_r: New file.
22144
22145         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
22146         strtok_r.
22147
22148 2004-11-11  Simon Josefsson  <jas@extundo.com>
22149
22150         * m4/strtok_r.m4: New file.
22151
22152         * m4/getopt.m4: Replace opterr.
22153
22154 2004-11-11  Simon Josefsson  <jas@extundo.com>
22155
22156         * lib/strtok_r.h, strtok_r.c: New file.
22157
22158 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
22159
22160         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
22161         of replacing opterr, getopt, etc.  This should handle the
22162         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
22163
22164 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
22165
22166         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
22167         we can stop lying to compilers about the constness of argv when we
22168         are compiled outside glibc.
22169         (getopt, getopt_long, getopt_long_only): Use it.
22170         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
22171         _getopt_internal, getopt): Likewise.
22172         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
22173         _getopt_long_only_r): Likewise.
22174         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
22175         _getopt_long_r, _getopt_long_only_r): Likewise.
22176
22177         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
22178         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
22179         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
22180         the other external symbols.
22181         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
22182         declaration, since the above renaming now works around collisions.
22183
22184 2004-11-11  Jim Meyering  <jim@meyering.net>
22185
22186         * lib/linebreak.c: Remove trailing blanks.
22187         * lib/alloca_.h: Likewise.
22188         * lib/acosl.c: Likewise.
22189         * lib/euidaccess.c: Likewise.
22190         * lib/allocsa.h: Likewise.
22191
22192 2004-11-10  Simon Josefsson  <jas@extundo.com>
22193
22194         * m4/getaddrinfo.m4: New file.
22195
22196 2004-11-10  Simon Josefsson  <jas@extundo.com>
22197
22198         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
22199
22200 2004-11-10  Simon Josefsson  <jas@extundo.com>
22201
22202         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
22203         getaddrinfo.
22204
22205         * modules/getaddrinfo: New file.
22206
22207 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
22208
22209         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
22210
22211 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
22212
22213         * lib/mktime.c (SHR): New macro, which is a portable
22214         substitute for >> that should work even on Crays.
22215         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
22216         Problem reported by Mark D. Baushke in
22217         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
22218         * lib/getdate.y (SHR): Likewise.
22219         (tm_diff): Use it.
22220         * lib/strftime.c (SHR): Likewise.
22221         (tm_diff): Use it.
22222         * lib/quotearg.c (struct quoting_options): Use unsigned int for
22223         quote_these_too, so that right shifts are well defined.  All uses
22224         changed.
22225
22226 2004-11-10  Jim Meyering  <jim@meyering.net>
22227
22228         Ensure that no close failure goes unreported.
22229         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
22230         return early when it seems there's nothing to flush.
22231         Don't include __fpending.h.
22232
22233 2004-11-10  Jim Meyering  <jim@meyering.net>
22234
22235         * modules/closeout (Depends-on): Remove fpending.
22236
22237 2004-11-10  Jim Meyering  <jim@meyering.net>
22238
22239         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
22240
22241 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
22242
22243         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
22244         gl_FUNC_STRFTIME.
22245         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
22246         and AC_REQUIRE when possible, to avoid duplicate checks.
22247         Check for <wchar.h>.
22248
22249 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
22250
22251         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
22252
22253 2004-11-09  Bruno Haible  <bruno@clisp.org>
22254
22255         * m4/sockpfaf.m4: New file.
22256
22257 2004-11-05  Bruno Haible  <bruno@clisp.org>
22258
22259         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
22260         Reported by Mark D. Baushke <mdb@cvshome.org>.
22261
22262 2004-11-04  Bruno Haible  <bruno@clisp.org>
22263
22264         2004-09-11  Bruno Haible  <bruno@clisp.org>
22265                 * allocsa.valgrind: New file.
22266         2004-02-06  Bruno Haible  <bruno@clisp.org>
22267                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
22268                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
22269                 Reported by Christopher Seip <chris.seip@hp.com>.
22270
22271 2004-11-04  Bruno Haible  <bruno@clisp.org>
22272
22273         * modules/allocsa (Files): Add lib/allocsa.valgrind.
22274         (Makefile.am): Distribute it.
22275
22276 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
22277
22278         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
22279         with errno == ERANGE if the buffer is too small.
22280         Problem reported by Mark D. Baushke.
22281
22282 2004-11-03  Albert Chin  <china@thewrittenword.com>
22283             Paul Eggert  <eggert@cs.ucla.edu>
22284
22285         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
22286         equivalent, substitute $ac_type for equivalent type rather than
22287         blindly using uint32_t *always* which won't work if uint32_t is not
22288         available.  Define _UINT32_T to work around typedef of uint32_t if
22289         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
22290         2.5.1.
22291
22292 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
22293
22294         * m4/jm-macros.m4: Sync from coreutils.
22295         (gl_MACROS): Check for mbrlen, for pathchk.
22296         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
22297
22298 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
22299
22300         * lib/xreadlink.c (MAXSIZE): New macro.
22301         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
22302         size does not exceed MAXSIZE.  Avoid cast.
22303         As suggested by Mark D. Baushke in
22304         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
22305         if readlink fails with buffer size just under MAXSIZE, try again
22306         with MAXSIZE.
22307
22308 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
22309
22310         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
22311
22312 2004-11-02  Derek R. Price  <derek@ximbiot.com>
22313         and  Paul Eggert  <eggert@cs.ucla.edu>
22314
22315         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
22316         (get_date): Overparenthesize to avoid GCC warning.
22317
22318 2004-11-02  Bruno Haible  <bruno@clisp.org>
22319
22320         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
22321         returns void.
22322
22323 2004-11-02  Bruno Haible  <bruno@clisp.org>
22324
22325         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
22326         function returns void.
22327
22328 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
22329
22330         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
22331         fflush_unlocked, flockfile, funlockfile, funlockfile,
22332         fputs_unlocked, putc_unlocked.
22333
22334 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
22335
22336         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
22337         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
22338         already declared.
22339
22340 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
22341
22342         * modules/getdate (Files): Add doc/getdate.texi.
22343         (Depends-on): Add setenv, xalloc.
22344
22345 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
22346
22347         * lib/getdate.y: Add support for TZ="foo" within a date string.
22348         Fix some bugs near time_t boundaries.  Reject dates with
22349         out-of-range components, e.g., "Sept 31".
22350         Include <stdlib.h>, "setenv.h", "xalloc.h".
22351         (ISDIGIT_LOCALE): Remove; unused.
22352         Note that the TZ and time functions used here are not reentrant.
22353         (mktime_ok, get_tz): New functions.
22354         (TZBUFSIZE): New constant.
22355         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
22356         This requires that we sometimes generate our own TZ="XXX..." setting.
22357
22358 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
22359
22360         * doc/getdate.texi: New file, from coreutils with modifications for
22361         the new TZ parsing.
22362
22363 2004-10-27  Derek R. Price  <derek@ximbiot.com>
22364
22365         * lib/mktime.c (not_equal_tm): Remove redundant check.
22366
22367 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
22368
22369         * modules/regex (lib_SOURCES): Add regex.c.
22370         Reported by James Youngman in
22371         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
22372
22373 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
22374
22375         * lib/getdate.y: Use Bison 1.875 features, and some minor
22376         code cleanups.  This change does not affect semantics.
22377         Don't include <stdlib.h>; no longer needed.
22378         Don't include unlocked-io.h; only the "#if TEST" code uses
22379         stdio, and performance isn't crucial there.
22380         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
22381         Bison 1.875 features as described below.
22382         All uses of "PC." replaced by "pc->".
22383         (YYSTYPE): Add a forward declaration.
22384         (yylex, yyerror): Use full prototypes in forward decls.
22385         Use "%pure-parser" rather than obsolescent "%pure_parser".
22386         Use %parse-param and %lex-param instead of obsolescent
22387         YYPARSE_PARAM and YYLEX_PARAM.
22388         (meridian_table, month_and_day_table, time_units_table,
22389         relative_time_table, time_zone_table, military_table,
22390         lookup_zone, lookup_word, get_date):
22391         Use NULL instead of 0 where appropriate.
22392         (to_hour): Avoid abort (), to avoid a dependency on
22393         stdlib.h.
22394         (yyerror, yylex): Now accepts parser_control * arg.
22395         (main) [TEST]: Use '\0' rather than 0 for char.
22396
22397 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
22398
22399         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
22400
22401 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
22402
22403         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
22404         It's now the caller's responsibility to handle the case where
22405         !HAVE_GETPAGESIZE && !defined getpagesize.
22406
22407         * lib/mktime.c (leapyear): Arg is long int, not int.
22408
22409 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
22410
22411         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
22412
22413 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
22414
22415         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
22416         missing.  Problem reported by James Youngman.
22417
22418 2004-10-16  Simon Josefsson  <jas@extundo.com>
22419
22420         * gnulib-tool: Fix comments.  Fix parse problem.
22421         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
22422
22423 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
22424
22425         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
22426         implementation of getopt_long.  Problem reported by Alexander Taler in:
22427         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
22428
22429 2004-10-15  Bruno Haible  <bruno@clisp.org>
22430
22431         * gnulib-tool: Untabify. Initialize supplied_libname.
22432         (func_usage): More homogenous output.
22433         (func_modules_transitive_closure, func_modules_to_filelist,
22434         func_emit_lib_Makefile_am): New functions.
22435         (func_import): New function, extracted from big case statement. Use
22436         func_get_license, func_modules_transitive_closure,
22437         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
22438         opt_lgpl. Don't use test -a, as it's not portable.
22439         (func_create_testdir): Use func_modules_transitive_closure,
22440         func_modules_to_filelist, func_emit_lib_Makefile_am.
22441
22442 2004-10-15  Bruno Haible  <bruno@clisp.org>
22443
22444         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
22445
22446 2004-10-15  Bruno Haible  <bruno@clisp.org>
22447
22448         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
22449         the portions belonging to each module.
22450         Suggested by Derek Robert Price <derek@ximbiot.com>.
22451
22452 2004-10-12  Simon Josefsson  <jas@extundo.com>
22453
22454         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
22455         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
22456         to real functions.
22457
22458 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22459
22460         * modules/vsnprintf: New file.
22461
22462 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22463
22464         * m4/vsnprintf.m4: New file.
22465
22466 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22467
22468         * lib/vsnprintf.h: New file.
22469         * lib/vsnprintf.c: New file.
22470
22471 2004-10-11  Bruno Haible  <bruno@clisp.org>
22472
22473         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
22474         vsnprintf.
22475
22476 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
22477
22478         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
22479
22480 2004-10-07  Bruno Haible  <bruno@clisp.org>
22481
22482         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
22483         fits into the provided buffer.
22484
22485 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
22486
22487         * lib/diacrit.c, diacrit.h: Add GPL notice.
22488
22489         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
22490         notice.
22491         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
22492         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
22493         This avoids a potential constant-folding bug.
22494
22495 2004-10-05  Bruno Haible  <bruno@clisp.org>
22496
22497         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
22498         for the declaration of strsep.
22499
22500 2004-10-05  Bruno Haible  <bruno@clisp.org>
22501
22502         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
22503
22504 2004-10-04  Simon Josefsson  <jas@extundo.com>
22505
22506         * modules/memmem: New file.
22507         * tests/test-memmem.c: New file.
22508         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
22509
22510 2004-10-04  Simon Josefsson  <jas@extundo.com>
22511
22512         * m4/memmem.m4: New file.
22513
22514 2004-10-04  Simon Josefsson  <jas@extundo.com>
22515
22516         * lib/memmem.h: New file.
22517         * lib/memmem.c: New file, taken from glibc.
22518
22519 2004-10-04  Simon Josefsson  <jas@extundo.com>
22520
22521         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
22522         '#ifdef USE_UNLOCKED_IO'.
22523
22524 2004-10-04  Simon Josefsson  <jas@extundo.com>
22525
22526         * config/srclist.txt: Add memmem from glibc.
22527
22528 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
22529
22530         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
22531
22532         * modules/argmatch, modules/argp, modules/closeout, modules/error,
22533         modules/exclude, modules/getdate, modules/getline,
22534         modules/getndelim2, modules/getpass, modules/getpass-gnu,
22535         modules/getusershell, modules/linebuffer, modules/md5,
22536         modules/mountlist, modules/posixtm, modules/readtokens,
22537         modules/readutmp, modules/regex, modules/sha1,
22538         modules/version-etc, modules/yesno:
22539         Remove dependency on unlocked-io.
22540
22541 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
22542
22543         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
22544
22545         * m4/unlocked-io.m4: Add copyright notice.
22546         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
22547
22548 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
22549
22550         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
22551         * lib/xmalloc.c (xmemdup): Likewise.
22552         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
22553         XFREE): Remove these long-obsolescent macros.
22554         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
22555         * lib/xstrdup.c: Remove.
22556
22557         * lib/regex.c (re_comp): Cast gettext return value to char *,
22558         Problem reported by Martin Neitzel via Mark D. Baushke.
22559
22560 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
22561
22562         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
22563         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
22564         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
22565         regex.c, sha1.c, version-etc.c, yesno.c:
22566         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
22567         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
22568         the includer's responsibility.
22569
22570         Sync from coreutils.
22571
22572         * lib/modechange.c (mode_compile): Don't decrement a pointer that
22573         points to the start of a string, as the C Standard says the
22574         resulting behavior is undefined.
22575
22576         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
22577         simple -> simple_backups, numbered_existing ->
22578         numbered_existing_backups, numbered -> numbered_backups
22579         to avoid shadowing problems.  All uses changed.
22580         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
22581         * lib/backupfile.c (check_extension, numbered_backup):
22582         Rename locals to avoid shadowing 'basename'.
22583         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
22584         once.
22585
22586         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
22587         * lib/.cvsignore: Add getopt.h.
22588
22589 2004-10-04  Bruno Haible  <bruno@clisp.org>
22590
22591         * modules/README: New file.
22592         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
22593         not a module.
22594
22595 2004-10-02  Jim Meyering  <jim@meyering.net>
22596
22597         * lib/dirfd.h, getpagesize.h: Add copyright notice.
22598
22599 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22600
22601         * modules/strsep: New file.
22602
22603 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22604
22605         * m4/strsep.m4: New file.
22606
22607 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22608
22609         * lib/strsep.h: New file.
22610         * lib/strsep.c: New file.
22611
22612 2004-10-01  Simon Josefsson  <jas@extundo.com>
22613
22614         * lib/snprintf.c (snprintf): Handle size==0.
22615
22616 2004-10-01  Simon Josefsson  <jas@extundo.com>
22617             Bruno Haible  <bruno@clisp.org>
22618
22619         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
22620         (snprintf): Declare 'args'.
22621
22622 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
22623
22624         * lib/snprintf.c: Remove comments as to why each header is needed.
22625
22626 2004-10-01  Bruno Haible  <bruno@clisp.org>
22627
22628         * MODULES.html.sh: Add strsep.
22629
22630 2004-09-30  Simon Josefsson  <jas@extundo.com>
22631
22632         * modules/snprintf: New file.
22633
22634 2004-09-30  Simon Josefsson  <jas@extundo.com>
22635
22636         * m4/snprintf.m4: New file.
22637
22638 2004-09-30  Simon Josefsson  <jas@extundo.com>
22639
22640         * lib/snprintf.h, lib/snprintf.c: New files.
22641
22642 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
22643
22644         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
22645         (hol_entry_help): Never translate an empty string.
22646         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
22647         * lib/argp.h (OPTION_NO_TRANS): New option.
22648
22649 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
22650
22651         * modules/argp (Maintainer): Replace Simon Josefsson
22652         by Sergey Poznyakoff.
22653
22654 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
22655
22656         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
22657         changes merged back into glibc.
22658
22659 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
22660
22661         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
22662
22663 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
22664
22665         * lib/xvasprintf.c: Include xalloc.h.
22666         (xvasprintf): Use xalloc_die, not xmalloc_die.
22667
22668 2004-09-29  Bruno Haible  <bruno@clisp.org>
22669
22670         * modules/alloca-opt: New file, derived from modules/alloca.
22671         * modules/allocsa: Depend on alloca-opt instead of alloca.
22672         * modules/setenv: Likewise.
22673         * modules/vasnprintf: Likewise.
22674         * MODULES.html.sh: Add alloca-opt.
22675
22676 2004-09-28  Simon Josefsson  <jas@extundo.com>
22677
22678         * gnulib-tool: New parameter --lgpl, to asseert that modules are
22679         LGPL, and to replace license template from GPL to LGPL.
22680
22681 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
22682
22683         * modules/dummy: Change license to LGPL.
22684
22685 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
22686
22687         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
22688
22689 2004-09-24  Simon Josefsson  <jas@extundo.com>
22690
22691         * modules/minmax (License): Change from GPL to LGPL.
22692
22693 2004-09-23  Simon Josefsson  <jas@extundo.com>
22694
22695         * gnulib-tool (--import): Typo.
22696
22697 2004-09-23  Simon Josefsson  <jas@extundo.com>
22698
22699         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
22700
22701 2004-09-22  Bruno Haible  <bruno@clisp.org>
22702
22703         * modules/*: Add 'License' field.
22704         * gnulib-tool: Accept --extract-license option.
22705         (func_get_license): New function.
22706
22707 2004-09-21  Bruno Haible  <bruno@clisp.org>
22708
22709         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
22710         Reported by Simon Josefsson.
22711
22712 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
22713
22714         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
22715         gl_AC_TYPE_LONG_LONG.
22716
22717 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
22718
22719         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
22720
22721 2004-09-18  Simon Josefsson  <jas@extundo.com>
22722         and  Paul Eggert  <eggert@cs.ucla.edu>
22723
22724         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
22725         calls with autoreconf.  Define GL_LIB.
22726
22727 2004-09-14  Karl Berry  <karl@gnu.org>
22728
22729         * config/srclist.txt: unsync setenv.c, sigh.
22730
22731 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
22732
22733         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
22734         Problem reported by Bruno Haible in:
22735         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
22736
22737 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
22738
22739         * config/srclist.txt: Comment out argp-pvh.c.
22740
22741 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
22742
22743         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
22744         in case some system header has #define'd it.  Problem reported by
22745         Soeren D. Schulze in
22746         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
22747
22748 2004-09-09  Karl Berry  <karl@gnu.org>
22749
22750         * regex.[ch]: delete from the root.  These were supposed to be
22751                 synced with emacs cvs, but this has not happened for about
22752                 a year, and anyway nothing else uses emacs regex.[ch].
22753                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
22754                 lib/regex[.ch] is untouched.
22755
22756 2004-09-09  Bruno Haible  <bruno@clisp.org>
22757
22758         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
22759
22760 2004-09-09  Bruno Haible  <bruno@clisp.org>
22761
22762         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
22763         modifications.
22764         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
22765
22766 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
22767
22768         * modules/xvasprintf: New file.
22769         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
22770
22771 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
22772
22773         * lib/xvasprintf.h: New file.
22774         * lib/xvasprintf.c: New file.
22775         * lib/xasprintf.c: New file.
22776
22777 2004-09-08  Bruno Haible  <bruno@clisp.org>
22778
22779         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
22780
22781 2004-09-08  Bruno Haible  <bruno@clisp.org>
22782
22783         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
22784         length is > INT_MAX.
22785         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
22786         more.
22787
22788 2004-09-08  Bruno Haible  <bruno@clisp.org>
22789
22790         * lib/stdint_.h: New file, taken from GNU clisp.
22791
22792 2004-09-08  Bruno Haible  <bruno@clisp.org>
22793             Oskar Liljeblad  <oskar@osk.mine.nu>
22794
22795         * modules/stdint: New file.
22796         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
22797
22798 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
22799
22800         Import from coreutils.
22801         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
22802         strings on unbounded length.  alloca's performance benefits aren't
22803         that important here.
22804         (V_STRDUP): Remove.
22805         (parse_with_separator): New function, with most of the internals
22806         of the old parse_user_spec.  Allow user to omit both user and group,
22807         for compatibility with FreeBSD.
22808         Clone only the user name, not the entire spec.
22809         Do not set *uid, *gid unless entirely successful.
22810         Avoid memory leak in some failing cases.
22811         Fix regression for USER.GROUP reported by Dmitry V. Levin in
22812         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
22813         (parse_user_spec): Rewrite to use parse_with_separator.
22814
22815 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
22816
22817         * modules/userspec: Don't depend on alloca.
22818
22819 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
22820
22821         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
22822
22823 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
22824
22825         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
22826         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
22827         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
22828
22829 2004-08-16  Simon Josefsson  <jas@extundo.com>
22830
22831         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
22832         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
22833         Add --dry-run for --import.
22834         Let user provided command line parameters override configure.ac
22835         settings.
22836
22837 2004-08-12  Simon Josefsson  <jas@extundo.com>
22838
22839         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
22840         as discussed with Paul Eggert in threads rooted at
22841         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
22842         and
22843         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
22844         Before, the test was empty, and relied on ELIDE_CODE in source
22845         code.)
22846         (gl_PREREQ_GETOPT): New macro.
22847         (gl_GETOPT): Use them.
22848
22849 2004-08-12  Simon Josefsson  <jas@extundo.com>
22850
22851         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
22852         * lib/getopt_.h: Renamed from getopt.h.
22853
22854 2004-08-12  Simon Josefsson  <jas@extundo.com>
22855
22856         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
22857         Change default library name from libfoo to libgnu.
22858         Now, if you have a configure.ac that says:
22859                 gl_SOURCE_BASE(gl)
22860                 gl_M4_BASE(gl/m4)
22861                 gl_MODULES(error getopt etcetera)
22862                 gl_INIT
22863         you can import all you need by running:
22864                 ../gnulib/gnulib-tool --import
22865
22866         * modules/getopt (Files): Rename getopt.h to getopt_.h.
22867         (Makefile.am): Rewrite, use logic from argz.
22868         (Include): Use <getopt.h> instead of "getopt.h".
22869
22870 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
22871
22872         * modules/argp (Files): Add m4/unlocked-io.m4.
22873         (Depends-on): Add extensions.
22874
22875 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
22876
22877         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
22878         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
22879         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
22880         Check for program_invocation_name, program_invocation_short_name,
22881         flockfile, funlockfile, features.h, _getopt_long_only_r.
22882
22883 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
22884
22885         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
22886         its complicated substitute.
22887         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
22888         and program_invocation_name.
22889         (__argp_basename) [!_LIBC]: Remove; the only use was
22890         replaced by its body.
22891         (__argp_short_program_name): Change condition from
22892         !defined __argp_short_program_name to
22893         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
22894         to match argp-namefrob.h.
22895         (__argp_failure): Don't assume strerror_r returns char *.
22896         * lib/argp-parse.c (N_): Define unconditionally.
22897         (argp_default_options): Fill out initializers with 0 to avoid
22898         gcc warnings.
22899
22900 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
22901
22902         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
22903         getopt1.c.
22904
22905 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
22906
22907         Merge from coreutils.
22908
22909         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
22910
22911         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
22912         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
22913
22914 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
22915
22916         Merge from coreutils.
22917
22918         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
22919         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
22920         for Reliant Unix 5.43.
22921
22922         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
22923         (union fooround): Use uintmax_t, not long int.
22924         The rest is a merge from libc:
22925         [defined _LIBC]: Include <shlib-compat.h>.
22926         (_obstack) [defined _LIBC]: Remove after 2.3.4.
22927
22928         * lib/settime.c (settime): Recode to avoid warning with
22929         Sun Forte C 6U2.
22930
22931         * lib/strverscmp.c: Convert to UTF-8.
22932
22933 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
22934
22935         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
22936         m4/uintmax_t.m4.
22937
22938 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
22939
22940         * modules/xalloc-die: New file.
22941         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
22942
22943         * modules/md5 (Files): Add m4/uint32_t.m4.
22944         * modules/sha1: Renamed from modules/sha.
22945         (Files):
22946         Rename lib/sha.h to lib/sha1.h.
22947         Rename lib/sha.c to lib/sha1.c.
22948         Rename m4/sha.m4 to m4/sha1.m4.
22949         (lib_SOURCES): Likewise.
22950         (configure.ac): Rename gl_SHA to gl_SHA1.
22951         (Include): sha.h -> sha1.h.
22952
22953 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
22954
22955         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
22956         * m4/sha1.m4: Renamed from sha.m4.
22957         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
22958
22959 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
22960
22961         * lib/obstack.h (obstack_empty_p):
22962         Don't assume that chunk->contents is suitably aligned.
22963         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
22964         Likewise. Problem reported by Benno in
22965         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
22966
22967         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
22968         readable.  This could be improved further but it'd take some work.
22969
22970 2004-08-08  Simon Josefsson  <jas@extundo.com>
22971
22972         * modules/xgethostname (Depends-on): Remove exit and error (not
22973         used).
22974
22975         * modules/getpass-gnu: Add getpass.h.
22976         (Depends-on): Add stdbool.
22977         * modules/getpass: Add getpass.h.
22978
22979 2004-08-08  Simon Josefsson  <jas@extundo.com>
22980
22981         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
22982         Check getpass declaration.
22983
22984 2004-08-08  Simon Josefsson  <jas@extundo.com>
22985
22986         * lib/xgethostname.c: Don't include error.h (not used).
22987
22988         * lib/getpass.h: Add.
22989         * lib/getpass.c: Include getpass.h first.
22990
22991 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
22992
22993         * lib/xalloc-die.c: New file.
22994         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
22995         All uses removed.
22996         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
22997         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
22998         xalloc-die.c.
22999         (_, N_, xalloc_die): Move to xalloc-die.c.
23000         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
23001         so that we needn't mess with xalloc_msg_memory_exhausted.
23002
23003         * lib/sha1.h: Renamed from sha.h.
23004         (SHA1_H): Renamed from _SHA_H.
23005         (sha1_ctx): Renamed from sha_ctx.
23006         (sha1_init_ctx): Renamed from sha_init_ctx.
23007         (sha1_process_block): Renamed from sha_process_block.
23008         (sha1_process_bytes): Renamed from sha_process_bytes.
23009         (sha1_finish_ctx): Renamed from sha_finish_ctx.
23010         (sha1_read_ctx): Renamed from sha_read_ctx.
23011         (sha1_stream): Renamed from sha_stream.
23012         (sha1_buffer): Renamed from sha_buffer.
23013         * lib/sha1.c: Likewise; renamed from sha.c.
23014         Do not include <sys/types.h>.
23015         Include <stddef.h> rather than <stdlib.h>.
23016
23017 2004-08-08  Bruno Haible  <bruno@clisp.org>
23018
23019         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
23020         FILESYSTEM_PREFIX_LEN.
23021         * lib/progreloc.c: Likewise.
23022         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
23023
23024 2004-08-06  Simon Josefsson  <jas@extundo.com>
23025
23026         * modules/progname (Depends-on): Don't depend on stdbool.
23027
23028 2004-08-06  Simon Josefsson  <jas@extundo.com>
23029
23030         * modules/getsubopt: New file.
23031         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
23032         getsubopt.
23033
23034 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
23035
23036         More merge from coreutils.
23037
23038         * m4/utimens.m4, m4/utimecmp.m4: New files.
23039         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
23040         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
23041         prereq.m4, sha.m4: Import changes from coreutils.
23042
23043 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
23044
23045         More merge from coreutils.
23046         * modules/raise, modules/readtokens0, modules/utimens:
23047         * modules/utimecmp, module/xnanosleep: New files.
23048         * modules/strftime: Add lib/strftime.h.
23049         Change include from <time.h> to "strftime.h".
23050         * modules/yesno: Add lib/yesno.h.
23051         * modules/backupfile: Remove lib/addext.c.
23052         * modules/euidaccess: Add stat-macros.h.
23053         * modules/canonicalize, modules/euidaccess,
23054         modules/filemode, modules/lchown, modules/makepath,
23055         modules/rmdir, modules/stat: Likewise.
23056
23057 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
23058
23059         Merge from tar.
23060         * lib/argp-help.c (make_hol, hol_append): Don't assume that
23061         SIZE_MAX is a valid preprocessor constant.
23062         (__argp_basename): Change from "#ifndef _LIBC"
23063         to "#ifndef __argp_short_program_name", so that
23064         we don't compile these functions for tar.
23065
23066         More merges from coreutils.
23067         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
23068         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
23069         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
23070         * lib/addext.c: Remove; no longer needed.
23071         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
23072         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
23073         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
23074         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
23075         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
23076         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
23077         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
23078         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
23079         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
23080         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
23081         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
23082         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
23083         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
23084         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
23085         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
23086         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
23087         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
23088         Import changes from coreutils.
23089
23090 2004-08-05  Simon Josefsson  <jas@extundo.com>
23091
23092         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
23093
23094 2004-08-05  Simon Josefsson  <jas@extundo.com>
23095
23096         * m4/getsubopt.m4: New file.
23097
23098 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
23099
23100         Merge from coreutils.
23101
23102         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
23103         * m4/getcwd-path-max.m4: New files.
23104
23105         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
23106         FILESYSTEM_PREFIX_LEN ->
23107         FILE_SYSTEM_PREFIX_LEN.
23108         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
23109         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
23110         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
23111         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
23112
23113         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
23114         prerequisite modules now handle the DOS stuff.
23115         Don't check for unistd.h.
23116
23117 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
23118
23119         Merge from coreutils.
23120
23121         * lib/.gdb-history: Remove; this doesn't belong here.
23122
23123         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
23124         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
23125         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
23126         * lib/getcwd.c: New files.
23127
23128         * lib/dirname.h: Include <stdbool.h>.
23129         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
23130         for consistency with POSIX terminology.  All uses changed.
23131         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
23132         (strip_trailing_slashes): Use bool for booleans.
23133         * lib/stripslash.c (strip_trailing_slashes): Likewise.
23134
23135         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
23136         sometimes returns a positive errno value even when it succeeds.
23137         (print_errno_message) [!LIBC]: Fall back on strerror if
23138         __strerror_r fails.
23139
23140         * lib/path-concat.c (mempcpy): Don't define if a system header defines
23141         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
23142         (longest_relative_suffix): New function.
23143         (path_concat): Use it.  Assume first argument is not NULL.
23144         Port to DOS.  Omit redundant separators.
23145         Report an error instead of returning NULL.
23146         Use mempcpy instead of memcpy.
23147         (xpath_concat): Remove: not declared or used.
23148
23149         * lib/same.h: Include <stdbool.h>
23150         (same_name): Return bool, not int.
23151         * lib/same.c (same_name): Likewise.
23152         (errno): Don't declare; we assume C89 or better now.
23153
23154         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
23155         if not already defined.
23156
23157         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
23158         * lib/dup-safer.c (errno): Likewise.
23159
23160 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
23161
23162         Merge from coreutils.
23163         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
23164         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
23165         * modules/path-concat: Don't depend on strdup.
23166
23167 2004-08-03  Simon Josefsson  <jas@extundo.com>
23168
23169         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
23170         * lib/progname.h: Don't include stdbool.h.
23171
23172 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
23173
23174         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
23175         * MODULES.html.sh (func_all_modules): Remove fatal.
23176
23177 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
23178
23179         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
23180
23181 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
23182
23183         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
23184         working.
23185
23186 2004-08-02  Simon Josefsson  <jas@extundo.com>
23187
23188         * lib/getsubopt.h: New file, with comments from Bruno Haible.
23189         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
23190         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
23191
23192 2004-08-01  Simon Josefsson  <jas@extundo.com>
23193
23194         * lib/xgetdomainname.c: Include stdlib.h, for free().
23195
23196 2004-07-19  Bruno Haible  <bruno@clisp.org>
23197
23198         * MODULES.html.sh (func_all_modules): Add dummy.
23199
23200 2004-07-16  Simon Josefsson  <jas@extundo.com>
23201
23202         * modules/dummy: New file.
23203
23204 2004-07-16  Simon Josefsson  <jas@extundo.com>
23205
23206         * lib/dummy.c: New file.
23207
23208 2004-07-16  Bruno Haible  <bruno@clisp.org>
23209
23210         * lib/backupfile.h: Add extern "C" for C++.
23211         * lib/closeout.h: Likewise.
23212         * lib/copy-file.h: Likewise.
23213         * lib/findprog.h: Likewise.
23214         * lib/full-write.h: Likewise.
23215         * lib/pathname.h: Likewise.
23216         * lib/progname.h: Likewise.
23217         * lib/stpcpy.h: Likewise.
23218         * lib/stpncpy.h: Likewise.
23219         * lib/strcase.h: Likewise.
23220         * lib/strstr.h: Likewise.
23221         * lib/xalloc.h: Likewise.
23222
23223         * lib/mbswidth.h: Add extern "C" for C++.
23224         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
23225
23226 2004-07-13  Robert Millan  <robertmh@gnu.org>
23227
23228         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
23229
23230 2004-07-09  Simon Josefsson  <jas@extundo.com>
23231
23232         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
23233         failed without this.)
23234
23235 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
23236
23237         * modules/chown (Files): Add lib/fchown-stub.c, since
23238         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
23239
23240 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
23241
23242         * lib/fchown-stub.c: New file.
23243
23244 2004-06-24  Jim Meyering  <jim@meyering.net>
23245
23246         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
23247
23248 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
23249
23250         * modules/argz: Omit "#include".
23251
23252         * MODULES.html.sh (func_all_modules): Add calloc, to match
23253         2004-06-01 addition of calloc module.
23254
23255 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
23256
23257         * m4/argz.m4: New file, which is autoupdated from libtool.
23258
23259 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
23260
23261         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
23262         libtool.
23263
23264 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
23265
23266         * config/srclist-update: Don't insist on "USA." before the
23267         close-comment, as libtool omits the period and puts the */ on a
23268         separate line.
23269         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
23270         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
23271
23272 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
23273
23274         * modules/argz: New file.
23275         * MODULES.html.sh (func_all_modules): Add argz.
23276
23277 2004-06-12  Jim Meyering  <jim@meyering.net>
23278         and  Paul Eggert  <eggert@cs.ucla.edu>
23279
23280         * modules/hash (Files): Add lib/xalloc.h.
23281         * modules/pipe (Depends-on): Add wait-process.
23282         * modules/stat (Depends-on): Add xalloc.
23283         * modules/userspec (Files): Add lib/userspec.h.
23284         * modules/xstrto
23285
23286         Upgrade from gettext-0.13.
23287         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
23288         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
23289         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
23290
23291 2004-06-10  Jim Meyering  <jim@meyering.net>
23292
23293         * lib/calloc.c: New file.
23294
23295 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
23296
23297         * lib/getdate.y (yylex): Allow space between sign and number.
23298         Problem reported by Dan Jacobson.
23299
23300 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
23301
23302         Merge from coreutils CVS.
23303
23304         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
23305         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
23306         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
23307         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
23308         xstrtol.m4: Fix copyright date and/or serial number.
23309
23310         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
23311         See if we need an fchown replacement.
23312         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
23313         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
23314         and use the replacement function if we detect either defect.
23315
23316         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
23317         gl_UTIMECMP.
23318
23319 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
23320         and  Jim Meyering  <jim@meyering.net>
23321
23322         Merge from coreutils CVS.
23323
23324         * lib/stat-macros.h: New file, with contents from file-type.h
23325         and coreutils' system.h.
23326         * lib/file-type.c: Include "stat-macros.h".
23327         * lib/file-type.h (file_type): Move all macro definitions to new file,
23328         stat-macros.h.
23329
23330         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
23331         Wrap old code with this conditional.
23332         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
23333         function that does not dereference symlinks.
23334         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
23335
23336         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
23337         dependency problems.
23338         (xreadlink): Accept new arg SIZE, for efficiency.
23339         All decls and uses changed.
23340         * lib/xreadlink.h: Include <stddef.h>, for size_t.
23341
23342         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
23343         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
23344
23345         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
23346         sysexits.h.
23347
23348 2004-06-01  Jim Meyering  <jim@meyering.net>
23349
23350         * m4/calloc.m4: New file.
23351
23352 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
23353
23354         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
23355         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
23356         Also, fix a typo in a diagnostic.
23357
23358 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
23359
23360         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
23361         or AC_FUNC_REALLOC.
23362
23363 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
23364
23365         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
23366         macros to be defined.
23367         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
23368         the allocator returns NULL because the requested size is zero.
23369
23370 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
23371
23372         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
23373         var.  Add comment explaining why libc still defines it.  This
23374         merges the following patch from glibc:
23375         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
23376
23377 2004-05-20  Andreas Schwab  <schwab@suse.de>
23378
23379         * m4/free.m4: Replace free if it not known to work, not the other
23380         way round.
23381
23382 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
23383
23384         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
23385         present in glibc since revision 1.1 of this file.
23386         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
23387         obstack_alignment_mask, obstack_alloc, obstack_base,
23388         obstack_blank, obstack_blank_fast, obstack_chunk_size,
23389         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
23390         obstack_grow0, obstack_init, obstack_int_grow,
23391         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
23392         obstack_next_free, obstack_object_size, obstack_ptr_grow,
23393         obstack_ptr_grow_fast, obstack_room): Remove declarations of
23394         nonexistent functions.
23395
23396 2004-05-18  Karl Berry  <karl@gnu.org>
23397
23398         * config/srclist.txt: break link for vasnprintf.c.
23399
23400 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
23401
23402         Port obstack to the AS/400, where pointers are 16 bytes wide and
23403         you cannot cast an integer to a valid pointer.  This patch is
23404         currently waiting to be integrated into glibc; see
23405         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
23406
23407         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
23408         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
23409         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
23410         (struct obstack): temp member is now a union of a pointer and
23411         an integer, instead of an integer.  All integer uses changed.
23412         This does not affect the physical layout of struct obstack,
23413         except on hosts (like the AS/400) where the size or alignment of
23414         void * is greater than that of ptrdiff_t.
23415         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
23416         __STDC__)]: Store temporary in pointer member of union, not
23417         integer member.
23418         * lib/obstack.c: Include <stddef.h>, for offsetof.
23419         (struct fooalign): Remove; it doesn't need a name.
23420         (union fooround): Change double to long double, and add void *.
23421         (DEFAULT_ALIGNMENT): Use offsetof to compute.
23422         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
23423         not a macro.  Hence the values are always int; so remove all
23424         casts-to-int in uses.
23425
23426 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
23427
23428         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
23429         we can get this patch merged into glibc.
23430
23431 2004-05-17  Derek R. Price  <derek@ximbiot.com>
23432             Paul Eggert  <eggert@cs.ucla.edu>
23433
23434         * m4/argp: Depend on alloca.
23435
23436 2004-05-17  Derek R. Price  <derek@ximbiot.com>
23437             Paul Eggert  <eggert@cs.ucla.edu>
23438
23439         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
23440         freecoding.
23441
23442 2004-05-17  Bruno Haible  <bruno@clisp.org>
23443
23444         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
23445         precision that consists of a '.' followed by an empty digit string.
23446         Patch by Tor Lillqvist <tml@iki.fi>.
23447
23448 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
23449
23450         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
23451         for backward compatibility with older code.  We need our own
23452         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
23453         it under some other name, and our alloca.h will define it.
23454
23455 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
23456             Derek Price  <derek@ximbiot.com>
23457
23458         * lib/alloca.c: Include <alloca.h>, to get our interface.
23459         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
23460         include <alloca.h> first.  Use C89 prototype for alloca; this
23461         requires including <stddef.h> for size_t.  Use extern "C" if C++.
23462         Use #elif for simplicity, since we can assume C89 now.
23463         Don't try to source the system alloca.h since it will not be found
23464         and to prevent recursively including its replacement.
23465         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
23466         * lib/regex.c: Likewise.
23467
23468 2004-05-16  Derek Price  <derek@ximbiot.com>
23469             Paul Eggert  <eggert@cs.ucla.edu>
23470
23471         getline cleanup.  This changes the getndelim2 API: both order of
23472         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
23473         no delimiter).
23474
23475         * lib/getline.c: Don't include stddef.h or stdio.h, since our
23476         interface does that.
23477         (getline): Always use getdelim, so that we don't have two
23478         copies of this code.
23479         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
23480         if available.
23481         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
23482         (GETNDELIM2_MAXIMUM): New macro.
23483         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
23484         instead of the old practice of delim2==0.  All callers changed.
23485         Return -1 on overflow, instead of returning junk.
23486         Do not set *linesize unless allocation succeeds.
23487         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
23488         that we include sys/types.h.
23489         * lib/getnline.h: Likewise.
23490         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
23491         (getndelim2): Reorder arguments.
23492         * lib/getnline.c (getnline, getndelim):
23493         Don't discard the NMAX argument.
23494         (getnline): Invoke getndelim, to avoid code duplication.
23495         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
23496         of (size_t) -1 by callers of the getnline family.
23497
23498 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
23499
23500         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
23501         Check for gettimeofday.
23502         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
23503         Check for settimeofday, stime.
23504
23505 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
23506
23507         * lib/nanosleep.c (suspended): Change its type from int to
23508         sig_atomic_t volatile.
23509         (first_call): Make it private to rpl_nanosleep, and have it
23510         be zero initially as that's a bit faster.
23511         (my_usleep): Round up fractional times instead of truncating them,
23512         as this is the usual meaning for 'sleep'.
23513
23514         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
23515         doesn't work.
23516         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
23517         (ENOSYS): Define if not defined.
23518         (settime): Fall back on stime if it exists and settimeofday fails.
23519         But don't bother with fallbacks if a method fails with errno == EPERM.
23520
23521 2004-05-11  Jim Meyering  <jim@meyering.net>
23522
23523         Prior to this change, the save_cwd caller required read access to the
23524         current directory on most systems (ones with the fchdir function).
23525
23526         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
23527         fails, try write-only, and finally, resort to using xgetcwd.
23528
23529 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
23530
23531         * lib/obstack.c, obstack.h: Import changes from libc.
23532
23533 2004-04-28  Bruno Haible  <bruno@clisp.org>
23534
23535         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
23536         also implicitly appends .exe to executables.
23537         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
23538         accepts Windows pathnames.
23539         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
23540         Treat Cygwin like Windows, since it now accepts Windows pathnames.
23541         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
23542         Treat Cygwin like Windows, since it now accepts Windows pathnames.
23543         Reported by Derek Robert Price <derek@ximbiot.com>.
23544
23545 2004-04-21  Karl Berry  <karl@gnu.org>
23546
23547         * config/srclist.txt (localcharset.c): break sync.
23548
23549 2004-04-20  Paul Eggert  <eggert@twinsun.com>
23550
23551         * m4/host-os.m4: Add a copyright notice.
23552
23553 2004-04-20  Jim Meyering  <jim@meyering.net>
23554
23555         Change UTILS_ to gl_ in AC_DEFINE'd names.
23556         Change utils_- and jm_-prefixed variables, too.
23557         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
23558         UTILS_FUNC_MKDIR_TRAILING_SLASH.
23559         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
23560
23561         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
23562         Don't emit trailing blanks.
23563         Also rename jm_-prefixed variables to have gl_ prefix.
23564
23565         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
23566         Also rename jm_-prefixed variables to have gl_ prefix.
23567
23568         * m4/jm-macros.m4: Reflect the renamings.
23569         * m4/prereq.m4: Likewise.
23570
23571 2004-04-20  Jim Meyering  <jim@meyering.net>
23572
23573         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
23574         memory.
23575
23576 2004-04-20  Jim Meyering  <jim@meyering.net>
23577             Bruno Haible  <bruno@clisp.org>
23578
23579         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
23580         memory when realloc fails.
23581
23582 2004-04-19  Jim Meyering  <jim@meyering.net>
23583
23584         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
23585         now that readutmp.c may call `free (0)'.
23586
23587 2004-04-19  Bruno Haible  <bruno@clisp.org>
23588
23589         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
23590         * m4/inttypes_h.m4: Likewise.
23591         * m4/stdint_h.m4: Likewise.
23592         * m4/intmax_t.m4: Likewise.
23593         * m4/uintmax_t.m4: Likewise.
23594
23595 2004-04-18  Jim Meyering  <jim@meyering.net>
23596
23597         * m4/prereq.m4: Don't forbid jm_ prefix.
23598
23599         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
23600         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
23601         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
23602         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
23603         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
23604         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
23605         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
23606         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
23607         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
23608         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
23609         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
23610         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
23611         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
23612         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
23613         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
23614         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
23615         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
23616         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
23617         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
23618
23619 2004-04-18  Jim Meyering  <jim@meyering.net>
23620
23621         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
23622         failure, don't leak memory and do call END_UTMP_ENT.
23623
23624 2004-04-16  Jim Meyering  <jim@meyering.net>
23625
23626         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
23627         coreutils' stat program.
23628         (gl_PREREQ): Don't require jm_PREREQ_STAT.
23629
23630 2004-04-11  Paul Eggert  <eggert@twinsun.com>
23631
23632         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
23633         C89.
23634         (CHAR_BIT): Remove, since we assume C89.
23635         Include <stdint.h> if available, as per current Autoconf CVS advice.
23636
23637 2004-03-31  Jim Meyering  <jim@meyering.net>
23638
23639         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
23640         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
23641         * m4/xalloc.m4: Likewise.
23642
23643 2004-03-30  Paul Eggert  <eggert@twinsun.com>
23644
23645         Merge from coreutils.
23646
23647         * m4/inttostr.m4: New file.
23648         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
23649         Require AM_STDBOOL_H and gl_TIMESPEC instead.
23650         Require gl_CLOCK_TIME.
23651         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
23652
23653 2004-03-30  Paul Eggert  <eggert@twinsun.com>
23654
23655         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
23656         not bool, to be more consistent with Unix conventions.
23657         Suggested by Bruno Haible.
23658
23659         Merge from coreutils.
23660
23661         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
23662         * lib/umaxtostr.c: New files.
23663
23664         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
23665         the usual <time.h> dance.
23666         (get_date): Change signature to support fractional time stamps.
23667         All callers changed.
23668         * lib/getdate.y: Include "getdate.h" first, as we can now
23669         assume C89 and don't need to worry about 'const'.
23670         Similarly, include "unlocked-io.h" near start, not in middle.
23671         Include <limits.h>.
23672         (textint.value): Use long int rather than int.
23673         (textint.digits): Use size_t rather than int.
23674         (BILLION, LOG10_BILLION): New constants.
23675         (parser_control): New member rel_ns.  Members day_ordinal,
23676         time_zone, month, day, hour, minutes, rel_year, rel_month,
23677         rel_day, rel_hour, rel_minutes, rel_seconds
23678         are now long int, not int.  Member seconds is now struct timespec,
23679         not int.  New member timespec_seen.  Members dates_seen, days_seen,
23680         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
23681         not int.
23682         (%union.intval): Now long int, not int.
23683         New member timespec.
23684         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
23685         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
23686         (spec): Now is a timespec or an item list.
23687         (timespec, items): New nonterminals.
23688         (time, rel, relunit, number, get_date):
23689         Add support for fractional seconds.
23690         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
23691         (gmtime, localtime, mktime): Remove decls; not needed with C89.
23692         (to_hour): First arg is now long int, not int.
23693         (to_year): Returns long int, not int.
23694         Don't treat year -70 like 70.
23695         (tm_diff): Returns long int, not int.
23696         (lookup_word): Use bool instead of int when appropriate.
23697         (yylex): Use size_t for count, not int.
23698         Detect overflow when parsing large integer constants.
23699         Add support for fractions.
23700         (get_date): Make pointers 'const' if possible.
23701         Use more-portable code to detect integer overflow.
23702         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
23703         Don't use ctime; it's not reliable if the year has >4 digits.
23704
23705         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
23706         This is for compatibility with BSD.
23707
23708         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
23709         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
23710         From coreutils' system.h.
23711
23712         * lib/userspec.c: Don't include "posixver.h".
23713         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
23714         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
23715         compatible extension.  Simplify code by removing a boolean int
23716         that was always nonzero if a string was nonnull.
23717
23718 2004-03-30  Jim Meyering  <jim@meyering.net>
23719
23720         Merge from coreutils.
23721
23722         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
23723         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
23724         on some systems one must include <grp.h> before it.
23725         Reported by Christian Krackowizer.
23726
23727 2004-03-30  Jim Meyering  <jim@meyering.net>
23728
23729         Merge from coreutils.
23730
23731         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
23732
23733         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
23734         an empty input stream.
23735
23736         * lib/readtokens.c: Include <stdbool.h>.
23737         (readtoken): Use `size_t' rather than int/long.
23738         All callers adjusted.
23739         Use `bool' rather than `int' where appropriate.
23740         Use memset rather than an explicit loop.
23741         Use x2nrealloc rather than xrealloc.
23742         Allow the use of `\0' as a delimiter.
23743         (readtokens): Likewise.
23744         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
23745
23746 2004-03-30  Jim Meyering  <jim@meyering.net>
23747
23748         * m4/realloc.m4: Remove file, since now it does no more than
23749         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
23750         the `configure.ac' section of module/realloc.
23751         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
23752
23753 2004-03-30  Bruno Haible  <bruno@clisp.org>
23754
23755         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
23756         nonnull.
23757
23758 2004-03-29  Paul Eggert  <eggert@twinsun.com>
23759
23760         Merge changes to getloadavg.c from coreutils and Emacs.
23761
23762         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
23763         Define to an expression, not to the empty string.
23764         Include cloexec.h and xalloc.h.
23765         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
23766         Use set_cloexec_flag rather than rolling our own.
23767         * lib/cloexec.c, lib/cloexec.h: New files.
23768
23769 2004-03-29  Paul Eggert  <eggert@twinsun.com>
23770
23771         * m4/cloexec.m4: New file.
23772
23773 2004-03-18  Paul Eggert  <eggert@twinsun.com>
23774
23775         * lib/getopt.h: Sync with libc CVS.
23776
23777 2004-03-18  Paul Eggert  <eggert@twinsun.com>
23778             Bruno Haible  <bruno@clisp.org>
23779
23780         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
23781         mbswidth.
23782
23783 2004-03-18  Paul Eggert  <eggert@twinsun.com>
23784             Bruno Haible  <bruno@clisp.org>
23785
23786         * lib/mbswidth.h: Include <wchar.h> only if
23787         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
23788         <wchar.h>.
23789         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
23790
23791 2004-03-09  Paul Eggert  <eggert@twinsun.com>
23792
23793         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
23794         Sync with libc CVS.
23795         * lib/getopt_int.h: New file, also synced from libc.
23796
23797 2004-03-09  Paul Eggert  <eggert@twinsun.com>
23798
23799         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
23800         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
23801         Bring back getopt.c, getopt.h, getopt1.c.
23802
23803 2004-03-07  Paul Eggert  <eggert@twinsun.com>
23804
23805         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
23806         All uses changed.  Check for sa_sigaction member; this fixes
23807         a bug first reported by Jason Andrade in
23808         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
23809
23810 2004-03-07  Paul Eggert  <eggert@twinsun.com>
23811
23812         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
23813         '#if' expressions.  Unlike the code it replaces, it does not
23814         depend on (defined _SC_PAGESIZE).  However, it does depend on
23815         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
23816         first reported by Jason Andrade in
23817         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
23818
23819 2004-02-25  Simon Josefsson  <jas@extundo.com>
23820
23821         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
23822
23823 2004-02-25  Simon Josefsson  <jas@extundo.com>
23824
23825         * lib/strdup.h: New file.
23826         * lib/strdup.c: Include it.
23827         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
23828         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
23829
23830 2004-02-23  Karl Berry  <karl@gnu.org>
23831
23832         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
23833         (from fencepost.gnu.org:/gd/gnuorg).
23834
23835 2004-02-23  Karl Berry  <karl@gnu.org>
23836
23837         * config/srclistvars.sh (GNUORG) [karl]: redefine.
23838         * config/srclist.txt: add maintain/standards documents.
23839
23840 2004-02-18  Bruno Haible  <bruno@clisp.org>
23841
23842         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
23843         Reported by Derek Robert Price <derek@ximbiot.com>.
23844
23845 2004-02-16  Karl Berry  <karl@gnu.org>
23846
23847         * config/mkinstalldirs, install-sh: update from automake.
23848
23849 2004-02-06  Karl Berry  <karl@gnu.org>
23850
23851         * m4/po.m4: update from gettext 0.14.1.
23852
23853 2004-02-06  Karl Berry  <karl@gnu.org>
23854
23855         * lib/config.charset: update from gettext 0.14.1.
23856
23857 2004-02-05  Paul Eggert  <eggert@twinsun.com>
23858
23859         Add comments and code, prompted by suggestions from Bruno Haible
23860         for sh-quote.
23861         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
23862         describing the enum quoting_style values.
23863         * lib/quotearg.c (quotearg_alloc): New function.
23864         (quotearg_buffer_restyled): Treat lone { and } as special.
23865         Treat = as special.  Work around bug with older shells
23866         that "see" a '\' that is really the 2nd byte of a multibyte char.
23867         Quote empty string with shell_quoting_style.
23868
23869 2004-02-03  Bruno Haible  <bruno@clisp.org>
23870
23871         * m4/pipe.m4: New file, from GNU gettext.
23872
23873 2004-02-03  Bruno Haible  <bruno@clisp.org>
23874
23875         * lib/pipe.h: New file, from GNU gettext.
23876         * lib/pipe.c: New file, from GNU gettext.
23877
23878 2004-01-27  Bruno Haible  <bruno@clisp.org>
23879
23880         * m4/execute.m4: New file, from GNU gettext.
23881
23882 2004-01-27  Bruno Haible  <bruno@clisp.org>
23883
23884         * lib/execute.h: New file, from GNU gettext.
23885         * lib/execute.c: New file, from GNU gettext.
23886         * lib/w32spawn.h: New file, from GNU gettext.
23887
23888 2004-01-24  Paul Eggert  <eggert@twinsun.com>
23889
23890         Merge from diffutils.
23891
23892         * lib/file-type.c (file_type): Add typed memory objects.
23893         * lib/file-type.h (S_TYPEISTMO): New macro.
23894
23895         * lib/c-stack.h (c_stack_action): Remove argv argument.
23896         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
23897         (die): Don't calculate message unless segv_action returns.
23898         (get_stack_location, min_address_from_argv, max_address_from_argv,
23899         volatile stack_base, volatile_stack_size): Remove.
23900         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
23901         that every segmentation violation is a stack overflow.  (Ouch!)
23902         See Debian bug 136249 (still outstanding) for more info about why
23903         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
23904
23905 2004-01-24  Paul Eggert  <eggert@twinsun.com>
23906
23907         Exit-status fix from coreutils.
23908
23909         Use exit_failure consistently in place of EXIT_FAILURE,
23910         so that program exit statuses are consistent on failure.
23911
23912         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
23913         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
23914         * lib/argmatch.h: Comment fix to match the above.
23915         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
23916         Now a macro referring to exit_failure, instead of a separate
23917         variable.  Include "exitfail.h" to get it.
23918         * lib/xstrtol.h: Include "exitfail.h".
23919         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
23920
23921         * lib/long-options.c (parse_long_options): Use prototype
23922         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
23923         for clarity.
23924
23925 2004-01-21  Jim Meyering  <jim@meyering.net>
23926
23927         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
23928         so as not to conflict with a different-sized __mktime_internal
23929         function in GNU libc.
23930         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
23931         Problem building statically-linked `ls' reported by Michael Brunnbauer.
23932
23933 2004-01-20  Karl Berry  <karl@gnu.org>
23934
23935         * config/config.guess: update from config.
23936
23937         * config/srclistvars.sh: GNUWWWLICENSES for karl.
23938
23939 2004-01-20  Bruno Haible  <bruno@clisp.org>
23940
23941         Safer stack allocation.
23942         * lib/setenv.c: Include allocsa.h.
23943         (alloca): Remove fallback definition.
23944         (freea): Remove macro.
23945         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
23946         instead of freea.
23947
23948 2004-01-20  Bruno Haible  <bruno@clisp.org>
23949
23950         * m4/eealloc.m4: New file, from GNU gettext.
23951
23952 2004-01-20  Bruno Haible  <bruno@clisp.org>
23953
23954         * m4/allocsa.m4: New file, from GNU gettext.
23955
23956 2004-01-20  Bruno Haible  <bruno@clisp.org>
23957
23958         * lib/xallocsa.h: New file, from GNU gettext.
23959         * lib/xallocsa.c: New file, from GNU gettext.
23960
23961 2004-01-20  Bruno Haible  <bruno@clisp.org>
23962
23963         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
23964
23965 2004-01-20  Bruno Haible  <bruno@clisp.org>
23966
23967         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
23968         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
23969         specially.
23970
23971 2004-01-20  Bruno Haible  <bruno@clisp.org>
23972
23973         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
23974         patch.
23975
23976 2004-01-20  Bruno Haible  <bruno@clisp.org>
23977
23978         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
23979
23980 2004-01-20  Bruno Haible  <bruno@clisp.org>
23981
23982         * lib/eealloc.h: New file.
23983
23984 2004-01-20  Bruno Haible  <bruno@clisp.org>
23985
23986         * lib/binary-io.h: Avoid warnings on Cygwin.
23987
23988 2004-01-20  Bruno Haible  <bruno@clisp.org>
23989
23990         * lib/allocsa.h: New file, from GNU gettext.
23991         * lib/allocsa.c: New file, from GNU gettext.
23992
23993 2004-01-18  Karl Berry  <karl@gnu.org>
23994
23995         * doc/gpl.texi, doc/lgpl.texi: new files.
23996
23997 2004-01-18  Karl Berry  <karl@gnu.org>
23998
23999         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
24000         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
24001
24002 2004-01-15  Paul Eggert  <eggert@twinsun.com>
24003
24004         Merge from coreutils.
24005
24006         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
24007         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
24008         (gl_DEFAULT_POSIX2_VERSION): Move
24009         the documentation from 'configure' into 'config.hin',
24010         so that 'configure --help' isn't burdened by it and
24011         we don't have to worry about its formatting there.
24012         Reword the documentation so that it's more succinct
24013         and can be run together into a single paragraph.
24014         * m4/same.m4 (gl_SAME): Check for pathconf.
24015
24016 2004-01-15  Paul Eggert  <eggert@twinsun.com>
24017
24018         Merge from coreutils.
24019
24020         * lib/posixver.c: Include posixver.h.
24021
24022         * lib/same.c: Include <stdbool.h>, <limits.h>.
24023         (_POSIX_NAME_MAX): Define if not defined.
24024         (MIN): New macro.
24025         (same_name): If file names are silently truncated, report
24026         that the file names are the same if they are the same after
24027         the silent truncation.
24028
24029         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
24030         conversion function.
24031         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
24032         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
24033         longer needed.
24034
24035 2004-01-15  Jim Meyering  <jim@meyering.net>
24036
24037         Merge from coreutils.
24038
24039         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
24040         if no library is required.
24041         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
24042         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
24043         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
24044         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
24045         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
24046         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
24047         value, $ac_cv_search_crypt, if it's "none required".
24048         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
24049         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
24050         not gl_FUNC_GETLOADAVG.
24051         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
24052         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
24053
24054 2004-01-15  Jim Meyering  <jim@meyering.net>
24055
24056         Merge from coreutils.
24057
24058         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
24059         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
24060         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
24061
24062         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
24063         optional configure-time default.
24064
24065         * lib/version-etc.c (version_etc_copyright): Update copyright date.
24066
24067         * lib/xreadlink.c (xreadlink): Correct outdated comment.
24068
24069 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
24070
24071         Merge from coreutils.
24072
24073         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
24074         value, $ac_cv_search_nanosleep, if it's "none required".
24075
24076 2004-01-14  Paul Eggert  <eggert@twinsun.com>
24077
24078         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
24079         with like-named macro in fnmatch.c.
24080         (EXT): Use an internal constant instead.
24081
24082         Merge fnmatch patches from glibc.
24083         * lib/fnmatch.c (mbsinit): Remove define.
24084         Add libc_hidden_ver (__fnmatch, fnmatch).
24085         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
24086         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
24087
24088 2004-01-14  Karl Berry  <karl@gnu.org>
24089
24090         * config/install-sh: update from automake.
24091
24092 2004-01-13  Karl Berry  <karl@gnu.org>
24093
24094         * config/install-sh: update from automake.
24095
24096 2004-01-09  Karl Berry  <karl@gnu.org>
24097
24098         * config/install-sh: update from automake.
24099
24100 2004-01-05  Karl Berry  <karl@gnu.org>
24101
24102         * config/config.{sub,guess}: update from config.
24103
24104 2003-12-31  Karl Berry  <karl@gnu.org>
24105
24106         * config/depcomp: update from automake.
24107
24108 2003-12-14  Karl Berry  <karl@gnu.org>
24109
24110         * lib/config.charset: update from gettext-runtime.
24111
24112 2003-12-03  Paul Eggert  <eggert@twinsun.com>
24113
24114         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
24115         Bug reported by Alfred M. Szmidt.
24116
24117 2003-12-03  Bruno Haible  <bruno@clisp.org>
24118
24119         * m4/gettext.m4: Upgrade from gettext-0.13.
24120         * m4/po.m4: Upgrade from gettext-0.13.
24121         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
24122         * m4/intmax.m4: New file, from gettext-0.13.
24123         * m4/printf-posix.m4: New file, from gettext-0.13.
24124
24125 2003-11-29  Karl Berry  <karl@gnu.org>
24126
24127         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
24128
24129 2003-11-25  Paul Eggert  <eggert@twinsun.com>
24130             Bruno Haible  <bruno@clisp.org>
24131
24132         * lib/printf-parse.h: Don't include sys/types.h.
24133         (ARG_NONE): New macro.
24134         (char_directive): Change type of *arg_index fields to size_t.
24135         * lib/printf-parse.c: Don't include sys/types.h.
24136         (SSIZE_MAX): Remove macro.
24137         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
24138         Remove unnecessary overflow check.
24139         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
24140         fields.
24141
24142 2003-11-25  Bruno Haible  <bruno@clisp.org>
24143
24144         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
24145
24146 2003-11-25  Bruno Haible  <bruno@clisp.org>
24147
24148         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
24149         gt_TYPE_SSIZE_T.
24150
24151 2003-11-24  Paul Eggert  <eggert@twinsun.com>
24152
24153         * modules/alloca: Remove dependency on xalloc.
24154
24155 2003-11-24  Paul Eggert  <eggert@twinsun.com>
24156
24157         * lib/alloca.c: Remove dependency on xalloc module.
24158         (xalloc_die): Remove.
24159         (memory_full) [!defined emacs]: New macro.
24160         [!defined emacs]: Don't include xalloc.h.
24161         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
24162         address arithmetic overflows.  Change datatypes a bit to avoid
24163         unnecessary casts.
24164
24165 2003-11-22  Jim Meyering  <jim@meyering.net>
24166
24167         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
24168         s/size/size_t/.
24169
24170 2003-11-21  Karl Berry  <karl@gnu.org>
24171
24172         * config/config.{sub,guess}: update from config.
24173
24174 2003-11-18  Karl Berry  <karl@gnu.org>
24175
24176         * config/config.{sub,guess}: update from config.
24177
24178         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
24179
24180 2003-11-17  Paul Eggert  <eggert@twinsun.com>
24181
24182         * README: Mention that S+T cannot overflow if S is the size of
24183         an existing object and T is sufficiently small.
24184
24185 2003-11-17  Jim Meyering  <jim@meyering.net>
24186
24187         On systems without utime and without a utimes function capable of
24188         dealing with a NULL struct utimbuf* argument, this utime replacement
24189         could -- in unusual circumstances -- leak a file descriptor.
24190         * lib/utime.c: Include <unistd.h> and <errno.h>.
24191         (utime_null): Be sure to close `fd' and to preserve errno.
24192         Reported by Geoff Collyer via Arnold Robbins.
24193
24194 2003-11-17  Bruno Haible  <bruno@clisp.org>
24195
24196         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
24197         (Depends-on): Add xsize.
24198
24199 2003-11-17  Bruno Haible  <bruno@clisp.org>
24200
24201         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
24202
24203 2003-11-17  Bruno Haible  <bruno@clisp.org>
24204
24205         * lib/vasnprintf.c (alloca): Remove fallback definition.
24206         (freea): Remove definition.
24207         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
24208         Reported by Paul Eggert.
24209
24210 2003-11-16  Paul Eggert  <eggert@twinsun.com>
24211             Bruno Haible  <bruno@clisp.org>
24212
24213         Protect against address arithmetic overflow.
24214         * lib/printf-args.h: Include stddef.h.
24215         (arguments): Change type of field 'count' to size_t.
24216         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
24217         'unsigned int' where appropriate.
24218         * lib/printf-parse.h: Include sys/types.h.
24219         (char_directive): Change type of *arg_index fields to ssize_t.
24220         (char_directives): Change type of fields 'count', max_*_length to
24221         size_t.
24222         * lib/printf-parse.c: Include sys/types.h and xsize.h.
24223         (SSIZE_MAX): Define fallback value.
24224         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
24225         instead of 'int' where appropriate. Check a_allocated, d_allocated
24226         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
24227         * lib/vasnprintf.c: Include xsize.h.
24228         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
24229         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
24230         overflow. Avoid wraparound when converting a width or precision from
24231         decimal to binary.
24232
24233 2003-11-16  Bruno Haible  <bruno@clisp.org>
24234
24235         Update from GNU gettext.
24236         * lib/printf-parse.c: Generalize to it can be compiled for wide
24237         strings.
24238         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
24239         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
24240         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
24241         SNPRINTF): New macros.
24242         Don't include <alloca.h> if the file is used inside libintl.
24243         (local_wcslen): New function, for Solaris 2.5.1.
24244         (VASNPRINTF): Use it instead of wcslen.
24245
24246 2003-11-16  Bruno Haible  <bruno@clisp.org>
24247
24248         * lib/xsize.h (xmax): New function.
24249         (xsum, xsum3, xsum4): Declare as "pure" functions.
24250
24251 2003-11-12  Paul Eggert  <eggert@twinsun.com>
24252
24253         * modules/xalloc (Files): Undo latest change, since xalloc.h
24254         no longer needs SIZE_MAX or PTRDIFF_MAX.
24255
24256 2003-11-12  Paul Eggert  <eggert@twinsun.com>
24257
24258         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
24259         gl_PTRDIFF_MAX.
24260
24261 2003-11-12  Paul Eggert  <eggert@twinsun.com>
24262
24263         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
24264         "return", to pacify some unknown compiler.  Problem reported
24265         by Joerg Schilling.
24266
24267 2003-11-12  Paul Eggert  <eggert@twinsun.com>
24268
24269         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
24270         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
24271         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
24272         heuristic is just as accurate as far as we know, and it removes a
24273         dependency on size_max.m4 and ptrdiff_max.m4.
24274
24275 2003-11-11  Bruno Haible  <bruno@clisp.org>
24276
24277         * modules/xsize (Files): Add m4/size_max.m4.
24278         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
24279
24280 2003-11-11  Bruno Haible  <bruno@clisp.org>
24281
24282         * m4/size_max.m4: New file.
24283         * m4/ptrdiff_max.m4: New file.
24284         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
24285         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
24286         (gl_XALLOC): Invoke it.
24287
24288 2003-11-11  Bruno Haible  <bruno@clisp.org>
24289
24290         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
24291         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
24292         defined.
24293
24294 2003-11-10  Paul Eggert  <eggert@twinsun.com>
24295
24296         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
24297         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
24298         rejected some allocations of exactly SIZE_MAX - 2 bytes.
24299         From Bruno Haible.
24300         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
24301         not (size_t) -1, since it's defined here.
24302
24303 2003-11-09  Karl Berry  <karl@gnu.org>
24304
24305         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
24306
24307 2003-11-06  Paul Eggert  <eggert@twinsun.com>
24308
24309         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
24310         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
24311         Reject sizes of exactly SIZE_MAX bytes.
24312         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
24313         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
24314
24315 2003-11-05  Bruno Haible  <bruno@clisp.org>
24316
24317         * lib/xsize.h: Include limits.h, to avoid a possible collision with
24318         SIZE_MAX defined in <limits.h> on Solaris.
24319
24320 2003-11-04  Jim Meyering  <jim@meyering.net>
24321
24322         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
24323         variable names, rather than @VAR@.
24324         * modules/poll: Likewise.
24325
24326 2003-11-04  Bruno Haible  <bruno@clisp.org>
24327
24328         * modules/xsize: New file.
24329         * modules/linebreak: Depend on xsize.
24330         * MODULES.html.sh (func_all_modules): Add xsize.
24331
24332 2003-11-04  Bruno Haible  <bruno@clisp.org>
24333
24334         * m4/xsize.m4: New file.
24335
24336 2003-11-04  Bruno Haible  <bruno@clisp.org>
24337
24338         * lib/xsize.h: New file.
24339         * lib/linebreak.c: Include xsize.h.
24340         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
24341         argument for overflow.
24342         Suggested by Paul Eggert.
24343
24344 2003-11-03  Karl Berry  <karl@gnu.org>
24345
24346         * config/config.{guess,sub}: update from config.
24347
24348 2003-11-03  Jim Meyering  <jim@meyering.net>
24349
24350         * modules/userspec (lib_SOURCES): Add userspec.h.
24351         (Include): Add "userspec.h".
24352         Improve description.
24353
24354 2003-11-03  Jim Meyering  <jim@meyering.net>
24355
24356         * lib/userspec.c: Include "userspec.h".
24357         * lib/userspec.h: New file.
24358
24359 2003-11-03  Bruno Haible  <bruno@clisp.org>
24360
24361         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
24362
24363 2003-11-03  Bruno Haible  <bruno@clisp.org>
24364
24365         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
24366         available, to avoid (extremely rare) race condition.
24367         Suggested by Paul Eggert.
24368
24369 2003-11-02  Karl Berry  <karl@gnu.org>
24370
24371         * config/srclist.txt (vasprintf.c): sync broken, sigh.
24372
24373 2003-10-31  Paul Eggert  <eggert@twinsun.com>
24374
24375         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
24376         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
24377         (read_filesystem_list): Set and use me_type_malloced.
24378         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
24379         whatever the type happens to be), for brevity and consistency.
24380         Check for size calculation overflow on Alphas running OSF/1.
24381
24382 2003-10-31  Jim Meyering  <jim@meyering.net>
24383
24384         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
24385
24386         * lib/linebuffer.c: Include <string.h> for declaration of memset.
24387
24388 2003-10-30  Paul Eggert  <eggert@twinsun.com>
24389             Bruno Haible  <bruno@clisp.org>
24390
24391         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
24392         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
24393
24394 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
24395
24396         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
24397         netbsd*-gnu*.  Suggested by Robert Millan.
24398
24399 2003-10-29  Paul Eggert  <eggert@twinsun.com>
24400
24401         * modules/group-member: Depend on stdbool.
24402
24403 2003-10-29  Paul Eggert  <eggert@twinsun.com>
24404
24405         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
24406
24407 2003-10-29  Paul Eggert  <eggert@twinsun.com>
24408
24409         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
24410         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
24411         after the 'gnu' in these cases.  This fixes some bugs in the
24412         previous change, and is based on suggestions by Robert Millan.
24413
24414 2003-10-29  Paul Eggert  <eggert@twinsun.com>
24415
24416         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
24417         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
24418         no longer needed.
24419         * lib/quotearg.c (quotearg_n_options): Use it.
24420         * lib/group-member.c: Include <stdbool.h>.
24421         (free_group_info): Arg is now const *; don't free arg.
24422         (get_group_info): Now returns bool and accepts struct group_info *,
24423         rather than returning a malloc'ed struct group_info *.
24424         All uses changed.  Check for overflow in internal size calculation.
24425
24426         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
24427         rather than xmalloc/xrealloc.
24428         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
24429         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
24430         conformance bug: the old code used a pointer after freeing the
24431         storage that it addressed.
24432         * lib/hash.c (hash_initialize): Simplify the code by using
24433         xalloc_oversized rather than doing it by hand.
24434         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
24435         the buffer preserved.  Use free and xmalloc instead.
24436         * lib/quotearg.c (quotearg_n_options): Likewise.
24437         Use a simpler test for size overflow.  Don't use xalloc_oversized
24438         because unsigned int might be wider than size_t (!); this suggests
24439         that we should switch from unsigned int to size_t for slot numbers.
24440
24441 2003-10-28  Paul Eggert  <eggert@twinsun.com>
24442
24443         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
24444         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
24445         NetBSD kernels.  Requested by Richard Stallman.
24446
24447 2003-10-27  Paul Eggert  <eggert@twinsun.com>
24448
24449         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
24450         to allocate the returned structure.  Do not allocate a subarray,
24451         as x2nrealloc will do that.
24452         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
24453         instead of xnrealloc.
24454         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
24455
24456 2003-10-27  Bruno Haible  <bruno@clisp.org>
24457
24458         * lib/stdbool_.h: Better support for BeOS.
24459
24460 2003-10-26  Paul Eggert  <eggert@twinsun.com>
24461
24462         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
24463         now uses inline.
24464
24465 2003-10-26  Paul Eggert  <eggert@twinsun.com>
24466
24467         * lib/xalloc.h (xalloc_oversized): New static inline function, for
24468         callers that want to do their own size-overflow checking.  Include
24469         <stdbool.h>, since xalloc_oversized returns bool.
24470         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
24471         to use xalloc_oversized.
24472
24473         Add two functions x2realloc, x2nrealloc, for programs that grow
24474         arrays dynamically by doubling their sizes.
24475         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
24476         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
24477         New functions.
24478
24479         Port to C99 semantics for 'inline' of external functions.
24480         Bug reported by Bruno Haible.
24481         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
24482         with the old contents of xnmalloc.
24483         (xnmalloc, xmalloc): Use it.
24484         (xnrealloc_inline): New static inline function,
24485         with the old contents of xnrealloc.
24486         (xnrealloc, xrealloc): Use it.
24487
24488         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
24489         that.
24490
24491 2003-10-26  Karl Berry  <karl@gnu.org>
24492
24493         * config/srclist.txt (COPYING.DOC): no longer available from
24494         /gd/gnuorg; don't know where the ultimate source is.
24495
24496 2003-10-25  Paul Eggert  <eggert@twinsun.com>
24497
24498         Fix several address-calculation bugs in the hash modules,
24499         plus some minor code cleanup.
24500
24501         * lib/hash.h: Include <stdbool.h>, for bool.
24502         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
24503         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
24504         hash_get_n_entries, hash_get_max_bucket_length,
24505         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
24506         hash_rehash): Use size_t rather than unsigned.
24507         * lib/hash.c (struct hash_table, hash_get_n_buckets,
24508         hash_get_n_buckets_used, hash_get_n_entries,
24509         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
24510         hash_get_entries, hash_do_for_each, hash_string, is_prime,
24511         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
24512         Likewise.
24513         (SIZE_MAX): Define if not defined.
24514         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
24515         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
24516         hash_print):
24517         Use const * when possible.
24518         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
24519         (check_tuning): Fix bug: if tuning parameters were very close to
24520         0 or 1, rounding errors could have caused subscript violations.
24521         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
24522         (hash_initialize): Add 'fail:' label
24523         to free table and return NULL, and use it to simplify code.
24524         Use calloc rather than clearing the storage ourself.
24525         (hash_initialize, hash_rehash): Check for arithmetic overflow in
24526         buffer size calculations.
24527         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
24528         Include <stddef.h>, for size_t.
24529         * lib/hash-pjw.c (hash_pjw): Likewise.
24530         Switch to method described by Bruno Haible.
24531         Include <limits.h>, for CHAR_BIT.
24532         (SIZE_BITS): New macro.
24533
24534 2003-10-23  Paul Eggert  <eggert@twinsun.com>
24535
24536         * m4/getline.m4 (AM_FUNC_GETLINE):
24537         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
24538         hosts.  Problem reported by Derek Robert Price in
24539         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
24540         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
24541         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
24542
24543 2003-10-21  Paul Eggert  <eggert@twinsun.com>
24544
24545         * lib/getndelim2.c (getndelim2): When size calculation overflows,
24546         ceiling the allocation at NMAX bytes rather than silently
24547         discarding input bytes before NMAX is reached.  This makes
24548         a difference only if NMAX exceeds SIZE_MAX / 2.
24549
24550         * lib/obstack.c: Merge from glibc.
24551         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
24552         Add libc_hidden_def (_obstack_newchunk).
24553         (_obstack_free) [! defined _LIBC]: Remove.
24554         [defined _LIBC]: Make a strong alias from obstack_free, rather than
24555         a clone of the function body.
24556         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
24557         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
24558
24559         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
24560         glibc.
24561         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
24562         arg to memcpy.
24563
24564         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
24565         (obstack_ptr_grow_fast, obstack_int_grow_fast):
24566         Don't use lvalue casts, as GCC plans to remove support for them
24567         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
24568         was also present in the non-GCC version, indicating that this
24569         code had always been buggy and had never been widely used.
24570         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
24571         Use the fast variant of each macro, rather than copying the
24572         definiens of the fast variant; that way, we'll be more likely to
24573         catch future bugs in the fast variants.
24574
24575 2003-10-20  Bruno Haible  <bruno@clisp.org>
24576
24577         * modules/wait-process: New file.
24578         * MODULES.html.sh (func_all_modules): Add wait-process.
24579
24580 2003-10-20  Bruno Haible  <bruno@clisp.org>
24581
24582         * m4/wait-process.m4: New file.
24583
24584 2003-10-20  Bruno Haible  <bruno@clisp.org>
24585
24586         * lib/wait-process.h: New file, from GNU gettext.
24587         * lib/wait-process.c: New file, from GNU gettext.
24588
24589 2003-10-19  Jim Meyering  <jim@meyering.net>
24590
24591         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
24592         HPUX 10.20.
24593
24594 2003-10-18  Karl Berry  <karl@gnu.org>
24595
24596         * config/config.guess: update from config.
24597
24598 2003-10-16  Paul Eggert  <eggert@twinsun.com>
24599
24600         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
24601         (getgroups): First arg is int, not size_t.
24602         Don't let 'free' mangle errno.
24603
24604 2003-10-16  Paul Eggert  <eggert@twinsun.com>
24605
24606         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
24607
24608 2003-10-16  Karl Berry  <karl@gnu.org>
24609
24610         * config/config.{guess,sub}: update from config.
24611
24612 2003-10-16  Jim Meyering  <jim@meyering.net>
24613
24614         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
24615         memcpy.
24616
24617 2003-10-15  Paul Eggert  <eggert@twinsun.com>
24618
24619         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
24620         (SIZE_MAX): Remove.
24621         (new_exclude, add_exclude_file): Initial size no longer needs to
24622         be a power of 2.
24623         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
24624         our own address arithmetic overflow checking.
24625
24626         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
24627         (fnmatch): Do not alloca more than 2000 wide characters;
24628         instead, use malloc for large buffers.
24629         Check for address arithmetic overflow, and return -1
24630         with errno set to ENOMEM in that case.
24631         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
24632         (NEW_PATTERN): Do not alloca more than 8000 bytes;
24633         instead, return -1.  Check for address arithmetic overflow.
24634
24635 2003-10-14  Paul Eggert  <eggert@twinsun.com>
24636
24637         Handle invalid suffixes and overflow independently, so that
24638         callers can treat them independently as needed.  Fix some bugs in
24639         suffix handling, e.g., "100k@" was not diagnosed as an invalid
24640         suffix for a human-readable blocksize.  The major caller-visible
24641         change is the addition of a new
24642         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
24643         that both overflow and suffix chars were found.
24644
24645         * lib/human.c (humblock): Don't check separately for invalid suffix
24646         char; that is xstrtoumax's job (now that its bug is fixed).
24647         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
24648         INTMAX_MAX]: New macros.
24649         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
24650         TYPE_MAXIMUM): New macros.
24651         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
24652         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
24653         if overflow occurs, as it's what __strtol does and it's more useful
24654         in practice.
24655         (__xstrtol): If __strtol reports some error other than ERANGE,
24656         reflect it to the caller as LONGINT_INVALID.  If it reports
24657         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
24658         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
24659         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
24660         value.
24661         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
24662         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
24663         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
24664         [defined UINTMAX_MAX]: New macros.
24665
24666 2003-10-14  Bruno Haible  <bruno@clisp.org>
24667
24668         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
24669
24670 2003-10-14  Bruno Haible  <bruno@clisp.org>
24671
24672         * m4/sig_atomic_t: New file, from GNU gettext.
24673         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
24674
24675 2003-10-14  Bruno Haible  <bruno@clisp.org>
24676
24677         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
24678         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
24679         Also use volatile where needed.
24680
24681 2003-10-12  Paul Eggert  <eggert@twinsun.com>
24682
24683         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
24684         Change maintainer from Bruno Haible to 'all'.
24685
24686 2003-10-12  Paul Eggert  <eggert@twinsun.com>
24687
24688         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
24689
24690 2003-10-12  Paul Eggert  <eggert@twinsun.com>
24691
24692         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
24693         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
24694         and define in terms of the other primitives.
24695         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
24696         (SIZE_MAX): Define if not already defined.
24697         (array_size_overflow): New function.
24698         (xalloc_die): Abort instead of exiting if 'error' returns.
24699         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
24700         (xmalloc, xrealloc): Use them.
24701         (xcalloc): Check for address arithmetic overflow.
24702         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
24703         a bit faster than strcpy.
24704
24705 2003-10-10  Simon Josefsson  <jas@extundo.com>
24706
24707         * modules/argp (Depends-on): Add restrict and strcase.
24708
24709 2003-10-10  Simon Josefsson  <jas@extundo.com>
24710
24711         * m4/argp.m4: Add AC_C_INLINE.
24712
24713 2003-10-08  Paul Eggert  <eggert@twinsun.com>
24714
24715         Merge getpass from libc, plus a few fixes.
24716
24717         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
24718         Include <stdbool.h>.
24719         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
24720         __fsetlocking to empty.
24721         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
24722         do include <bits/libc-lock.h>.
24723         Do not include <fcntl.h>; not needed.
24724         [_LIBC]: Include <wchar.h>.
24725         (NOTCANCEL_MODE): New macro.
24726         (flockfile, funlockfile) [_LIBC]: New macros.
24727         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
24728         [!_LIBC]: New macros.
24729         (call_fclose): New function.
24730         (getpass): Use it.  Save tty stream separately; this simplifies the
24731         code and makes it more reliable if stdin happens to equal stdout.
24732         Invoke __fsetlocking on tty.
24733         Handle thread cancellation if needed.
24734         Namespace cleanup (use __tcgetattr, __getline).
24735         Use bool for Booleans.
24736         [USE_IN_LIBIO]: Handle wide streams.
24737         [!_LIBC]: Unconditionally do the fseek, since we don't know what
24738         stream might go where.
24739
24740         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
24741         doesn't have to include <stdio.h> before us.
24742         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
24743         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
24744         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
24745         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
24746         if not declared, so that we can use getpass.c code from libc without
24747         rewriting it.
24748         (flockfile, ftrylockfile, funlockfile): New macros.
24749
24750 2003-10-08  Paul Eggert  <eggert@twinsun.com>
24751
24752         * modules/getpass: Depend on stdbool.
24753
24754 2003-10-08  Paul Eggert  <eggert@twinsun.com>
24755
24756         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
24757
24758 2003-10-07  Karl Berry  <karl@gnu.org>
24759
24760         * config/config.{guess,sub}: update from config.
24761
24762 2003-10-06  Jim Meyering  <jim@meyering.net>
24763             Bruno Haible  <bruno@clisp.org>
24764
24765         This lets translators provide better translations for the
24766         "Written by ..." part of --version output.
24767         * lib/version-etc.h: Include stdarg.h.
24768         (version_etc_copyright): Declare as readonly.
24769         (version_etc): Make this function variadic with a NULL-terminated list
24770         of author name strings.
24771         (version_etc_va): New declaration.
24772         * lib/version-etc.c: Include stdarg.h, stdlib.h.
24773         (version_etc_copyright): Declare as readonly.
24774         (version_etc_va): New function. Provide a different translatable string
24775         for each possible number of authors < 10. Abbreviate when there are 10
24776         authors or more.
24777         (version_etc): Make this function variadic. Call version_etc_va.
24778         Suggestion from Gary V. Vaughan.
24779
24780         * lib/long-options.h (parse_long_options): Change prototype: the
24781         authors string is moved to the end and becomes variadic.
24782         * lib/long-options.c: Include stdarg.h.
24783         (parse_long_options): Make this function variadic, too.
24784         Call version_etc_va, not version_etc.
24785
24786 2003-10-06  Bruno Haible  <bruno@clisp.org>
24787
24788         * modules/version-etc-2: Remove file.
24789         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
24790
24791 2003-10-06  Bruno Haible  <bruno@clisp.org>
24792
24793         * modules/fatal-signal: New file.
24794         * MODULES.html.sh (func_all_modules): Add fatal-signal.
24795
24796 2003-10-06  Bruno Haible  <bruno@clisp.org>
24797
24798         * m4/fatal-signal.m4: New file.
24799         * m4/signalblocking.m4: New file, from GNU gettext.
24800
24801 2003-10-06  Bruno Haible  <bruno@clisp.org>
24802
24803         * lib/version-etc-2.h: Remove file.
24804         * lib/version-etc-2.c: Remove file.
24805
24806 2003-10-06  Bruno Haible  <bruno@clisp.org>
24807
24808         * lib/fatal-signal.h: New file, from GNU gettext.
24809         * lib/fatal-signal.c: New file, from GNU gettext.
24810
24811 2003-10-05  Paul Eggert  <eggert@twinsun.com>
24812
24813         * README: Rework advice for preventing empty .o files.
24814         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
24815         not <sys/types.h>.
24816
24817 2003-10-04  Karl Berry  <karl@gnu.org>
24818
24819         * lib/argp*: update from libc.
24820
24821 2003-10-04  Karl Berry  <karl@gnu.org>
24822
24823         * config/config.{guess,sub}: update from config.
24824
24825 2003-10-02  Bruno Haible  <bruno@clisp.org>
24826
24827         * modules/lchown (Include): Add lchown.h.
24828         * modules/time_r (Include): Use "..." syntax.
24829         * modules/xgetdomainname (Include): Add xgetdomainname.h.
24830
24831 2003-10-01  Simon Josefsson  <jas@extundo.com>
24832
24833         * MODULES.html.sh (func_all_modules): Move gethostname from section
24834         'based on' to section 'lacking' POSIX:2001.
24835
24836 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
24837
24838         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
24839         to output mode on the same stream.
24840
24841 2003-09-29  Paul Eggert  <eggert@twinsun.com>
24842
24843         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
24844         Fix arg typo in previous patch.
24845
24846 2003-09-28  Jim Meyering  <jim@meyering.net>
24847
24848         * lib/error.c: Correct cpp indentation.
24849
24850 2003-09-27  Paul Eggert  <eggert@twinsun.com>
24851
24852         * modules/free: New file.
24853
24854 2003-09-27  Paul Eggert  <eggert@twinsun.com>
24855
24856         * m4/free.m4: New file.
24857
24858 2003-09-27  Paul Eggert  <eggert@twinsun.com>
24859
24860         * lib/minmax.h (MIN, MAX)
24861         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
24862         Omit the special code that used __typeof__, since we worry that
24863         it could be more trouble than it's worth.  See:
24864         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
24865         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
24866
24867         * lib/free.c: New file.
24868
24869 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
24870
24871         Trivial fixes to Makefile.am parts of module listings.
24872         * modules/strstr: Append strstr.h to lib_SOURCES.
24873         * modules/strcase: Likewise, for strcase.h.
24874
24875 2003-09-27  Karl Berry  <karl@gnu.org>
24876
24877         * config/mkinstalldirs: update from automake.
24878
24879 2003-09-26  Paul Eggert  <eggert@twinsun.com>
24880
24881         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
24882         (error_tail): Do not loop, reallocating temporary buffer, since
24883         the output cannot contain more wide characters than the input
24884         contains bytes, the size must be big enough already.  This avoids
24885         one potential size overflow calculation.  Check for size overflow
24886         when calculating temporary buffer size.  Free temporary buffer
24887         when done, if it was allocated with malloc; this plugs a memory
24888         leak.  Remove casts from void * to pointers, that are no longer
24889         needed now that we're assuming C89 or better.
24890
24891         Merge error changes from glibc.
24892
24893         * lib/error.c, error.h: Update copyright notice header to match glibc.
24894         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
24895         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
24896         Disable cancellation while printing error.
24897         * lib/error.h: Prepend __ to parameter names.
24898
24899 2003-09-26  Jim Meyering  <jim@meyering.net>
24900
24901         * lib/error.c (error_tail): Move some declarations
24902         into inner scope where the local variables are used.
24903
24904 2003-09-26  Bruno Haible  <bruno@clisp.org>
24905
24906         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
24907         stpncpy().
24908         Don't define stpncpy through config.h; it's now done through stpncpy.h.
24909
24910 2003-09-26  Bruno Haible  <bruno@clisp.org>
24911
24912         * lib/stpncpy.h (gnu_stpncpy): New declaration.
24913         (stpncpy): Define as alias for gnu_stpncpy.
24914         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
24915
24916 2003-09-25  Simon Josefsson  <jas@extundo.com>
24917
24918         * lib/xgetdomainname.h: New file.
24919         * lib/xgetdomainname.c: New file.
24920
24921 2003-09-25  Simon Josefsson  <jas@extundo.com>
24922             Bruno Haible  <bruno@clisp.org>
24923
24924         * modules/getdomainname: New file.
24925         * modules/xgetdomainname: New file.
24926         * MODULES.html.sh (func_all_modules): Add getdomainname,
24927         xgetdomainname.
24928
24929 2003-09-25  Simon Josefsson  <jas@extundo.com>
24930             Bruno Haible  <bruno@clisp.org>
24931
24932         * m4/getdomainname.m4: New file.
24933
24934 2003-09-25  Simon Josefsson  <jas@extundo.com>
24935             Bruno Haible  <bruno@clisp.org>
24936
24937         * lib/getdomainname.h: New file.
24938         * lib/getdomainname.c: New file.
24939
24940 2003-09-25  Karl Berry  <karl@gnu.org>
24941
24942         * lib/argp-fmtstream.c, argp-help.c: update from libc.
24943
24944 2003-09-25  Karl Berry  <karl@gnu.org>
24945
24946         * config/install-sh: update from automake.
24947
24948 2003-09-25  Bruno Haible  <bruno@clisp.org>
24949
24950         * modules/version-etc-2: New file, from modules/version-etc with
24951         modifications.
24952         * MODULES.html.sh (func_all_modules): Add version-etc-2.
24953
24954 2003-09-25  Bruno Haible  <bruno@clisp.org>
24955
24956         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
24957         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
24958
24959 2003-09-24  Simon Josefsson  <jas@extundo.com>
24960
24961         * modules/xgethostname: Add xgethostname.h.
24962
24963 2003-09-24  Paul Eggert  <eggert@twinsun.com>
24964
24965         * lib/linebuffer.c (freebuffer): Don't free the argument, just
24966         the buffer associated with the argument.  Bug reported by
24967         Simon Josefsson.
24968
24969 2003-09-24  Paul Eggert  <eggert@twinsun.com>
24970
24971         * README: Document assumptions that 'int' is at least 32 bits
24972         wide, that integer arithmetic is 2's complement without overflow,
24973         that there are no holes in integer values, that adding sizes of
24974         two nonoverlapping objects can't overflow, and that all-bits-zero
24975         yields scalar zero.  Fix spelling and capitalization typos.
24976
24977 2003-09-19  Karl Berry  <karl@gnu.org>
24978
24979         * lib/argp.h: update from libc.
24980
24981 2003-09-17  Paul Eggert  <eggert@twinsun.com>
24982
24983         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
24984         to avoid spurious warnings like "AC_RUN_IFELSE was called before
24985         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
24986
24987 2003-09-17  Paul Eggert  <eggert@twinsun.com>
24988
24989         * gnulib-tool: Use "test -h", not "test -L", for portability
24990         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
24991         (tags_regexp): Remove, since \| doesn't conform to POSIX.
24992         (sed_extract_prog): Issue s commands one-by-one, rather than
24993         using \| in one s command.
24994
24995 2003-09-16  Paul Eggert  <eggert@twinsun.com>
24996
24997         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
24998         input error, instead of returning NULL the next time we are called
24999         (and therefore losing track of errno).
25000
25001 2003-09-16  Bruno Haible  <bruno@clisp.org>
25002
25003         * gnulib-tool (func_create_testdir): Warn about duplicated
25004         dependencies.
25005
25006 2003-09-15  Paul Eggert  <eggert@twinsun.com>
25007
25008         * modules/argmatch, modules/fatal, modules/obstack,
25009         modules/xalloc, modules/xgethostname: Sort dependencies by
25010         importance, not alphabetically.
25011
25012 2003-09-15  Paul Eggert  <eggert@twinsun.com>
25013
25014         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
25015         fails, so that the caller gets the proper errno.
25016
25017         * lib/readutmp.c (read_utmp): Likewise.
25018         Check for fstat error.  Close stream and free storage
25019         when failing.
25020
25021 2003-09-14  Karl Berry  <karl@gnu.org>
25022
25023         * config/srclist.txt (strdup.c): disable for c89 changes.
25024
25025 2003-09-14  Jim Meyering  <jim@meyering.net>
25026
25027         * lib/getloadavg.c: Correct cpp indentation.
25028         * lib/strdup.c: Likewise.
25029         * lib/vasnprintf.c: Likewise.
25030
25031 2003-09-14  Bruno Haible  <bruno@clisp.org>
25032
25033         * modules/fwriteerror: New file.
25034         * MODULES.html.sh (func_all_modules): Add fwriteerror.
25035
25036 2003-09-14  Bruno Haible  <bruno@clisp.org>
25037
25038         * lib/fwriteerror.h: New file.
25039         * lib/fwriteerror.c: New file.
25040
25041 2003-09-12  Paul Eggert  <eggert@twinsun.com>
25042
25043         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
25044         modules/xgethostname, modules/xalloc: Depend on exit.
25045
25046 2003-09-12  Paul Eggert  <eggert@twinsun.com>
25047
25048         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
25049
25050         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
25051         and AC_MINIX, too, so that their extensions are available.
25052
25053         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
25054         This macro has been superseded by gl_BACKUPFILE.
25055
25056         More patches to assume C89 or better.
25057
25058         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
25059
25060         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
25061         unconditionally.
25062         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
25063         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
25064         Include <string.h>, <stdlib.h> unconditionally.
25065         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
25066         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
25067         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
25068         headers or for string.h.
25069         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
25070         or strtoul.
25071
25072         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
25073         headers.
25074         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
25075         * m4/userspec.m4 (gl_USERSPEC): Likewise.
25076         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
25077         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
25078         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
25079         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
25080         memcpy, memset.
25081         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
25082         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
25083         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
25084         strtol.
25085         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
25086         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
25087         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
25088         strtoul.
25089
25090 2003-09-12  Paul Eggert  <eggert@twinsun.com>
25091
25092         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
25093         * lib/obstack.c [!defined _LIBC]: Likewise.
25094         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
25095         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
25096         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
25097
25098         More changes to assume C89 or better.
25099
25100         * lib/error.c (error_tail): Assume vprintf.
25101
25102         * lib/argmatch.c (getenv): Remove decl.
25103         * lib/progreloc.c (get_full_program_name): Define via prototype.
25104         * lib/setenv.c (clearenv): Likewise.
25105         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
25106         needed.
25107         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
25108         (malloc, memcpy): Remove decls.
25109         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
25110         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
25111         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
25112         (memcpy): Remove macro.
25113         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
25114         (__P): Remove.  All uses removed.
25115         (PTR): Remove.  All uses changed to void *.
25116         (CHAR_BIT, NULL): Remove.
25117         (spaces, zeros, memset_space, memset_zero)
25118         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
25119         Remove.
25120         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
25121         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
25122         Define with prototype.
25123         Remove now-unnecessary prototype decl.
25124         (extra_args_spec): Assume ANSI C.  All uses changed.
25125         (extra_args_spec_iso): Remove.
25126         (my_strftime, emacs_strftimeu): Define via prototype.
25127         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
25128         unconditionally.
25129         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
25130         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
25131         (strtoul, strtol): Remove decls.
25132         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
25133         LONG_MAX): Remove.
25134         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
25135         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
25136         (LOCALE_PARAM_PROTO): New macro.
25137         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
25138         (INTERNAL (strtol), strtol): Define with a prototype.
25139         (PARAMS): Remove.  All uses removed.
25140         * lib/tempname.c: Include <string.h> unconditionally.
25141         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
25142         * lib/xgethostname.c (main): Define with a prototype.
25143         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
25144         Include <stdlib.h> unconditionally.
25145         (calloc, malloc, realloc, free): Remove decls.
25146         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
25147         Include <stdlib.h> unconditionally.  Sort include file names.
25148         (strtod): Remove.
25149         (xstrtod): Define with a prototype.
25150         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
25151         (strtol, strtoul): Remove decls.
25152
25153 2003-09-11  Paul Eggert  <eggert@twinsun.com>
25154
25155         More patches to assume C89 or better.
25156         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
25157         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
25158         string.h, memchr, STDC_HEADERS.
25159
25160 2003-09-11  Paul Eggert  <eggert@twinsun.com>
25161
25162         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
25163         Include <stdlib.h>, <string.h> unconditionally.
25164         Remove now-unnecessary cast to char *.
25165         * lib/strnlen.c: Include <string.h> unconditionally.
25166         * lib/yesno.c (yesno): Define with a prototype.
25167
25168 2003-09-11  Bruno Haible  <bruno@clisp.org>
25169
25170         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
25171
25172 2003-09-10  Jim Meyering  <jim@meyering.net>
25173
25174         * lib/error.c: Correct indentation of cpp directives.
25175
25176 2003-09-10  Bruno Haible  <bruno@clisp.org>
25177
25178         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
25179         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
25180         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
25181         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
25182         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
25183         <stdlib.h> and <string.h> checks.
25184         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
25185         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
25186
25187 2003-09-10  Bruno Haible  <bruno@clisp.org>
25188
25189         * lib/strcspn.c: Include <string.h> unconditionally.
25190         * lib/strpbrk.c: Include <string.h> unconditionally.
25191         * lib/strstr.c: Include <string.h> unconditionally.
25192         * lib/unicodeio.c: Include <string.h> unconditionally.
25193         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
25194         * lib/unsetenv.c: Likewise.
25195         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
25196         * lib/yesno.c: Include <stdlib.h> unconditionally.
25197         (rpmatch): Add prototype.
25198
25199 2003-09-09  Paul Eggert  <eggert@twinsun.com>
25200
25201         More patches to assume C89 or better.
25202         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
25203         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
25204         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
25205         or for string.h.
25206         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
25207         stdlib.h.
25208         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
25209         C headers.
25210         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
25211         string.h.
25212         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
25213         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
25214         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
25215         or for string.h.
25216         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
25217         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
25218         C headers.
25219         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
25220         memcpy.
25221         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
25222         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
25223         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
25224         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
25225         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
25226         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
25227         string.h, free.
25228         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
25229         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
25230         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
25231         C headers, or for string.h.
25232         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
25233         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
25234         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
25235         headers, memory.h, stdlib.h, string.h, strings.h.
25236         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
25237         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
25238         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
25239         strchr.
25240         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
25241         headers, memory.h, string.h.
25242         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
25243         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
25244         free.
25245         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
25246         headers.
25247         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
25248         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
25249         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
25250         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
25251         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
25252
25253 2003-09-09  Paul Eggert  <eggert@twinsun.com>
25254
25255         More K&R removal.
25256
25257         * lib/acosl.c (main): Use a prototype.
25258         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
25259         tanl.c: Likewise.
25260
25261         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
25262
25263         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
25264         (getopt, etopt_long, getopt_long_only, _getopt_internal)
25265         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
25266         with a prototype.
25267         * lib/getopt.c (const): Remove macro.
25268         Include <string.h> unconditionally.
25269         (my_index): Remove; all uses changed to strchr.
25270         (strlen): Remove decl.
25271         (exchange): Remove forward decl; no longer needed.
25272         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
25273         Define with prototype.
25274         * lib/getopt1.c (const): Remove macro.
25275         (getopt_long, getopt_long_only, main): Define with prototype.
25276
25277         * lib/getugroups.c: Include <string.h> unconditionally.
25278
25279         * lib/getusershell.c: Include <stdlib.h> unconditionally.
25280         (getusershell, setusershell, endusershell, readname, main):
25281         Define with prototypes.
25282
25283         * lib/group-member.c: Include group-member.h first.
25284         Include <stdlib.h> unconditionally.
25285
25286         * lib/hard-locale.c: Include hard-locale.h first.
25287         Include <stdlib.h>, <string.h> unconditionally.
25288
25289         * lib/hash.c (free, malloc): Remove decls.
25290         Include <stdlib.h> unconditionally.
25291
25292         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
25293         (getenv): Do not declare.
25294
25295         * lib/idcache.c: Include <string.h> unconditionally.
25296
25297         * lib/long-options.c: Include long-options.h first, to test interface.
25298         Include <stdlib.h> unconditionally.
25299
25300         * lib/makepath.c: Include makepath.h first, to test interface.
25301         Include <stdlib.h> and <string.h> unconditionally.
25302
25303         * lib/linebuffer.c: Include <stdlib.h>.
25304         (free): Remove decl.
25305
25306         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
25307         stddef.h. rpl_malloc returns void *, not char *.
25308         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
25309         prototype.
25310
25311         * lib/md5.h: Include <limits.h> unconditionally.
25312         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
25313         (__P): Remove; all uses removed.
25314         * lib/md5.c: Include "md5.h" first.
25315         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
25316         md5_buffer, md5_process_bytes, md5_process_block):
25317         Define with prototypes.
25318         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
25319         * lib/sha.c: Include "sha.h" first.
25320         Include <stdlib.h>, <string.h> unconditionally.
25321
25322         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
25323         * lib/memcmp.c (__ptr_t): Likewise.
25324         * lib/memrchr.c (__ptr_t): Likewise.
25325         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
25326         Include <string.h> unconditionally.
25327         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
25328         * lib/memchr.c: Include <stdlib.h> unconditionally.
25329         * lib/memchr.c (LONG_MAX): Remove.
25330         * lib/memrchr.c (LONG_MAX): Likewise.
25331         * lib/memchr.c (__memchr): Define via a prototype.
25332         * lib/memrchr.c (__memrchr): Likewise.
25333         * lib/memcmp.c (__P): Remove, and remove all uses.
25334         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
25335         Remove forward decls; no longer needed.
25336         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
25337         Use types required by C89 in prototype.
25338
25339         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
25340         * lib/savedir.c: Likewise.
25341         * lib/mkdir.c (free): Remove decl.
25342         * lib/rmdir.c (rmdir): Define with a prototype.
25343         * lib/savedir.c: Include savedir.h first, to test interface.
25344
25345         * lib/mktime.c (STDC_HEADERS): Remove.
25346         Include <stdlib.h>, <string.h> unconditionally.
25347
25348         * lib/modechange.c: Include <stdlib.h> unconditionally.
25349         (malloc): Remove decl.
25350
25351         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
25352         (free): Remove decl.
25353
25354         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
25355         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
25356         (This type really should be intptr_t, but that's a C99ism.)
25357         (_obstack_memcpy): Remove: all uses changed to memcpy.
25358         Include <string.h> unconditionally.
25359         (struct obstack): Assume __STDC__ for types of members
25360         chunkfun, freefun, extra_arg.
25361         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
25362         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
25363         obstack_begin, obstack_specify_allocation,
25364         obstack_specify_allocation_with_arg, obstack_chunkfun,
25365         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
25366         Remove unprototyped decls and the macros that use them.
25367         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
25368         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
25369         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
25370         (defined __STDC__ && __STDC__)]:
25371         Remove nonprototyped code.
25372         Include <stdlib.h> unconditionally.
25373         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
25374         _obstack_allocated_p, _obstack_free, obstack_free,
25375         _obstack_memory_used, print_and_abort):
25376         Define using prototypes.
25377         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
25378         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
25379         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
25380         obstack_next_free, obstack_object_size, obstack_room) [0]:
25381         Remove unused, unprototyped code.
25382
25383         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
25384
25385         * lib/physmem.c (physmem_total, physmem_available, main): Define
25386         with prototypes.
25387
25388         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
25389         (main): Define with a prototype.
25390
25391         * lib/posixver.c (getenv): Remove decl.
25392
25393         * lib/putenv.c (malloc): Returns void *, not char *.
25394         Include <string.h> unconditionally.
25395         (strchr, memcpy, NULL): Do not define.
25396
25397         * lib/readtokens.c: Include readtokens.h first, to test interface.
25398         Include <stdlib.h>, <string.h> unconditionally.
25399         (init_tokenbuffer): Define with a prototype.
25400
25401         * lib/regex.c (PARAMS): Remove.  All uses removed.
25402         All uses of _RE_ARGS removed, too.
25403         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
25404         unconditionally.
25405         (bzero): Assume memset exists.
25406         (memcmp, memcpy, NULL): Remove.
25407         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
25408         char, or assignments to local vars of type signed char.
25409         (init_syntax_once, PREFIX(extract_number_and_incr),
25410         PREFIX(print_partial_compiled_pattern),
25411         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
25412         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
25413         PREFIX(regex_grow_registers), PREFIX(regex_compile),
25414         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
25415         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
25416         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
25417         wcs_compile_range, byte_compile_range, truncate_wchar,
25418         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
25419         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
25420         count_mbs_length, wcs_re_match_2_internal,
25421         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
25422         PREFIX(alt_match_null_string_p),
25423         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
25424         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
25425         regfree, PREFIX(extract_number)): Define with prototype.  Remove
25426         now-unnecessary declaration, if any.
25427         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
25428         regcomp, regexec):
25429         Remove now-unnecessary casts among pointer types.
25430         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
25431
25432         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
25433         (free): Remove decl.
25434
25435         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
25436
25437         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
25438         (free): Remove decl.
25439
25440         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
25441         * lib/xgetcwd.c: Likewise.
25442
25443         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
25444         (free): Remove decl.
25445
25446         * lib/strchrnul.c (strchrnul): Define with a prototype.
25447         Fix bug: c_in was not converted to char before searching.
25448
25449         The following changes are not K&R related:
25450
25451         * lib/group-member.h: Include <sys/types.h>, so that this file is
25452         self-contained.
25453         * lib/makepath.h: Likewise.
25454
25455         * lib/getusershell.c (readname, default_index, line_size, readname):
25456         Use size_t, not int, for sizes.
25457         (readname): If the size overflows, report an error instead of
25458         looping forever.
25459
25460 2003-09-09  Paul Eggert  <eggert@twinsun.com>
25461
25462         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
25463         libc.
25464
25465 2003-09-09  Paul Eggert  <eggert@twinsun.com>
25466
25467         * README: New section: portability guidelines.
25468
25469 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
25470
25471         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
25472         C89 spec.
25473
25474 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
25475
25476         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
25477
25478 2003-09-08  Paul Eggert  <eggert@twinsun.com>
25479
25480         Assume C89 or better; remove K&R cruft.
25481         A few of these changes were first proposed by Derek Robert Price
25482         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
25483
25484         * lib/addext.c: Include <string.h> unconditionally.
25485         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
25486         Don't declare getenv or malloc.
25487
25488         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
25489         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
25490         (NULL): Remove.
25491         (find_stack_direction, alloca): Use prototypes.
25492
25493         * lib/atexit.c (atexit): Define using a prototype.
25494
25495         * lib/basename.c, dirname.c, stripslash.c:
25496         Include <string.h> unconditionally.
25497
25498         * lib/bcopy.c: Include <stddef.h>.
25499         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
25500
25501         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
25502
25503         * lib/error.h (error, error_at_line, error_print_progname)
25504         [! (defined (__STDC__) && __STDC__)]: Remove decls.
25505         * lib/error.c: Include error.h first, to check interface.
25506         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
25507         (VA_START): Remove; all uses changeed to va_start.
25508         (exit, strerror): Remove decls.
25509         (error_print_progname): Prototype uncondionally.
25510         Don't include <errno.h>; no longer needed.
25511         (private_strerror): Remove.
25512         (error_tail): Always define.
25513         (error, error_at_line): Assume C89 or better; always use prototypes.
25514         * lib/fatal.c: Include "fatal.h" first, to test interface.
25515         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
25516         (VA_START): Remove; all uses changed to va_start.
25517         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
25518         this case.
25519         (exit): Remove decl.
25520         (fatal): Prototype unconditionally.  Assume va_start works.
25521         Abort at end, to pacify gcc.
25522
25523         * lib/euidaccess.c (main): Define with a prototype.
25524
25525         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
25526
25527         * lib/exitfail.c: Include <stdlib.h> unconditionally.
25528
25529         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
25530         prototypes.
25531         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
25532         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
25533         (getenv): Remove decl.
25534         (fnmatch): Define using a prototype.
25535         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
25536         (FCT): Define using a prototype.
25537
25538         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
25539
25540         * lib/gethostname.c: Include <stddef.h>.
25541         (gethostname): Define with prototype.  Length is size_t, not int.
25542
25543 2003-09-08  Paul Eggert  <eggert@twinsun.com>
25544
25545         Assume C89 or better; remove K&R cruft.
25546         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
25547         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
25548         string.h, getenv, malloc.
25549         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
25550         headers.
25551         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
25552         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
25553         do not check for strerror.
25554         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
25555         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
25556         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
25557         do not check for doprnt or vprintf.
25558         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
25559         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
25560
25561 2003-09-08  Paul Eggert  <eggert@twinsun.com>
25562
25563         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
25564         getversion.c should have been removed then, but was accidentally
25565         preserved.
25566
25567         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
25568         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
25569
25570 2003-09-08  Karl Berry  <karl@gnu.org>
25571
25572         * config/config.sub, config.guess, srclistvars.sh: update from savannah
25573                 config, forget about prep.
25574
25575         * config/depcomp, missing: update from automake.
25576
25577 2003-09-07  Paul Eggert  <eggert@twinsun.com>
25578
25579         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
25580         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
25581
25582 2003-09-07  Paul Eggert  <eggert@twinsun.com>
25583
25584         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
25585         copy_tm_result.  Bug reported by Simon Josefsson in
25586         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
25587
25588 2003-09-06  Paul Eggert  <eggert@twinsun.com>
25589
25590         * m4/time_r.m4: New file.
25591         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
25592         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
25593         is. Check for timegm declaration.
25594         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
25595         Do not check for gmtime_r.
25596         Replace mktime if __mktime_internal does not exist and if mktime
25597         hasn't been replaced already.
25598
25599 2003-09-06  Paul Eggert  <eggert@twinsun.com>
25600
25601         * lib/time_r.c, lib/time_r.h: New files.
25602
25603         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
25604         __localtime_r.
25605         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
25606         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
25607
25608         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
25609         __gmtime_r.
25610         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
25611         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
25612         Include <time_r.h>.
25613
25614         * lib/timegm.c: Switch to glibc implementation, with the following
25615         changes:
25616         [defined HAVE_CONFIG_H]: Include <config.h>.
25617         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
25618         (__mktime_internal) [!defined _LIBC]: New decl.
25619         (__gmtime_r) [!defined _LIBC]: New macro and function.
25620         (timegm): Use a prototype, since gnulib assumes C89.
25621         Do not bother declaring tmp to be const, as it's not really usefu.
25622         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
25623         (timegm): Declare only if HAVE_DECL_TIMEGM.
25624
25625 2003-09-06  Paul Eggert  <eggert@twinsun.com>
25626
25627         * MODULES.html.sh (func_all_modules): Add time_r.
25628         * modules/time_r: New file.
25629         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
25630         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
25631
25632 2003-09-03  Paul Eggert  <eggert@twinsun.com>
25633
25634         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
25635         Bug reported by Lute Kamstra in
25636         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
25637
25638         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
25639         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
25640         course with correspondingly smaller numbers for tomorrow and
25641         yesterday.  From Tadayoshi Funaba.  Originally installed into
25642         sh-utils on 1999-08-07, but the patch got lost (I guess during the
25643         coreutils merge?).
25644
25645 2003-08-31  Simon Josefsson  <jas@extundo.com>
25646
25647         * modules/timegm: New file.
25648         * MODULES.html.sh (func_all_modules): Add timegm.
25649
25650 2003-08-31  Simon Josefsson  <jas@extundo.com>
25651
25652         * m4/timegm.m4: New file.
25653
25654 2003-08-31  Simon Josefsson  <jas@extundo.com>
25655
25656         * lib/timegm.h: New file.
25657         * lib/timegm.c: New file.  Based on
25658         wget-1.8.2/src/http.c:mktime_from_utc.
25659
25660 2003-08-31  Karl Berry  <karl@gnu.org>
25661
25662         * lib/argp.h: update from libc.
25663
25664 2003-08-28  Bruno Haible  <bruno@clisp.org>
25665
25666         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
25667         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
25668         followed by '#define fnmatch fnmatch_posix' gives an error.
25669
25670 2003-08-28  Bruno Haible  <bruno@clisp.org>
25671
25672         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
25673         warning on QNX, which defines O_BINARY to 000000.
25674
25675 2003-08-27  Jim Meyering  <jim@meyering.net>
25676
25677         * m4/mkstemp.m4: Require that the system mkstemp be able to create
25678         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
25679         would fail after 32.  Reported by Danny Levinson.  Details here:
25680         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
25681
25682 2003-08-24  Bruno Haible  <bruno@clisp.org>
25683
25684         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
25685         MSVC7 <stdio.h> is included later.
25686
25687 2003-08-22  Simon Josefsson  <jas@extundo.com>
25688
25689         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
25690
25691 2003-08-20  Karl Berry  <karl@gnu.org>
25692
25693         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
25694
25695 2003-08-20  Bruno Haible  <bruno@clisp.org>
25696
25697         * modules/progname: New file.
25698         * MODULES.html.sh (func_all_modules): Add progname.
25699
25700 2003-08-20  Bruno Haible  <bruno@clisp.org>
25701
25702         * lib/progname.h: New file, from GNU gettext.
25703         * lib/progname.c: New file, from GNU gettext.
25704         * lib/progreloc.c: New file, from GNU gettext.
25705
25706 2003-08-19  Jim Meyering  <jim@meyering.net>
25707
25708         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
25709         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
25710
25711 2003-08-19  Bruno Haible  <bruno@clisp.org>
25712
25713         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
25714         more.
25715
25716 2003-08-19  Bruno Haible  <bruno@clisp.org>
25717
25718         * lib/xstrdup.c: Assume <string.h> exists.
25719
25720 2003-08-18  Paul Eggert  <eggert@twinsun.com>
25721
25722         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
25723         in makefile rules.
25724
25725 2003-08-18  Jim Meyering  <jim@meyering.net>
25726
25727         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
25728         * m4/lib-ld.m4: Likewise.
25729
25730 2003-08-18  Jim Meyering  <jim@meyering.net>
25731
25732         * lib/setenv.h: Indent nested cpp directive.
25733         * lib/vasnprintf.c: Remove trailing blanks.
25734
25735 2003-08-17  Simon Josefsson  <jas@extundo.com>
25736
25737         * modules/xstrndup: New file.
25738         * MODULES.html.sh (func_all_modules): Add xstrndup.
25739
25740 2003-08-17  Simon Josefsson  <jas@extundo.com>
25741
25742         * modules/argp: Fix autoconf macro name. Add more dependencies.
25743
25744 2003-08-17  Simon Josefsson  <jas@extundo.com>
25745
25746         * m4/xstrndup.m4: New file.
25747
25748 2003-08-17  Simon Josefsson  <jas@extundo.com>
25749
25750         * m4/argp.m4: New file.
25751
25752 2003-08-17  Simon Josefsson  <jas@extundo.com>
25753             Bruno Haible  <bruno@clisp.org>
25754
25755         * lib/xstrndup.h: New file.
25756         * lib/xstrndup.c: New file.
25757
25758 2003-08-17  Bruno Haible  <bruno@clisp.org>
25759
25760         * modules/strndup (Files, Include): Add lib/strndup.h.
25761
25762 2003-08-17  Bruno Haible  <bruno@clisp.org>
25763
25764         * modules/euidaccess (Files): Add lib/euidaccess.h.
25765
25766 2003-08-17  Bruno Haible  <bruno@clisp.org>
25767
25768         * lib/strndup.h: New file.
25769
25770 2003-08-17  Bruno Haible  <bruno@clisp.org>
25771
25772         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
25773         like AC_GNU_SOURCE.
25774         * modules/extensions (configure.ac): Comment out the invocation of
25775         gl_USE_SYSTEM_EXTENSIONS.
25776
25777 2003-08-16  Paul Eggert  <eggert@twinsun.com>
25778
25779         Merges from coreutils, etc.
25780         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
25781         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
25782         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
25783         fixing a typo.
25784         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
25785         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
25786
25787 2003-08-16  Paul Eggert  <eggert@twinsun.com>
25788
25789         Document merge from coreutils.
25790         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
25791         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
25792         * modules/utime: Add m4/utimes-null.m4.
25793
25794 2003-08-16  Paul Eggert  <eggert@twinsun.com>
25795
25796         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
25797         space, undoing this 2003-08-12 change:
25798         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
25799
25800 2003-08-16  Paul Eggert  <eggert@twinsun.com>
25801
25802         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
25803         strtoul.c from libc, undoing this 2003-08-12 change:
25804         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
25805
25806 2003-08-16  Jim Meyering  <jim@meyering.net>
25807
25808         Merges from coreutils.
25809         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
25810         prefix.  Adjust cache variables similarly.  Create 500 rather than
25811         just 300 files, to exercise bug on Darwin6.5, too.
25812         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
25813         $missing_dir.
25814         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
25815         AM_SYS_POSIX_TERMIOS.
25816         Reported by mkc@mathdogs.com.
25817         Also change use of $am_cv_sys_posix_termios
25818         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
25819         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
25820         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
25821         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
25822         in /proc/mounts until it finds one with matching device number.  This
25823         is unnecessary when the FILE argument *is* a mount point.  No stat call
25824         is necessary in that case.  So, disable the statvfs-testing code on
25825         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
25826         as RedHat bug# 84846.
25827         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
25828         to 1MB, so as not to render systems with no stack size limit (e.g.,
25829         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
25830         Include <unistd.h>.  On some systems,
25831         it is required for the definition of _SC_PAGESIZE.
25832
25833 2003-08-16  Jim Meyering  <jim@meyering.net>
25834
25835         Merge from coreutils.
25836         * lib/xstrtoimax.c: #else #if -> #elif.
25837         * lib/xstrtoumax.c: Likewise.
25838
25839 2003-08-16  Jim Meyering  <jim@meyering.net>
25840
25841         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
25842         * m4/utimes.m4: Removed.
25843         * m4/utimes-null.m4: Renamed from utimes.m4.
25844
25845         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
25846         to 1MB, so as not to render systems with no stack size limit (e.g.,
25847         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
25848         Include <unistd.h>.  On some systems,
25849         it is required for the definition of _SC_PAGESIZE.
25850
25851 2003-08-16  Jim Meyering  <jim@meyering.net>
25852         and Paul Eggert  <eggert@cs.ucla.edu>
25853
25854         Merges from coreutils, etc.
25855
25856         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
25857         using the latest version from cvs.  This avoids problems with #line
25858         directives using a vendor (Sun) compiler.
25859         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
25860         Don't set GETGROUPS_LIB here; now it's
25861         done via getgroups.m4's wrapper function.
25862         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
25863         rather than just in sh-util/configure.in, so that the
25864         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
25865         same.
25866         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
25867         AC_FUNC_GETLOADAVG where to find getloadavg.c.
25868         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
25869         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
25870         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
25871         Remove code that is now done by the newly-required macros.
25872         Append $(EXEEXT) to DF_PROG.
25873         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
25874         Do not invoke or require the following here,
25875         since prereq.m4 or some gnulib .m4 now does this for us:
25876         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
25877         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
25878         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
25879         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
25880         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
25881         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
25882         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
25883         AC_FUNC_OBSTACK.
25884         Do not replace the following functions, as this is now the job
25885         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
25886         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
25887         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
25888         atexit getpass, strdup, getpagesize.
25889         Replace 'raise'.
25890         Do not check for the following functions, as this is now the job
25891         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
25892         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
25893         setregid.
25894         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
25895         Check for sys/sysctl.h.
25896         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
25897         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
25898         of checking for ssize_t ourselves.
25899
25900         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
25901         Require every macro that gnulib/modules/* suggests for us.
25902         (jm_PREREQ_ADDEXT): New macro.
25903         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
25904         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
25905
25906         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
25907         (gl_PHYSMEM): Use it.
25908         Also check for `table' function.
25909         Check for new headers and functions.
25910         Add check for sys/sysmp.h.
25911         With suggestions from Kaveh Ghazi.
25912         Ignore headers that are present but cannot be compiled.  This
25913         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
25914         C 5.4.
25915
25916 2003-08-15  Paul Eggert  <eggert@twinsun.com>
25917
25918         Document merge from coreutils.
25919         * modules/userspec: Depend on posixver.
25920         * modules/strftime: Depend on tzset.
25921
25922 2003-08-15  Paul Eggert  <eggert@twinsun.com>
25923
25924         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
25925         rather than tab, after '#' in shell-script copyright notices.
25926         Suggested by Bruno Haible.
25927
25928 2003-08-15  Paul Eggert  <eggert@twinsun.com>
25929
25930         * config/srclist-update: Use three spaces, rather than tab, after '#'
25931         in shell-script copyright notices.  Suggested by Bruno Haible.
25932         Remove unnecessary parenthesization in regular expression.
25933
25934 2003-08-15  Jim Meyering  <jim@meyering.net>
25935
25936         Merge from coreutils.
25937         * lib/xgethostname.c: Include <stdlib.h>.
25938         (xghostname): Don't exit for anything other than memory-related
25939         failure; just return NULL.
25940         * lib/userspec.c: Include "posixver.h".
25941         (parse_user_spec): Accept `.' as a separator only
25942         in pre-POSIX-200112 mode.
25943         * lib/strtoimax.c: Use #elif rather than #else #if.
25944         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
25945         Remove function, now that we can rely on a working tzset function.
25946         [!_LIBC]: Ensure that the required autoconf test has been run.
25947         [!defined _NL_CURRENT && HAVE_STRFTIME]:
25948         Use underlying_strftime for %r.
25949         * lib/sha.c: Merge in some clean-up and optimization changes from
25950         glibc.
25951         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
25952         Ensure that it is a multiple of 64.
25953         Rearrange loop exit tests so as to avoid performing an
25954         additional fread after encountering an error or EOF.
25955         * lib/realloc.c: Update copyright date.
25956
25957 2003-08-15  Jim Meyering  <jim@meyering.net>
25958         and Paul Eggert  <eggert@twinsun.com>
25959
25960         Merge from coreutils.
25961         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
25962         member but strut utmpx does not.  Needed for AIX 4.3.3.
25963         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
25964
25965 2003-08-15  Jim Meyering  <jim@meyering.net>
25966         and Paul Eggert  <eggert@cs.ucla.edu>
25967
25968         Merges from coreutils, etc.
25969         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
25970         Require gl_FUNC_TZSET_CLOBBER.
25971         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
25972         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
25973         members.
25974
25975 2003-08-14  Paul Eggert  <eggert@twinsun.com>
25976
25977         Help the merge from coreutils.
25978         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
25979         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
25980         * m4/tzset.m4: Use it too.
25981
25982 2003-08-14  Paul Eggert  <eggert@twinsun.com>
25983
25984         * modules/tzset: New file.
25985
25986 2003-08-14  Jim Meyering  <jim@meyering.net>
25987
25988         Merges from coreutils.
25989         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
25990         variable names, rather than @FNMATCH_H@.
25991         * modules/alloca: Likewise for $(ALLOCA_H).
25992
25993         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
25994         the three copies of the literal target, `fnmatch.h'.
25995         * modules/alloca (alloca.h): Likewise.
25996
25997 2003-08-14  Jim Meyering  <jim@meyering.net>
25998
25999         Merge from coreutils.
26000         * m4/tzset.m4: New file.
26001         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
26002         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
26003         otherwise, AIX 5.1 systems would end up using the latter.
26004         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
26005         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
26006         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
26007         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
26008
26009 2003-08-14  Jim Meyering  <jim@meyering.net>
26010
26011         Merge from coreutils.
26012         * lib/obstack.h: Whitespace changes.
26013         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
26014         and xcalloc return values.
26015         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
26016         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
26017         hang on OSF/1 5.1 for DIR on both local and remote file systems.
26018         Reported by (and fix confirmed by) Nelson H. F. Beebe.
26019         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
26020         error from mntctl.
26021         Use mntctl's return value to drive the entry-processing loop, since
26022         we can't rely on the value of the vmt_length member in the last
26023         entry.  On some systems doing so could result in exhausting
26024         virtual memory.  Based in part on a patch from Mike Jetzer.
26025
26026 2003-08-14  Jim Meyering  <jim@meyering.net>
26027         and Paul Eggert  <eggert@twinsun.com>
26028
26029         Merges from coreutils, plus other fixes.
26030         * lib/physmem.c: Merge in portability changes from gcc/libiberty
26031         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
26032         for credits and details.  Thanks to Kaveh Ghazi for helping
26033         to keep these files in sync.
26034         (ARRAY_SIZE): Define it.
26035         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
26036         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
26037         (memcasecmp): Don't assume size_t fits in unsigned int.
26038         Remove casts and duplicate code.
26039         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
26040         (memcpy): Remove definition.
26041         Merge in some clean-up and optimization changes from glibc.
26042         [BLOCKSIZE]: Move definition to top of file.
26043         Ensure that it is a multiple of 64.
26044         Rearrange loop exit tests so as to avoid performing an
26045         additional fread after encountering an error or EOF.
26046         * lib/md5.h (md5_uintptr): Define.
26047         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
26048         return to the initial working directory.  Preserve errno
26049         for caller.
26050         * lib/idcache.c: Include "xalloc.h".
26051         (xmalloc, xrealloc): Remove decls.
26052         (getuser): Remove casts no longer required in C89.
26053         * lib/human.c: Include stdio.h, for sprintf.
26054         * lib/group-member.c: Include "xalloc.h".
26055         (xmalloc, xrealloc): Remove decls.
26056         (get_group_info): Remove casts no longer required in C89.
26057         * lib/getusershell.c (readname): Remove casts no longer required in
26058         C89.
26059         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
26060         * lib/getline.c: Whitespace fix, from coreutils.
26061
26062 2003-08-13  Paul Eggert  <eggert@twinsun.com>
26063
26064         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
26065         Check for isascii.
26066
26067         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
26068         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
26069         Undo previous (whitespace-only) change.
26070
26071 2003-08-13  Paul Eggert  <eggert@twinsun.com>
26072
26073         * lib/exclude.c: Include <ctype.h>
26074         (IN_CTYPE_DOMAIN): New macro.
26075         (is_space): New fn.
26076         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
26077         and empty lines.
26078
26079         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
26080         Undo previous (whitespace-only) change.
26081
26082 2003-08-13  Paul Eggert  <eggert@twinsun.com>
26083
26084         * config/srclist-update: Change update back to the old behavior,
26085         leaving whitespace alone.  Use one 'sed' command rather than a
26086         pipeline.
26087         (fixlicense): Now a variable, not a function.
26088         (remove_trailing_blanks): Remove.
26089         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
26090         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
26091         Undo previous (whitespace-only) change.
26092
26093 2003-08-12  Paul Eggert  <eggert@twinsun.com>
26094
26095         Merge from coreutils.
26096         * modules/euidaccess: Add lib_SOURCES, include for new
26097         file euidaccess.h
26098
26099 2003-08-12  Paul Eggert  <eggert@twinsun.com>
26100
26101         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
26102         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
26103         Normalize leading white space and remove trailing white space.
26104
26105         Merge from coreutils
26106         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
26107
26108         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
26109         0.12.1.  These files are now being upgraded automatically by
26110         ../config/srclist-update.
26111
26112 2003-08-12  Paul Eggert  <eggert@twinsun.com>
26113
26114         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
26115         Normalize leading white space and remove trailing white space.
26116         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
26117         notice, as per ../config/srclist-update.
26118
26119         Merge from coreutils.
26120         * lib/euidaccess.h: New file.
26121         * lib/euidaccess.c: Include it.
26122         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
26123         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
26124         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
26125
26126 2003-08-12  Paul Eggert  <eggert@twinsun.com>
26127
26128         * config/srclist-update: Add copyright notice.
26129         (remove_id_lines, remove_trailing_blanks): New constants.
26130         (fixfile): Use them to normalize spacing a bit in copied files.
26131         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
26132         Normalize leading white space and remove trailing white space.
26133
26134         * config/texinfo.tex: Sync with texinfo.
26135
26136         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
26137         strtoul.c from libc, to merge coreutils whitespace changes.
26138
26139         * config/srclist.txt: Get the following m4 files from gettext:
26140         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
26141         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
26142         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
26143         wint_t.m4.
26144
26145 2003-08-12  Karl Berry  <karl@gnu.org>
26146
26147         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
26148         been made.
26149
26150 2003-08-11  Paul Eggert  <eggert@twinsun.com>
26151
26152         * modules/gnu-source, m4/gnu-source.m4:
26153         Remove; we're assuming Autoconf 2.54 or later now.
26154         Suggested by Bruno Haible.
26155         * MODULES.html.sh (func_all_modules): Remove gnu-source.
26156
26157 2003-08-11  Bruno Haible  <bruno@clisp.org>
26158
26159         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
26160
26161 2003-08-11  Bruno Haible  <bruno@clisp.org>
26162
26163         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
26164         (vasnprintf): Use it instead of wcslen.
26165
26166 2003-08-11  Bruno Haible  <bruno@clisp.org>
26167
26168         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
26169         value to ensure that _Bool promotes to int. Use #define for _Bool when
26170         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
26171
26172 2003-08-10  Karl Berry  <karl@gnu.org>
26173
26174         * lib/regex.h: update from libc (whitespace fix).
26175
26176 2003-08-09  Paul Eggert  <eggert@twinsun.com>
26177
26178         Merge some files from coreutils.  These changes were
26179         originally made by Jim Meyering.
26180         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
26181         many older Unixes require this.
26182         * lib/alloca.c (alloca): Remove cast to argument of free;
26183         no longer needed in C89.
26184         * lib/alloca_.h, regex.h: Fix white space to match
26185         what GNU indent does.
26186
26187 2003-08-09  Paul Eggert  <eggert@twinsun.com>
26188
26189         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
26190         apparently Emacs's Unicode mode got confused before my 2003-08-05
26191         checkin.
26192
26193 2003-08-08  Paul Eggert  <eggert@twinsun.com>
26194
26195         * m4/extensions.m4: New file.
26196         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
26197         Require gl_USE_SYSTEM_EXTENSIONS.
26198         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
26199         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
26200
26201 2003-08-08  Paul Eggert  <eggert@twinsun.com>
26202
26203         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
26204         * modules/extensions, modules/gnu-source: New files.
26205         * modules/timespec, modules/unlocked-io: Depend on extensions.
26206
26207 2003-08-07  Paul Eggert  <eggert@twinsun.com>
26208
26209         * modules/restrict: New file.
26210         * MODULES.html.sh (func_all_modules): Add restrict.
26211         * modules/regex: Depend on restrict.
26212
26213 2003-08-07  Paul Eggert  <eggert@twinsun.com>
26214
26215         * m4/restrict.m4: New file.
26216         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
26217
26218 2003-08-07  Bruno Haible  <bruno@clisp.org>
26219
26220         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
26221         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
26222
26223 2003-08-07  Bruno Haible  <bruno@clisp.org>
26224
26225         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
26226         makes the module 'getndelim2' compatible with the module 'getline'.
26227
26228 2003-08-05  Paul Eggert  <eggert@twinsun.com>
26229
26230         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
26231         byte with "\201" to avoid glitches when editing that source file
26232         with multi-gnome-terminal.
26233
26234 2003-08-05  Paul Eggert  <eggert@twinsun.com>
26235
26236         * lib/bumpalloc.h: Remove.
26237
26238 2003-08-05  Paul Eggert  <eggert@twinsun.com>
26239
26240         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
26241         * modules/bumpalloc: Remove.
26242
26243 2003-08-04  Paul Eggert  <eggert@twinsun.com>
26244
26245         * lib/getloadavg.c: Change copyright notice and spacing to conform to
26246         GNU coding style.
26247
26248         Merge from coreutils.
26249         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
26250         1. From glibc.
26251         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
26252         from Karl Berry, implemented by Jim Meyering.
26253         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
26254         from Dmitry V. Levin.
26255         Remove anachronistic cast of xrealloc.
26256         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
26257         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
26258         type. Otherwise, it wouldn't compile with at least /bin/cc on
26259         ymp-cray-unicos9.0.2.X.
26260         Combine two mostly-identical uses of alloca into one.
26261         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
26262
26263 2003-08-04  Dave Love  <d.love@dl.ac.uk>
26264
26265         [From Emacs.]
26266
26267         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
26268         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
26269         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
26270         obsolete NLIST_NAME_UNION.
26271         [__GNU__]: Undef BSD and FSCALE.
26272         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
26273
26274 2003-08-03  Paul Eggert  <eggert@twinsun.com>
26275
26276         * lib/stdbool_.h (_Bool): Make it signed char, instead of
26277         an enum type, so that it's guaranteed to promote to int.  See:
26278         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
26279
26280 2003-08-03  Karl Berry  <karl@gnu.org>
26281
26282         * config/depcomp: update from automake.
26283
26284 2003-07-31  Paul Eggert  <eggert@twinsun.com>
26285
26286         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
26287         (strerror): Don't assume that a printable int fits in 14 bytes.
26288
26289 2003-07-31  Bruno Haible  <bruno@clisp.org>
26290
26291         * modules/getpass-gnu: New file.
26292         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
26293
26294 2003-07-31  Bruno Haible  <bruno@clisp.org>
26295
26296         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
26297
26298 2003-07-24  Karl Berry  <karl@gnu.org>
26299
26300         * config/missing: update from automake.
26301
26302 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
26303             Bruno Haible  <bruno@clisp.org>
26304
26305         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
26306         * lib/getline.c (getline, getdelim): Likewise.
26307         Remove _GNU_SOURCE define; now it's defined in config.h through
26308         m4/getline.m4.
26309
26310 2003-07-23  Karl Berry  <karl@gnu.org>
26311
26312         * config/config.sub: update from prep.
26313
26314 2003-07-22  Paul Eggert  <eggert@twinsun.com>
26315
26316         * modules/xalloc (Depends-on): Add exitfail.
26317         * modules/xmemcoll: Likewise.
26318
26319 2003-07-22  Paul Eggert  <eggert@twinsun.com>
26320
26321         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
26322         over-parenthesization in macros.
26323
26324         Sync with coreutils.
26325
26326         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
26327         required by C99.
26328
26329         Use `exit_failure' for xalloc and xmemcoll instead of their own
26330         private exit-failure variables.
26331         * lib/xalloc.h (xalloc_exit_failure): Remove.
26332         * lib/xmalloc.c: Likewise.  Include exitfail.h.
26333         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
26334         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
26335         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
26336         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
26337
26338 2003-07-20  Jim Meyering  <jim@meyering.net>
26339
26340         * modules/closeout (Depends-on): Add exitfail.
26341         Suggestion from Bruno Haible.
26342
26343 2003-07-19  Karl Berry  <karl@gnu.org>
26344
26345         * config/config.sub: update from prep.
26346
26347 2003-07-18  Paul Eggert  <eggert@twinsun.com>
26348
26349         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
26350         Remove.
26351         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
26352         to test that it can stand by itself.  Include "exitfail.h".
26353         Clients should set exit_failure instead.
26354         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
26355
26356 2003-07-18  Bruno Haible  <bruno@clisp.org>
26357
26358         * modules/getndelim2: New file.
26359         * modules/getline: Share files with module getndelim2.
26360         * modules/getnline: Depend on getndelim2 instead of sharing files with
26361         it. Add getnline.c to lib_SOURCES.
26362         * MODULES.html.sh (func_all_modules): Add getndelim2.
26363
26364 2003-07-18  Bruno Haible  <bruno@clisp.org>
26365
26366         * m4/getndelim2.m4: New file.
26367         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
26368         invoke gl_PREREQ_GETNDELIM2.
26369         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
26370         gl_PREREQ_GETNDELIM2.
26371         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
26372         gl_GETNDELIM2.
26373
26374 2003-07-18  Bruno Haible  <bruno@clisp.org>
26375
26376         * lib/getndelim2.h: New file.
26377         * lib/getndelim2.c: Make into a module of its own. Include config.h,
26378         getndelim2.h.
26379         (getndelim2): Make non-static. Change return type to ssize_t.
26380         * lib/getline.h: Change argument names.
26381         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
26382         * lib/getnline.c: Include getndelim2.h.
26383
26384 2003-07-18  Andreas Schwab  <schwab@suse.de>
26385
26386         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
26387
26388 2003-07-17  Karl Berry  <karl@gnu.org>
26389
26390         * config/config.sub: update from prep.
26391
26392 2003-07-17  Bruno Haible  <bruno@clisp.org>
26393
26394         * modules/getnline: New file.
26395         * modules/getline: Add lib/getndelim2.c to source file list.
26396         * MODULES.html.sh (func_all_modules): Add getnline.
26397
26398 2003-07-17  Bruno Haible  <bruno@clisp.org>
26399
26400         * m4/getnline.m4: New file.
26401
26402 2003-07-17  Bruno Haible  <bruno@clisp.org>
26403
26404         * m4/Makefile.am.in: Remove file.
26405         * m4/Makefile.am: Remove file.
26406         * m4/Makefile.in: Remove file.
26407
26408 2003-07-17  Bruno Haible  <bruno@clisp.org>
26409
26410         * lib/getnline.h: New file.
26411         * lib/getnline.c: New file.
26412         * lib/getndelim2.c: New file, extracted from getline.c.
26413         (getndelim2): Renamed from getdelim2, with added nmax argument.
26414         * lib/getline.c: Include getndelim2.c.
26415         (getdelim2): Moved out to getndelim2.c.
26416         (getline, getdelim): Update.
26417
26418 2003-07-17  Bruno Haible  <bruno@clisp.org>
26419
26420         * lib/Makefile.am: Remove file.
26421         * lib/Makefile.in: Remove file.
26422
26423 2003-07-17  Bruno Haible  <bruno@clisp.org>
26424
26425         * configure.in: Remove file.
26426         * Makefile.in: Remove file.
26427
26428 2003-07-17  Bruno Haible  <bruno@clisp.org>
26429
26430         * MODULES.html.sh: Put the </BODY> right before </HTML>.
26431
26432 2003-07-16  Karl Berry  <karl@gnu.org>
26433
26434         * config/srclist-update: was running fixlicense twice, which caused
26435                 texinfo.tex to be nullified for some reason.  Simplify,
26436                 $gplsrc is no longer needed as far as I can see?
26437
26438 2003-07-16  Jim Meyering  <jim@meyering.net>
26439
26440         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
26441
26442 2003-07-15  Paul Eggert  <eggert@twinsun.com>
26443
26444         * config/srclist.txt: Get the following files from gettext-runtime/intl
26445         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
26446         ref-del.sin.  From Bruno Haible.
26447         * config/srclist-update (fixfile): Change grep pattern again, since the
26448         previous fix didn't work (there was another trailing $).  Use
26449         '[$]' to escape the $s.
26450
26451 2003-07-15  Karl Berry  <karl@gnu.org>
26452
26453         * lib/vasnprintf.c: update from gettext.
26454
26455 2003-07-15  Karl Berry  <karl@gnu.org>
26456
26457         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
26458         gets expanded when surrounded by '$'.
26459
26460 2003-07-15  Jim Meyering  <jim@meyering.net>
26461
26462         * modules/save-cwd: Don't depend on error.  From Derek Price.
26463
26464 2003-07-15  Jim Meyering  <jim@meyering.net>
26465
26466         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
26467
26468 2003-07-14  Simon Josefsson  <jas@extundo.com>
26469
26470         * modules/mempcpy: New file.
26471         * MODULES.html.sh (func_all_modules): Add mempcpy.
26472
26473 2003-07-14  Simon Josefsson  <jas@extundo.com>
26474
26475         * m4/mempcpy.m4: New file.
26476
26477 2003-07-14  Simon Josefsson  <jas@extundo.com>
26478
26479         * lib/mempcpy.h: New file.
26480         * lib/mempcpy.c: New file.
26481
26482 2003-07-14  Paul Eggert  <eggert@twinsun.com>
26483
26484         * modules/getdate, modules/posixtm: Depend on mktime.
26485
26486 2003-07-14  Paul Eggert  <eggert@twinsun.com>
26487
26488         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
26489         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
26490         unicodeio.c, unicodeio.h, unlocked-io.h:
26491         Switch from LGPL to GPL.
26492
26493 2003-07-14  Paul Eggert  <eggert@twinsun.com>
26494
26495         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
26496         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
26497         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
26498         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
26499         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
26500         updated automatically by ../config/srclist-update.  This changes
26501         their license from LPGL to GPL.
26502
26503 2003-07-14  Paul Eggert  <eggert@twinsun.com>
26504
26505         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
26506         assumed to refer to the root of the most recent stable gettext version.
26507         * config/srclistvars.sh: Add defaults for eggert.
26508         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
26509         Match "This program" as well as "The program".  This is needed
26510         for gettext.
26511
26512 2003-07-14  Jim Meyering  <jim@meyering.net>
26513
26514         Don't emit diagnostics.  Let callers do that.
26515         * lib/save-cwd.c: Don't include "error.h".
26516         (save_cwd): Don't call error.  Ensure that errno is valid
26517         when returning nonzero.
26518
26519         * lib/save-cwd.h (restore_cwd): Update prototype.
26520         * lib/save-cwd.c (restore_cwd): Remove two parameters.
26521         Simplify.  Don't call error upon failure.  Let callers do that.
26522         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
26523         when auditing is enabled.  But don't bother updating the #if.
26524
26525 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
26526
26527         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
26528         it breaks C++ compilation.
26529         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
26530
26531 2003-07-10  Simon Josefsson  <jas@extundo.com>
26532
26533         * modules/strchrnul (Makefile.am): Add strchrnul.h.
26534
26535 2003-07-10  Jim Meyering  <jim@meyering.net>
26536
26537         * m4/clock_time.m4: Remove trailing blank.
26538         * m4/intmax_t.m4: Likewise.
26539
26540 2003-07-10  Jim Meyering  <jim@meyering.net>
26541
26542         * lib/vasnprintf.c: Remove trailing blanks.
26543         Make cpp indentation consistent.
26544
26545 2003-07-09  Paul Eggert  <eggert@twinsun.com>
26546
26547         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
26548         posixver.c, strftime.c, strnlen.c, strverscmp.c:
26549         Switch from LGPL to GPL.
26550
26551 2003-07-09  Paul Eggert  <eggert@twinsun.com>
26552
26553         * config/srclist.txt: Sort sublists.  Add
26554         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
26555         that differ from gnulib for one reason or another; we'd like this list
26556         to be smaller but for now let's document what we have.
26557
26558 2003-07-08  Paul Eggert  <eggert@twinsun.com>
26559
26560         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
26561         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
26562         and sweeter "eval x=$x".
26563         * config/srclist.txt: Get lib/argp* from glibc.
26564
26565 2003-07-07  Paul Eggert  <eggert@twinsun.com>
26566
26567         * lib/mktime.c: Fix some boundary cases and remove need for floating
26568         point.
26569
26570         Issue a compile-time diagnostic if time_t is floating point, or if
26571         two's complement arithmetic is not in effect, or if arithmetic
26572         right shift does not propagate the sign.  These assumptions were
26573         all in the original code but they weren't checked.
26574
26575         (TIME_T_MIDPOINT, verify): New macros.
26576         (__isleap): Remove; it has integer overflow problems.
26577         (leapyear): New function, without those problems.
26578         (ydhms_tm_diff): Remove; splitting into two parts.
26579         (ydhms_diff): New function, containing the arithmetic part of
26580         the old ydhms_tm_diff function.  Issue a compile-time
26581         diagnostic if we are not using C99 integer division.
26582         Avoid casts when possible.
26583         (guess_time_tm): New function, containing the checking part of
26584         the old ydhms_tm_diff function.  Return the new value, rather than
26585         the difference between it and the old.  Accept a new argument T
26586         so that *T specifies the old value.  Check for overflow in the result.
26587
26588         (__mktime_internal): Use a time_t offset, not a long int offset.
26589         This undoes the 2003-06-04 change, which is no longer needed now
26590         that we have better overflow checking.
26591         (localtime_offset): Likewise.
26592
26593         (__mktime_internal): Avoid harmful overflow on hosts where time_t
26594         and long are 64-bit but int is only 32-bit.
26595         (ydhms_diff): Use long int to store year1 and yday1.
26596         Issue a compile-time diagnostic if long int is not wide enough.
26597
26598         (__mktime_internal): Use long int to store adjusted year and yday.
26599         Use plain C rather than preprocessor commands, if that doesn't
26600         affect efficiency.
26601         Check for overflow (and try to repair) after each probe
26602         rather than checking only at the very end.  This avoids some bugs
26603         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
26604         does not equal GMT offset at maximum time).
26605         Use integer to check for overflow rather than floating point; this
26606         is more portable to non-IEEE hosts, and is a tad faster.
26607         When we detect that we are oscillating between two values,
26608         don't check whether tm_isdst has the requested value, since
26609         we already know the answer.  When tm_isdst has the wrong value,
26610         use a different heuristic to find the right one, based on the
26611         extreme values actually observed in practice in tz2003a,
26612         rather than the (overly optimistic) "previous 3 calendar quarters".
26613
26614         (not_equal_tm, print_tm, check_result): Use "const T" rather than
26615         "T const" to accommodate glibc style.
26616         (check_result): Use less-confusing report format.  "long" -> "long int.
26617         (main): Likewise.
26618         Don't loop if the iteration overflows time_t.
26619         Allow a negative step in the iteration.
26620
26621 2003-07-06  Karl Berry  <karl@gnu.org>
26622
26623         * config/depcomp: update from automake.
26624         * config/config.sub: update from prep.
26625
26626 2003-07-03  Karl Berry  <karl@gnu.org>
26627
26628         * config/config.guess: update from prep.
26629
26630 2003-07-01  Paul Eggert  <eggert@twinsun.com>
26631
26632         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
26633         xreadlink.c now includes it unconditionally.
26634
26635 2003-07-01  Paul Eggert  <eggert@twinsun.com>
26636
26637         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
26638         having it depend on HAVE_SYS_TYPES_H.
26639
26640 2003-07-01  Bruno Haible  <bruno@clisp.org>
26641
26642         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
26643         <sys/types.h> should be sufficient.
26644         Reported by Paul Eggert.
26645
26646 2003-06-26  Karl Berry  <karl@gnu.org>
26647
26648         * config/depcomp: update from automake.
26649
26650 2003-06-26  Bruno Haible  <bruno@clisp.org>
26651
26652         * modules/human: Depend on module stdbool.
26653
26654 2003-06-25  Bruno Haible  <bruno@clisp.org>
26655
26656         * modules/readlink: New file.
26657         * modules/xreadlink: Depend on it.
26658         * MODULES.html.sh (func_all_modules): Add readlink.
26659
26660 2003-06-25  Bruno Haible  <bruno@clisp.org>
26661
26662         * m4/readlink.m4: New file.
26663
26664 2003-06-25  Bruno Haible  <bruno@clisp.org>
26665
26666         * lib/readlink.c: New file.
26667
26668 2003-06-22  Karl Berry  <karl@gnu.org>
26669
26670         * config/srclist.txt: update mkinstalldirs from automake.
26671         * config/mkinstalldirs: update.
26672
26673 2003-06-22  Bruno Haible  <bruno@clisp.org>
26674
26675         Portability to mingw32.
26676         * m4/ssize_t.m4: New file, from GNU gettext.
26677         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
26678         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
26679
26680 2003-06-22  Bruno Haible  <bruno@clisp.org>
26681
26682         * modules/safe-read: Add m4/ssize_t.m4.
26683         * modules/xreadlink: Add m4/ssize_t.m4.
26684
26685 2003-06-20  Bruno Haible  <bruno@clisp.org>
26686
26687         Assume C89, so PARAMS isn't needed.
26688         * lib/unicodeio.h (PARAMS): Remove.
26689         * lib/unicodeio.c: Don't use PARAMS.
26690
26691 2003-06-18  Karl Berry  <karl@gnu.org>
26692
26693         * config/config.{guess,sub}: update from prep.
26694
26695 2003-06-18  Jim Meyering  <jim@meyering.net>
26696
26697         Merge changes from coreutils.
26698         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
26699         Remove explicit declarations of xmalloc and realloc.
26700         Include xalloc.h.
26701         (read_utmp): Remove anachronistic cast of xmalloc.
26702
26703 2003-06-17  Paul Eggert  <eggert@twinsun.com>
26704
26705         Assume C89, so PARAMS isn't needed.
26706         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
26707         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
26708         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
26709         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
26710         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
26711         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
26712         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
26713         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
26714         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
26715         lib/xstrtod.h, lib/xstrtol.h: Likewise.
26716         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
26717         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
26718         no longer needed. Anyway, config.h should always be included before any
26719         other file.
26720
26721 2003-06-11  Simon Josefsson  <jas@extundo.com>
26722
26723         * modules/sysexits: New file.
26724         * MODULES.html.sh (func_all_modules): Add sysexits.
26725
26726 2003-06-11  Simon Josefsson  <jas@extundo.com>
26727
26728         * lib/sysexit_.h: New file.
26729
26730 2003-06-11  Derek Price  <derek@ximbiot.com>
26731
26732         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
26733         necessary.
26734
26735 2003-06-11  Bruno Haible  <bruno@clisp.org>
26736
26737         * m4/sysexits.m4: New file.
26738
26739 2003-06-10  Simon Josefsson  <jas@extundo.com>
26740
26741         * lib/argp.h: New file, from glibc.
26742         * lib/argp-ba.c: New file, from glibc.
26743         * lib/argp-eexst.c: New file, from glibc.
26744         * lib/argp-fmtstream.c: New file, from glibc.
26745         * lib/argp-fmtstream.h: New file, from glibc.
26746         * lib/argp-fs-xinl.c: New file, from glibc.
26747         * lib/argp-help.c: New file, from glibc.
26748         * lib/argp-namefrob.h: New file, from glibc.
26749         * lib/argp-parse.c: New file, from glibc.
26750         * lib/argp-pv.c: New file, from glibc.
26751         * lib/argp-pvh.c: New file, from glibc.
26752         * lib/argp-xinl.c: New file, from glibc.
26753
26754 2003-06-10  Simon Josefsson  <jas@extundo.com>
26755
26756         * modules/strchrnul: New file.
26757
26758 2003-06-10  Simon Josefsson  <jas@extundo.com>
26759
26760         * modules/argp: New file.
26761
26762 2003-06-10  Simon Josefsson  <jas@extundo.com>
26763
26764         * m4/strchrnul.m4: New file.
26765
26766 2003-06-10  Simon Josefsson  <jas@extundo.com>
26767
26768         * lib/strchrnul.h: New file.
26769         * lib/strchrnul.c: New file.
26770
26771 2003-06-10  Bruno Haible  <bruno@clisp.org>
26772
26773         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
26774
26775 2003-06-07  Karl Berry  <karl@gnu.org>
26776
26777         * config/config.{guess,sub}: update from prep.
26778
26779 2003-06-07  Jim Meyering  <jim@meyering.net>
26780
26781         * modules/strtod: Use $(...) notation, not @...@ for
26782         AC_REPLACE'd variables.
26783         * modules/localcharset: Likewise.
26784
26785 2003-06-07  Jim Meyering  <jim@meyering.net>
26786
26787         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
26788         in place of my name in the copyright comment.
26789         Remove definition and uses of __P.
26790
26791         From coreutils.
26792         * lib/stat.c: Don't declare xmalloc explicitly.
26793         Instead, include "xalloc.h".
26794         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
26795         xrealloc, and xcalloc return values.
26796         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
26797         Improve comment.
26798         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
26799
26800 2003-06-07  Bruno Haible  <bruno@clisp.org>
26801
26802         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
26803         avoid AC_CONFIG_LINKS.
26804         * modules/fnmatch (Makefile.am): Use explicit creation rule for
26805         fnmatch.h, to avoid AC_CONFIG_LINKS.
26806         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
26807
26808 2003-06-07  Bruno Haible  <bruno@clisp.org>
26809
26810         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
26811         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
26812         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
26813         directory.
26814         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
26815         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
26816         directory.
26817
26818 2003-06-06  Jim Meyering  <jim@meyering.net>
26819
26820         Merge from coreutils.
26821         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
26822         Consolidate declarations and initializations of *_base* locals.
26823
26824         Merge from coreutils.
26825         This avoids a core dump on systems without GNU putenv,
26826         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
26827         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
26828         (unsetenv): New static function, from GNU libc.
26829         (rpl_putenv): Use it.
26830
26831         * lib/modechange.c: Remove trailing blanks.
26832
26833         Merge from coreutils.
26834         * lib/fsusage.c: Remove declaration of statfs.
26835         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
26836
26837         * lib/posixtm.c: Include <stdbool.h> unconditionally.
26838
26839 2003-06-06  Jim Meyering  <jim@meyering.net>
26840
26841         * lib/stdbool_.h: Renamed from stdbool.h.in.
26842
26843 2003-06-06  Jim Meyering  <jim@meyering.net>
26844             Bruno Haible  <bruno@clisp.org>
26845
26846         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
26847         Adjust Makefile.am snippet not to redirect directly to target.
26848         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
26849
26850 2003-06-05  Paul Eggert  <eggert@twinsun.com>
26851
26852         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
26853         mismatch, look in future quarters as well as past.  This fixes a
26854         bug when processing fall-backwards gaps immediately after a long
26855         period of daylight-saving time.
26856
26857         * lib/mktime.c: Assume freestanding C89 or better.
26858         (HAVE_LIMITS_H): Remove.  Assume it's 1.
26859         (__P): Remove; not used.
26860         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
26861         (mktime, not_equal_tm, print_tm, check_result,
26862         main): Use prototypes.  Use const * where appropriate.
26863         (main): Fix typo in testing code that uncovered by above changes.
26864         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
26865
26866 2003-06-04  Paul Eggert  <eggert@twinsun.com>
26867
26868         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
26869         locale.h, localeconv.  This merges changes from coreutils.
26870
26871         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
26872         It can be removed after the next Autoconf is released.
26873         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
26874         needed.
26875
26876 2003-06-04  Paul Eggert  <eggert@twinsun.com>
26877
26878         * lib/mktime.c: Fix Debian bug 177940
26879         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
26880         (localtime_offset): Now long int, not time_t, because we want it
26881         to be guaranteed to be signed.  All uses changed.
26882         (__mktime_internal): If overflow would occur when adding offset,
26883         don't add it.
26884
26885         Merge 'human' changes from coreutils.  Rewrite to support
26886         locale-specific notations like thousands separators.
26887         * lib/human.c: Simplify authorship notice.
26888         Include human.h immediately after config.h.
26889         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
26890         <limits.h>: Do not include, since human.h does.
26891         (SIZE_MAX, UINTMAX_MAX): New macros.
26892         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
26893         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
26894         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
26895         (power_letter): Renamed from suffixes.
26896         (generate_suffix_backwards): Remove.
26897         (adjust_value): Now takes int style (because of human.h changes)
26898         and long double value (for greater precision on some platforms).
26899         (group_number): New function.
26900         (human_readable): Use it.  Use integer options, not enum.
26901         Put the options before the sizes in the arg list.
26902         Support all the new options.
26903         The old human_readable function has been removed;
26904         use inttostr.h instead.
26905         (human_readable, default_block_size, humblock):
26906         Use uintmax_t, not int, for block sizes.
26907         (human_readable_inexact, block_size_types): Remove.
26908         (block_size_opts): New constant.
26909         (human_options): Renamed from human_block_size, with new signature
26910         that allows block sizes up to UINTMAX_MAX.  All callers changed.
26911         * lib/human.h: Add copyright and authorship notice.
26912         Include <limits.h> and <stdbool.h> unconditionally.
26913         (PARAMS): Remove.  All uses removed.
26914         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
26915         (enum human_inexact_style): Remove tag; now a nameless enum.
26916         (human_floor, human_ceiling, human_round_to_even): Now have
26917         values 2, 0, 1 rather than -1, 1, 0.
26918         (human_group_digits, human_suppress_point_zero, human_autoscale,
26919         human_base_1024, human_SI, human_B): New constants.
26920         (human_readable_inexact, human_block_size): Remove.
26921         (human_readable): Size args are now uintmax_t, not int.
26922         (human_options): New decl.
26923
26924         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
26925         unnecessary now that we assume C89 or better.  This change
26926         imported from coreutils.
26927
26928         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
26929         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
26930         in the 2003-05-30 sync from glibc.
26931
26932         .h files should stand alone, but we shouldn't include <sys/types.h>
26933         if we can get away with just <stddef.h>.
26934
26935         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
26936         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
26937         rather than <sys/types.h>, as we merely need size_t.
26938         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
26939         to get size_t.
26940         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
26941         Include <stdio.h>, to get FILE.
26942         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
26943         memcasecmp.h has included <stddef.h> and all we need is size_t.
26944         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
26945         our interface, instead of including <sys/types.h>
26946
26947 2003-06-04  Paul Eggert  <eggert@twinsun.com>
26948
26949         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
26950         now, as glibc mktime is buggy on non-glibc systems.
26951
26952 2003-06-03  Karl Berry  <karl@gnu.org>
26953
26954         * config/config.sub: update from prep.
26955
26956 2003-06-02  Paul Eggert  <eggert@twinsun.com>
26957
26958         [from coreutils]
26959         Fix some minor time-related bugs with POSIX time arguments.
26960         Some valid time stamps were being rejected (notably -1, and
26961         time stamps before 1900 on 64-bit hosts).  And some invalid
26962         time stamps were being accepted, e.g. September 31.
26963
26964         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
26965         that we can return (time_t) -1 successfully.
26966         * lib/posixtm.c: Likewise.
26967         [HAVE_STDBOOL_H]: Include <stdbool.h>.
26968         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
26969         (t): Remove static var.
26970         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
26971         of static var.  All uses changed.
26972         (year): Do not reject years before 1900; they can occur with
26973         64-bit time_t.
26974         (posix_time_parse): Do not check for out-of-range components;
26975         that is now the caller's responsibility, since our checks were
26976         only approximations.
26977         (posixtime): Use mktime to check for out-of-range components,
26978         since it knows them exactly.
26979         If mktime returns (time_t) -1, check whether an error actually occurred
26980         by invoking localtime on -1.
26981         (main) [TEST_POSIXTIME]: Check for input data errors, and report
26982         posixtime failures better.
26983         Improve the test data (in comments only).
26984
26985 2003-06-02  Karl Berry  <karl@gnu.org>
26986
26987         * config/mkinstalldirs (version): new variable.
26988         (--version): new option.
26989         (usage): improve message.
26990
26991 2003-05-30  Karl Berry  <karl@gnu.org>
26992
26993         * lib/mktime.c: update from libc.
26994
26995 2003-05-30  Bruno Haible  <bruno@clisp.org>
26996
26997         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
26998         * config/config.rpath: Upgrade to gettext-0.12.1.
26999
27000 2003-05-30  Bruno Haible  <bruno@clisp.org>
27001
27002         * m4/gettext.m4: Upgrade to gettext-0.12.1.
27003         * m4/nls.m4: New file, from gettext-0.12.1.
27004         * m4/po.m4: New file, from gettext-0.12.1.
27005         * m4/progtest.m4: Upgrade to gettext-0.12.1.
27006
27007 2003-05-30  Bruno Haible  <bruno@clisp.org>
27008
27009         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
27010         * lib/localcharset.h: Likewise.
27011         * lib/localcharset.c: Likewise.
27012
27013 2003-05-29  Karl Berry  <karl@gnu.org>
27014
27015         * config/config.rpath: update from gettext.
27016
27017 2003-05-28  Paul Eggert  <eggert@twinsun.com>
27018
27019         Assume the headers required for C89 freestanding compilers.
27020         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
27021         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
27022         * m4/human.m4 (gl_HUMAN): Likewise.
27023         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
27024         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
27025         * m4/userspec.m4 (gl_USERSPEC): Likewise.
27026         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
27027         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
27028         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
27029
27030 2003-05-28  Paul Eggert  <eggert@twinsun.com>
27031
27032         Assume the headers required for C89 freestanding compilers.
27033         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
27034         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
27035         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
27036         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
27037         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
27038         define, since <limits.h> is guaranteed to do that.
27039         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
27040         * lib/exclude.c: Include <stdbool.h> unconditionally.
27041         * lib/tempname.c: Include <stddef.h> unconditionally.
27042         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
27043         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
27044         <stddef.h> does that.
27045         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
27046         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
27047         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
27048         needed.
27049         * lib/xstrtol.c: Likewise.
27050         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
27051         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
27052
27053         * lib/addext.c (addext): Use assignment rather than cast, to avoid
27054         warnings on some platforms.
27055
27056         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
27057         arbitrarily.
27058
27059 2003-05-26  Jim Meyering  <jim@meyering.net>
27060
27061         Merge in a change from coreutils:
27062         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
27063         that is guaranteed to be `no'.  Use `no_such_member' to indicate
27064         that condition, rather than `-1' which is slightly misleading.
27065         Change the name of the cache variable to have the gl_ prefix.
27066         Prompted by a patch from Richard Dawe for DJGPP.
27067
27068 2003-05-24  Karl Berry  <karl@gnu.org>
27069
27070         * config/config.guess: update from prep.
27071
27072 2003-05-22  Karl Berry  <karl@gnu.org>
27073
27074         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
27075
27076 2003-05-20  Karl Berry  <karl@gnu.org>
27077
27078         * config/config.guess: update from prep.
27079
27080 2003-05-18  Karl Berry  <karl@gnu.org>
27081
27082         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
27083         might actually be set by the user.
27084
27085         * config/depcomp, install-sh, mdate-sh: update from automake.
27086
27087 2003-05-17  Bruno Haible  <bruno@clisp.org>
27088
27089         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
27090         invalid expansion for AC_EGREP_CPP.
27091         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
27092         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
27093         Suggested by Akim Demaille <akim@epita.fr> in
27094         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
27095
27096 2003-05-12  Jim Meyering  <jim@meyering.net>
27097
27098         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
27099         the space-padded-by-default conversion specifiers, %e, %k, %l.
27100
27101 2003-05-12  Bruno Haible  <bruno@clisp.org>
27102
27103         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
27104         the string is longer than 4 KB.
27105
27106 2003-05-11  Karl Berry  <karl@gnu.org>
27107
27108         * config/config.{guess,sub}: update from prep.
27109
27110 2003-05-09  Bruno Haible  <bruno@clisp.org>
27111
27112         * modules/error: Add m4/strerror_r.m4 to file list.
27113
27114 2003-05-03  Bruno Haible  <bruno@clisp.org>
27115
27116         Upgrade to Unicode-4.0.
27117         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
27118         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
27119         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
27120         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
27121         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
27122         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
27123         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
27124         Change width of U+E0100..U+E01EF from 1 to 0.
27125
27126 2003-04-25  Jim Meyering  <jim@meyering.net>
27127
27128         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
27129         of type size_t, not int.
27130
27131 2003-04-25  Bruno Haible  <bruno@clisp.org>
27132
27133         * lib/copy-file.c: Include <stddef.h>, for size_t.
27134
27135 2003-04-21  Paul Eggert  <eggert@twinsun.com>
27136
27137         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
27138         code which expansion is under static control.  Patch imported from
27139         Akim Demaille's patch to Bison; see
27140         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
27141
27142 2003-04-14  Bruno Haible  <bruno@clisp.org>
27143
27144         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
27145
27146 2003-04-11  Jim Meyering  <jim@meyering.net>
27147
27148         Merge changes from Coreutils.
27149
27150         2003-03-22  Jim Meyering  <jim@meyering.net>
27151
27152         * lib/strftime.c (widen): Cast alloca return value to proper type.
27153
27154         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
27155
27156         From GNU libc.
27157         * lib/strftime.c (my_strftime): Handle very large width
27158         specifications for numeric values correctly.  Improve checks for
27159         overflow.
27160
27161         2003-01-19  Jim Meyering  <jim@meyering.net>
27162
27163         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
27164         definitions.
27165         (nl_get_alt_digit) [! defined my_strftime]: Define.
27166         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
27167         _nl_get_alt_digit and _nl_get_walt_digit.
27168
27169         * lib/strftime.c (my_strftime): Merge in locale-related changes from
27170         libc. These changes have no effect outside of _LIBC.
27171
27172 2003-04-10  Bruno Haible  <bruno@clisp.org>
27173
27174         * modules/findprog: New file.
27175         * MODULES.html.sh (func_all_modules): Add it.
27176
27177 2003-04-10  Bruno Haible  <bruno@clisp.org>
27178
27179         * m4/findprog.m4: New file.
27180         * m4/eaccess.m4: New file.
27181
27182 2003-04-10  Bruno Haible  <bruno@clisp.org>
27183
27184         * lib/findprog.h: New file, from GNU gettext.
27185         * lib/findprog.c: New file, from GNU gettext.
27186
27187 2003-04-05  Jim Meyering  <jim@meyering.net>
27188
27189         Merge changes from Coreutils.
27190
27191         * lib/exclude.h (PARAMS): Remove definition and uses.
27192         * lib/exclude.c: Remove uses of `PARAMS'.
27193
27194         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
27195         Add test-cases for DOS filenames. Declare program_name.
27196         (main): Set up program_name.  Patch by Rich Dawe.
27197
27198         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
27199         error from mntctl.
27200         Use mntctl's return value to drive the entry-processing loop, since
27201         we can't rely on the value of the vmt_length member in the last
27202         entry.  On some systems doing so could result in exhausting
27203         virtual memory.  Based in part on a patch from Mike Jetzer.
27204
27205 2003-04-04  Bruno Haible  <bruno@clisp.org>
27206
27207         * modules/linebreak: New file.
27208         * MODULES.html.sh (func_all_modules): Add it.
27209
27210 2003-04-04  Bruno Haible  <bruno@clisp.org>
27211
27212         * m4/linebreak.m4: New file.
27213
27214 2003-04-04  Bruno Haible  <bruno@clisp.org>
27215
27216         * lib/linebreak.h: New file, from GNU gettext.
27217         * lib/linebreak.c: New file, from GNU gettext with slight
27218         modifications.
27219         * lib/lbrkprop.h: New file, from GNU gettext.
27220
27221 2003-04-03  Bruno Haible  <bruno@clisp.org>
27222
27223         * modules/utf8-ucs4: New file.
27224         * modules/utf16-ucs4: New file.
27225         * modules/ucs4-utf8: New file.
27226         * modules/ucs4-utf16: New file.
27227         * MODULES.html.sh (func_all_modules): Add them.
27228
27229 2003-04-03  Bruno Haible  <bruno@clisp.org>
27230
27231         * m4/utf-ucs4.m4: New file.
27232         * m4/ucs4-utf.m4: New file.
27233
27234 2003-04-03  Bruno Haible  <bruno@clisp.org>
27235
27236         * lib/utf8-ucs4.h: New file, from GNU gettext.
27237         * lib/utf16-ucs4.h: New file, from GNU gettext.
27238         * lib/ucs4-utf8.h: New file, from GNU gettext.
27239         * lib/ucs4-utf16.h: New file, from GNU gettext.
27240
27241 2003-04-02  Bruno Haible  <bruno@clisp.org>
27242
27243         * modules/binary-io: New file.
27244         * MODULES.html.sh (func_all_modules): Add it.
27245
27246 2003-04-02  Bruno Haible  <bruno@clisp.org>
27247
27248         * lib/binary-io.h: New file, from GNU gettext.
27249
27250 2003-04-01  Bruno Haible  <bruno@clisp.org>
27251
27252         * modules/pathname: New file.
27253         * MODULES.html.sh (func_all_modules): Add it.
27254
27255 2003-04-01  Bruno Haible  <bruno@clisp.org>
27256
27257         * lib/pathname.h: New file, from GNU gettext.
27258         * lib/concatpath.c: New file, from GNU gettext.
27259
27260 2003-03-30  Bruno Haible  <bruno@clisp.org>
27261
27262         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
27263
27264 2003-03-30  Bruno Haible  <bruno@clisp.org>
27265
27266         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
27267         function chown() doesn't exist.
27268
27269 2003-03-28  Bruno Haible  <bruno@clisp.org>
27270
27271         * modules/copy-file: New file.
27272         * MODULES.html.sh (func_all_modules): Add it.
27273
27274 2003-03-28  Bruno Haible  <bruno@clisp.org>
27275
27276         * m4/copy-file.m4: New file.
27277
27278 2003-03-28  Bruno Haible  <bruno@clisp.org>
27279
27280         * lib/copy-file.h: New file, from GNU gettext.
27281         * lib/copy-file.c: New file, from GNU gettext.
27282
27283 2003-03-18  Jim Meyering  <jim@meyering.net>
27284
27285         * lib/quote.c (quote_n): Fix typo in comment.
27286
27287 2003-03-18  Bruno Haible  <bruno@clisp.org>
27288
27289         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
27290         checking.
27291         * m4/onceonly_2_57.m4: Likewise.
27292
27293 2003-03-17  Bruno Haible  <bruno@clisp.org>
27294
27295         * m4/onceonly.m4: Require autoconf 2.54 or newer.
27296         (m4_quote): Remove macro.
27297         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
27298
27299 2003-03-14  Jim Meyering  <jim@meyering.net>
27300
27301         Merge changes from Coreutils.
27302         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
27303         to be const, in order to avoid warnings.
27304         (obstack_room): Likewise.
27305         (obstack_empty_p): Likewise.
27306
27307 2003-03-14  Bruno Haible  <bruno@clisp.org>
27308
27309         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
27310         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
27311
27312 2003-03-13  Paul Eggert  <eggert@twinsun.com>
27313
27314         Merge changes from Bison.
27315         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
27316         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
27317         when compiling Bison 1.875's `bitset bset = obstack_alloc
27318         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
27319         * lib/hash.c: Include <stdbool.h> unconditionally.
27320
27321 2003-03-13  Paul Eggert  <eggert@twinsun.com>
27322
27323         * m4/onceonly.m4 (m4_quote): New macro.
27324         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
27325         Quote AC_FOREACH variable-expansions properly.
27326
27327 2003-03-13  Paul Eggert  <eggert@twinsun.com>
27328
27329         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
27330
27331 2003-03-09  Paul Eggert  <eggert@twinsun.com>
27332
27333         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
27334         Reported by Bruce Becker; see:
27335         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
27336
27337 2003-03-03  Paul Eggert  <eggert@twinsun.com>
27338             Bruno Haible  <bruno@clisp.org>
27339
27340         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
27341         Reported by John Hughes, see
27342         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
27343
27344 2003-02-20  Bruno Haible  <bruno@clisp.org>
27345
27346         * MODULES.html.sh (func_all_modules): Add poll.
27347
27348 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
27349
27350         * modules/poll: New file.
27351
27352 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
27353
27354         * lib/poll_.h: New file.
27355         * lib/poll.c: New file.
27356
27357 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
27358
27359         * m4/poll.m4: New file.
27360
27361 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
27362
27363         * modules/mathl: New file.
27364
27365 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
27366
27367         * lib/mathl.h: New file.
27368         * lib/acosl.c: New file.
27369         * lib/asinl.c: New file.
27370         * lib/atanl.c: New file.
27371         * lib/ceill.c: New file.
27372         * lib/cosl.c: New file.
27373         * lib/expl.c: New file.
27374         * lib/floorl.c: New file.
27375         * lib/frexpl.c: New file.
27376         * lib/ldexpl.c: New file.
27377         * lib/logl.c: New file.
27378         * lib/sincosl.c: New file.
27379         * lib/sinl.c: New file.
27380         * lib/sqrtl.c: New file.
27381         * lib/tanl.c: New file.
27382         * lib/trigl.c: New file.
27383         * lib/trigl.h: New file.
27384
27385 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
27386
27387         * m4/mathl.m4: New file.
27388
27389 2003-02-18  Bruno Haible  <bruno@clisp.org>
27390
27391         * MODULES.html.sh (func_all_modules): Add mathl.
27392
27393 2003-02-17  Bruno Haible  <bruno@clisp.org>
27394
27395         * modules/mkdtemp: New module.
27396         * MODULES.html.sh (func_all_modules): Add it.
27397
27398 2003-02-17  Bruno Haible  <bruno@clisp.org>
27399
27400         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
27401
27402 2003-02-17  Bruno Haible  <bruno@clisp.org>
27403
27404         * lib/mkdtemp.h: New file, from GNU gettext.
27405         * lib/mkdtemp.c: New file, from GNU gettext.
27406
27407 2003-02-02  Jim Meyering  <jim@meyering.net>
27408
27409         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
27410         e.g. glibc-2.2.93.
27411
27412 2003-01-31  Bruno Haible  <bruno@clisp.org>
27413
27414         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
27415         'rpl_rename'.
27416         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
27417         'rpl_strnlen'.
27418         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
27419         'rpl_strtod'.
27420         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
27421         'rpl_utime'.
27422
27423 2003-01-31  Bruno Haible  <bruno@clisp.org>
27424
27425         * lib/rename.c: #undef rename before defining rpl_rename.
27426         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
27427
27428 2003-01-30  Bruno Haible  <bruno@clisp.org>
27429
27430         * modules/vasnprintf, modules/vasprintf: New modules.
27431         * MODULES.html.sh (func_all_modules): Add them.
27432
27433 2003-01-30  Bruno Haible  <bruno@clisp.org>
27434
27435         * m4/signed.m4: New file, from GNU gettext.
27436         * m4/longdouble.m4: New file, from GNU gettext.
27437         * m4/wchar_t.m4: New file, from GNU gettext.
27438         * m4/wint_t.m4: New file, from GNU gettext.
27439         * m4/vasnprintf.m4: New file.
27440         * m4/vasprintf.m4: New file.
27441
27442 2003-01-30  Bruno Haible  <bruno@clisp.org>
27443
27444         * lib/printf-args.h: New file, from GNU gettext.
27445         * lib/printf-args.c: New file, from GNU gettext.
27446         * lib/printf-parse.h: New file, from GNU gettext.
27447         * lib/printf-parse.c: New file, from GNU gettext.
27448         * lib/vasnprintf.h: New file, from GNU gettext.
27449         * lib/vasnprintf.c: New file, from GNU gettext.
27450         * lib/asnprintf.c: New file, from GNU gettext.
27451         * lib/vasprintf.h: New file, from GNU gettext with modifications.
27452         * lib/vasprintf.c: New file, from GNU gettext.
27453         * lib/asprintf.c: New file, from GNU gettext.
27454
27455 2003-01-29  Bruno Haible  <bruno@clisp.org>
27456
27457         * modules/stpncpy: New module.
27458         * MODULES.html.sh (func_all_modules): Add it.
27459
27460 2003-01-29  Bruno Haible  <bruno@clisp.org>
27461
27462         * m4/stpncpy.m4: New file.
27463
27464 2003-01-29  Bruno Haible  <bruno@clisp.org>
27465
27466         * lib/stpncpy.h: New file, from GNU gettext with modifications.
27467         * lib/stpncpy.c: New file, from GNU gettext with modifications.
27468
27469 2003-01-28  Bruno Haible  <bruno@clisp.org>
27470
27471         * modules/c-ctype: New module.
27472         * MODULES.html.sh (func_all_modules): Add it.
27473
27474 2003-01-28  Bruno Haible  <bruno@clisp.org>
27475
27476         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
27477         Paul Eggert.
27478         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
27479         Paul Eggert.
27480
27481 2003-01-27  Bruno Haible  <bruno@clisp.org>
27482
27483         * modules/xsetenv: New module.
27484         * MODULES.html.sh (func_all_modules): Add it.
27485
27486 2003-01-27  Bruno Haible  <bruno@clisp.org>
27487
27488         * lib/xsetenv.h: New file, from GNU gettext.
27489         * lib/xsetenv.c: New file, from GNU gettext.
27490
27491 2003-01-23  Jim Meyering  <jim@meyering.net>
27492
27493         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
27494         from working on systems without dirfd (at least Irix and OSF1/Tru64).
27495
27496 2003-01-23  Bruno Haible  <bruno@clisp.org>
27497
27498         * modules/minmax: New module.
27499         * MODULES.html.sh (func_all_modules): Add it.
27500
27501 2003-01-23  Bruno Haible  <bruno@clisp.org>
27502
27503         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
27504         Eggert.
27505
27506 2003-01-22  Bruno Haible  <bruno@clisp.org>
27507
27508         * modules/exit: New module.
27509         * MODULES.html.sh (func_all_modules): Add it.
27510
27511 2003-01-22  Bruno Haible  <bruno@clisp.org>
27512
27513         * lib/exit.h: New file, from GNU gettext.
27514
27515 2003-01-19  Bruno Haible  <bruno@clisp.org>
27516
27517         * gnulib-tool: Recognize option --extract-maintainer.
27518         (func_get_maintainer): New function.
27519         * modules/*: Add Maintainer entry.
27520
27521 2003-01-16  Jim Meyering  <jim@meyering.net>
27522
27523         * m4/regex.m4: The `regex' struct is both input and output.
27524         Initialize it before each use.  Patch by Tim Waugh.
27525
27526 2003-01-16  Bruno Haible  <bruno@clisp.org>
27527
27528         * MODULES.html.sh: Add a table of contents. Add the module name as
27529         leftmost column. Add hyperlinks.
27530
27531 2003-01-15  Bruno Haible  <bruno@clisp.org>
27532
27533         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
27534
27535 2003-01-15  Bruno Haible  <bruno@clisp.org>
27536
27537         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
27538         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
27539         suffix.
27540
27541 2003-01-15  Bruno Haible  <bruno@clisp.org>
27542
27543         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
27544
27545 2003-01-15  Bruno Haible  <bruno@clisp.org>
27546
27547         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
27548         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
27549
27550 2003-01-14  Jim Meyering  <jim@meyering.net>
27551
27552         * lib/same.c (same_name): Tweak a comment.
27553
27554 2003-01-14  Bruno Haible  <bruno@clisp.org>
27555
27556         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
27557         when a string comparison is sufficient.
27558
27559 2003-01-14  Bruno Haible  <bruno@clisp.org>
27560
27561         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
27562         'unsigned int'.
27563
27564 2003-01-14  Bruno Haible  <bruno@clisp.org>
27565
27566         * lib/hash-pjw.c: Add comment about low quality of this function.
27567
27568 2003-01-13  Bruno Haible  <bruno@clisp.org>
27569
27570         * modules/stpcpy: Distribute lib/stpcpy.h.
27571         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
27572
27573 2003-01-13  Bruno Haible  <bruno@clisp.org>
27574
27575         * modules/*: Add a description.
27576         * modules/strpbrk: Fix Makefile.am snippet.
27577         * modules/strtoimax: Fix dependencies.
27578         * modules/strtoumax: Likewise.
27579
27580 2003-01-13  Bruno Haible  <bruno@clisp.org>
27581
27582         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
27583         * modules/alloca (Makefile.am): All object files depend on alloca.h.
27584         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
27585
27586 2003-01-13  Bruno Haible  <bruno@clisp.org>
27587
27588         * gnulib-tool (func_create_testdir): Store config/* files in the main
27589         directory.
27590         * config.rpath: Move to ...
27591         * config/config.rpath: ... here.
27592         * modules/gettext: Contains config/config.rpath, not config.rpath.
27593         * modules/iconv: Likewise.
27594
27595 2003-01-12  Paul Eggert  <eggert@twinsun.com>
27596
27597         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
27598         to avoid collisions with libcurses and libreadline.
27599
27600         * m4/getstr.m4: Remove.
27601         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
27602
27603 2003-01-12  Paul Eggert  <eggert@twinsun.com>
27604
27605         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
27606         to avoid collisions with libcurses and libreadline.
27607
27608         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
27609         * lib/getstr.h, getstr.c: Remove.
27610         * lib/getline.c: Include "getline.h", to check interface.
27611         Move body of old getstr.c here: this defines MIN_CHUNK and
27612         declares getdelim2, which is renamed from getstr.
27613         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
27614
27615         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
27616         All uses changed.
27617         * lib/linebuffer.h: Likewise.
27618         (readline): Remove backward-compatibility macro.
27619
27620 2003-01-12  Paul Eggert  <eggert@twinsun.com>
27621
27622         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
27623         to avoid collisions with libcurses and libreadline.
27624         * getstr: Remove.
27625         * MODULES.html.sh: Remove getstr.
27626         * modules/getline: Depend on unlocked-io, not getstr.
27627
27628 2003-01-12  Jim Meyering  <jim@meyering.net>
27629
27630         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
27631
27632 2003-01-10  Bruno Haible  <bruno@clisp.org>
27633
27634         * modules/alloca: Change Makefile.am requirements. Simplify Include
27635         requirements. Add lib/alloca_.h to file list.
27636
27637 2003-01-10  Bruno Haible  <bruno@clisp.org>
27638
27639         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
27640
27641 2003-01-10  Bruno Haible  <bruno@clisp.org>
27642
27643         * lib/alloca_.h: New file.
27644         * lib/getdate.y: Unconditionally include alloca.h.
27645         * lib/makepath.c: Likewise.
27646         * lib/setenv.c: Likewise.
27647         * lib/userspec.c: Likewise.
27648
27649 2003-01-09  Karl Berry  <karl@gnu.org>
27650
27651         * MODULES.html.sh: include `dirname $0` in PATH, to find
27652         gnulib-tool.
27653
27654 2003-01-09  Bruno Haible  <bruno@clisp.org>
27655
27656         * modules/stdbool: Change configure.ac, Makefile.am requirements.
27657         Simplify Include requirements. Add lib/stdbool.h.in to file list.
27658
27659 2003-01-09  Bruno Haible  <bruno@clisp.org>
27660
27661         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
27662
27663 2003-01-09  Bruno Haible  <bruno@clisp.org>
27664
27665         * lib/stdbool.h.in: New file.
27666
27667 2003-01-09  Bruno Haible  <bruno@clisp.org>
27668
27669         * gnulib-tool (func_all_modules): Ignore files ending in ~.
27670         * MODULES.html.sh: Likewise.
27671
27672 2003-01-08  Jim Meyering  <jim@meyering.net>
27673
27674         * lib/full-write.c: Undefine and define-away `const' after inclusion
27675         of errno.h, not before.  Suggestion from Bruno Haible.
27676
27677 2003-01-08  Bruno Haible  <bruno@clisp.org>
27678
27679         * modules/full-read: Depend on full-write.
27680
27681 2003-01-08  Bruno Haible  <bruno@clisp.org>
27682
27683         * lib/safe-read.c: Include specification header first, to ensure its
27684         selfcontainedness.
27685         * lib/full-write.c: Likewise.
27686
27687 2003-01-07  Jim Meyering  <jim@meyering.net>
27688
27689         * lib/full-write.c: Rework so that it may serve to define full_read,
27690         too.
27691         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
27692
27693 2003-01-07  Bruno Haible  <bruno@clisp.org>
27694
27695         * lib/strtoimax.c: Include <stdint.h> as an alternative to
27696         <inttypes.h>.
27697         * lib/xstrtol.h: Likewise.
27698         * lib/xstrtoimax.c: Likewise.
27699         * lib/xstrtoumax.c: Likewise.
27700         * lib/human.h: Likewise.
27701
27702         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
27703         on systems that have <inttypes.h> but not <stdint.h>.
27704
27705 2003-01-07  Bruno Haible  <bruno@clisp.org>
27706
27707         * MODULES.html.sh: Add copyright notice.
27708         (missed_files): Omit CVS directory entries.
27709         (func_module): Make it work with sed-3.02.
27710         * MODULES.txt: Remove file.
27711
27712 2003-01-06  Jim Meyering  <jim@meyering.net>
27713
27714         * lib/version-etc.c: Update year in translatable copyright string.
27715
27716 2003-01-03  Karl Berry  <karl@gnu.org>
27717
27718         * config/config.{guess,sub}: update from prep.
27719
27720 2003-01-02  Karl Berry  <karl@gnu.org>
27721
27722         * doc/COPYING.DOC: belatedly updated to 1.2.
27723
27724 2003-01-01  Karl Berry  <karl@gnu.org>
27725
27726         * gnulib-tool (func_verify_module): report module name $module in
27727         error message, not $1.
27728         * gnulib-tool (create-testdir): don't complain if destdir couldn't
27729         be created, only if it doesn't exist.
27730         * gnulib-tool (last_checkin_date): don't expand the $Date here.
27731
27732 2002-12-31  Paul Eggert  <eggert@twinsun.com>
27733
27734         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
27735
27736 2002-12-31  Paul Eggert  <eggert@twinsun.com>
27737
27738         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
27739         memcmp if strcoll doesn't work.
27740
27741 2002-12-31  Bruno Haible  <bruno@clisp.org>
27742
27743         * lib/utime.c (utime_null): No need to call ftruncate if the file was
27744         nonempty.
27745
27746 2002-12-31  Bruno Haible  <bruno@clisp.org>
27747
27748         * lib/memcoll.c (STRCOLL): New macro.
27749         (memcoll): Use it.
27750
27751 2002-12-31  Bruno Haible  <bruno@clisp.org>
27752
27753         * lib/localcharset.h: New file.
27754         * lib/localcharset.c: Include it.
27755         * lib/unicodeio.c: Likewise.
27756
27757 2002-12-31  Bruno Haible  <bruno@clisp.org>
27758
27759         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
27760         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
27761
27762 2002-12-31  Bruno Haible  <bruno@clisp.org>
27763
27764         * lib/getline.h: Include <stddef.h>, for size_t.
27765
27766         * lib/unicodeio.h: Include <stddef.h>, for size_t.
27767         * lib/unicodeio.c: Don't include <stddef.h>.
27768
27769 2002-12-31  Bruno Haible  <bruno@clisp.org>
27770
27771         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
27772         HAVE_TM_ZONE.
27773
27774 2002-12-24  Karl Berry  <karl@gnu.org>
27775
27776         * config/config.guess: update from prep.
27777
27778 2002-12-24  Bruno Haible  <bruno@clisp.org>
27779
27780         General infrasructure.
27781         * m4/README: Rewritten.
27782         * m4/onceonly.m4: New file.
27783         * m4/onceonly_2_57.m4: New file.
27784
27785         Module atexit.
27786         * m4/atexit.m4: New file.
27787
27788         Module strtod.
27789         * m4/strtod.m4: New file.
27790
27791         Module strtol.
27792         * m4/strtol.m4: New file.
27793
27794         Module strtoul.
27795         * m4/strtoul.m4: New file.
27796
27797         Module memchr.
27798         * m4/memchr.m4: New file.
27799
27800         Module memcmp.
27801         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
27802         (jm_FUNC_MEMCMP): Invoke it.
27803
27804         Module memcpy.
27805         * m4/memcpy.m4: New file.
27806
27807         Module memmove.
27808         * m4/memmove.m4: New file.
27809
27810         Module memset.
27811         * m4/memset.m4: New file.
27812
27813         Module strcspn.
27814         * m4/strcspn.m4: New file.
27815
27816         Module strpbrk.
27817         * m4/strpbrk.m4: New file.
27818
27819         Module strstr.
27820         * m4/strstr.m4: New file.
27821
27822         Module strerror.
27823         * m4/strerror.m4: New file.
27824
27825         Module mktime.
27826         * m4/mktime.m4: Renamed from jm-mktime.m4.
27827         (gl_PREREQ_MKTIME): New macro.
27828         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
27829
27830         Module malloc.
27831         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
27832         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
27833         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
27834
27835         Module realloc.
27836         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
27837         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
27838         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
27839
27840         Module strftime.
27841         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
27842         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
27843         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
27844         gl_TM_GMTOFF.
27845         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
27846
27847         Module xalloc.
27848         * m4/xalloc.m4: New file.
27849
27850         Module alloca.
27851         * m4/alloca.m4: New file.
27852
27853         Module putenv.
27854         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
27855         (jm_FUNC_PUTENV): Invoke it.
27856
27857         Module setenv.
27858         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
27859         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
27860         when invoked twice.
27861         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
27862         gt_FUNC_SETENV.
27863
27864         Module memrchr.
27865         * m4/memrchr.m4: New file.
27866
27867         Module stpcpy.
27868         * m4/stpcpy.m4: New file.
27869
27870         Module strcase.
27871         * m4/strcase.m4: New file.
27872
27873         Module strdup.
27874         * m4/strdup.m4: New file.
27875
27876         Module strnlen.
27877         * m4/strnlen.m4: New file.
27878
27879         Module strndup.
27880         * m4/strndup.m4: New file.
27881
27882         Module xstrtod.
27883         * m4/xstrtod.m4: New file.
27884
27885         Module xstrtol.
27886         * m4/xstrtol.m4: New file.
27887
27888         Module getdate.
27889         * m4/getdate.m4: New file.
27890
27891         Module unlocked-io.
27892         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
27893         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
27894         * m4/jm-glibc-io.m4n: Remove file.
27895
27896         Module long-options.
27897         * m4/long-options.m4: New file.
27898
27899         Module md5.
27900         * m4/md5.m4: New file.
27901
27902         Module sha.
27903         * m4/sha.m4: New file.
27904
27905         Module getstr.
27906         * m4/getstr.m4: New file.
27907
27908         Module getline.
27909         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
27910         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
27911         <sys/types.h>, for size_t. Use the function name gnu_getline, not
27912         simply getline. Infoke gl_PREREQ_GETLINE.
27913
27914         Module obstack.
27915         * m4/obstack.m4: New file.
27916
27917         Module hash.
27918         * m4/hash.m4: New file.
27919
27920         Module readtokens.
27921         * m4/readtokens.m4: New file.
27922
27923         Module strverscmp.
27924         * m4/strverscmp.m4: New file.
27925
27926         Module stdbool.
27927         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
27928         OSF/1.
27929
27930         Module strtoll.
27931         * m4/strtoll.m4: New file.
27932
27933         Module strtoull.
27934         * m4/strtoull.m4: New file.
27935
27936         Module strtoimax.
27937         * m4/strtoimax.m4: New file.
27938
27939         Module strtoumax.
27940         * m4/strtoumax.m4: New file.
27941
27942         Module xstrtoimax.
27943         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
27944         jm_AC_PREREQ_XSTRTOIMAX.
27945         Moved the strtol prerequisites to strtol.m4.
27946         Moved the strtoll prerequisites to strtoll.m4.
27947         Moved the strtoimax prerequisites to strtoimax.m4.
27948
27949         Module xstrtoumax.
27950         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
27951         jm_AC_PREREQ_XSTRTOUMAX.
27952         Moved the strtoul prerequisites to strtoul.m4.
27953         Moved the strtoull prerequisites to strtoull.m4.
27954         Moved the strtoumax prerequisites to strtoumax.m4.
27955
27956         Module chown.
27957         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
27958         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
27959
27960         Module dup2.
27961         * m4/dup2.m4: New file.
27962
27963         Module ftruncate.
27964         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
27965         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
27966
27967         Module getgroups.
27968         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
27969         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
27970
27971         Module gettimeofday.
27972         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
27973         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
27974         gl_PREREQ_GETTIMEOFDAY.
27975
27976         Module mkdir.
27977         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
27978         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
27979
27980         Module mkstemp.
27981         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
27982         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
27983         jm_AC_TYPE_UINTMAX_T.
27984         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
27985
27986         Module stat.
27987         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
27988         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
27989
27990         Module lstat.
27991         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
27992         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
27993
27994         Module timespec.
27995         * m4/timespec.m4 (gl_TIMESPEC): New macro.
27996         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
27997         * m4/st_mtim.m4: Indentation.
27998
27999         Module nanosleep.
28000         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
28001         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
28002         gl_PREREQ_NANOSLEEP.
28003
28004         Module regex.
28005         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
28006         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
28007         (gl_REGEX): New macro.
28008
28009         Module rename.
28010         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
28011         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
28012
28013         Module rmdir.
28014         * m4/rmdir.m4: New file.
28015
28016         Module utime.
28017         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
28018         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
28019         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
28020
28021         Module dirname.
28022         * m4/dirname.m4: New file.
28023
28024         Module getopt.
28025         * m4/getopt.m4: New file.
28026
28027         Module unistd-safer.
28028         * m4/unistd-safer.m4: New file.
28029
28030         Module fnmatch.
28031         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
28032         declaration.
28033         (gl_PREREQ_FNMATCH_EXTRA): New macro.
28034         (gl_FUNC_FNMATCH_POSIX): New macro.
28035         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
28036         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
28037         simply fnmatch.
28038
28039         Module exclude.
28040         * m4/exclude.m4: New file.
28041
28042         Module human.
28043         * m4/human.m4: New file.
28044
28045         Module acl.
28046         * m4/acl.m4: Nop.
28047
28048         Module backupfile.
28049         * m4/backupfile.m4: New file.
28050         * m4/d-ino.m4: Indentation.
28051
28052         Module fsusage.
28053         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
28054         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
28055         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
28056
28057         Module dirfd.
28058         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
28059         requirements.
28060
28061         Module euidaccess.
28062         * m4/euidaccess.m4: New file.
28063
28064         Module file-type.
28065         * m4/file-type.m4: New file.
28066
28067         Module fileblocks.
28068         * m4/fileblocks.m4: New file.
28069
28070         Module filemode.
28071         * m4/filemode.m4: New file.
28072
28073         Module isdir.
28074         * m4/isdir.m4: New file.
28075
28076         Module lchown.
28077         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
28078         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
28079
28080         Module makepath.
28081         * m4/makepath.m4: New file.
28082
28083         Module modechange.
28084         * m4/modechange.m4: New file.
28085
28086         Module mountlist.
28087         * m4/mountlist.m4: New file.
28088         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
28089         Indentation.
28090
28091         Module path-concat.
28092         * m4/path-concat.m4: New file.
28093
28094         Module pathmax.
28095         * m4/pathmax.m4: New file.
28096
28097         Module same.
28098         * m4/same.m4: New file.
28099
28100         Module save-cwd.
28101         * m4/save-cwd.m4: New file.
28102
28103         Module savedir.
28104         * m4/savedir.m4: New file.
28105
28106         Module xgetcwd.
28107         * m4/xgetcwd.m4: New file.
28108         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
28109
28110         Module xreadlink.
28111         * m4/xreadlink.m4: New file.
28112
28113         Module safe-read.
28114         * m4/safe-read.m4: New file.
28115
28116         Module safe-write.
28117         * m4/safe-write.m4: New file.
28118
28119         Module closeout.
28120         * m4/closeout.m4: New file.
28121
28122         Module stdio-safer.
28123         * m4/stdio-safer.m4: New file.
28124
28125         Module getpass.
28126         * m4/getpass.m4: New file.
28127
28128         Module getugroups.
28129         * m4/getugroups.m4: New file.
28130
28131         Module group-member.
28132         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
28133         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
28134
28135         Module idcache.
28136         * m4/idcache.m4: New file.
28137
28138         Module userspec.
28139         * m4/userspec.m4: New file.
28140
28141         Module gettime.
28142         * m4/clock_time.m4: New file.
28143         * m4/gettime.m4: New file.
28144
28145         Module settime.
28146         * m4/settime.m4: New file.
28147
28148         Module posixtm.
28149         * m4/posixtm.m4: New file.
28150
28151         Module gethostname.
28152         * m4/gethostname.m4: New file.
28153
28154         Module canon-host.
28155         * m4/canon-host.m4: New file.
28156
28157         Module gettext.
28158         * m4/codeset.m4: New file, from gettext-0.11.5.
28159         * m4/gettext.m4: New file, from gettext-0.11.5.
28160         * m4/glibc21.m4: New file, from gettext-0.11.5.
28161         * m4/iconv.m4: New file, from gettext-0.11.5.
28162         * m4/intdiv0.m4: New file, from gettext-0.11.5.
28163         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
28164         * m4/inttypes.m4: New file, from gettext-0.11.5.
28165         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
28166         * m4/isc-posix.m4: New file, from gettext-0.11.5.
28167         * m4/lcmessage.m4: New file, from gettext-0.11.5.
28168         * m4/lib-ld.m4: New file, from gettext-0.11.5.
28169         * m4/lib-link.m4: New file, from gettext-0.11.5.
28170         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
28171         * m4/progtest.m4: New file, from gettext-0.11.5.
28172         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
28173         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
28174         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
28175
28176         Module localcharset.
28177         * m4/localcharset.m4: New file.
28178
28179         Module hard-locale.
28180         * m4/hard-locale.m4: New file.
28181
28182         Module mbswidth.
28183         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
28184         onceonly macros.
28185         * m4/mbrtowc.m4: Add comment.
28186
28187         Module memcasecmp.
28188         * m4/memcasecmp.m4: New file.
28189
28190         Module memcoll.
28191         * m4/memcoll.m4: New file.
28192
28193         Module unicodeio.
28194         * m4/unicodeio.m4: New file.
28195
28196         Module rpmatch.
28197         * m4/rpmatch.m4: New file.
28198
28199         Module yesno.
28200         * m4/yesno.m4: New file.
28201
28202         Module exitfail.
28203         * m4/exitfail.m4: New file.
28204
28205         Module c-stack.
28206         * m4/c-stack.m4 (gl_C_STACK): New macro.
28207         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
28208
28209         Module error.
28210         * m4/error.m4 (gl_ERROR): New macro.
28211         (jm_PREREQ_ERROR): Use onceonly macros.
28212
28213         Module fatal.
28214         * m4/fatal.m4: New file.
28215
28216         Module getloadavg.
28217         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
28218         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
28219
28220         Module getpagesize.
28221         * m4/getpagesize.m4: New file.
28222
28223         Module getusershell.
28224         * m4/getusershell.m4: New file.
28225
28226         Module physmem.
28227         * m4/physmem.m4: New file.
28228
28229         Module posixver.
28230         * m4/posixver.m4: New file.
28231
28232         Module quotearg.
28233         * m4/quotearg.m4: New file.
28234
28235         Module quote.
28236         * m4/quote.m4: New file.
28237
28238         Module readutmp.
28239         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
28240
28241         Module sig2str.
28242         * m4/sig2str.m4: New file.
28243
28244         Other.
28245         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
28246         ulonglong.m4.
28247         * m4/intmax_t.m4: New file.
28248         * m4/d-type.m4: Indentation.
28249         * m4/jm-macros.m4: Update.
28250         * m4/prereq.m4 (jm_PREREQ): Update.
28251         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
28252         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
28253         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
28254         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
28255         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
28256         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
28257         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
28258         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
28259         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
28260         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
28261         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
28262         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
28263         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
28264         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
28265         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
28266         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
28267         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
28268         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
28269         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
28270
28271 2002-12-24  Bruno Haible  <bruno@clisp.org>
28272
28273         * MODULES.txt: Update according to m4/ changes.
28274
28275         Module gettext.
28276         * config.rpath: New file, from gettext-0.11.5.
28277
28278         * modules/*: New module descriptions.
28279         * gnulib-tool: New file.
28280         * MODULES.html.sh: New file.
28281
28282 2002-12-21  Karl Berry  <karl@gnu.org>
28283
28284         * doc/fdl.texi: update to version 1.2.
28285
28286 2002-12-19  Karl Berry  <karl@gnu.org>
28287
28288         * config/config.guess: update from prep.
28289
28290 2002-12-18  Bruno Haible  <bruno@clisp.org>
28291
28292         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
28293         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
28294
28295 2002-12-17  Bruno Haible  <bruno@clisp.org>
28296
28297         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
28298         stdlib.h, string.h.
28299
28300 2002-12-17  Bruno Haible  <bruno@clisp.org>
28301
28302         * lib/canon-host.c (strdup): Remove unused declaration.
28303
28304         * lib/fsusage.c: Include full_read.h.
28305         (get_fs_usage): Use full_read instead of safe_read.
28306
28307         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
28308
28309 2002-12-12  Karl Berry  <karl@gnu.org>
28310
28311         * config/config.guess: update from prep.
28312
28313 2002-12-11  Bruno Haible  <bruno@clisp.org>
28314
28315         * m4/setenv.m4: New file, from gettext-0.11.5.
28316
28317 2002-12-11  Bruno Haible  <bruno@clisp.org>
28318
28319         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
28320         not unsetenv().
28321         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
28322         modifications:
28323
28324         2002-12-11  Bruno Haible  <bruno@clisp.org>
28325
28326                 * setenv.c (alloca): Fall back to malloc.
28327                 (freea): New macro.
28328                 (setenv): Use freea() to free memory allocated with alloca().
28329
28330         2002-11-13  Bruno Haible  <bruno@clisp.org>
28331
28332                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
28333                 function declarations.
28334                 * unsetenv.c (unsetenv): Likewise.
28335
28336         2002-03-04  Bruno Haible  <bruno@clisp.org>
28337
28338                 Portability to AIX 4.3.3.
28339                 * unsetenv.c: New file, extracted from setenv.c.
28340                 * setenv.c: Move the unsetenv() function to unsetenv.c.
28341
28342         2001-12-20  Bruno Haible  <bruno@clisp.org>
28343
28344                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
28345                 use malloc instead. For SunOS 4.
28346
28347         2001-12-11  Bruno Haible  <bruno@clisp.org>
28348
28349                 * setenv.c: Declare alloca.
28350                 (compar_fn_t): New typedef.
28351                 (KNOWN_VALUE, STORE_VALUE): Use it.
28352
28353         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
28354         setenv.h.
28355
28356 2002-12-10  Paul Eggert  <eggert@twinsun.com>
28357
28358         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
28359         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
28360         Choose values that are less likely to collide with system fnmatch
28361         options.
28362         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
28363         defined (e.g., a pure POSIX system).
28364         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
28365         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
28366
28367 2002-12-06  Paul Eggert  <eggert@twinsun.com>
28368
28369         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
28370         a pain in practice to deal with generated m4 files.  This change
28371         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
28372
28373         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
28374         and jm-glibc-io.m4, as they are no longer a special case.
28375         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
28376         kludge and the auto-generation stuff.  Check only whether the
28377         functions are declared, not whether they exist, since older hosts
28378         that don't declare the functions can't use the optimization anyway.
28379
28380 2002-12-06  Jim Meyering  <jim@meyering.net>
28381
28382         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
28383
28384         Merge in changes from libc's misc/error.c, in preparation
28385         for the merge of gnulib's changes back into libc.
28386
28387         * lib/error.c (_): Define only if not already defined.
28388         Move definition to follow all #include directives.
28389         Include unlocked-io.h only if !_LIBC.
28390         [_LIBC]: Include <libio/libioP.h>.
28391         [USE_IN_LIBIO]: Include <libio/iolibio.h>
28392         (fflush): Tweak definition to use INTUSE.
28393         (putc): Define.
28394
28395 2002-12-05  Paul Eggert  <eggert@twinsun.com>
28396
28397         * lib/alloca.c [defined emacs]: Include "lisp.h".
28398         (xalloc_die) [defined emacs]: New macro.
28399         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
28400         [! defined emacs]: Include <xalloc.h>.
28401         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
28402         (pointer): Typedef to POINTER_TYPE *.
28403         (malloc): Remove decl; we now always use xmalloc.
28404         (alloca): Use old-style definition, since Emacs needs this.
28405         Check for arithmetic overflow when computing combined size.
28406
28407 2002-12-04  Paul Eggert  <eggert@twinsun.com>
28408
28409         Do not generate unlocked-io.h automatically, since it's easier to
28410         maintain it by hand.
28411
28412         * lib/unlocked-io.h: New file, from GNU diffutils,
28413         but with proper copyright notice and attribution.
28414         * lib/gen-uio: Remove.
28415         * lib/Makefile.am: Add copyright notice.
28416         (libfetish_a_SOURCES): Add unlocked-io.h.
28417         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
28418         (DISTCLEANFILES, io_functions): Remove macros.
28419         (EXTRA_DIST): Remove gen_uio.
28420         (unlocked-io.h): Remove rule.
28421
28422 2002-12-04  Jim Meyering  <jim@meyering.net>
28423
28424         Reflect the fact that stat.c and lstat.c are no longer generated.
28425         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
28426         (DISTCLEANFILES): Likewise.
28427         (EXTRA_DIST): Likewise.
28428         (all_local): Don't depend on stat.c or lstat.c.
28429         (stat.c, lstat.c): Remove rules.
28430         (EXTRA_DIST): Remove xstat.in.
28431
28432         * lib/xstat.in: Remove file.  Contents moved into stat.c.
28433         * lib/stat.c: New file.  Contents mostly from xstat.in.
28434         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
28435         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
28436
28437         * lib/safe-read.c: Rework so that it may serve to define safe_write,
28438         too.
28439         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
28440
28441 2002-12-03  Jim Meyering  <jim@meyering.net>
28442
28443         * lib/safe-read.c, safe-write.c: Change variable names and comments,
28444         but not semantics, to minimize the differences between these two files.
28445         (safe_read): Change comment to mention SAFE_READ_ERROR.
28446
28447         * lib/safe-read.c (IS_EINTR): Define.
28448         (safe_read): Use IS_EINTR in place of in-function cpp directives.
28449
28450 2002-12-02  Jim Meyering  <jim@meyering.net>
28451
28452         * lib/safe-read.c (EINTR): Define.
28453         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
28454         (INT_MAX): Provide fallback.
28455         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
28456
28457         * lib/safe-read.h (SAFE_READ_ERROR): Define.
28458
28459 2002-12-02  Bruno Haible  <bruno@clisp.org>
28460
28461         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
28462         Define, taken from safe-read.c.
28463         (INT_MAX): Provide fallback.
28464         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
28465         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
28466
28467         * lib/safe-read.c (EINTR): Remove definition.
28468         (safe_read): Don't use EINTR if it is absent.
28469
28470 2002-12-01  Jim Meyering  <jim@meyering.net>
28471
28472         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
28473         zero.
28474         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
28475
28476 2002-11-27  Paul Eggert  <eggert@twinsun.com>
28477
28478         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
28479         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
28480         with `if (! (value < limit)) abort ();', for readability.
28481
28482 2002-11-26  Karl Berry  <karl@gnu.org>
28483
28484         * lib/strdup.c: copy from libc again, with jim's ok.
28485         * lib/.cppi-disable: re-add strdup.c
28486
28487 2002-11-25  Karl Berry  <karl@gnu.org>
28488
28489         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
28490         instead of "strtol.c".
28491
28492 2002-11-25  Karl Berry  <karl@gnu.org>
28493
28494         * config/install-sh: update from automake for variable quoting, $0 in
28495         error msgs, etc.
28496
28497         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
28498         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
28499         entry.
28500
28501 2002-11-25  Jim Meyering  <jim@meyering.net>
28502
28503         * lib/mktime.c: Sync from libc, now that it has the latest fix.
28504
28505 2002-11-24  Karl Berry  <karl@gnu.org>
28506
28507         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
28508         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
28509
28510 2002-11-24  Jim Meyering  <jim@meyering.net>
28511
28512         Update from coreutils:
28513
28514         * lib/mktime.c: Merge in changes from libc.
28515
28516         Avoid a link-time failure on some Linux systems.
28517         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
28518         (otherwise).
28519         (__mon_yday): Declare with the STATIC attribute.
28520         (__mktime_internal): Likewise.
28521         Based on a report from Greg Schafer.
28522
28523 2002-11-23  Jim Meyering  <jim@meyering.net>
28524
28525         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
28526         Use `unsigned', not `int', as type of index.
28527
28528         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
28529
28530         * lib/fsusage.c: Remove unneeded parentheses around operands of
28531         `defined'.
28532
28533 2002-11-22  Paul Eggert  <eggert@twinsun.com>
28534
28535         * lib/quotearg.h: Allow multiple inclusion by surrounding with
28536         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
28537         so that we can be included first.
28538         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
28539         * lib/quotearg.c: Include quotearg.h immediately after config.h.
28540         No need to include stddef.h or sys/types.h any more.
28541         Surround local include files with "", not "<>".
28542         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
28543         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
28544         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
28545         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
28546         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
28547         (ISPRINT): Remove; no longer needed now that we assume C89.
28548
28549         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
28550         Preserve errno.
28551
28552         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
28553         quotearg_char): Use SIZE_MAX rather than
28554         (size_t) -1 when we are talking about "infinity".
28555
28556         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
28557
28558 2002-11-22  Paul Eggert  <eggert@twinsun.com>
28559
28560         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
28561         hint that one should use `if (! x) abort ();' rather than `assert
28562         (x);', and anyway it's one less thing to worry about configuring.
28563         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
28564         hash_rehash, hash_insert): Use abort rather than assert.
28565
28566 2002-11-22  Bruno Haible  <bruno@clisp.org>
28567
28568         * lib/safe-read.h: Assume C89. Add comments.
28569         (safe_read): Change return type to size_t.
28570         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
28571         byte counts > SSIZE_MAX correctly.
28572         * lib/safe-write.h: New file.
28573         * lib/safe-write.c: New file.
28574         * lib/full-read.h: New file.
28575         * lib/full-read.c: New file.
28576         * lib/full-write.h: Assume C89. Add comments.
28577         * lib/full-write.c: Include safe-write.h.
28578         (full_write): Rewritten to use safe_write.
28579         Suggested by Jim Meyering and Paul Eggert.
28580
28581 2002-11-21  Jim Meyering  <jim@meyering.net>
28582
28583         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
28584
28585         Merge in changes from the coreutils.
28586
28587         2002-09-25  Paul Eggert  <eggert@twinsun.com>
28588         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
28589         <stdint.h>.
28590         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
28591         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
28592         int.  Work more efficiently if X is the same width as uintmax_t.
28593         Do not compare X to -1, to avoid bogus compiler warning.
28594         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
28595         Don't assume that f_frsize and f_bsize are the same type.
28596
28597         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
28598         warning on FreeBSD.
28599
28600         * lib/makepath.c (make_path): Restore umask *before* creating the final
28601         component.
28602         (make_path): Minor reformatting.
28603
28604         * lib/xmalloc.c: Adjust to work with new autoconf macros,
28605         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
28606         HAVE_MALLOC/HAVE_REALLOC.
28607
28608         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
28609         dummy ones.  At least on GNU/Linux systems, `auto' means something
28610         else.
28611         From Michael Stone.
28612
28613 2002-11-21  Bruno Haible  <bruno@clisp.org>
28614
28615         Remove case insensitive option matching.
28616         * lib/argmatch.h (argcasematch): Remove declaration.
28617         (ARGCASEMATCH): Remove macro.
28618         (__xargmatch_internal): Remove case_sensitive argument.
28619         (XARGMATCH): Update.
28620         (XARGCASEMATCH): Remove macro.
28621         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
28622         case_sensitive argument.
28623         (argcasematch): Remove function.
28624         (__xargmatch_internal): Remove case_sensitive argument.
28625         (main): Use XARGMATCH instead of XARGCASEMATCH.
28626
28627         * lib/xmalloc.c: Change compile-time error message. Add comment about
28628         required autoconf version.
28629
28630 2002-11-20  Paul Eggert  <eggert@twinsun.com>
28631
28632         Merge argmatch cleanups from Bison.  Assume C89.
28633
28634         * lib/argmatch.c: Include config.h here, not in argmatch.h.
28635         Include stdlib.h, for EXIT_FAILURE.
28636         Always include <string.h>, since we assume C89.
28637         (EXIT_FAILURE): Remove pre-C89 bug workaround.
28638         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
28639         Include <stddef.h> instead, since it's all we need for size_t.
28640         (PARAMS): Remove.  All uses removed.
28641         (ARRAY_CARDINALITY): Do not bother to #undef.
28642         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
28643         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
28644         Remove unnecessary parentheses.
28645         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
28646         Insert necessary parentheses.
28647         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
28648         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
28649
28650 2002-11-19  Bruno Haible  <bruno@clisp.org>
28651
28652         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
28653         * lib/mbswidth.h: Include <stddef.h>, for size_t.
28654
28655         * lib/mbswidth.h (PARAMS): Remove macro.
28656         (mbswidth, mbsnwidth): Use ANSI C function declarations.
28657         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
28658
28659         * lib/gcd.h (PARAMS): Remove macro.
28660         (gcd): Use ANSI C function declarations.
28661         * lib/gcd.c (gcd): Likewise.
28662
28663 2002-11-15  Bruno Haible  <bruno@clisp.org>
28664
28665         * lib/strcspn.c: Include <stddef.h>.
28666         (strcspn): Use ANSI C function declaration. Change return type to
28667         size_t. Use NULL.
28668         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
28669         (strpbrk): Use NULL.
28670         * lib/strpbrk.h (PARAMS): Remove macro.
28671         (strpbrk): Use ANSI C function declaration.
28672         * lib/strstr.c: Don't include <sys/types.h>.
28673         * lib/strstr.h (PARAMS): Remove macro.
28674         (strstr): Use ANSI C function declarations.
28675
28676 2002-11-14  Karl Berry  <karl@gnu.org>
28677
28678         * config/mkinstalldirs: `do' on separate line, instead of
28679         `for var; do'.
28680
28681 2002-11-06  Bruno Haible  <bruno@clisp.org>
28682
28683         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
28684         * lib/gcd.c (gcd): Likewise.
28685
28686 2002-11-05  Bruno Haible  <bruno@clisp.org>
28687
28688         * lib/gcd.h: New file, from gettext-0.11.5.
28689         * lib/gcd.c: New file, from gettext-0.11.5.
28690
28691 2002-11-05  Bruno Haible  <bruno@clisp.org>
28692
28693         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
28694         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
28695         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
28696         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
28697
28698         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
28699         <libintl.h>.
28700         * lib/makepath.c: Include gettext.h instead of <locale.h> and
28701         <libintl.h>.
28702
28703         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
28704         * lib/human.c: Include gettext.h instead of <libintl.h>.
28705         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
28706         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
28707         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
28708         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
28709         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
28710         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
28711         (textdomain): Remove definition.
28712         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
28713
28714         * lib/long-options.c: Remove include of <libintl.h> and definition of
28715         _.
28716         * lib/same.c: Remove include of <libintl.h> and definition of _.
28717
28718 2002-11-04  Owen Taylor  <otaylor@redhat.com>
28719
28720         * lib/config.charset: A few additions for Solaris.
28721
28722 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
28723
28724         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
28725         * lib/localcharset.c (locale_charset): Declare as extern "C".
28726
28727 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
28728
28729         * lib/config.charset: msdos in uk_UA uses CP1125.
28730
28731 2002-11-04  Bruno Haible  <bruno@clisp.org>
28732
28733         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
28734         * lib/strcase.h: New file, from GNU gettext-0.11.5.
28735         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
28736         * lib/strstr.h: New file, from GNU gettext-0.11.5.
28737         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
28738
28739 2002-11-04  Bruno Haible  <bruno@clisp.org>
28740
28741         * lib/localcharset.c (locale_charset): Don't return an empty string.
28742
28743 2002-11-04  Bruno Haible  <bruno@clisp.org>
28744
28745         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
28746         aliases.
28747
28748 2002-11-04  Bruno Haible  <bruno@clisp.org>
28749
28750         * lib/config.charset: Update for newest glibc. Add canonical names
28751         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
28752
28753 2002-11-04  Bruno Haible  <bruno@clisp.org>
28754
28755         * lib/config.charset: Add support for NetBSD.
28756
28757 2002-11-04  Bruno Haible  <bruno@clisp.org>
28758
28759         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
28760
28761 2002-11-01  Bruno Haible  <bruno@clisp.org>
28762
28763         * configure.in: Add AC_CONFIG_AUX_DIR call.
28764         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
28765         test/Makefile.
28766         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
28767
28768 2002-09-28  Karl Berry  <karl@gnu.org>
28769
28770         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
28771         installed automake until the next release, since changes have been
28772         made.
28773
28774 2002-09-25  Karl Berry  <karl@gnu.org>
28775
28776         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
28777         * lib/getopt*: copy from libc/posix.
28778         * lib/gettext.h: copy from gettext.
28779         * lib/.cppi-disable: add strdup.c, gettext.h.
28780
28781 2002-09-25  Karl Berry  <karl@gnu.org>
28782
28783         * config/srclist.txt: enable gettext.h check.
28784         * config/config.{guess,sub}: update from prep.
28785         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
28786                 from automake 1.6.3.
28787         See srclist*.
28788
28789 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
28790
28791         * regex.c (PATFETCH): Remove the translating fetch.
28792         (PATFETCH_RAW): Rename to PATFETCH.
28793         (set_image_of_range): New fun.
28794         (SET_RANGE_TABLE_WORK_AREA): Use it.
28795         (regex_compile): Don't translate the pattern chars so eagerly.
28796         Only do it when inserting an `exactn' bytecode or when handling
28797         a char-range.
28798         (mutually_exclusive_p): Avoid empty statement.
28799
28800 2002-07-06  Jim Meyering  <meyering@lucent.com>
28801
28802         * m4/README: Don't mention Makefile.am.in.
28803         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
28804
28805 2002-07-01  Jim Meyering  <meyering@lucent.com>
28806
28807         * lib/c-stack.c: Include sys/time.h.
28808         From Volker Borchert.
28809
28810 2002-06-26  Paul Eggert  <eggert@twinsun.com>
28811
28812         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
28813
28814 2002-06-26  Paul Eggert  <eggert@twinsun.com>
28815
28816         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
28817         New macro.  Use it uniformly instead of
28818         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
28819         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
28820         reported by Vin Shelton.
28821
28822 2002-06-22  Paul Eggert  <eggert@twinsun.com>
28823
28824         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
28825         Do not assume SA_SIGINFO behavior.
28826         Bug reported by Jim Meyering on NetBSD 1.5.2.
28827
28828 2002-06-22  Jim Meyering  <meyering@lucent.com>
28829
28830         * m4/c-stack.m4: New file, from diffutils-2.8.2.
28831         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
28832
28833         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
28834         now that configure.ac uses AC_GNU_SOURCE.
28835         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
28836         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
28837
28838         Update to latest tools.  Suggestions from Paul Eggert.
28839         * m4/stdbool.m4: New file, from diffutils-2.8.2.
28840         * m4/gnu-source.m4: Update from diffutils-2.8.2.
28841         * m4/fnmatch.m4: Likewise.
28842         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
28843         to AC_HEADER_STDBOOL
28844
28845 2002-06-22  Jim Meyering  <meyering@lucent.com>
28846
28847         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
28848         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
28849
28850 2002-06-22  Jim Meyering  <meyering@lucent.com>
28851
28852         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
28853
28854         * lib/exitfail.c, exitfail.h: Likewise.
28855         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
28856
28857         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
28858         of fnmatch.h.
28859         (EXTRA_DIST): Add fnmatch_loop.c.
28860         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
28861
28862         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
28863         * lib/fnmatch.c: Update from diffutils-2.8.2.
28864         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
28865         * lib/fnmatch.h: Remove file.
28866
28867 2002-06-21  Jim Meyering  <meyering@lucent.com>
28868
28869         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
28870         * m4/mbrtowc.m4: Likewise.
28871
28872         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
28873         * m4/mbswidth.m4: Reflect name change:
28874         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
28875         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
28876
28877         * m4/lib-link.m4: Update from gettext-0.11.2.
28878         * m4/gettext.m4: Likewise.
28879
28880         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
28881         From Alfred M. Szmidt.
28882
28883 2002-06-18  Paul Eggert  <eggert@twinsun.com>
28884
28885         * lib/file-type.h: Report an error if neither S_ISREG nor
28886         S_IFREG is defined, instead of using a test specific to glibc
28887         2.2.  This should be safe, since POSIX requires S_ISREG and
28888         Unix Version 7 had S_IFREG.  We don't need to check for
28889         <sys/types.h> since we don't use any symbols that it defines.
28890
28891 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
28892
28893         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
28894         $@-t, so that each temporary file name is unique and valid in the first
28895         8 characters, for operation under DOS.
28896
28897 2002-06-15  Paul Eggert  <eggert@twinsun.com>
28898
28899         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
28900
28901 2002-06-15  Jim Meyering  <meyering@lucent.com>
28902
28903         Work even with DJGPP 2.03, which lacks support for symlinks.
28904         From Richard Dawe.
28905         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
28906         is defined.
28907         * lib/lchown.c (S_ISLNK): Likewise.
28908
28909 2002-06-15  Jim Meyering  <meyering@lucent.com>
28910
28911         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
28912         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
28913         have been included before this file.
28914
28915 2002-06-14  Jim Meyering  <meyering@lucent.com>
28916
28917         * lib/file-type.h: Use the version from diffutils-2.8.2.
28918         * lib/file-type.c: Likewise.
28919
28920 2002-06-07  Jim Meyering  <meyering@lucent.com>
28921
28922         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
28923         They're needed at least for NetBSD 1.5.2.
28924         ($statxfs_includes): Include those same headers.
28925         ($statxfs_includes): Include sys/vfs.h if available.
28926         ($statxfs_includes): Likewise for sys/statvfs.h.
28927         Check for the following members in both structs statfs and statvfs:
28928         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
28929
28930 2002-06-01  Jim Meyering  <meyering@lucent.com>
28931
28932         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
28933         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
28934
28935 2002-05-28  Jim Meyering  <meyering@lucent.com>
28936
28937         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
28938         Reported by Volker Borchert.
28939
28940 2002-05-27  Jim Meyering  <meyering@lucent.com>
28941
28942         Fix a problem seen only on nonconforming systems whereby ls.c's
28943         use of localtime, and then of gettimeofday would cause trouble:
28944         the localtime call used to initialize rpl_gettimeofday's save
28945         mechanism would clobber ls's current local time information so
28946         that in any long listing the first file would always be listed
28947         with date 1970-01-01.  Analysis by Volker Borchert.
28948
28949         * lib/gettimeofday.c (localtime): Undefine.
28950         (rpl_localtime): New function.
28951
28952 2002-05-27  Jim Meyering  <meyering@lucent.com>
28953
28954         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
28955         localtime.
28956
28957         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
28958         use the replacement function; it wouldn't resolve at link time.
28959         Reported by Volker Borchert.
28960
28961 2002-05-22  Jim Meyering  <meyering@lucent.com>
28962
28963         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
28964         file-type.h.
28965         * lib/file-type.h: New file.
28966         * lib/file-type.c (file_type): New file/function.  Extracted from
28967         diffutils.
28968
28969 2002-04-30  Jim Meyering  <meyering@lucent.com>
28970
28971         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
28972
28973 2002-04-29  Paul Eggert  <eggert@twinsun.com>
28974
28975         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
28976
28977 2002-04-29  Paul Eggert  <eggert@twinsun.com>
28978
28979         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
28980         Do not check for alloca.h (no longer used) or stdbool.h (was never
28981         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
28982
28983 2002-04-29  Paul Eggert  <eggert@twinsun.com>
28984
28985         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
28986
28987 2002-04-29  Jim Meyering  <meyering@lucent.com>
28988
28989         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
28990         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
28991         Use AC_FUNC_STRNLEN here instead.
28992
28993         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
28994         With autoconf-2.53a, it's part of AC_PROG_CC.
28995
28996 2002-04-28  Paul Eggert  <eggert@twinsun.com>
28997
28998         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
28999         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
29000
29001 2002-04-28  Paul Eggert  <eggert@twinsun.com>
29002
29003         * lib/sig2str.h, lib/sig2str.c: New files.
29004         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
29005
29006 2002-04-28  Paul Eggert  <eggert@twinsun.com>
29007
29008         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
29009         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
29010         of 127, since 64 is the largest conceivable number for ancient
29011         nonstandard hosts.
29012         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
29013
29014 2002-04-28  Jim Meyering  <meyering@lucent.com>
29015
29016         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
29017
29018 2002-04-24  Jim Meyering  <meyering@lucent.com>
29019
29020         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
29021         (jm_PREREQ): Use it.
29022
29023         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
29024         mach/mach.h fcntl.h.
29025         Check for this function: setlocale.
29026
29027 2002-04-24  Jim Meyering  <meyering@lucent.com>
29028
29029         * lib/gettext.h: New file, from Gettext.
29030         * lib/Makefile.am (INCLUDES): Remove -I../intl.
29031         (libfetish_a_SOURCES): Add gettext.h.
29032
29033 2002-04-16  Jim Meyering  <meyering@lucent.com>
29034
29035         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
29036         ut_pid, ut_id, ut_exit.
29037
29038 2002-04-16  Jim Meyering  <meyering@lucent.com>
29039
29040         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
29041         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
29042         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
29043
29044 2002-04-12  Jim Meyering  <meyering@lucent.com>
29045
29046         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
29047         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
29048         existence of the getmntinfo function.  Needed for Darwin 5.3.
29049
29050         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
29051         This is necessary at least on Darwin 5.3.
29052
29053         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
29054         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
29055         strnlen.o in the library, and that makes some versions of ranlib
29056         object.
29057
29058 2002-04-12  Jim Meyering  <meyering@lucent.com>
29059
29060         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
29061
29062 2002-04-09  Jim Meyering  <meyering@lucent.com>
29063
29064         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
29065         to be more precise.  Rather than saying we're checking whether the
29066         function `works', say what we're testing.
29067         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
29068         Reported by Bruno Haible.
29069
29070 2002-03-10  Jim Meyering  <meyering@lucent.com>
29071
29072         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
29073         Suggestion from Santiago Vila.
29074
29075 2002-03-08  Jim Meyering  <meyering@lucent.com>
29076
29077         * lib/rename.c: Mention that this wrapper is needed also on
29078         mips-dec-ultrix4.4 systems.
29079
29080 2002-03-02  Jim Meyering  <meyering@lucent.com>
29081
29082         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
29083         not HAVE_CLOCK_SETTIME.
29084
29085 2002-02-27  Paul Eggert  <eggert@twinsun.com>
29086
29087         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
29088         Check for clock_settime.
29089
29090 2002-02-27  Paul Eggert  <eggert@twinsun.com>
29091
29092         * lib/nanosleep.h: Rename to....
29093         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
29094
29095         * lib/gettime.c: New file.
29096         * lib/settime.c: New file.
29097         * lib/stime.c: Remove.
29098
29099         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
29100         timespec.h.  Remove nanosleep.h.
29101
29102 2002-02-25  Paul Eggert  <eggert@twinsun.com>
29103
29104         * m4/acl.m4: New file.
29105         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
29106         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
29107
29108 2002-02-25  Paul Eggert  <eggert@twinsun.com>
29109
29110         * lib/acl.c, lib/acl.h: New files.
29111         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
29112
29113 2002-02-24  Jim Meyering  <meyering@lucent.com>
29114
29115         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
29116         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
29117         cause trouble.  Reported by Nelson Beebe.
29118
29119 2002-02-23  Paul Eggert  <eggert@twinsun.com>
29120
29121         * lib/path-concat.c (xpath_concat): Reorder code to pacify
29122         compilers that don't know that xalloc_die never returns.
29123
29124 2002-02-20  Jim Meyering  <meyering@lucent.com>
29125
29126         * lib/getdate.c: Regenerate using bison-1.33.
29127
29128 2002-02-17  Jim Meyering  <meyering@lucent.com>
29129
29130         * config/config.guess (main): Don't use `head -1'; it's no longer
29131         portable. Use `sed 1q' instead.
29132
29133 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
29134
29135         * m4/codeset.m4: Upgrade to gettext-0.11.
29136         * m4/gettext.m4: Upgrade to gettext-0.11.
29137         * m4/glibc21.m4: Upgrade to gettext-0.11.
29138         * m4/iconv.m4: Upgrade to gettext-0.11.
29139         * m4/isc-posix.m4: Upgrade to gettext-0.11.
29140         * m4/lcmessage.m4: Upgrade to gettext-0.11.
29141         * m4/lib-ld.m4: New file, from gettext-0.11.
29142         * m4/lib-link.m4: New file, from gettext-0.11.
29143         * m4/lib-prefix.m4: New file, from gettext-0.11.
29144         * m4/progtest.m4: Upgrade to gettext-0.11.
29145
29146 2002-02-15  Paul Eggert  <eggert@twinsun.com>
29147
29148         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
29149         (jm_PREREQ): Use it.
29150
29151 2002-02-15  Paul Eggert  <eggert@twinsun.com>
29152
29153         * lib/posixver.c, lib/posixver.h: New files.
29154         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
29155
29156 2002-02-02  Paul Eggert  <eggert@twinsun.com>
29157             Bruno Haible  <bruno@clisp.org>
29158
29159         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
29160         (fwrite_success_callback): New declaration.
29161         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
29162         print_unicode_char. Call failure callback instead of error.
29163         (fwrite_success_callback): New function.
29164         (exit_failure_callback): New function.
29165         (fallback_failure_callback): New function.
29166         (print_unicode_char): Call unicode_to_mb.
29167
29168 2002-01-26  Jim Meyering  <meyering@lucent.com>
29169
29170         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
29171         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
29172
29173 2002-01-26  Jim Meyering  <meyering@lucent.com>
29174
29175         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
29176
29177 2002-01-22  Paul Eggert  <eggert@twinsun.com>
29178
29179         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
29180
29181 2002-01-22  Jim Meyering  <meyering@lucent.com>
29182
29183         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
29184         Otherwise, some versions of automake would omit the rule that makes
29185         Makefile from Makefile.in.
29186
29187 2002-01-21  Paul Eggert  <eggert@twinsun.com>
29188
29189         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
29190         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
29191         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
29192         (memcoll): Set errno to zero if there is no error.
29193
29194         * lib/quotearg.c (quotearg_buffer_restyled):
29195         Fix bug with quoting buffers containing NUL when backslashing escapes.
29196         This bug was exposed by the other changes in this patch.
29197         (quotearg_n_options): New arg ARGSIZE.
29198         All callers changed.
29199         (quoting_options_from_style): New function.
29200         (quotearg_n_style): Use it.
29201         (quotearg_n_style_mem): New function.
29202
29203         * lib/quotearg.h (quotearg_n_style_mem): New function.
29204
29205 2002-01-19  Jim Meyering  <meyering@lucent.com>
29206
29207         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
29208         Remove useless quotes: DF_PROG="df".
29209         * m4/strnlen.m4: New file.
29210
29211 2002-01-16  Paul Eggert  <eggert@twinsun.com>
29212
29213         * lib/backupfile.c (ISDIGIT): Comment fix.
29214         * lib/getdate.y (ISDIGIT): Likewise.
29215         * lib/posixtm.c (ISDIGIT, year): Likewise.
29216         * lib/strverscmp.c (ISDIGIT): Likewise.
29217         * lib/userspec.c (ISDIGIT): Likewise.
29218
29219 2002-01-16  Jim Meyering  <meyering@lucent.com>
29220
29221         * lib/getdate.y: Add three semicolons, each just before a closing
29222         brace. Bison (as of version 1.31) no longer papers over that mistake.
29223
29224 2002-01-05  Jim Meyering  <meyering@lucent.com>
29225
29226         * lib/version-etc.c (version_etc_copyright): Update copyright year.
29227
29228 2001-12-19  Paul Eggert  <eggert@twinsun.com>
29229
29230         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
29231         not silently exit merely because the output buffer happens to
29232         have nothing pending.
29233
29234 2001-12-18  Paul Eggert  <eggert@twinsun.com>
29235
29236         See the big note in ../ChangeLog.
29237         * lib/human.c (suffixes): Prefer K to k for 1024.
29238         (generate_suffix_backwards): New function.
29239         (human_readable_inexact): Use it.
29240         * lib/xstrtol.c (__xstrtol): If there is no number but there
29241         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
29242         Accept 'K' as well as 'k'.
29243
29244 2001-12-15  Jim Meyering  <meyering@lucent.com>
29245
29246         * lib/regex.h (__restrict_arr): Update from libc.
29247
29248         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
29249         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
29250         (STREQ): Define.
29251
29252 2001-12-14  Jim Meyering  <meyering@lucent.com>
29253
29254         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
29255         Suggestion from Bruno Haible.
29256
29257 2001-12-10  Jim Meyering  <meyering@lucent.com>
29258
29259         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
29260         xrealloc, Instead, include "xalloc.h".
29261         (initbuffer): Don't cast xmalloc return value to char*.
29262         (readline): Reword comment.
29263         Don't cast xrealloc return value to char*
29264         Return NULL, not 0.
29265
29266 2001-12-09  Jim Meyering  <meyering@lucent.com>
29267
29268         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
29269         about `signed and unsigned type in conditional expression'.
29270         * lib/posixtm.c (posix_time_parse): Likewise.
29271
29272         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
29273
29274         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
29275         to avoid a pedantic warning.
29276
29277         * lib/getstr.c: Don't include assert.h.
29278         (getstr): Remove warning-evoking assertions.
29279         Return -1 if offset parameter is out of bounds.
29280         Change the type of a local from int to size_t.
29281
29282         * lib/strftime.c (my_strftime_localtime_r): Include this function
29283         definition in the `#if ! HAVE_TM_GMTOFF' block.
29284
29285         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
29286         Include xalloc.h instead.
29287
29288 2001-12-02  Jim Meyering  <meyering@lucent.com>
29289
29290         * lib/tempname.c: Don't declare getenv, thus reverting the change of
29291         2001-11-18.  It's no longer necessary, now that stdlib.h is always
29292         included.
29293
29294         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
29295         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
29296
29297 2001-11-30  Akim Demaille  <akim@epita.fr>
29298
29299         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
29300         before being defined.
29301
29302 2001-11-27  Paul Eggert  <eggert@twinsun.com>
29303
29304         * lib/quotearg.h (quotearg_n, quotearg_n_style):
29305         First arg is int, not unsigned.
29306         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
29307         (SIZE_MAX, UINT_MAX): New macros.
29308         (quotearg_n_options): Abort if N is negative.
29309         Avoid overflow check on hosts where size_t is 64 bits and int
29310         is 32 bits, as overflow is impossible there.
29311         Fix off-by-one typo that caused unnecessary reallocation.
29312
29313 2001-11-27  Jim Meyering  <meyering@lucent.com>
29314
29315         * lib/tempname.c: Merge with version from libc.
29316         * lib/regex.c: Likewise.
29317
29318         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
29319         systems for which STDC_HEADERS is 0, it was not included, resulting in
29320         a warning about an integer-to-pointer conversion problem with getenv.
29321         Reported by Volker Borchert.
29322
29323 2001-11-26  Jim Meyering  <meyering@lucent.com>
29324
29325         * lib/gtod.h: Remove file.
29326         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
29327         * lib/gettimeofday.c: Don't include gtod.h.
29328         (GTOD_init): Remove function.
29329         (rpl_gettimeofday): Do its job here instead, rather than aborting.
29330         Suggestion from Volker Borchert.
29331
29332 2001-11-23  Jim Meyering  <meyering@lucent.com>
29333
29334         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
29335         it.
29336         * lib/hash.c (struct hash_table): Define it here instead.
29337
29338 2001-11-22  Jim Meyering  <meyering@lucent.com>
29339
29340         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
29341
29342 2001-11-20  Jim Meyering  <meyering@lucent.com>
29343
29344         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
29345         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
29346
29347 2001-11-19  Jim Meyering  <meyering@lucent.com>
29348
29349         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
29350         directory.  Use "conftestXXXXXX" as the template.
29351         Suggestion from Paul Eggert.
29352
29353         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
29354         immediately, so the test doesn't mistakenly hit the max-open-files
29355         limit.
29356
29357 2001-11-18  Paul Eggert  <eggert@twinsun.com>
29358
29359         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
29360         (TEMPORARIES): New macro.
29361         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
29362         removes an artificial limitation (e.g. HP-UX 10.20, where
29363         TMP_MAX is 17576).
29364
29365 2001-11-18  Jim Meyering  <meyering@lucent.com>
29366
29367         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
29368
29369 2001-11-18  Jim Meyering  <meyering@lucent.com>
29370
29371         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
29372         on SunOS 4.
29373
29374         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
29375         files will be created before anything else.
29376
29377 2001-11-17  Paul Eggert  <eggert@twinsun.com>
29378
29379         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
29380         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
29381
29382 2001-11-17  Jim Meyering  <meyering@lucent.com>
29383
29384         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
29385         Prompted by a report from Bob Proulx.
29386
29387         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
29388         Instead, require UTILS_FUNC_MKSTEMP.
29389
29390 2001-11-17  Jim Meyering  <meyering@lucent.com>
29391
29392         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
29393         Now, that's done as part of AC_FUNC_STRTOD.
29394
29395 2001-11-17  Jim Meyering  <meyering@lucent.com>
29396
29397         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
29398         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
29399         rather than group writable.  Patch by Juan F. Codagnone.
29400
29401         * lib/readtokens.c: Remove explicit declarations of xmalloc and
29402         xrealloc, Instead, include "xalloc.h".
29403
29404         * lib/mountlist.c: Include unlocked-io.h after all system headers.
29405         Remove explicit declarations of xmalloc, xrealloc,
29406         and xstrdup.  Instead, include "xalloc.h".
29407
29408         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
29409         unlocked-io.h.
29410         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
29411         Likewise.
29412         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
29413
29414         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
29415         Reported by Padraig Brady.
29416
29417         * lib/mkstemp.c: #undef mkstemp.
29418         Include config.h.
29419         (rpl_mkstemp): Rename from mkstemp.
29420         Protoize.
29421
29422 2001-11-16  Jim Meyering  <meyering@lucent.com>
29423
29424         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
29425         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
29426         determine the amount of total physical memory, use pstat_getstatic.
29427         HPUX-11 doesn't define _SC_PHYS_PAGES.
29428         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
29429         If sysconf couldn't be used to determine the amount of available
29430         physical memory, use both pstat_getstatic and pstat_getdynamic.
29431         Based on a patch from Bob Proulx.
29432
29433 2001-11-10  Jim Meyering  <meyering@lucent.com>
29434
29435         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
29436         (jm_PREREQ): Use it.
29437
29438 2001-11-09  Jim Meyering  <meyering@lucent.com>
29439
29440         * m4/jm-macros.m4: Require autoconf-2.52f.
29441         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
29442         Use these AC_-prefixed names, not the AM_-prefixed ones.
29443
29444         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
29445
29446 2001-11-05  Jim Meyering  <meyering@lucent.com>
29447
29448         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
29449
29450 2001-11-04  Jim Meyering  <meyering@lucent.com>
29451
29452         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
29453         $DEFS.
29454
29455 2001-11-03  Jim Meyering  <meyering@lucent.com>
29456
29457         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
29458         of AC_DEFUN.
29459
29460         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
29461         know the name of the variable in the macro definition.
29462
29463 2001-11-03  Jim Meyering  <meyering@lucent.com>
29464
29465         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
29466         in argmatch_to_argument call.
29467
29468         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
29469         argument.
29470
29471         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
29472         e.g., a fault due to an attempt to free a NULL pointer.
29473
29474 2001-11-01  Jim Meyering  <meyering@lucent.com>
29475
29476         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
29477         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
29478
29479 2001-11-01  Jim Meyering  <meyering@lucent.com>
29480
29481         * lib/dirfd.c, lib/dirfd.h: New files.
29482         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
29483
29484         * lib/hash.c (hash_print) [TESTING]: Clean up.
29485
29486 2001-10-22  Paul Eggert  <eggert@twinsun.com>
29487
29488         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
29489         to avoid a warning if -Wall.
29490
29491 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
29492
29493         * README: New file
29494         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
29495         (per RMS's instructions, this is now the canonical source)
29496         * lgpl/, gpl/: New directories.
29497
29498 2001-10-21  Paul Eggert  <eggert@twinsun.com>
29499
29500         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
29501
29502 2001-10-21  Jim Meyering  <meyering@lucent.com>
29503
29504         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
29505         this code would end up calling gettext even in packages built
29506         with --disable-nls.
29507         * lib/getopt.c (_): Likewise.
29508         * lib/regex.c (_): Likewise.
29509
29510 2001-10-20  Paul Eggert  <eggert@twinsun.com>
29511
29512         * m4/error.m4 (jm_PREREQ_ERROR):
29513         Do not invoke AC_CHECK_FUNCS with strerror_r, as
29514         AC_FUNC_STRERROR_R does that.
29515         Check for strerror declaration.
29516
29517         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
29518         are supposed to have them these days.
29519         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
29520         Merge changes from latest Autoconf CVS.
29521         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
29522         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
29523         POSIX decided to standardize on the int flavor of strerror_r.
29524
29525 2001-10-20  Paul Eggert  <eggert@twinsun.com>
29526
29527         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
29528         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
29529         Use strerror_r that is only a macro, even if it is not a function.
29530         (strerror): Check for HAVE_DECL_STRERROR before declaring.
29531         (private_strerror): Use prototypes, not old-style function definition.
29532         (print_errno_message): New function.
29533         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
29534         char*-flavored one.
29535         (error_tail, error, error_at_line): Use it.
29536
29537 2001-10-11  Jim Meyering  <meyering@lucent.com>
29538
29539         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
29540         and quote_n (1, ... to avoid clobbering a buffer.
29541
29542 2001-10-05  Jim Meyering  <meyering@lucent.com>
29543
29544         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
29545         hash-pjw.h.
29546         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
29547         * lib/hash-pjw.h: New file.
29548
29549 2001-09-30  Jim Meyering  <meyering@lucent.com>
29550
29551         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
29552         `struct fsstat' has the `f_fstypename' member.
29553         Use that to define FS_TYPE, which is now used to make
29554         the getfsstat link test tighter.
29555
29556 2001-09-30  Jim Meyering  <meyering@lucent.com>
29557
29558         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
29559         Include <sys/ucred.h>, for Apple Darwin.
29560         Include sys/mount.h and sys/fs_types.h only if available.
29561         (FS_TYPE): Define.
29562         (read_filesystem_list): Use FS_TYPE.
29563
29564 2001-09-29  Paul Eggert  <eggert@twinsun.com>
29565
29566         * lib/exclude.c (excluded_filename): 0 -> false, since it's
29567         a boolean context.
29568
29569 2001-09-29  Jim Meyering  <meyering@lucent.com>
29570
29571         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
29572         [one-argument getmntent function]): Include stdio.h before mntent.h.
29573         SunOS 4.1.x needs it for the declaration of `FILE'.
29574         Patch by Volker Borchert.
29575
29576         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
29577         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
29578         sys/fs_types.h, and make the link-test for getfsstat guard #include
29579         directives with appropriate #if HAVE_*_H tests so that we can
29580         detect getfsstat on Apple Darwin1.3.7 systems.
29581         Reported by Nelson Beebe.
29582         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
29583
29584 2001-09-28  Paul Eggert  <eggert@twinsun.com>
29585
29586         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
29587         #defines strtoimax.  Also treat the other strto* functions
29588         like strtoimax.
29589
29590         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
29591         Check for strtoul and strtoumax,
29592         as those declarations are made even in the signed case.
29593         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
29594         Likewise, for strtol and strtoimax.
29595
29596 2001-09-28  Paul Eggert  <eggert@twinsun.com>
29597
29598         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
29599         #defines strtoimax.  Also treat the other strto* functions
29600         like strtoimax.
29601
29602         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
29603         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
29604         (strtoimax, strtoumax): Do not declare if already defined as a macro.
29605
29606 2001-09-26  Jim Meyering  <meyering@lucent.com>
29607
29608         Most macros in unlocked-io.h had the wrong number of arguments.
29609         * lib/gen-uio: New script.
29610         (USE_UNLOCKED_IO): Define to 1 if not already defined.
29611         * lib/unlocked-io.hin: Remove file.
29612         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
29613         rather than trying to embed it here.
29614         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
29615         Reported by Padraig Brady.
29616
29617 2001-09-25  Volker Borchert  <bt@teknon.de>
29618
29619         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
29620         `result'.
29621
29622 2001-09-24  Jim Meyering  <meyering@lucent.com>
29623
29624         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
29625
29626 2001-09-23  Jim Meyering  <meyering@lucent.com>
29627
29628         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
29629         instead of the mere test for existence of mntent.h.  The latter
29630         would get a false-positive on AIX 3.4 systems.
29631         In the outer getmntent if-block, don't die if neither of the getmntent
29632         tests succeeds.  Instead, just fall through and continue with the
29633         remaining tests.
29634
29635 2001-09-23  Jim Meyering  <meyering@lucent.com>
29636
29637         * lib/mountlist.c: Remove useless parentheses in #if directives.
29638         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
29639         the deprecated MOUNTED symbol is no longer defined in mntent.h.
29640
29641 2001-09-22  Jim Meyering  <meyering@lucent.com>
29642
29643         * m4/gettext.m4: New file.  From gettext.
29644         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
29645         * m4/progtest.m4: Likewise
29646         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
29647         * m4/glibc21.m4: Likewise.
29648
29649         * m4/libintl.m4: Remove.  No longer used.
29650
29651 2001-09-22  Jim Meyering  <meyering@lucent.com>
29652
29653         * lib/localcharset.c: Update from latest gettext.
29654         * lib/config.charset: Likewise.
29655
29656 2001-09-20  Jim Meyering  <meyering@lucent.com>
29657
29658         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
29659         strtoimax.
29660         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
29661         strtoumax.
29662
29663 2001-09-20  Jim Meyering  <meyering@lucent.com>
29664
29665         * lib/xstrtol.c (strtoimax): Guard declaration with
29666         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
29667         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
29668         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
29669         (strtoumax): Likewise, for completeness (it wasn't necessary).
29670
29671 2001-09-17  Paul Eggert  <eggert@twinsun.com>
29672
29673         * lib/strtoimax.c (HAVE_LONG_LONG):
29674         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
29675         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
29676         to work around bug in IBM C compiler.
29677
29678 2001-09-17  Jim Meyering  <meyering@lucent.com>
29679
29680         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
29681         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
29682         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
29683         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
29684         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
29685         whenever the right hand side need not be expanded by the shell.
29686
29687 2001-09-16  Paul Eggert  <eggert@twinsun.com>
29688
29689         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
29690         library.  It's not correct, as some older glibcs are buggy.
29691         fnmatch wasn't fixed until glibc 2.2.
29692
29693         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
29694         special shell magic here.
29695
29696 2001-09-16  Jim Meyering  <meyering@lucent.com>
29697
29698         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
29699         * m4/jm-macros.m4: Require it.
29700
29701 2001-09-16  Jim Meyering  <meyering@lucent.com>
29702
29703         * lib/mkdir.c: New file.
29704
29705 2001-09-15  Jim Meyering  <meyering@lucent.com>
29706
29707         * m4/jm-macros.m4: Check for help2man.
29708
29709 2001-09-11  Jim Meyering  <meyering@lucent.com>
29710
29711         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
29712         The body, by Paul Eggert, was moved here from configure.in.
29713         * m4/jm-macros.m4: Require UTILS_HOST_OS.
29714
29715 2001-09-04  Paul Eggert  <eggert@twinsun.com>
29716
29717         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
29718         (jm_PREREQ): Use it.
29719
29720 2001-09-04  Paul Eggert  <eggert@twinsun.com>
29721
29722         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
29723         Use ssize_t, not int, to store result of readlink.
29724         Check for ssize_t overflow as well as size_t overflow,
29725         as POSIX says the result of readlink is implementation-defined
29726         when ssize_t overflows.
29727         Remove unnecessary cast to char*.
29728         Use free+malloc instead of realloc, as the storage doesn't need
29729         to be preserved and it's clearer and can be more efficient that way.
29730         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
29731         * lib/xreadlink.h (xreadlink): Update prototype.
29732
29733 2001-09-04  Paul Eggert  <eggert@twinsun.com>
29734
29735         * lib/xgetcwd.c: Revert some of the previous change; intead,
29736         fix the HAVE_GETCWD_NULL code to behave more like the
29737         !HAVE_GETCWD_NULL code used to.
29738
29739         Include "xalloc.h".
29740         (xgetcwd): Do not return NULL when memory is exhausted; instead,
29741         invoke xalloc_die.
29742
29743 2001-09-03  Paul Eggert  <eggert@twinsun.com>
29744
29745         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
29746         sys/param.h, as pathmax.h includes them.
29747
29748 2001-09-03  Paul Eggert  <eggert@twinsun.com>
29749
29750         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
29751         (jm_PREREQ_XGETCWD): New macro.
29752
29753         * m4/getcwd.m4: New file.
29754
29755 2001-09-03  Paul Eggert  <eggert@twinsun.com>
29756
29757         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
29758         like the HAVE_GETCWD_NULL code.
29759         Include pathmax.h if not HAVE_GETCWD.
29760         Do not include xalloc.h.
29761         (INITIAL_BUFFER_SIZE): New symbol.
29762         Do not use xmalloc / xrealloc, since the caller is responsible for
29763         handling errors.  Preserve errno around `free' during failure.
29764         Do not overrun buffer when using getwd.
29765
29766 2001-09-03  Paul Eggert  <eggert@twinsun.com>
29767
29768         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
29769         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
29770         getcwd (NULL, 0).
29771
29772 2001-09-03  Paul Eggert  <eggert@twinsun.com>
29773
29774         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
29775         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
29776         spotted by Jim Meyering.
29777
29778 2001-09-03  Jim Meyering  <meyering@lucent.com>
29779
29780         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
29781         failure.
29782
29783 2001-09-02  Jim Meyering  <meyering@lucent.com>
29784
29785         * lib/error.c: Update from GNU libc.
29786
29787 2001-09-01  Jim Meyering  <meyering@lucent.com>
29788
29789         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
29790         Used by df.
29791
29792 2001-09-01  Jim Meyering  <meyering@lucent.com>
29793
29794         * lib/xreadlink.c: New file.
29795         * lib/xreadlink.h: New file.
29796         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
29797         xreadlink.h.
29798
29799         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
29800         doesn't conflict with sparc Solaris 7's definition in
29801         /usr/include/sys/int_types.h.
29802
29803         * lib/exclude.c: Use `""', not `<>' to #include non-system header
29804         files.
29805         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
29806         and strncasecmp as r-values.  Unixware didn't have declarations.
29807
29808 2001-08-31  Paul Eggert  <eggert@twinsun.com>
29809
29810         * lib/xstrtol.h: Add copyright notice.
29811         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
29812         LONGINT_INVALID_SUFFIX_CHAR.
29813
29814 2001-08-31  Paul Eggert  <eggert@twinsun.com>
29815
29816         * lib/xstrtol.c (strtoimax): New decl.
29817
29818 2001-08-31  Paul Eggert  <eggert@twinsun.com>
29819
29820         * lib/xgetcwd.c: Don't include pathmax.h.
29821         Include stdlib.h and unistd.h if available.
29822         Include xalloc.h.
29823         (xmalloc, xstrdup, free): Remove decls.
29824         (xgetcwd): Don't assume sizes fit in unsigned.
29825         Check for overflow when computing sizes.
29826         Simplify reallocation code.
29827
29828 2001-08-31  Paul Eggert  <eggert@twinsun.com>
29829
29830         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
29831         a directory's st_size can have an arbitrary value, so the old
29832         usage could waste an arbitrary amount of memory.  All uses
29833         changed.
29834         * lib/savedir.h: Update prototype.
29835
29836 2001-08-31  Paul Eggert  <eggert@twinsun.com>
29837
29838         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
29839
29840         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
29841         old strtoimax.c.
29842
29843         Also, make the following further changes to make this file's
29844         configuration more similar to that of strtol.c:
29845         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
29846         (strtoumax, uintmax_t, strtoull, strtol): Remove.
29847         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
29848         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
29849         changed to signed values.
29850
29851         And make the following changes as well:
29852         Fix copyright notice, as 1999 was missing.
29853         (verify): New macro.
29854         (strtoimax): Check sizes at compile-time, not run-time.
29855         Prefer strtol to strtoll if both work.
29856         (main): Remove; it was not that useful and was a pain to maintain.
29857
29858         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
29859
29860 2001-08-31  Jim Meyering  <meyering@lucent.com>
29861
29862         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
29863         Use an initial, malloc'd, buffer of length 128 rather than
29864         a statically allocated one of length 1024.
29865
29866 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29867
29868         Simplify code, partly by assuming autoconf 2.52 semantics.
29869
29870         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
29871
29872         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
29873         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
29874         All uses removed.
29875         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
29876         Move AC_REQUIRE to next-to-top level, to avoid confusion.
29877         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
29878         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
29879         jm_AC_HEADER_INTTYPES_H.
29880         * m4/jm-macros.m4 (jm_MACROS): Likewise.
29881
29882         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
29883
29884         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
29885         Quote first arg of AC_DEFUN.
29886         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
29887         since they are needed to parse the include file even if we need
29888         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
29889         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
29890         but with opposite signedness.
29891
29892 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29893
29894         Merge 'exclude' changes from tar 1.13.22.
29895         This fixes one or two unlikely storage allocation overflow bugs,
29896         but doesn't change user-visible behavior otherwise.
29897
29898 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29899
29900         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
29901         (jm_PREREQ_EXCLUDE): New macro.
29902
29903 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29904
29905         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
29906         tm to be declared.
29907
29908 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29909
29910         * lib/hash.c: Remove '2001' from copyright notice.
29911
29912 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29913
29914         * lib/full-write.h: New file.
29915         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
29916         * lib/full-write.c: Correct credits, as cccp.c no longer
29917         exists and anyway it was so heavily changed from the old cccp
29918         code as to be unrecognizable.  Include full-write.h.
29919         (full_write) Return size_t, with short writes meaning failure.
29920         All callers changed.  This fixes a bug with large buffers
29921         on 64-bit hosts.
29922         * lib/utime.c: Include full-write.h.
29923
29924 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29925
29926         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
29927         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
29928         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
29929         Include if available.
29930         (<xalloc.h>): Include
29931         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
29932         (verify): New macro.  Use it to verify that EXCLUDE macros do not
29933         collide with FNM macros.
29934         (struct patopts): New struct.
29935         (struct exclude): Use it, as exclude patterns now come with options.
29936         (new_exclude): Support above changes.
29937         (new_exclude, add_exclude_file):
29938         Initial size must now be a power of two to simplify overflow checking.
29939         (free_exclude, fnmatch_no_wildcards): New function.
29940         (excluded_filename): No longer requires options arg, as the options
29941         are determined by add_exclude.  Now returns bool, not int.
29942         (excluded_filename, add_exclude):
29943         Add support for the fancy new exclusion options.
29944         (add_exclude, add_exclude_file): Now takes int options arg.
29945         Check for arithmetic overflow when computing sizes.
29946         (add_exclude_file): xrealloc might modify errno, so don't
29947         realloc until after errno might be used.
29948
29949         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
29950         New macros.
29951         (free_exclude): New decl.
29952         (add_exclude, add_exclude_file): Now takes int options arg.
29953         (excluded_filename): No longer requires options arg, as the options
29954         are determined by add_exclude.  Now returns bool, not int.
29955
29956 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29957
29958         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
29959
29960 2001-08-27  Jim Meyering  <meyering@lucent.com>
29961
29962         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
29963
29964         * lib/version-etc.c (N_): Remove definition.
29965         Revert most of last change.
29966         Instead, simply don't mark the `Copyright...' string for translation.
29967         Based on advice from Paul Eggert.
29968
29969         * lib/strtoxmax.c: Tweak comment.
29970
29971 2001-08-26  Jim Meyering  <meyering@lucent.com>
29972
29973         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
29974
29975         * m4/xstrtoimax.m4: New file.
29976         * m4/xstrtoumax.m4: Add comments explaining why we
29977         AC_REPLACE_FUNCS(strtol).
29978
29979 2001-08-26  Jim Meyering  <meyering@lucent.com>
29980
29981         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
29982         of copyright with `%s' so translators don't get an untranslated
29983         message in 2002.
29984         (COPYRIGHT_YEAR): Define.
29985         (version_etc): Use fprintf rather than fputs.
29986         Suggestion from Ulrich Drepper.
29987
29988         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
29989
29990         * lib/strtoll.c: New file, from GNU libc.
29991         * lib/xstrtoimax.c: New file.
29992
29993         * lib/xstrtol.h: Add xstrtoimax.
29994         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
29995         * lib/strtoimax.c: New file.  Likewise, but first define
29996         STRTOUXMAX_SIGNED.
29997
29998         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
29999         ...
30000         * lib/strtoxmax.c: ... then renamed to this.
30001
30002 2001-08-18  Paul Eggert  <eggert@twinsun.com>
30003
30004         * m4/inttypes.m4: Add AC_PREREQ(2.13).
30005         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
30006         (jm_AC_TYPE_INTMAX_T): New macro.
30007         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
30008
30009         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
30010
30011         * m4/longlong.m4: Renamed from ulonglong.m4.
30012         * m4/inttypes.m4: Renamed from inttypes_h.m4.
30013         * m4/uintmax_t.m4: Removed.
30014
30015 2001-08-13  Paul Eggert  <eggert@twinsun.com>
30016
30017         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
30018         Port to Solaris 8, where 'sed' requires a space after the 'r'
30019         command, and where sh dislikes "$/".  Clean up the spacing a bit.
30020         Redirect output to $tmp just once.
30021
30022 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
30023
30024         * lib/addext.c (<errno.h>): Include.
30025         (errno): Declare if not defined.
30026         (addext): Work correctly when pathconf returns -1 and leaves
30027         errno alone because there is no limit.  Also, work even if
30028         pathconf returns a value greater than SIZE_MAX.
30029
30030 2001-08-12  Jim Meyering  <meyering@lucent.com>
30031
30032         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
30033         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
30034         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
30035         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
30036         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
30037         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
30038         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
30039         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
30040         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
30041         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
30042         utime.m4, utimes.m4, xstrtoumax.m4:
30043         Quote the first argument in each use of AC_DEFUN.
30044
30045 2001-08-12  Jim Meyering  <meyering@lucent.com>
30046
30047         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
30048         Simply `return getcwd (NULL, 0);'.
30049         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
30050         Use 1300 as initial value for length, not PATH_MAX.
30051
30052         * lib/pathmax.h: Clean up cpp syntax.
30053
30054 2001-08-12  Jim Meyering  <meyering@lucent.com>
30055
30056         * lib/gettimeofday.c: New file.
30057         * lib/gtod.h: New file.
30058         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
30059
30060 2001-08-05  Jim Meyering  <meyering@lucent.com>
30061
30062         * m4/jm-macros.m4: Require autoconf-2.52.
30063
30064 2001-08-04  Jim Meyering  <meyering@lucent.com>
30065
30066         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
30067         stmt, to get in sync with glibc.
30068
30069 2001-08-03  Paul Eggert  <eggert@twinsun.com>
30070
30071         The following changes are from gettext 0.10.39 as maintained by
30072         Bruno Haible.
30073
30074         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
30075         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
30076         with inverted sense.  All uses changed.
30077
30078         * lib/mbswidth.c: Don't include <limits.h>.
30079         Include <stdlib.h> and <string.h> unconditionally.
30080         (iswcntrl, mbsinit, ISCNTRL): New macros.
30081         (mbsnwidth): Use K&R style function declarations.
30082         Don't bother checking for MB_LEN_MAX == 1, since the compiler
30083         can optimize it when MB_CUR_MAX == 1.
30084         The width of control characters is zero, not 1.
30085
30086 2001-08-03  Paul Eggert  <eggert@twinsun.com>
30087
30088         The following changes are from gettext 0.10.39 as maintained by
30089         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
30090
30091         * m4/codeset.m4: Upgrade to serial AM1.
30092         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
30093         all uses changed.  Quote first arg of AC_DEFUN.
30094         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
30095
30096         * m4/iconv.m4: Upgrade to serial AM2.
30097         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
30098         Add --with-libconv-prefix.
30099         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
30100         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
30101         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
30102         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
30103         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
30104
30105         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
30106         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
30107         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
30108         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
30109         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
30110         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
30111         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
30112         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
30113         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
30114
30115         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
30116         string.h any more.
30117
30118         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
30119         not the default value.
30120
30121         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
30122         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
30123         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
30124         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
30125         Also check for iswcntrl, used for wcwidth fallback.
30126         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
30127         to Autoconf 2.13.
30128
30129 2001-08-03  Jim Meyering  <meyering@lucent.com>
30130
30131         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
30132         as it was in the original.  Reported by Paul Eggert.
30133
30134 2001-07-16  Jim Meyering  <meyering@lucent.com>
30135
30136         * m4/gettimeofday.m4: New file.
30137         Prompted by a report from Bernhard Baehr.
30138
30139 2001-07-15  Jim Meyering  <meyering@lucent.com>
30140
30141         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
30142         stuff. Now it's in ../Makefile.cfg.
30143
30144 2001-07-15  Jim Meyering  <meyering@lucent.com>
30145
30146         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
30147         (BUILT_SOURCES): Add unlocked-io.h.
30148         (io_functions): Define.
30149         (unlocked-io.h): New rule.
30150         (DISTCLEANFILES): Add unlocked-io.h.
30151         (all-local): Depend on unlocked-io.h, to ensure it is created.
30152
30153         * lib/unlocked-io.hin: New file
30154
30155         * lib/regex.c: Update from glibc.
30156
30157 2001-07-05  Jim Meyering  <meyering@lucent.com>
30158
30159         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
30160         recommendation.
30161         (libfetish_a_SOURCES): Put all .h files here instead.
30162         Remove a thus-exposed (better checks in automake) duplicate and
30163         two unnecessary .h files.
30164
30165 2001-07-04  Jim Meyering  <meyering@lucent.com>
30166
30167         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
30168         that generates jm-glibc-io.m4 so that it doesn't trigger any make
30169         distcheck failure.
30170
30171 2001-07-02  Jim Meyering  <meyering@lucent.com>
30172
30173         The following changes were prompted by suggestions from Bruno Haible.
30174
30175         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
30176         is now generated.
30177         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
30178         definition of EXTRA_DIST.
30179         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
30180         ensure that the generated file is created/updated whenever the list
30181         of $(unlocked_functions) is changed.
30182         (jm-glibc-io.m4): New rule.
30183         (unlocked-io.h): New rule -- currently unused.
30184
30185 2001-06-24  Jim Meyering  <meyering@lucent.com>
30186
30187         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
30188         unmatched right bracket, rather than kludging it with an extra,
30189         falsely-matching quote in a comment.  Patch by Akim Demaille.
30190
30191 2001-06-11  Jim Meyering  <meyering@lucent.com>
30192
30193         * lib/regex.c: Update from GNU libc.
30194
30195 2001-05-27  Jim Meyering  <meyering@lucent.com>
30196
30197         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
30198         Check for ut_type in struct utmp.
30199
30200 2001-05-27  Jim Meyering  <meyering@lucent.com>
30201
30202         * lib/readutmp.h (UT_TYPE): Define.
30203
30204 2001-05-24  Jim Meyering  <meyering@lucent.com>
30205
30206         * lib/argmatch.c: Include "quote.h".
30207         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
30208         quote function.  Reported by Göran Uddeborg.
30209
30210 2001-05-22  Jim Meyering  <meyering@lucent.com>
30211
30212         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
30213         now that we use the package-supplied version unconditionally.
30214         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
30215
30216 2001-05-21  Jim Meyering  <meyering@lucent.com>
30217
30218         * m4/regex.m4: Change a couple backticks to single quotes to avoid
30219         shell syntax errors.
30220
30221 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
30222
30223         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
30224
30225 2001-05-20  Paul Eggert  <eggert@twinsun.com>
30226
30227         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
30228         Don't bother to check library strftime, since
30229         we'll be using our own my_strftime function anyway.
30230         Define my_strftime instead of strftime.
30231
30232 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
30233
30234         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
30235         which is not yet declared.
30236
30237 2001-05-15  Jim Meyering  <meyering@lucent.com>
30238
30239         * m4/regex.m4: Use proper quoting so brackets appear in the test
30240         program.
30241         Reported by, and with help from, Bruno Haible.
30242
30243 2001-05-13  Jim Meyering  <meyering@lucent.com>
30244
30245         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
30246         undefined.
30247
30248 2001-05-11  Paul Eggert  <eggert@twinsun.com>
30249
30250         dirname code cleanup.  base_name now behaves more compatibly
30251         with POSIX basename when given file names that have trailing
30252         slashes, and similarly for dir_name.  Add new primitives
30253         base_len and dir_len.  Put the directory-name-related decls
30254         into dirname.h.
30255
30256         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
30257         * lib/backupfile.c (base_name): Likewise.
30258         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
30259         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
30260         * lib/makepath.c (strip_trailing_slashes): Likewise.
30261         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
30262         ISSLASH): Likewise.
30263         * lib/rename.c (strip_trailing_slashes): Likewise.
30264         * lib/same.c (base_name): Likewise.
30265         * lib/stripslash.c (ISSLASH): Likewise.
30266
30267         * lib/addext.c: Include <dirname.h> after size_t is defined.
30268         * lib/backupfile.c: Likewise.
30269
30270         * lib/addext.c (addext): Use base_len to trim redundant
30271         trailing slashes instead of doing it ourselves.
30272         But do not trim the last slash if it is not redundant.
30273
30274         * lib/backupfile.c (find_backup_file_name,
30275         max_backup_version): Use base_len instead of rolling it ourselves.
30276         Handle the case of "" and (on DOS) "C:" correctly.
30277
30278         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
30279         needed. Include <string.h>, <dirname.h>.
30280         (base_name): Allow file names ending in slashes, other than names
30281         that are all slashes.  In this case, return the basename followed
30282         by the slashes.  This is more general, and can be used in places
30283         where the original base_name purposely had an assertion failure.
30284         (base_len): New function.
30285
30286         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
30287         Do not include <assert.h>; no longer needed.
30288         Include xalloc.h.
30289         (memrchr): Remove decl.
30290         (dir_name_r): Remove.
30291         (dir_len): Renamed from dirlen.  All callers changed.
30292         Rewrite in terms of base_name, for simplicity and consistency.
30293         (dir_name): Never return NULL.  All callers changed.
30294         Do not include <stdlib.h> in test program; no longer needed.
30295         return 0; is fine for test program.
30296
30297         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
30298         New macros.
30299         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
30300
30301         * lib/path-concat.c (path_concat): Use base_len to compute
30302         base length, not strlen; this means we cannot rely on memcpy
30303         to null-terminate.
30304
30305         * lib/same.c (STREQ): Remove.
30306         (same_name): Handle the case where the basename ends in trailing '/'.
30307
30308         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
30309         a slash was stripped.  Do not strip the last slash after a
30310         file system prefix.
30311
30312 2001-05-11  Paul Eggert  <eggert@twinsun.com>
30313
30314         * lib/Makefile.am (libfetish_a_SOURCES):
30315         Add strftime.c, since we now compile it on all hosts.
30316
30317         * lib/strftime.c (my_strftime):
30318         Define to nstrftime if emacs, but only if my_strftime is not defined.
30319         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
30320         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
30321         Add one more extra argument: a nanoseconds value.
30322         All uses changed.
30323         (ns): New macro.
30324         (my_strftime function): Add %N format.
30325         (emacs_strftimeu): Renamed from emacs_strftime,
30326         with extra ut argument.
30327
30328 2001-05-09  Paul Eggert  <eggert@twinsun.com>
30329
30330         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
30331
30332 2001-04-21  Jim Meyering  <meyering@lucent.com>
30333
30334         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
30335         doesn't interfere.
30336
30337 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
30338
30339         * m4/ftruncate.m4: Check for chsize.
30340         Link with ftruncate.o unconditionally if ftruncate is missing.
30341         This was required when cross-compiling to i586-mingw32msvc.
30342
30343 2001-04-08  Jim Meyering  <meyering@lucent.com>
30344
30345         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
30346         recomputed; that's necessary when the offset spans a DST transition.
30347         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
30348
30349 2001-04-02  Jim Meyering  <meyering@lucent.com>
30350
30351         * lib/regex.h, regex.c: Update from GNU libc.
30352
30353 2001-03-24  Jim Meyering  <meyering@lucent.com>
30354
30355         * m4/jm-macros.m4: Require autoconf-2.49d.
30356
30357 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
30358
30359         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
30360
30361 2001-03-19  Paul Eggert  <eggert@twinsun.com>
30362
30363         * lib/version-etc.c (version_etc_copyright): Update to 2001.
30364
30365 2001-03-17  Jim Meyering  <meyering@lucent.com>
30366
30367         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
30368         now that the version in autoconf is equivalent.
30369         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
30370
30371         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
30372         Suggestion from Akim Demaille.
30373
30374         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
30375         (jm_PREREQ_TEMPNAME): New function.
30376
30377 2001-03-16  Paul Eggert  <eggert@twinsun.com>
30378
30379         * lib/tempname.c (uint64_t): Define to uintmax_t if
30380         not defined, and if UINT64_MAX is not defined.
30381         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
30382         Reported by John David Anglin.
30383
30384 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
30385
30386         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
30387         resolve alias if codeset is empty.
30388         * lib/config.charset (BeOS): Use wildcard syntax.
30389
30390 2001-03-13  Jim Meyering  <meyering@lucent.com>
30391
30392         * lib/path-concat.c (path_concat)
30393         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
30394         concatenating e.g., `C:' and `foo'.
30395         From Bruno Haible.
30396
30397 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
30398
30399         * lib/localcharset.c (locale_charset): Don't use
30400         setlocale(LC_CTYPE,NULL). Don't return NULL.
30401         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
30402
30403 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
30404
30405         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
30406         support for DOS/DJGPP.
30407
30408 2001-03-01  Paul Eggert  <eggert@twinsun.com>
30409
30410         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
30411         lacks mkstemp.  Compile our own tempname.c if we compile our own
30412         mkstemp.c, as mkstemp relies on tempname.
30413
30414 2001-03-01  Jim Meyering  <meyering@lucent.com>
30415
30416         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
30417         AH_VERBATIM really does output its argument verbatim.
30418
30419 2001-02-28  Paul Eggert  <eggert@twinsun.com>
30420
30421         * lib/Makefile.am (libfetish_a_SOURCES):
30422         Add dup-safer.c, fopen-safer.c.
30423         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
30424
30425         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
30426         * lib/unistd-safer.h: New files.
30427
30428 2001-02-25  Paul Eggert  <eggert@twinsun.com>
30429
30430         The mkstemp replacement is taken from glibc 2.2.2, with some
30431         portability fixes for use outside glibc, as follows:
30432
30433         * lib/tempname.c (struct_stat64): New macro.
30434         (direxists, __gen_tempname): Use it.
30435         This avoids a portability problem with Solaris 8.
30436
30437         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
30438         (<stddef.h>, <stdint.h>, <string.h>):
30439         Include only if STDC_HEADERS || _LIBC.
30440         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
30441         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
30442         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
30443         (__set_errno): Define this macro if <errno.h> doesn't.
30444         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
30445         Define these macros if <stdio.h> doesn't.
30446         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
30447         Define these macros if <sys/stat.h>
30448         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
30449         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
30450         __xstat64): Define if not _LIBC.
30451         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
30452         (__gen_tempname): Invoke gettimeofday only if
30453         HAVE_GETTIMEOFDAY || _LIBC;
30454         otherwise, fall back on plain "time".
30455         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
30456
30457         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
30458
30459         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
30460
30461 2001-02-18  Paul Eggert  <eggert@twinsun.com>
30462
30463         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
30464
30465 2001-02-17  Paul Eggert  <eggert@twinsun.com>
30466
30467         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
30468         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
30469         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
30470         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
30471
30472 2001-02-17  Paul Eggert  <eggert@twinsun.com>
30473
30474         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
30475         Remove workaround macros for hosts that have mbrtowc but not
30476         mbstate_t, as we now insist on proper declarations for both
30477         before using mbrtowc.
30478
30479 2001-02-17  Jim Meyering  <meyering@lucent.com>
30480
30481         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
30482         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
30483         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
30484         UnixWare 7.1.1.
30485
30486         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
30487         rather than AC_CACHE_VAL.
30488
30489 2001-02-17  Jim Meyering  <meyering@lucent.com>
30490
30491         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
30492         around included file name.
30493
30494         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
30495
30496         * lib/strftime.c: Update from GNU libc (the only changes were to
30497         comments).
30498
30499 2001-02-17  Jim Meyering  <meyering@lucent.com>
30500
30501         * lib/regex.c: Update from libc.
30502
30503 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
30504
30505         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
30506         clash.
30507
30508 2001-02-16  Paul Eggert  <eggert@twinsun.com>
30509
30510         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
30511         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
30512         Reported by Mark Hounschell via Paul Eggert.
30513
30514 2001-02-07  Jim Meyering  <meyering@lucent.com>
30515
30516         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
30517
30518 2001-02-05  Jim Meyering  <meyering@lucent.com>
30519
30520         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
30521         it includes the patch required for `large file' support with at least
30522         HP-UX's 10.20 /bin/cc.
30523
30524 2001-02-03  Jim Meyering  <meyering@lucent.com>
30525
30526         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
30527         AS_IF, now that it works once again (mysteriously).
30528         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
30529
30530 2001-01-30  Jim Meyering  <meyering@lucent.com>
30531
30532         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
30533         * m4/chown.m4: Rename conftestchown to conftest.chown.
30534         * m4/rename.m4: s/conftestdir/conftest.d1/ and
30535         s/conftestdir2/conftest.d2/.
30536         * m4/utimes.m4: s/conftestdata/conftest.data/
30537         Inspired by Pavel Roskin's change in autoconf.
30538
30539 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
30540
30541         * lib/config.charset: Update for FreeBSD 4.2.
30542
30543 2001-01-27  Jim Meyering  <meyering@lucent.com>
30544
30545         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
30546         a use of AS_IF.
30547         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
30548
30549 2001-01-26  Jim Meyering  <meyering@lucent.com>
30550
30551         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
30552         quotearg.c includes it.
30553
30554 2001-01-26  Jim Meyering  <meyering@lucent.com>
30555
30556         * lib/quotearg.c: Include stddef.h.
30557         * lib/quote.c: Include stddef.h.
30558         Reported by Axel Kittenberger.
30559
30560         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
30561         line in double quotes so that it evokes a better diagnostic.
30562         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
30563         Reported by Axel Kittenberger.
30564
30565 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
30566
30567         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
30568         as if it was a `charset'.
30569
30570 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
30571
30572         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
30573         has const.
30574
30575 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
30576
30577         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
30578         to avoid a warning.  Add back 'const' to inptr.
30579
30580 2001-01-20  Jim Meyering  <meyering@lucent.com>
30581
30582         Be sure that headers are checked before used in code compiled
30583         for the type checks.
30584         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
30585         In place of that, invoke jm_CHECK_ALL_TYPES.
30586         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
30587         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
30588         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
30589         The check for ssize_t was mistakenly run before the test for unistd.h.
30590
30591         The configure-time check for stdbool.h was missing.
30592         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
30593         (jm_PREREQ_HASH): New function.
30594
30595 2001-01-17  Jim Meyering  <meyering@lucent.com>
30596
30597         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
30598         for autoconf-2.49c.
30599         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
30600
30601 2001-01-16  Jim Meyering  <meyering@lucent.com>
30602
30603         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
30604         From Bruno Haible.
30605
30606 2001-01-14  Jim Meyering  <meyering@lucent.com>
30607
30608         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
30609         foo and bar.  Create conftestdir/ in the script, not in the C code.
30610         Remove directories in the script, not in the C code.
30611         Remove conftestdir{,2} before trying to create the directory.
30612         Make the entire configure script fail if the mkdir fails.
30613
30614 2001-01-14  Jim Meyering  <meyering@lucent.com>
30615
30616         * lib/rename.c: New file.  From Volker Borchert.
30617         Include stdlib.h, string.h or strings.h, and xalloc.h.
30618         Use strip_trailing_slashes rather than open-coding it.
30619
30620 2001-01-03  Paul Eggert  <eggert@twinsun.com>
30621
30622         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
30623
30624 2001-01-03  Jim Meyering  <meyering@lucent.com>
30625
30626         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
30627         of local `inptr' to avoid warning with some system declarations of
30628         iconv.
30629
30630 2001-01-02  Volker Borchert  <bt@teknon.de>
30631
30632         * m4/rename.m4: New file.
30633         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
30634
30635 2001-01-01  Jim Meyering  <meyering@lucent.com>
30636
30637         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
30638         even on systems with utmpx.h.  It's necessary for the declaration of
30639         utmp's ut_user member.  Reported by Andreas Jaeger.
30640
30641         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
30642         available. They are required for the declarations of getgrgid and
30643         getpwuid resp.
30644         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
30645         Reported by Andreas Jaeger.
30646
30647 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
30648
30649         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
30650         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
30651         so `make install' also works in VPATH builds.
30652
30653 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
30654
30655         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
30656         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
30657         can be used in subdirectories.
30658
30659 2000-12-29  Paul Eggert  <eggert@twinsun.com>
30660
30661         * lib/modechange.c: Do not assume that mode_t uses the
30662         traditional octal encoding.  E.g. "chmod 1 FOO" should set
30663         the other-execute bit of FOO even if S_IXOTH != 1.
30664
30665         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
30666         WOTH, XOTH, ALLM): New macros.
30667         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
30668          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
30669         Use them.
30670         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
30671         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
30672         (mode_compile):
30673         No need to use uintmax_t; unsigned long is long enough.
30674         Don't bother to get suffix since we don't use it.
30675
30676 2000-12-26  Jim Meyering  <meyering@lucent.com>
30677
30678         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
30679         better with autoheader.
30680
30681 2000-12-24  Jim Meyering  <meyering@lucent.com>
30682
30683         * lib/hash.c (is_prime): Return explicit boolean values.
30684         (hash_get_first): Return NULL to appease Irix5.6's 89.
30685         Reported by Nelson Beebe.
30686
30687 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
30688
30689         * lib/localcharset.c (locale_charset): Add support for Win32.
30690
30691 2000-12-18  Paul Eggert  <eggert@twinsun.com>
30692
30693         * lib/physmem.h, lib/physmem.c: New files.
30694
30695         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
30696         (noinst_HEADERS): Add physmem.h.
30697
30698         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
30699         't' for compatibility with Solaris 8 sort.
30700
30701 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
30702
30703         * lib/config.charset: Add support for BeOS.
30704
30705 2000-12-17  Jim Meyering  <meyering@lucent.com>
30706
30707         * m4/dos.m4 (jm_AC_DOS): New file and macro.
30708         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
30709
30710 2000-12-16  Jim Meyering  <meyering@lucent.com>
30711
30712         This bug had a serious impact on chown: `chown N:M FILE' (for integer
30713         N and M) would have treated it like `chown N:N FILE'.
30714
30715         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
30716
30717 2000-12-16  Jim Meyering  <meyering@lucent.com>
30718
30719         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
30720         SHELLS_FILE to a file name that's useful on djgpp systems.
30721         Include stdlib.h.
30722         (ADDITIONAL_DEFAULT_SHELLS): Define.
30723         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
30724         Based mostly on a patch from Prashant TR.
30725
30726 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
30727
30728         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
30729         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
30730         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
30731
30732 2000-12-08  Andreas Schwab  <schwab@suse.de>
30733
30734         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
30735         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
30736
30737 2000-12-07  Jim Meyering  <meyering@lucent.com>
30738
30739         * lib/stripslash.c (ISSLASH): Define.
30740         (strip_trailing_slashes): Use ISSLASH rather than comparing against
30741         `/'.
30742         From Prashant TR.
30743
30744         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
30745         (dir_name_r): Declare this function as static.
30746         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
30747         manifest itself on a name containing a mix of slashes and
30748         backslashes.
30749         Make this function work with names starting with a DOS-style
30750         drive letter and colon prefix.
30751         (dir_name): Append `.' if necessary.
30752         Based mostly on patches from Prashant TR and Eli Zaretskii.
30753
30754         * lib/dirname.h (dir_name_r): Remove prototype.
30755
30756 2000-12-06  Paul Eggert  <eggert@twinsun.com>
30757
30758         * m4/off_t-format.m4: Remove this file.
30759         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
30760
30761 2000-12-06  Jim Meyering  <meyering@lucent.com>
30762
30763         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
30764         replacement strtoull, we may well need the replacement strtoul, too.
30765         Check for declarations of strtoul and strtoull.
30766         Check for strtol.  Mainly as a cue to cause automake to include
30767         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
30768         Check for limits.h -- strtol.c needs it.
30769
30770 2000-12-05  Jim Meyering  <meyering@lucent.com>
30771
30772         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
30773
30774 2000-12-04  Jim Meyering  <meyering@lucent.com>
30775
30776         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
30777         Also include memory.h, stdlib.h, unistd.h if appropriate.
30778         Reported by Andreas Jaeger (conflicting declaration of malloc).
30779
30780 2000-12-02  Jim Meyering  <meyering@lucent.com>
30781
30782         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
30783         * m4/jm-macros.m4 (jm_MACROS): require it.
30784
30785 2000-12-02  Jim Meyering  <meyering@lucent.com>
30786
30787         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
30788
30789 2000-12-01  Paul Eggert  <eggert@twinsun.com>
30790
30791         * lib/memrchr.c: Include <config.h> before any system include file.
30792
30793 2000-11-30  Jim Meyering  <meyering@lucent.com>
30794
30795         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
30796
30797 2000-11-30  Jim Meyering  <meyering@lucent.com>
30798
30799         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
30800
30801 2000-11-29  Paul Eggert  <eggert@twinsun.com>
30802
30803         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
30804
30805 2000-11-26  Jim Meyering  <meyering@lucent.com>
30806
30807         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
30808
30809 2000-11-22  Paul Eggert  <eggert@twinsun.com>
30810
30811         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
30812         size of (size_t) -1; it's not portable.
30813
30814 2000-11-17  Jim Meyering  <meyering@lucent.com>
30815
30816         * lib/strstr.c: Update from GNU libc.
30817
30818 2000-11-17  Akim Demaille  <akim@epita.fr>
30819
30820         * lib/obstack.h: Formatting changes.
30821         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
30822         prevent type checking.
30823         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
30824         cast the value to (void *): assigning a `foo *' to a `void *'
30825         variable is valid.
30826         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
30827
30828 2000-11-16  Jim Meyering  <meyering@lucent.com>
30829
30830         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
30831
30832 2000-11-11  Jim Meyering  <meyering@lucent.com>
30833
30834         * lib/error.c: Add a couple #includes, merging from GNU libc version.
30835
30836 2000-11-10  Jim Meyering  <meyering@lucent.com>
30837
30838         * lib/obstack.h: Update from GNU libc.
30839         * lib/obstack.c: Likewise.
30840
30841 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
30842
30843         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
30844
30845 2000-11-06  Paul Eggert  <eggert@twinsun.com>
30846
30847         * lib/getusershell.c (setusershell): Use rewind rather than
30848         fseek/fseeko, to avoid configuration hassles with fseeko.
30849         Don't bother opening SHELLS_FILE if shellstream is NULL;
30850         it's not necessary.
30851
30852 2000-11-05  Jim Meyering  <meyering@lucent.com>
30853
30854         * lib/makepath.h (make_dir): Declare.
30855         * lib/makepath.c (make_dir): Remove `static' attribute.
30856         Tweak a comment.
30857
30858 2000-11-04  Jim Meyering  <meyering@lucent.com>
30859
30860         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
30861
30862 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
30863
30864         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
30865         last one in a bucket, advance to the next bucket.
30866
30867 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
30868
30869         * lib/fnmatch.c: Do not comment out all the code if we are using
30870         the GNU C library, because in some cases we are replacing buggy
30871         code in the GNU C library itself.
30872
30873 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
30874
30875         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
30876         (regex_compile): Catch bogus \(\1\).
30877
30878 2000-10-30  Paul Eggert  <eggert@twinsun.com>
30879
30880         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
30881         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
30882         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
30883
30884 2000-10-30  Paul Eggert  <eggert@twinsun.com>
30885
30886         * lib/error.h, getline.h, modechange.h:
30887         Remove "2000" from Copyright line, as the file hasn't been
30888         changed this year other than in the copyright notice.
30889
30890         * lib/xalloc.h: Add "2000" to Copyright line, as this file
30891         was changed this year.
30892
30893 2000-10-29  Jim Meyering  <meyering@lucent.com>
30894
30895         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
30896         renaming.
30897         * m4/ls-mntd-fs.m4: Likewise
30898
30899 2000-10-29  Jim Meyering  <meyering@lucent.com>
30900
30901         * lib/xstat.in: Fix grammar in comment.
30902
30903 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
30904
30905         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
30906         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
30907         doesn't define __restrict_arr.
30908
30909 2000-10-28  Jim Meyering  <meyering@lucent.com>
30910
30911         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
30912         (jm_PREREQ_MEMCHR): New function.
30913
30914 2000-10-28  Jim Meyering  <meyering@lucent.com>
30915
30916         * lib/memchr.c: Update from libc.
30917         Adjust for portability:
30918         [HAVE_STDLIB_H]: Include stdlib.h.
30919         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
30920         Undef __memchr, too.
30921         [!weak_alias]: Define __memchr to memchr.
30922
30923         * lib/regex.c: Update from libc.
30924         * lib/regex.h: Likewise.
30925         * lib/getopt1.c: Likewise.
30926         * lib/memcmp.c: Likewise.
30927
30928         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
30929         Avoid using fseek, when possible -- it's broken by design.
30930         Patch by Ulrich Drepper.
30931
30932 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
30933
30934         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
30935         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
30936         Giving in to popular pressure to shut up the compiler with casts.
30937
30938 2000-10-26  Jim Meyering  <meyering@lucent.com>
30939
30940         * lib/strftime.c: Update from libc.
30941
30942 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
30943
30944         * regex.c: More `unsigned char' -> `re_char' changes.
30945         Also change several `int' into `re_wchar_t'.
30946         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
30947         (PUSH_FAILURE_POINTER): Don't cast any more.
30948         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
30949         We want GCC to complain, since this piece of code makes
30950         re_match non-reentrant, which *should* be fixed.
30951         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
30952         (EXTEND_BUFFER): Use RETALLOC.
30953         (SET_LIST_BIT): Don't cast.
30954         (re_wchar_t): New type.
30955         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
30956         that those two functions will always properly return.
30957         (IMMEDIATE_QUIT_CHECK): Cast to void.
30958         (analyse_first): Use recursion rather than an explicit stack.
30959         (re_compile_fastmap): Can't fail anymore.
30960         (re_search_2): Don't check re_compile_fastmap for failure.
30961         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
30962         Now also sets the new value (passed in a new argument).
30963         (re_match_2_internal): Use it.
30964         Also, use a new var `reg' of type size_t when looping through regs
30965         rather than reuse the inappropriate `mcnt'.
30966
30967 2000-10-25  Jim Meyering  <meyering@lucent.com>
30968
30969         * lib/obstack.c: Update from libc.
30970
30971 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
30972
30973         * regex.c (regex_compile): Change the way of handling a range from
30974         a char less than 256 to a char not less than 256.
30975
30976 2000-10-24  Andrew Innes  <andrewi@gnu.org>
30977
30978         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
30979         NT-Emacs only.
30980         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
30981         so that re_search functions only quit when callers expect them to.
30982
30983 2000-10-23  Jim Meyering  <meyering@lucent.com>
30984
30985         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
30986         wrong.  That set_locale call must not have any side effects.
30987         From Paul Eggert.
30988
30989 2000-10-22  Jim Meyering  <meyering@lucent.com>
30990
30991         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
30992         [CYCLIC]: Remove now-unused definition.
30993
30994         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
30995         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
30996         Suggestion from Ulrich Drepper.
30997
30998 2000-10-21  Jim Meyering  <meyering@lucent.com>
30999
31000         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
31001         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
31002         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
31003
31004 2000-10-21  Jim Meyering  <meyering@lucent.com>
31005
31006         * lib/dirname.c (memrchr): Declare if necessary.
31007         (dir_name): Remove the restriction that there be no
31008         trailing slashes.  Now, this code skips past them, effectively
31009         ignoring them.
31010         [TEST_DIRNAME] (main): New unit tests.
31011
31012         * lib/memrchr.c: New file from GNU libc.
31013         Undef __memrchr, too.
31014         [!weak_alias]: Define __memrchr to memrchr.
31015         Guard weak_alias use with `#ifdef weak_alias'.
31016
31017 2000-10-21  Jim Meyering  <meyering@lucent.com>
31018
31019         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
31020         (dir_name): Use dir_name_r.
31021         * lib/dirname.h (dir_name_r): Declare it.
31022
31023 2000-10-17  Jim Meyering  <meyering@lucent.com>
31024
31025         * lib/quote.h (PARAMS): Define and use.
31026         Reported by Akim Demaille.
31027
31028         * lib/getopt.c: Update from libc.
31029
31030 2000-10-16  Jim Meyering  <meyering@lucent.com>
31031
31032         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
31033         setlocale.
31034         From Jan Fedak.
31035
31036 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
31037
31038         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
31039
31040 2000-09-25  Jim Meyering  <meyering@lucent.com>
31041
31042         * lib/md5.h (rol): Define (from GnuPG).
31043
31044         * lib/sha.c: Give credit (GnuPG) where due.
31045         (M): Use rol rather than open-coding it.
31046         Add a FIXME comment.
31047
31048 2000-09-21  Jim Meyering  <meyering@lucent.com>
31049
31050         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
31051         Reported by Michael Stone.
31052
31053 2000-09-20  Jim Meyering  <meyering@lucent.com>
31054
31055         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
31056         (noinst_HEADERS): Add sha.h.
31057         Based on code from Scott G. Miller and from GnuPG.
31058
31059 2000-09-18  Jim Meyering  <meyering@lucent.com>
31060
31061         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
31062         LIBS. Otherwise, everyone ends up linking with -lelf for some
31063         configurations.
31064         Reported by Mike Stone.
31065
31066 2000-09-15  Jim Meyering  <meyering@lucent.com>
31067
31068         * lib/regex.c: Update from libc.
31069
31070 2000-09-10  Jim Meyering  <meyering@lucent.com>
31071
31072         * lib/getopt.c (_getopt_internal): Update from glibc.
31073
31074 2000-09-09  Jim Meyering  <meyering@lucent.com>
31075
31076         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
31077         think it should be used as a general replacement for isascii.
31078         * lib/fnmatch.c: Likewise.
31079         * lib/mbswidth.c: Likewise
31080         * lib/regex.c: Likewise.
31081
31082         Don't use atoi.
31083         * lib/userspec.c: Include sys/param.h and limits.h.
31084         Include xstrtol.h.
31085         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
31086         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
31087         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
31088         UID, GID.  Check range.
31089
31090 2000-09-06  Jim Meyering  <meyering@lucent.com>
31091
31092         * lib/getopt.c (_getopt_internal): Update from glibc.
31093
31094 2000-08-30  Jim Meyering  <meyering@lucent.com>
31095
31096         * lib/strftime.c: Merge in changes from GNU libc.
31097
31098 2000-08-26  Jim Meyering  <meyering@lucent.com>
31099
31100         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
31101         * m4/fpending.m4: New file.
31102
31103 2000-08-26  Jim Meyering  <meyering@lucent.com>
31104
31105         * lib/closeout.c: Include "__fpending.h".
31106         (close_stdout_status): Return right away if there's nothing to flush.
31107
31108         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
31109         * lib/__fpending.c: New file.
31110         * lib/__fpending.h: New file.
31111
31112 2000-08-20  Jim Meyering  <meyering@lucent.com>
31113
31114         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
31115         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
31116         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
31117
31118 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
31119
31120         Improve fileutils installation on systems where running
31121         programs (like install) can't be unlinked.
31122         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
31123         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
31124
31125 2000-08-07  Paul Eggert  <eggert@twinsun.com>
31126
31127         Standardize on "memory exhausted" instead of "Memory exhausted"
31128         or "virtual memory exhausted".
31129         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
31130         "virtual memory exhausted".
31131         * lib/same.c (same_name): Invoke xalloc_die instead of printing
31132         our own message.
31133         * lib/userspec.c (parse_user_spec): Likewise.
31134         * lib/bumpalloc.h: comment fix
31135         * lib/same.c, userspec.c: Include xalloc.h.
31136
31137         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
31138         not char *const and pointing to a constant array.
31139         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
31140         (xrealloc): Comment fix.
31141
31142         * lib/userspec.c (parse_user_spec):
31143         Don't translate a message until just before returning,
31144         to avoid unnecessary translation.
31145
31146 2000-08-07  Jim Meyering  <meyering@lucent.com>
31147
31148         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
31149         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
31150         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
31151         getgroups.c, gethostname.c, getopt.h, group-member.c,
31152         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
31153         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
31154         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
31155         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
31156         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
31157         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
31158         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
31159         yesno.c: Back out Copyright date changes for each file with no change
31160         this year.  This eases coordination with other programs using the same
31161         source code modules.  From Paul Eggert.
31162
31163 2000-08-06  Paul Eggert  <eggert@twinsun.com>
31164
31165         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
31166         not char, for compatibility with glibc 2.1.3 strftime.c.
31167
31168 2000-08-03  Greg McGary  <greg@mcgary.org>
31169
31170         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
31171         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
31172         (EXTEND_BUFFER): Use them.
31173
31174 2000-08-01  Jim Meyering  <meyering@lucent.com>
31175
31176         * lib/dirname.c (ISSLASH): Define.
31177         (BACKSLASH_IS_PATH_SEPARATOR): Define.
31178         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
31179         both `\' and `/' may be use as path separators.
31180         Based on a patch from Prashant TR.
31181
31182 2000-07-31  Paul Eggert  <eggert@twinsun.com>
31183
31184         * lib/quotearg.c (quotearg_n_options): Don't make the initial
31185         slot vector a constant, since it might get modified.
31186
31187 2000-07-31  Jim Meyering  <meyering@lucent.com>
31188
31189         * lib/xmalloc.c: Use `virtual memory exhausted', not
31190         `Memory exhausted'.
31191         * lib/obstack.c (print_and_abort): Likewise.
31192
31193 2000-07-30  Paul Eggert  <eggert@twinsun.com>
31194
31195         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
31196         buffer, so that the caller can always quote one small
31197         component of a "memory exhausted" message in slot 0.
31198         From a suggestion by Jim Meyering.
31199
31200 2000-07-30  Jim Meyering  <meyering@lucent.com>
31201
31202         * lib/makepath.c (make_path): Quote the other instance, too.
31203
31204         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
31205         (STATIC_BUF_SIZE): Define.
31206         (quotearg_n_options): Use only statically allocated storage when
31207         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
31208         than STATIC_BUF_SIZE.
31209
31210 2000-07-29  Jim Meyering  <meyering@lucent.com>
31211
31212         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
31213         * lib/dirname.c (dir_name): Likewise.
31214
31215         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
31216         `/'.
31217
31218         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
31219         (dir_name): Assert that there are no trailing slashes.
31220
31221 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
31222
31223         * lib/mbswidth.h (mbswidth): Add a flags argument.
31224         (mbswidth): New declaration.
31225         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
31226         * lib/mbswidth.c (mbswidth): Add a flags argument.
31227         (mbsnwidth): New function.
31228
31229 2000-07-24  Jim Meyering  <meyering@lucent.com>
31230
31231         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
31232
31233 2000-07-23  Paul Eggert  <eggert@twinsun.com>
31234
31235         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
31236
31237 2000-07-23  Paul Eggert  <eggert@twinsun.com>
31238
31239         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
31240         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
31241         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
31242         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
31243         invoke multibyte primitives.
31244
31245 2000-07-23  Paul Eggert  <eggert@twinsun.com>
31246
31247         * lib/quotearg.c:
31248         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
31249         so that mbstate_t is always defined.
31250
31251         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
31252         be 1 in at least one GCC installation, and this configuration
31253         error is likely to be common.  Ignoring MB_LEN_MAX hurts
31254         performance on hosts that have mbrtowc but have only unibyte
31255         locales, but I assume these hosts are rare.
31256
31257 2000-07-23  Paul Eggert  <eggert@twinsun.com>
31258
31259         * lib/mbswidth.c (_XOPEN_SOURCE):
31260         Don't define; this causes problems on Solaris 7.
31261         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
31262
31263 2000-07-23  Jim Meyering  <meyering@lucent.com>
31264
31265         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
31266         too: getgrgid, getpwuid, getuid.
31267
31268 2000-07-23  Jim Meyering  <meyering@lucent.com>
31269
31270         * lib/basename.c (base_name): Add an assertion.
31271
31272 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
31273
31274         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
31275         shadow its mbsinit function.
31276
31277 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
31278
31279         * lib/mbswidth.h: New file.
31280         * lib/mbswidth.c: New file.
31281         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
31282         (noinst_HEADERS): Add mbswidth.h.
31283
31284 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
31285
31286         * lib/config.charset: Add support for FreeBSD. Improve support for
31287         HP-UX and IRIX 6.
31288
31289 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
31290
31291         * m4/mbswidth.m4: New file.
31292         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
31293
31294 2000-07-15  Jim Meyering  <meyering@lucent.com>
31295
31296         * lib/makepath.c: Include quote.h.
31297         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
31298         corresponding argument in a `quote (...)' call.
31299         Give better diagnostics.
31300
31301         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
31302         (noinst_HEADERS): Add quote.h.
31303
31304         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
31305         from tar's src/misc.c.
31306         * lib/quote.h: New file.  Prototypes for same.
31307
31308 2000-07-14  Paul Eggert  <eggert@twinsun.com>
31309
31310         From a suggestion by Bruno Haible.
31311         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
31312         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
31313         to decide whether to define the BeOS workaround macro;
31314         this adjusts to the change to AC_MBSTATE_T.
31315
31316 2000-07-14  Jim Meyering  <meyering@lucent.com>
31317
31318         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
31319         jm_AC_TYPE_UINTMAX_T.
31320
31321 2000-07-13  Paul Eggert  <eggert@twinsun.com>
31322
31323         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
31324
31325         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
31326         quotearg_buffer_restyled): Add support for
31327         clocale_quoting_style.  Undo previous change to
31328         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
31329         and "{RIGHT QUOTATION MARK}" msgids.
31330
31331 2000-07-10  Paul Eggert  <eggert@twinsun.com>
31332
31333         From a suggestion by Bruno Haible.
31334         * m4/mbstate_t.m4 (AC_MBSTATE_T):
31335         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
31336         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
31337         and mbstate_t, to a single-part test that simply defines mbstate_t.
31338         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
31339         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
31340
31341 2000-07-10  Jim Meyering  <meyering@lucent.com>
31342
31343         * m4/strerror_r.m4: Mirror the correction made in autoconf.
31344
31345         * m4/gnu-source.m4: Output to confdefs.h directly.
31346         Suggestion from Akim Demaille.
31347
31348 2000-07-09  Paul Eggert  <eggert@twinsun.com>
31349
31350         The old behavior of quoting `like this' doesn't look good with
31351         newer, ISO-style fonts.  See:
31352         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
31353
31354         Instead, quote "like this" by default.  Let the translator
31355         tailor the locale-specific quoting behavior by providing
31356         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
31357
31358         * lib/quotearg.c (N_): New macro.
31359         (gettext_default): New function.
31360         (quotearg_buffer_restyled): Use
31361         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
31362         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
31363
31364 2000-07-09  Jim Meyering  <meyering@lucent.com>
31365
31366         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
31367         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
31368
31369         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
31370         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
31371
31372 2000-07-09  Jim Meyering  <meyering@lucent.com>
31373
31374         * lib/Most files: Update copyright dates to include 2000.
31375
31376 2000-07-08  Jim Meyering  <meyering@lucent.com>
31377
31378         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
31379         if not defined.
31380         (xgethostname): Remove now-unnecessary #ifdef.
31381         Move declaration of `err' into loop where it's used.
31382
31383 2000-07-05  Paul Eggert  <eggert@twinsun.com>
31384         and Bruno Haible  <haible@clisp.cons.org>
31385
31386         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
31387         only if the test for an object-type mbstate_t fails.  This
31388         prevents us from mistakenly reporting that mbstate_t is a
31389         system object type after we "#define mbstate_t int" to work
31390         around its lack.
31391
31392 2000-07-05  Paul Eggert  <eggert@twinsun.com>
31393         and Bruno Haible  <haible@clisp.cons.org>
31394
31395         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
31396
31397 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
31398
31399         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
31400         to strerror_r.
31401         Include <ctype.h> for use of isalpha.
31402
31403 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
31404
31405         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
31406         by allocating a larger buffer. Test the gethostname return value for
31407         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
31408         returns an error and ENAMETOOLONG isn't defined.
31409
31410 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
31411
31412         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
31413         dimension.
31414
31415 2000-07-04  Jim Meyering  <meyering@lucent.com>
31416
31417         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
31418         of the deprecated AC_CHECKING.
31419
31420 2000-07-04  Jim Meyering  <meyering@lucent.com>
31421
31422         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
31423         Reported by Bruno Haible.
31424
31425 2000-07-04  Jim Meyering  <meyering@lucent.com>
31426
31427         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
31428         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
31429         lacks mbrtowc.
31430
31431 2000-07-03  Paul Eggert  <eggert@twinsun.com>
31432
31433         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
31434         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
31435
31436 2000-07-03  Paul Eggert  <eggert@twinsun.com>
31437         and Bruno Haible  <haible@clisp.cons.org>
31438
31439         * lib/quotearg.c (mbrtowc):
31440         Assign to *pwc, and return 1 only if result is nonzero.
31441         (iswprint): Use ISPRINT when substituting our own mbrtowc.
31442
31443 2000-07-03  Jim Meyering  <meyering@lucent.com>
31444
31445         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
31446
31447 2000-07-03  Jim Meyering  <meyering@lucent.com>
31448
31449         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
31450         This is necessary to get a definition of e.g., UTMP_FILE on
31451         HP-UX 10.20.
31452         From Bob Proulx.
31453
31454 2000-07-02  Jim Meyering  <meyering@lucent.com>
31455
31456         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
31457
31458         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
31459         AC_LIBOBJ(function_name).
31460         * m4/chown.m4: Likewise.
31461         * m4/fnmatch.m4: Likewise.
31462         * m4/ftruncate.m4: Likewise.
31463         * m4/getgroups.m4: Likewise.
31464         * m4/getline.m4: Likewise.
31465         * m4/group-member.m4: Likewise.
31466         * m4/jm-macros.m4: Likewise.
31467         * m4/lstat.m4: Likewise.
31468         * m4/malloc.m4: Likewise.
31469         * m4/memcmp.m4: Likewise.
31470         * m4/nanosleep.m4: Likewise.
31471         * m4/putenv.m4: Likewise.
31472         * m4/realloc.m4: Likewise.
31473         * m4/regex.m4: Likewise.
31474         * m4/stat.m4: Likewise.
31475         * m4/strftime.m4: Likewise.
31476
31477 2000-07-02  Jim Meyering  <meyering@lucent.com>
31478
31479         * lib/quotearg.c (mbstate_t): Don't define here.
31480
31481 2000-07-02  Jim Meyering  <meyering@lucent.com>
31482
31483         * lib/nanosleep.c (SIGCONT): Define if not already defined.
31484
31485 2000-07-01  Jim Meyering  <meyering@lucent.com>
31486
31487         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
31488
31489 2000-07-01  Jim Meyering  <meyering@lucent.com>
31490
31491         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
31492         problem.
31493
31494 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
31495
31496         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
31497         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
31498
31499 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
31500
31501         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
31502         per change in ../m4/ls-mntd-fs.m4.
31503         (read_filesystem_list): Ignore symbolic links.
31504
31505 2000-06-29  Jim Meyering  <meyering@lucent.com>
31506
31507         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
31508         for declaration of strcmp.
31509
31510         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
31511
31512         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
31513         Avoid warning by casting result to `char *' to remove `const'.
31514
31515 2000-06-28  Jim Meyering  <meyering@lucent.com>
31516
31517         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
31518         included by quotearg.c, for which we perform this test.  From
31519         Bruno Haible.
31520
31521 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
31522
31523         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
31524         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
31525         <utmpx.h> exists, put readutmp.o into LIBOBJS.
31526
31527 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
31528
31529         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
31530
31531 2000-06-26  Paul Eggert  <eggert@twinsun.com>
31532
31533         savedir now sets errno on failure and invokes xmalloc to get memory.
31534         Fix a couple of other minor bugs while we're at it.
31535
31536         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
31537         (NAMLEN): Remove macro.
31538         (malloc, realloc): Remove decls.
31539         (stpcpy): Likewise.
31540         ("xalloc.h"): Include.
31541         (NAME_SIZE_DEFAULT): New macro.
31542         (savedir): Use xmalloc / xrealloc to allocate memory.
31543         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
31544         Skip "" directory entries.
31545         Use strlen to calculate directory entry length, since the old method
31546         is rarely used these days and isn't worth supporting.
31547         Don't use a pointer after freeing it.
31548         Check for integer overflow when calculating allocation size.
31549         Use memcpy to copy entries, instead of stpcpy.
31550         Set errno properly when returning NULL.
31551         Check for readdir error.
31552
31553 2000-06-26  Jim Meyering  <meyering@lucent.com>
31554
31555         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
31556
31557 2000-06-25  Jim Meyering  <meyering@lucent.com>
31558
31559         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
31560         Linux header bug when _XOPEN_SOURCE is defined to 500.
31561
31562 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
31563
31564         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
31565         deficiency.
31566
31567 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
31568
31569         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
31570         Include xalloc.h.
31571         Don't include <stdlib.h>.  Don't declare malloc, realloc.
31572
31573 2000-06-24  Jim Meyering  <meyering@lucent.com>
31574
31575         * m4/strerror_r.m4: Revive this file -- to try out an experimental
31576         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
31577         for which strerror does return char*, but which lacks a conveniently
31578         accessible declaration of the function.  If the compile-test says
31579         strerror_r doesn't work, then resort to a `run'-test that works on
31580         BeOS and segfaults on DEC Unix.
31581
31582 2000-06-24  Jim Meyering  <meyering@lucent.com>
31583
31584         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
31585
31586 2000-06-23  Paul Eggert  <eggert@twinsun.com>
31587
31588         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
31589         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
31590
31591 2000-06-23  Paul Eggert  <eggert@twinsun.com>
31592
31593         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
31594         (mbrtowc, mbstate_t): Define substitutes if
31595         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
31596         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
31597         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
31598
31599 2000-06-23  Jim Meyering  <meyering@lucent.com>
31600
31601         * m4/afs.m4: Add missing AC_MSG_RESULT.
31602         Reported by Bruno Haible.
31603
31604         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
31605         Suggestion from Bruno Haible.
31606
31607 2000-06-23  Jim Meyering  <meyering@lucent.com>
31608
31609         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
31610
31611 2000-06-21  Jim Meyering  <meyering@lucent.com>
31612
31613         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
31614
31615 2000-06-21  Jim Meyering  <meyering@lucent.com>
31616
31617         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
31618         (noinst_HEADERS): Add getstr.h.
31619
31620         * lib/getline.c (getstr): Move into a separate file.
31621         * lib/getstr.c (getstr): New file, extracted from getline.c, with
31622         the following changes: new parameter, delim2; both delim[12]
31623         parameters have type `int', not `char'.  The latter would lose
31624         with 8-bit delimiters.
31625         * lib/getstr.h: New file.
31626
31627 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
31628
31629         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
31630         than 1024, return a memory chunk of least possible size, instead
31631         of size PATH_MAX + 2. In the loop, increment the size proportionally.
31632         Use free/xmalloc instead of xrealloc to avoid copying for very long
31633         paths.
31634
31635 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
31636
31637         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
31638         the empty string.
31639
31640 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
31641
31642         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
31643         address, not strdup.  Include <stdlib.h> and don't declare free().
31644
31645 2000-06-19  Jim Meyering  <meyering@lucent.com>
31646
31647         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
31648
31649 2000-06-18  Jim Meyering  <meyering@lucent.com>
31650
31651         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
31652
31653         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
31654         `checking whether...' message to be consistent with that of the
31655         lstat test.
31656
31657 2000-06-18  Jim Meyering  <meyering@lucent.com>
31658
31659         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
31660         Besides, these days every porting target provides a mkdir function.
31661
31662         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
31663         needed. (this snippet comes from src/system.h).
31664
31665 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
31666
31667         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
31668
31669 2000-06-15  Paul Eggert  <eggert@twinsun.com>
31670
31671         * lib/human.c (adjust_value): New function.
31672         (human_readable_inexact): Apply rounding style even when
31673         printing approximate values.
31674
31675 2000-06-14  Paul Eggert  <eggert@twinsun.com>
31676
31677         * lib/human.c (human_readable_inexact): Allow an input block
31678         size that is not a multiple of the output block size, and vice versa.
31679         Reported by Piergiorgio Sartor.
31680
31681 2000-06-14  Paul Eggert  <eggert@twinsun.com>
31682
31683         * lib/getdate.y (get_date): Apply relative times after time
31684         zone indicator, not before.  Reported by Todd A. Jacobs.
31685
31686 2000-06-13  Jim Meyering  <meyering@lucent.com>
31687
31688         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
31689
31690         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
31691
31692 2000-06-12  Paul Eggert  <eggert@twinsun.com>
31693
31694         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
31695
31696 2000-06-12  Jim Meyering  <meyering@lucent.com>
31697
31698         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
31699         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
31700         optional argument.
31701         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
31702         the optional argument, `lib'.
31703
31704 2000-06-08  Jim Meyering  <meyering@lucent.com>
31705
31706         * m4/largefile.m4: Remove file (now that it's part of autoconf).
31707
31708 2000-06-04  Paul Eggert  <eggert@twinsun.com>
31709
31710         Rewrite largefile configuration so that we don't need to run
31711         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
31712         AC_CANONICAL_HOST in configure.in -- jmm]
31713
31714         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
31715         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
31716         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
31717         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
31718         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
31719         All uses changed.
31720         Instead of inspecting the output of getconf, try to compile the
31721         test program without and with the macro definition.
31722         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
31723         for getconf.  Instead, check for the needed flags by compiling
31724         test programs.
31725
31726 2000-06-04  Paul Eggert  <eggert@twinsun.com>
31727
31728         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
31729
31730 2000-06-04  Jim Meyering  <meyering@lucent.com>
31731
31732         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
31733         SunOS 4.1.4 for which gid_t is an unsigned type.
31734
31735 2000-06-03  Jim Meyering  <meyering@lucent.com>
31736
31737         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
31738         now that autoconf requires that.
31739
31740         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
31741         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
31742         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
31743
31744 2000-06-03  Jim Meyering  <meyering@lucent.com>
31745
31746         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
31747
31748 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
31749
31750         * m4/glibc21.m4: New file.
31751         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
31752
31753 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
31754
31755         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
31756         newer, don't install charset.alias.
31757         * lib/config.charset: Change the Linux/glibc rules so they become empty
31758         on glibc-2.1 or newer.
31759
31760 2000-06-02  Jim Meyering  <meyering@lucent.com>
31761
31762         * lib/mountlist.c: Back out last change.  Instead, do this...
31763         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
31764         me_dummy member using the same `ignore'-testing code.
31765         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
31766         fs_type strings.
31767         From Mark D. Roth.
31768
31769 2000-05-29  Jim Meyering  <meyering@lucent.com>
31770
31771         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
31772         mounts with the `ignore' attribute.  Based on a patch from
31773         Mark D. Roth.
31774
31775 2000-05-28  Jim Meyering  <meyering@lucent.com>
31776
31777         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
31778         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
31779         * m4/stat.m4: Likewise.
31780         * m4/lstat.m4: Likewise.
31781         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
31782
31783         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
31784         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
31785
31786 2000-05-26  Jim Meyering  <meyering@lucent.com>
31787
31788         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
31789
31790 2000-05-24  Jim Meyering  <meyering@lucent.com>
31791
31792         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
31793         autoconf requires that.
31794         * m4/lib-check.m4: Likewise.
31795         * m4/jm-macros.m4: Likewise.
31796         * m4/strftime.m4: Likewise.
31797
31798         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
31799         AC_CHECK_DECLS, now that autoconf requires that.
31800
31801 2000-05-22  Jim Meyering  <meyering@lucent.com>
31802
31803         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
31804         * m4/lstat.m4: Likewise.
31805
31806 2000-05-22  Jim Meyering  <meyering@lucent.com>
31807
31808         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
31809
31810 2000-05-20  Jim Meyering  <meyering@lucent.com>
31811
31812         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
31813         (jm_PREREQ): Use it.
31814
31815 2000-05-18  Jim Meyering  <meyering@lucent.com>
31816
31817         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
31818         back, too, since it may have been modified by allocate_entry.
31819         (hash_delete): Rewrite to use neither the assignment operator
31820         nor the comma operator in an if-expression.
31821
31822 2000-05-15  Paul Eggert  <eggert@twinsun.com>
31823
31824         * lib/closeout.c:
31825         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
31826         Remove; no longer needed.
31827         "quotearg.h": Add include.
31828         (file_name): Do not bother to explicitly initialize to NULL; it's less
31829         efficient on some hosts.
31830         (close_stdout_status): Remove test as to whether stdout was already
31831         closed; it breaks for the case "echo x | sort >&-".
31832         Quote file name colons.
31833         Do not assume that _("write error") lacks format strings.
31834
31835 2000-05-15  Jim Meyering  <meyering@lucent.com>
31836
31837         * lib/version-etc.c (version_etc_copyright): Update the copyright
31838         string used in all --version output.
31839
31840 2000-05-14  Jim Meyering  <meyering@lucent.com>
31841
31842         * lib/closeout.c (close_stdout_set_file_name): New function.
31843         (close_stdout_status): Use new file-scoped global.
31844         Return right away if fstat says the stdout file descriptor is invalid.
31845         * lib/closeout.h (close_stdout_set_file_name): Declare.
31846
31847 2000-05-10  Jim Meyering  <meyering@lucent.com>
31848
31849         * lib/closeout.c [default_exit_status]: New file-scoped variable.
31850         (close_stdout_set_status): New function.
31851         * lib/closeout.h (close_stdout_set_status): Declare.
31852
31853 2000-05-09  Jim Meyering  <meyering@lucent.com>
31854
31855         * m4/gettext.m4: Rename this...
31856         * m4/libintl.m4: ...to this.
31857
31858 2000-05-08  Jim Meyering  <meyering@lucent.com>
31859
31860         * lib/long-options.c: Don't include closeout.h.
31861         (parse_long_options): Don't call close_stdout for --version.
31862
31863 2000-05-06  Paul Eggert  <eggert@twinsun.com>
31864
31865         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
31866         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
31867         2.1.3 bug.  This avoids a clash when files like regex.c define
31868         _GNU_SOURCE.
31869
31870 2000-05-06  Jim Meyering  <meyering@lucent.com>
31871
31872         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
31873         (AC_REPLACE_FUNCS): Add strnlen.
31874
31875         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
31876         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
31877
31878         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
31879         AC_SEARCH_LIBS call for nanosleep.
31880         (LIB_NANOSLEEP): Set and AC_SUBST.
31881
31882 2000-05-06  Jim Meyering  <meyering@lucent.com>
31883
31884         * lib/strnlen.c: Undefine __strnlen and strnlen.
31885         [!weak_alias]: Define __strnlen to strnlen.
31886
31887         * lib/atexit.c: New file, from libiberty.
31888
31889 2000-05-06  Jim Meyering  <meyering@lucent.com>
31890
31891         * lib/closeout.c (close_stdout_status): Also check for errors on the
31892         stderr stream.
31893
31894 2000-05-05  Jim Meyering  <meyering@lucent.com>
31895
31896         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
31897         AC_SEARCH_LIBS call for clock_gettime.
31898         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
31899
31900         * m4/search-libs.m4: Update from autoconf.
31901
31902         su doesn't work on Solaris 2.6.
31903         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
31904         <shadow.h>.  Reported by Dragos Harabor.
31905
31906 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
31907
31908         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
31909         memcpy instead of xmalloc, xrealloc, path_concat.
31910         (locale_charset): Treat empty environment variables as absent.
31911         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
31912
31913 2000-05-04  Jim Meyering  <meyering@lucent.com>
31914
31915         * lib/getopt.c: Update from glibc.
31916         * lib/obstack.c: Likewise.
31917         * lib/obstack.h: Likewise.
31918         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
31919         file
31920
31921         * lib/regex.h: Likewise.
31922         * lib/strndup.c: Likewise.
31923         * lib/strnlen.c: New file, from glibc.
31924
31925 2000-05-03  Jim Meyering  <meyering@lucent.com>
31926
31927         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
31928
31929 2000-05-02  Paul Eggert  <eggert@twinsun.com>
31930
31931         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
31932         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
31933         compile-time test, rather than inspecting host and OS, to
31934         decide whether to define _LARGEFILE_SOURCE.
31935
31936 2000-05-01  Jim Meyering  <meyering@lucent.com>
31937
31938         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
31939
31940         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
31941         Based on a patch from Bruno Haible.
31942
31943 2000-05-01  Jim Meyering  <meyering@lucent.com>
31944
31945         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
31946
31947 2000-04-29  Jim Meyering  <meyering@lucent.com>
31948
31949         * lib/path-concat.c: Declare strdup only if it's not defined.
31950         * lib/canon-host.c: Likewise.
31951
31952 2000-04-28  Jim Meyering  <meyering@lucent.com>
31953
31954         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
31955         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
31956         is included first, then limits.h is included by locale.h by libintl.h.
31957         From John David Anglin.
31958
31959 2000-04-25  Jim Meyering  <meyering@lucent.com>
31960
31961         * lib/makepath.c (S_IRWXUGO): Define.
31962         (make_path): Always perform explicit chmod if MODE specifies any
31963         of the `special' permission bits.  Prompted by a bug report against
31964         install from Mate Wierdl and Joost van Baal.
31965
31966 2000-04-18  Jim Meyering  <meyering@lucent.com>
31967
31968         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
31969         (jm_PREREQ): Use it.
31970
31971 2000-04-18  Jim Meyering  <meyering@lucent.com>
31972
31973         * lib/README: New file.
31974
31975         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
31976         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
31977
31978 2000-04-17  Jim Meyering  <meyering@lucent.com>
31979
31980         Get it right :-)
31981         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
31982         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
31983         Suggestion from Akim Demaille.
31984
31985 2000-04-17  Jim Meyering  <meyering@lucent.com>
31986
31987         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
31988         the definition of it to rpl_strftime also defined-away the system's
31989         declaration.
31990
31991 2000-04-15  Jim Meyering  <meyering@lucent.com>
31992
31993         Use `C' to denote so-called `contiguous' files, the same way
31994         that tar does.
31995         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
31996         (ftypelet): Use S_ISCTG.
31997         From Michael Deutschmann.
31998
31999 2000-04-14  Jim Meyering  <meyering@lucent.com>
32000
32001         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
32002         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
32003         clobbered.
32004
32005 2000-04-14  Jim Meyering  <meyering@lucent.com>
32006
32007         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
32008
32009 2000-04-13  Jim Meyering  <meyering@lucent.com>
32010
32011         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
32012         AH_VERBATIM to insert required #ifndef into config.h.in.
32013         Suggestion from Akim Demaille.
32014
32015 2000-04-12  Jim Meyering  <meyering@lucent.com>
32016
32017         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
32018         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
32019         Christian Krackowizer.
32020
32021         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
32022         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
32023         (AC_SYS_LARGEFILE): Require.
32024         (AM_C_PROTOTYPES): Require.
32025
32026 2000-04-08  Jim Meyering  <meyering@lucent.com>
32027
32028         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
32029         names don't conflict.  Reported by Eli Zaretskii.
32030
32031 2000-04-07  Jim Meyering  <meyering@lucent.com>
32032
32033         * lib/putenv.c: Move inclusion of errno.h so it follows that of
32034         sys/types.h, to work around system header problems on AIX 3.2.5.
32035         From Bruno Haible.
32036
32037 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
32038
32039         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
32040         bug.  Deal with the different error behavior of Irix iconv.
32041
32042 2000-04-05  Paul Eggert  <eggert@twinsun.com>
32043
32044         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
32045         IRIX if the installer said otherwise.
32046
32047 2000-04-05  Jim Meyering  <meyering@lucent.com>
32048
32049         Portability tweaks required for ultrix4.3.
32050         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
32051         (jm_CHECK_DECLS): Add getutent to the list of functions.
32052         (_jm_DECL_HEADERS): Add utmpx.h.
32053         From John David Anglin.
32054
32055         * m4/strftime.m4: Back out the 2000-04-02 change.
32056         Instead of that change, simply undefine putenv in the test program.
32057
32058 2000-04-05  Jim Meyering  <meyering@lucent.com>
32059
32060         Portability tweaks required for ultrix4.3.
32061         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
32062         getutent.
32063         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
32064         * lib/canon-host.c: Declare strdup.
32065         * lib/path-concat.c: Likewise.
32066         From John David Anglin.
32067
32068 2000-04-04  Jim Meyering  <meyering@lucent.com>
32069
32070         Be more DOS 8.3-friendly.
32071         * lib/ref-add.sin: Renamed from ref-add.sed.in.
32072         * lib/ref-del.sin: Renamed from ref-del.sed.in.
32073         * lib/Makefile.am: Reflect renaming.
32074         Reported by Eli Zaretskii.
32075
32076         Use a temporary file name that won't clash with `charset.alias'
32077         in the DOS 8.3 name space.
32078         * lib/Makefile.am (charset_tmp): Define.
32079         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
32080         (uninstall-local): Likewise.
32081         Reported by Eli Zaretskii.
32082
32083 2000-04-03  Jim Meyering  <meyering@lucent.com>
32084
32085         * m4/gettext.m4: Fix typo in comment.
32086
32087         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
32088         textutils/configure.in).  Suggestion from Paul Eggert.
32089         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
32090
32091 2000-04-02  Paul Eggert  <eggert@twinsun.com>
32092
32093         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
32094         variable in the shell rather than using putenv, which isn't
32095         portable.  This avoids the configure-time inter-test dependency
32096         on the potentially-renamed putenv function.
32097
32098 2000-03-30  Paul Eggert  <eggert@twinsun.com>
32099
32100         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
32101         before checking struct stat.st_blksize, so that
32102         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
32103
32104 2000-03-29  Paul Eggert  <eggert@twinsun.com>
32105
32106         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
32107         since strftime.c uses HAVE_STRFTIME to decide whether to use
32108         the underlying strftime.
32109
32110 2000-03-29  Paul Eggert  <eggert@twinsun.com>
32111
32112         * lib/time/strftime.c (my_strftime): Make sure we call the system
32113         strftime, not ourselves, when invoking the underlying strftime.
32114
32115 2000-03-24  Jim Meyering  <meyering@lucent.com>
32116
32117         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
32118         (charset_alias): Define.
32119         (install-exec-local): Factor out common code.
32120         (uninstall-local): Split lines longer than 80.
32121         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
32122         (SUFFIXES): Define.
32123         (.sed.in.sed): New rule.  Don't redirect directly to $@.
32124         (CLEANFILES): Add ref-add.sed and ref-del.sed.
32125
32126 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
32127
32128         * lib/config.charset: Output a line containing "Packages using this
32129         file".
32130         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
32131         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
32132         ref-del.sed): New rules.
32133
32134 2000-03-17  Jim Meyering  <meyering@lucent.com>
32135
32136         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
32137         Otherwise, include <strings.h>
32138
32139 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
32140
32141         * lib/unicodeio.c (utf8_wctomb): New function.
32142         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
32143         format instead of in UCS-4 with platform dependent endianness.
32144
32145 2000-03-10  Jim Meyering  <meyering@lucent.com>
32146
32147         * m4/lib-check.m4: Look for getspnam in -lgen, too.
32148         From Marco Franzen.
32149
32150 2000-03-07  Paul Eggert  <eggert@twinsun.com>
32151
32152         * lib/savedir.c (savedir): Work even if directory size is
32153         negative; this can happen with some screwy NFS configurations.
32154
32155 2000-03-06  Jim Meyering  <meyering@lucent.com>
32156
32157         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
32158         if it's NULL (because we ran out of memory).  From Bruno Haible.
32159
32160 2000-03-05  Jim Meyering  <meyering@lucent.com>
32161
32162         * lib/localcharset.c ("path-concat.h"): Include.
32163         (get_charset_aliases): Use path_concat instead of ANSI string
32164         concatenation.
32165
32166         * lib/unicodeio.h (PARAMS): Define.
32167         Use it to guard prototype.
32168
32169 2000-03-04  Jim Meyering  <meyering@lucent.com>
32170
32171         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
32172         for lib/localcharset.c.
32173
32174 2000-03-04  Jim Meyering  <meyering@lucent.com>
32175
32176         * lib/Makefile.am (install-exec-local): Create $(libdir) before
32177         installing into it.
32178         (uninstall-local): Uncomment this rule so `make distcheck' works
32179         once again.
32180
32181         * lib/unicodeio.c (<errno.h>): Include it.
32182         (errno): Declare if not defined.
32183
32184         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
32185
32186         * lib/config.charset: New version, incorporating remarks from a linux
32187         i18n mailing list.  From Bruno Haible.
32188
32189 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
32190
32191         * m4/codeset.m4: New file.
32192         * m4/iconv.m4: New file.
32193         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
32194
32195 2000-03-03  Jim Meyering  <meyering@lucent.com>
32196
32197         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
32198
32199 2000-03-02  Jim Meyering  <meyering@lucent.com>
32200
32201         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
32202         the messages come out on separate lines.
32203
32204         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
32205         rather than jm_CHECK_DECLARATIONS.
32206         * m4/decl.m4: Remove now-unused file.
32207
32208         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
32209         geteuid.
32210
32211 2000-03-02  Jim Meyering  <meyering@lucent.com>
32212
32213         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
32214
32215 2000-03-01  Jim Meyering  <meyering@lucent.com>
32216
32217         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
32218         * lib/unicodeio.c: Likewise.
32219
32220 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
32221
32222         * lib/config.charset: New file.
32223         * lib/localcharset.c: New file.
32224         * lib/unicodeio.h, lib/unicodeio.c: New files.
32225         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
32226         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
32227         (noinst_HEADERS): Add unicodeio.h.
32228         (all-local, install-exec-local, charset.alias): New targets.
32229
32230 2000-02-28  Paul Eggert  <eggert@twinsun.com>
32231
32232         * lib/quotearg.c (ALERT_CHAR): New macro.
32233         (quotearg_buffer_restyled): Use it.
32234
32235 2000-02-27  Jim Meyering  <meyering@lucent.com>
32236
32237         * m4/check-decl.m4: Add getenv to the list.
32238
32239 2000-02-27  Jim Meyering  <meyering@lucent.com>
32240
32241         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
32242         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
32243
32244         * lib/backupfile.c: Guard inclusion of stdlib.h with
32245         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
32246         Declare malloc if needed.
32247
32248         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
32249         `#ifndef HAVE_DECL..'
32250         now that autoconf always defines the HAVE_DECL_ symbols.
32251         * lib/human.c: Likewise.
32252         * lib/same.c: Likewise.
32253         * lib/strtoumax.c: Likewise.
32254
32255         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
32256         declaration check was not run.
32257         * lib/hash.c: Likewise.
32258         * lib/human.c: Likewise.
32259         * lib/same.c: Likewise.
32260         * lib/strtoumax.c: Likewise.
32261
32262         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
32263         `.', then first look up the entire `.'-containing string as a login
32264         name.
32265
32266 2000-02-23  Jim Meyering  <meyering@lucent.com>
32267
32268         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
32269         in place of my hack.
32270
32271 2000-02-18  Paul Eggert  <eggert@twinsun.com>
32272
32273         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
32274         (textint): New typedef.
32275         (parser_control): Member year changed from int to textint.
32276         All uses changed.
32277         (YYSTYPE): Removed; replaced by %union with int and textint members.
32278         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
32279         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
32280         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
32281         (tSNUMBER, tUNUMBER): Now of type <textintval>.
32282         (date, number, to_year): Use width of number in digits, not its value,
32283         to determine whether it's a 2-digit year, or a 2-digit time.
32284         (yylex): Store number of digits of numeric tokens.
32285         Reported by John Kendall.
32286
32287         (parser_control): Changed from struct parser_control to typedef (for
32288         consistency).  All uses changed.
32289
32290         (tID): Removed; not used.
32291         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
32292
32293 2000-02-14  Paul Eggert  <eggert@twinsun.com>
32294
32295         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
32296         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
32297
32298 2000-02-12  Jim Meyering  <meyering@lucent.com>
32299
32300         * lib/userspec.c (ISDIGIT): Define it.
32301         (isdigit): Remove definition.
32302         (is_number): Use ISDIGIT, not isdigit.
32303         <libintl.h>: Include.
32304         (_ and N_): Define.
32305         (parse_user_spec): Mark translatable strings.
32306
32307 2000-02-10  Jim Meyering  <meyering@lucent.com>
32308
32309         With these changes, nanosleep.[ch] are finally enough like the other
32310         lib/* replacement files to compile on a few more losing systems.
32311
32312         * lib/nanosleep.h: Don't include config.h.
32313         Remove prototype from declaration of nanosleep.
32314         (PARAMS): Remove now-unneeded definition.
32315         * lib/nanosleep.c: #undef nanosleep.
32316         (rpl_nanosleep): Rename from nanosleep.
32317
32318 2000-02-10  Jim Meyering  <meyering@lucent.com>
32319
32320         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
32321         gnu_nanosleep to rpl_nanosleep.
32322
32323 2000-02-09  Jim Meyering  <meyering@lucent.com>
32324
32325         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
32326         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
32327
32328 2000-02-08  Akim Demaille  <akim@epita.fr>
32329
32330         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
32331         `[' and `]' and remove uses of `changequote'.
32332         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
32333         (AC_SYS_LARGEFILE): Likewise.
32334         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
32335         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
32336         of changequote.
32337         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
32338         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
32339         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
32340         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
32341
32342 2000-02-05  Jim Meyering  <meyering@lucent.com>
32343
32344         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
32345         Remove explicit use of AC_HEADER_TIME.  It is required by
32346         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
32347         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
32348         in autoconf whereby the expansion of the latter ended up preceding
32349         the expansion of its prerequisite, AC_HEADER_TIME.
32350         Reported by Volker Borchert.
32351
32352 2000-02-03  Jim Meyering  <meyering@lucent.com>
32353
32354         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
32355
32356 2000-02-03  Jim Meyering  <meyering@lucent.com>
32357
32358         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
32359         rather than with `#if HAVE_UTMPNAME'.
32360
32361 2000-02-02  Jim Meyering  <meyering@lucent.com>
32362
32363         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
32364         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
32365         Reported by Eli Zaretskii.
32366
32367 2000-02-01  Jim Meyering  <meyering@lucent.com>
32368
32369         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
32370
32371 2000-01-31  Jim Meyering  <meyering@lucent.com>
32372
32373         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
32374         functions.  Add the time.h and sys/time.h headers along with the
32375         AC_REQUIRE'ment of AC_HEADER_TIME.
32376
32377 2000-01-31  Jim Meyering  <meyering@lucent.com>
32378
32379         * lib/nanosleep.h (nanosleep): Guard declaration with
32380         `#if ! HAVE_DECL_NANOSLEEP'.
32381         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
32382         the declaration in that vendor's sys/timers.h.
32383         Reported by Christian Krackowizer.
32384
32385         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
32386         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
32387         (ISPRINT): Likewise.
32388         Reported by Tom Tromey.
32389
32390 2000-01-30  Jim Meyering  <meyering@lucent.com>
32391
32392         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
32393
32394         * m4/prereq.m4 (utmp_includes): Define.
32395         Check for ut_user and ut_name members in both struct utmpx
32396         and struct utmp.
32397
32398 2000-01-30  Jim Meyering  <meyering@lucent.com>
32399
32400         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
32401         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
32402         header files where only utmpx.ut_user is declared.
32403
32404         * lib/readutmp.h (UT_USER): Define.
32405
32406 2000-01-29  Jim Meyering  <meyering@lucent.com>
32407
32408         * m4/lib-check.m4: New file containing library-related checks from
32409         fileutils and sh-utils (textutils had none).
32410
32411 2000-01-28  Jim Meyering  <meyering@lucent.com>
32412
32413         * m4/perl.m4: Change format of warning message to look more like that
32414         from the missing script.  Suggestion from François Pinard.
32415
32416 2000-01-25  Jim Meyering  <meyering@lucent.com>
32417
32418         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
32419         well as time.h in the compile check.
32420         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
32421         Fix typo in cross-compiling case: s/yes/no/.
32422
32423 2000-01-23  Jim Meyering  <meyering@lucent.com>
32424
32425         * m4/jm-macros.m4: Move df-related tests here from
32426         fileutils/configure.in
32427
32428         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
32429         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
32430
32431         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
32432         s/space/ac_fsusage_space/.
32433         (jm_FILE_SYSTEM_USAGE): Take two parameters.
32434
32435         * m4/ftruncate.m4: New file (derived from part of
32436         fileutils/configure.in).
32437         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
32438         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
32439
32440         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
32441         AC_SUBST these here, rather than just in sh-util/configure.in, so
32442         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
32443         all the same.
32444         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
32445         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
32446         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
32447         (AC_SUBST(POW_LIBM)): Likewise.
32448         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
32449
32450 2000-01-23  Jim Meyering  <meyering@lucent.com>
32451
32452         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
32453         obstack.c.
32454
32455 2000-01-22  Jim Meyering  <meyering@lucent.com>
32456
32457         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
32458
32459         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
32460
32461         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
32462         configure.in
32463         (AC_CHECK_HEADERS): Likewise for sh-utils.
32464         (AC_CHECK_HEADERS): Likewise for textutils.
32465         Merge the three lists of headers.
32466
32467         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
32468         from fileutils' configure.in.
32469
32470         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
32471         code. Moved tests into their own function (_jm_DECL_HEADERS) in
32472         check-decl.m4.
32473
32474         * m4/check-decl.m4: Use #if rather than #ifdef.
32475         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
32476         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
32477         (_jm_DECL_HEADERS): Define new function.
32478         (jm_CHECK_DECLARATIONS): Require it.
32479
32480 2000-01-22  Jim Meyering  <meyering@lucent.com>
32481
32482         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
32483         [! HAVE_DECL_STRTOULL]: Declare strtoull.
32484         Required for some AIX systems.  Reported by Christian Krackowizer.
32485         [TESTING] (main): New function.
32486
32487         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
32488         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
32489         letters.
32490
32491         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
32492         iswprint.
32493
32494         * lib/strverscmp.c (ISDIGIT): Define.
32495         (strverscmp): Use ISDIGIT, not isdigit.
32496
32497 2000-01-19  Jim Meyering  <meyering@lucent.com>
32498
32499         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
32500         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
32501         defines `struct timespec' in <sys/time.h>
32502
32503         * m4/c-bs-a.m4: Remove uses of changequote altogether.
32504         Thanks to Akim for explaining.
32505
32506 2000-01-17  Paul Eggert  <eggert@twinsun.com>
32507
32508         * lib/nanosleep.c (nanosleep):
32509         Don't use SA_INTERRUPT to decide whether to call sigaction, as
32510         POSIX.1 doesn't require SA_INTERRUPT and some systems
32511         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
32512         it's been part of POSIX.1 since day 1 (in 1988).
32513
32514 2000-01-17  Jim Meyering  <meyering@lucent.com>
32515
32516         * lib/interlock: Remove unused file.  Reported by François Pinard.
32517
32518 2000-01-16  Paul Eggert  <eggert@twinsun.com>
32519
32520         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
32521         alert, backslash, formfeed, and vertical tab unnecessarily in
32522         shell quoting style.
32523
32524 2000-01-16  Jim Meyering  <meyering@lucent.com>
32525
32526         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
32527         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
32528         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
32529         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
32530
32531 2000-01-16  Jim Meyering  <meyering@lucent.com>
32532
32533         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
32534         because the latter didn't work.
32535
32536 2000-01-15  Jim Meyering  <meyering@lucent.com>
32537
32538         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
32539         (AC_REPLACE_FUNCS): Add memcpy and memset.
32540         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
32541         Add strpbrk.
32542         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
32543
32544 2000-01-12  Jim Meyering  <meyering@lucent.com>
32545
32546         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
32547         (jm_PREREQ): Use it.
32548         (jm_PREREQ_READUTMP): New macro.
32549         (jm_PREREQ): Use it.
32550
32551 2000-01-11  Paul Eggert  <eggert@twinsun.com>
32552
32553         Quote multibyte characters correctly.
32554         * m4/c-bs-a.m4: New file.
32555         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
32556         (jm_PREREQ): Use it.
32557
32558 2000-01-11  Paul Eggert  <eggert@twinsun.com>
32559
32560         * m4/uintmax_t.m4: Port to autoconf 2.13.
32561
32562 2000-01-08  Jim Meyering  <meyering@ascend.com>
32563
32564         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
32565         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
32566
32567 2000-01-04  Jim Meyering  <meyering@ascend.com>
32568
32569         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
32570         jm_STRUCT_DIRENT_D_TYPE.
32571         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
32572         jm_STRUCT_DIRENT_D_INO.
32573         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
32574         jm_STRUCT_UTIMBUF.
32575         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
32576         renamings.
32577         * m4/utime.m4: Likewise.
32578
32579         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
32580         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
32581
32582 2000-01-03  Paul Eggert  <eggert@twinsun.com>
32583
32584         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
32585         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
32586
32587 2000-01-02  Jim Meyering  <meyering@ascend.com>
32588
32589         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
32590         remember if this is necessary.
32591
32592 1999-12-26  Jim Meyering  <meyering@ascend.com>
32593
32594         * m4/jm-macros.m4: Use it here.
32595         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
32596
32597 1999-12-23  Jim Meyering  <meyering@ascend.com>
32598
32599         * m4/jm-macros.m4: Check for clock_gettime (moved from
32600         fileutils/configure.in)
32601         Check for gettimeofday.
32602
32603 1999-12-20  Jim Meyering  <meyering@ascend.com>
32604
32605         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
32606         autoconf-2.14a-1999-12-20.
32607
32608 1999-12-19  Jim Meyering  <meyering@ascend.com>
32609
32610         * m4/lstat-slash.m4: New file.
32611         * m4/jm-macros.m4: Use the new macro:
32612         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
32613
32614 1999-12-07  Jim Meyering  <meyering@ascend.com>
32615
32616         * m4/perl.m4: Require that File::Compare be available, too.
32617         Too many systems seem to lack it.
32618
32619         * m4/strftime.m4: Add checks for most of the cpp macros tested in
32620         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
32621
32622 1999-11-18  Paul Eggert  <eggert@twinsun.com>
32623
32624         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
32625         problem with the QNX 4.25 shell, which doesn't propagate exit
32626         status of failed commands inside shell assignments.
32627
32628 1999-11-17  Jim Meyering  <meyering@ascend.com>
32629
32630         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
32631
32632 1999-11-07  Jim Meyering  <meyering@ascend.com>
32633
32634         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
32635
32636 1999-11-06  Jim Meyering  <meyering@ascend.com>
32637
32638         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
32639         * m4/jm-macros.m4 (jm_MACROS): Use it here.
32640
32641 1999-11-05  Jim Meyering  <meyering@ascend.com>
32642
32643         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
32644         configure.in of textutils, fileutils, and sh-utils into this one
32645         (shared between those packages) file.
32646         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
32647         AC_STRUCT_ST_BLKSIZE.
32648
32649 1999-11-03  Jim Meyering  <meyering@ascend.com>
32650
32651         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
32652         of AC_CHECK_TYPE checks includes unistd.h.
32653         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
32654         Suggestion from Akim Demaille.
32655
32656 1999-10-30  Jim Meyering  <meyering@ascend.com>
32657
32658         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
32659         m4-quoted string.
32660         * m4/ls-mntd-fs.m4: Likewise.
32661         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
32662         * m4/jm-winsz1.m4: Likewise.
32663
32664         * m4/const.m4: Remove file, since the fix made it into the experimental
32665         version of autoconf.
32666         * m4/mktime.m4: Likewise.
32667
32668         * m4/check-type.m4: Remove file, now that the latest version of
32669         AC_CHECK_TYPE takes a third arg to specify additional #includes.
32670
32671         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
32672         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
32673         AC_CHECK_TYPE.
32674
32675 1999-10-04  Jim Meyering  <meyering@ascend.com>
32676
32677         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
32678
32679 1999-09-22  Paul Eggert  <eggert@twinsun.com>
32680
32681         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
32682         2.95.1 bug with HP-UX 10.20.
32683
32684 1999-09-17  Jim Meyering  <meyering@ascend.com>
32685
32686         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
32687         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
32688         due to missing strdup (against sh-utils-2.0).
32689
32690 1999-08-29  Jim Meyering  <meyering@ascend.com>
32691
32692         * m4/jm-macros.m4: Require jm_BISON.
32693         * m4/bison.m4: New file.
32694
32695 1999-08-17  Paul Eggert  <eggert@twinsun.com>
32696
32697         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
32698         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
32699
32700 1999-08-05  Jim Meyering  <meyering@ascend.com>
32701
32702         * m4/getline.m4: Rename test file from conftestdata to conftest.data
32703         to avoid conflicts with `conftest' on 8+3 filesystems.
32704         Suggestion from Eli Zaretskii.
32705
32706 1999-08-04  Jim Meyering  <meyering@ascend.com>
32707
32708         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
32709         fileutils and sh-utils (textutils's getline test was inadequate).
32710         (AM_FUNC_GETLINE): Run this test.
32711         (AC_CHECK_FUNCS): Check for getdelim.
32712         Reported by Bob Proulx.
32713
32714 1999-08-02  Jim Meyering  <meyering@ascend.com>
32715
32716         * m4/jm-macros.m4: Add a comment.
32717
32718 1999-08-01  Paul Eggert  <eggert@twinsun.com>
32719
32720         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
32721         <inttypes.h> defines strtoumax as a macro (and not as a
32722         function).
32723
32724 1999-08-01  Paul Eggert  <eggert@twinsun.com>
32725
32726         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
32727         that we can shift, multiply and divide unsigned long long
32728         values; Ultrix cc can't do it.
32729
32730 1999-08-01  Paul Eggert  <eggert@twinsun.com>
32731
32732         * m4/mktime.m4: New file, which is a preview of what should appear
32733         in the next public autoconf release.
32734
32735 1999-08-01  Paul Eggert  <eggert@twinsun.com>
32736
32737         * m4/lfs.m4: Remove this file.
32738         * m4/largefile.m4: New file.  It contains the old contents of
32739         lfs.m4, except that all names with prefix AC_LFS have been
32740         changed to use the prefix AC_SYS_LARGEFILE instead, to be
32741         compatible with future autoconf versions.  Also, some minor m4
32742         quoting problems have been fixed.
32743
32744 1999-08-01  Paul Eggert  <eggert@twinsun.com>
32745
32746         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
32747         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
32748         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
32749         and simplify the shell code.
32750
32751 1999-08-01  Jim Meyering  <meyering@ascend.com>
32752
32753         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
32754         m4.
32755
32756 1999-07-20  Jim Meyering  <meyering@ascend.com>
32757
32758         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
32759
32760 1999-07-15  Jim Meyering  <meyering@ascend.com>
32761
32762         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
32763
32764 1999-05-22  Jim Meyering  <meyering@ascend.com>
32765
32766         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
32767
32768 1999-05-20  Jim Meyering  <meyering@ascend.com>
32769
32770         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
32771         Add a colon after each `then' in case $4 is empty.
32772
32773 1999-05-16  Jim Meyering  <meyering@ascend.com>
32774
32775         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
32776
32777 1999-05-10  Jim Meyering  <meyering@ascend.com>
32778
32779         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
32780
32781         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
32782         AC_FUNC_MKTIME.
32783
32784 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
32785
32786         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
32787
32788 1999-05-04  Paul Eggert  <eggert@twinsun.com>
32789
32790         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
32791         not CPPFLAGS, so that linking works correctly in IRIX.
32792
32793 1999-04-30  Paul Eggert  <eggert@twinsun.com>
32794
32795         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
32796
32797 1999-04-20  Paul Eggert  <eggert@twinsun.com>
32798
32799         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
32800         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
32801         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
32802         jm_AC_TYPE_UNSIGNED_LONG_LONG.
32803         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
32804
32805         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
32806
32807 1999-04-20  Jim Meyering  <meyering@ascend.com>
32808
32809         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
32810         AC_REPLACE xstroull if necessary.  From Paul Eggert.
32811         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
32812
32813 1999-04-18  Jim Meyering  <meyering@ascend.com>
32814
32815         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
32816         * m4/jm-macros.m4: Use it.
32817
32818 1999-04-06  Jim Meyering  <meyering@ascend.com>
32819
32820         * m4/strftime.m4: Remove test for %f.
32821
32822 1999-03-29  Jim Meyering  <meyering@ascend.com>
32823
32824         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
32825         superset of the AC_TYPE_* checks in the textutils, fileutils,
32826         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
32827         AC_TYPE_PID_T.
32828
32829 1999-03-28  Jim Meyering  <meyering@ascend.com>
32830
32831         * m4/jm-macros.m4: Define GNU_PACKAGE here.
32832         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
32833         replaced e.g., in the *.sh files of the sh-utils.
32834
32835 1999-03-20  Jim Meyering  <meyering@ascend.com>
32836
32837         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
32838         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
32839         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
32840
32841 1999-03-19  Jim Meyering  <meyering@ascend.com>
32842
32843         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
32844
32845 1999-03-12  Jim Meyering  <meyering@ascend.com>
32846
32847         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
32848
32849 1999-03-07  Jim Meyering  <meyering@ascend.com>
32850
32851         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
32852         declared.
32853
32854 1999-02-17  Jim Meyering  <meyering@ascend.com>
32855
32856         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
32857         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
32858
32859 1999-02-07  Jim Meyering  <meyering@ascend.com>
32860
32861         * m4/group-member.m4: New file -- extracted from sh-utils'
32862         configure.in.
32863
32864         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
32865         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
32866
32867 1999-02-06  Jim Meyering  <meyering@ascend.com>
32868
32869         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
32870         * m4/fnmatch.m4: Likewise.
32871         * m4/getgroups.m4: Likewise.
32872         * m4/lstat.m4: Likewise.
32873         * m4/malloc.m4: Likewise.
32874         * m4/putenv.m4: Likewise.
32875         * m4/realloc.m4: Likewise.
32876         * m4/regex.m4: Likewise.
32877         * m4/stat.m4: Likewise.
32878         * m4/strftime.m4: Likewise.
32879         Suggestion from Alain Magloire.
32880
32881         * m4/chown.m4: Use `.$ac_objext', not `.o'.
32882         * m4/fnmatch.m4: Likewise.
32883         * m4/getgroups.m4: Likewise.
32884         * m4/getline.m4: Likewise.
32885         * m4/lstat.m4: Likewise.
32886         * m4/malloc.m4: Likewise.
32887         * m4/memcmp.m4: Likewise.
32888         * m4/putenv.m4: Likewise.
32889         * m4/realloc.m4: Likewise.
32890         * m4/regex.m4: Likewise.
32891         * m4/stat.m4: Likewise.
32892         * m4/strftime.m4: Likewise.
32893         Suggestion from Alain Magloire.
32894
32895         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
32896         an argument.
32897
32898         * m4/regex.m4: Add a run-time Test for proper operation of
32899         re_compile_pattern.
32900
32901 1999-01-31  Jim Meyering  <meyering@ascend.com>
32902
32903         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
32904
32905 1999-01-30  Jim Meyering  <meyering@ascend.com>
32906
32907         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
32908
32909         * m4/jm-mktime.m4: Make this a wrapper around the official
32910         AM_FUNC_MKTIME rather than my private copy, now that the official one
32911         is up to date.
32912         * m4/mktime.m4: Remove file.
32913
32914         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
32915         * m4/uptime.m4: Likewise.
32916         * m4/uintmax_t.m4: Likewise.
32917
32918 1999-01-28  Jim Meyering  <meyering@ascend.com>
32919
32920         * m4/jm-macros.m4: Use jm_AFS.
32921         * m4/afs.m4: New file (from fileutils' configure.in).
32922
32923         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
32924         * m4/chown.m4: Likewise.
32925         * m4/d-ino.m4: Likewise.
32926         * m4/d-type.m4: Likewise.
32927         * m4/fnmatch.m4: Likewise.
32928         * m4/getgroups.m4: Likewise.
32929         * m4/gettext.m4: Likewise.
32930         * m4/jm-mktime.m4: Likewise.
32931         * m4/jm-winsz2.m4: Likewise.
32932         * m4/lcmessage.m4: Likewise.
32933         * m4/ls-mntd-fs.m4: Likewise.
32934         * m4/malloc.m4: Likewise.
32935         * m4/memcmp.m4: Likewise.
32936         * m4/putenv.m4: Likewise.
32937         * m4/realloc.m4: Likewise.
32938         * m4/st_mtim.m4: Likewise.
32939         * m4/strftime.m4: Likewise.
32940
32941 1999-01-16  Jim Meyering  <meyering@ascend.com>
32942
32943         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
32944         (ARGMATCH_DIE_DECL): Define.
32945
32946 1999-01-12  Jim Meyering  <meyering@ascend.com>
32947
32948         * m4/Makefile.am.in: Rewrite to avoid using fmt.
32949         Reported by Lars Hecking.
32950
32951 1999-01-10  Jim Meyering  <meyering@ascend.com>
32952
32953         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
32954         gross kludge.
32955         * m4/inttypes_h.m4: Likewise.
32956         * m4/lstat.m4: Likewise.
32957         * m4/malloc.m4: Likewise.
32958         * m4/readdir.m4: Likewise.
32959         * m4/realloc.m4: Likewise.
32960         * m4/st_dm_mode.m4: Likewise.
32961         * m4/stat.m4: Likewise.
32962         * m4/utimbuf.m4: Likewise.
32963         * m4/utimes.m4: Likewise.
32964
32965         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
32966         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
32967         comments in config.h.in are meaningful.
32968
32969         * m4/jm-macros.m4: Require autoconf-2.13 here.
32970
32971         * m4/regex.m4: By default, don't use the included regex.c on systems
32972         with glibc 2.  Suggestion from Uli Drepper.
32973
32974 1999-01-02  Jim Meyering  <meyering@ascend.com>
32975
32976         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
32977
32978 1998-12-18  Jim Meyering  <meyering@ascend.com>
32979
32980         * m4/Makefile.am.in (Makefile.am): Simplify rule.
32981         Based on a suggestion from Lars Hecking.
32982
32983 1998-11-16  Paul Eggert  <eggert@twinsun.com>
32984
32985         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
32986
32987 1998-11-16  Jim Meyering  <meyering@ascend.com>
32988
32989         * m4/lfs.m4: Double-quote the `uname...` expression.
32990
32991 1998-11-14  Jim Meyering  <meyering@ascend.com>
32992
32993         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
32994         * m4/stat.m4: Likewise.
32995
32996 1998-11-03  Jim Meyering  <meyering@ascend.com>
32997
32998         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
32999         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
33000
33001 1998-10-18  Jim Meyering  <meyering@ascend.com>
33002
33003         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
33004
33005 1998-10-17  Jim Meyering  <meyering@ascend.com>
33006
33007         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
33008         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
33009         calls for those previously hard-coded headers.  Instead, take a new
33010         parameter.
33011         (jm_CHECK_DECLARATIONS): Reflect interface change.
33012         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
33013         (jm_CHECK_DECL_LOCALTIME_R): New macro.
33014
33015         * m4/mktime.m4: Test for spring-forward gap before long-running test.
33016
33017 1998-10-14  Jim Meyering  <meyering@ascend.com>
33018
33019         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
33020         instead of "TZ=America/Vancouver".  From Paul Eggert.
33021
33022 1998-10-11  Jim Meyering  <meyering@ascend.com>
33023
33024         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
33025         This adds a test for a recently added compatibility fix for mktime.c.
33026         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
33027
33028 1998-09-27  Jim Meyering  <meyering@ascend.com>
33029
33030         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
33031
33032         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
33033         ../configure.in, including a change from Gordon Matzigkeit to allow
33034         cross-compiling for the Hurd.
33035
33036         * m4/glibc.m4: New file/macro to test for the GNU C Library
33037         versions 1 and 2.  From Gordon Matzigkeit.
33038         Indent.
33039
33040 1998-09-21  Jim Meyering  <meyering@ascend.com>
33041
33042         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
33043
33044 1998-08-18  Paul Eggert  <eggert@twinsun.com>
33045
33046         Port nanosecond-resolution times to UnixWare 2.1.2 and
33047         pedantic Solaris 2.6.
33048
33049         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
33050         AC_STRUCT_ST_MTIM.
33051         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
33052         Generate name of ns member, instead of just 1 or undef.
33053         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
33054
33055 1998-08-15  Jim Meyering  <meyering@ascend.com>
33056
33057         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
33058         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
33059         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
33060         instead of jm_TYPE_SSIZE_T.
33061
33062 1998-08-12  Jim Meyering  <meyering@ascend.com>
33063
33064         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
33065
33066 1998-08-02  Jim Meyering  <meyering@ascend.com>
33067
33068         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
33069         in acconfig.h manually.
33070
33071 1998-07-31  Paul Eggert  <eggert@twinsun.com>
33072
33073         * m4/st_mtim.m4: New file.
33074
33075 1998-07-28  Jim Meyering  <meyering@ascend.com>
33076
33077         * m4/utimes.m4: Undef stat.
33078
33079 1998-07-25  Jim Meyering  <meyering@ascend.com>
33080
33081         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
33082         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
33083
33084 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
33085
33086         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
33087         uid and gid actually remain unchanged.
33088
33089 1998-07-07  Jim Meyering  <meyering@ascend.com>
33090
33091         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
33092
33093 1998-07-04  Jim Meyering  <meyering@ascend.com>
33094
33095         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
33096         to prove that this macro can be used in packages without regex.c.
33097
33098 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
33099
33100         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
33101         is to be used.
33102
33103 1998-07-03  Jim Meyering  <meyering@ascend.com>
33104
33105         * m4/gettext.m4: Add -lintl if it's found to be necessary.
33106
33107         * m4/gettext.m4: New file -- from gettext-0.10.35.
33108         * m4/lcmessage.m4: Likewise.
33109         * m4/progtest.m4: Likewise.
33110
33111         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
33112         * m4/jm-macros.m4: Require the new macro.
33113
33114 1998-06-29  Jim Meyering  <meyering@ascend.com>
33115
33116         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
33117         for the definition of NGROUPS (used in a system header included
33118         by sys/mount.h).
33119
33120 1998-06-28  Jim Meyering  <meyering@ascend.com>
33121
33122         * m4/ls-mntd-fs.m4: New file.
33123         * m4/fstypename.m4: New file.
33124
33125         * m4/jm-macros.m4: Require the new macro.
33126         * m4/jm-glibc-io.m4: New file.
33127
33128 1998-05-19  Jim Meyering  <meyering@ascend.com>
33129
33130         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
33131         * m4/lchown.m4: New file.
33132
33133         * m4/Makefile.am.in: New file.
33134         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
33135
33136 1998-05-14  Jim Meyering  <meyering@ascend.com>
33137
33138         * m4/Makefile.am (EXTRA_DIST): Add them.
33139         * m4/jm-macros.m4: New file.
33140         * m4/utimbuf.m4: New file.
33141
33142 1998-05-12  Jim Meyering  <meyering@ascend.com>
33143
33144         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
33145
33146 1998-05-11  Jim Meyering  <meyering@ascend.com>
33147
33148         * m4/isc-posix.m4: New file.
33149
33150 1998-05-10  Jim Meyering  <meyering@ascend.com>
33151
33152         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
33153
33154 1998-05-09  Jim Meyering  <meyering@ascend.com>
33155
33156         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
33157         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
33158         with automake.
33159
33160         * m4/ssize_t.m4: New file.
33161         * m4/mktime.m4: Remove file -- the new automake has this now.
33162
33163 1998-04-26  Jim Meyering  <meyering@ascend.com>
33164
33165         * m4/assert.m4: New file.
33166         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
33167
33168 1998-04-05  Jim Meyering  <meyering@ascend.com>
33169
33170         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
33171         (jm_PREREQ): Use it here.
33172
33173 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
33174
33175         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
33176         in acconfig.h.
33177
33178 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
33179
33180         * m4/prereq.m4: New file.
33181         * m4/error.m4: New file.
33182         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
33183
33184 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
33185
33186         * m4/getline.m4: Don't set am_cv_func_working_getline before the
33187         cache-check for the same variable -- that defeated the purpose of
33188         the test; the test program was never run.  This was a problem only
33189         on systems with losing getline functions -- HP-UX 10.20 is one.
33190         Reported by Bjorn Helgaas.
33191
33192 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
33193
33194         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
33195
33196 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
33197
33198         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
33199
33200         * m4/const.m4: New file.  Use an initializer in this declaration
33201         typedef int charset[2]; const charset x;
33202         Reported by Bob Glickstein.
33203
33204 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
33205
33206         * m4/chown.m4: Fix reversed types on -1 args to chown.
33207         From Kaveh Ghazi.
33208
33209 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
33210
33211         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
33212         Add lseek and memchr.
33213
33214         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
33215         T.E.Dickey <dickey@clark.net> said that some older preprocessors
33216         have a 20-character limit on names.
33217
33218 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
33219
33220         * m4/inttypes_h.m4: New file.
33221         * m4/uintmax_t.m4: New file.
33222         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
33223
33224 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
33225   Free Software Foundation, Inc.
33226 Copying and distribution of this file, with or without modification,
33227 are permitted provided the copyright notice and this notice are preserved.