Rename inttypes_.h to inttypes.in.h.
[gnulib.git] / ChangeLog
1 2007-09-30  Bruno Haible  <bruno@clisp.org>
2
3         * lib/alloca.in.h: Renamed from lib/alloca_.h.
4         * modules/alloca-opt (Files, Makefile.am): Use alloca.in.h instead of
5         alloca_.h.
6         * lib/argz.in.h: Renamed from lib/argz_.h.
7         * modules/argz (Files, Makefile.am): Use argz.in.h instead of argz_.h.
8         * lib/byteswap.in.h: Renamed from lib/byteswap_.h.
9         * modules/byteswap (Files, Makefile.am): Use byteswap.in.h instead of
10         byteswap_.h.
11         * lib/dirent.in.h: Renamed from lib/dirent_.h.
12         * modules/fchdir (Files, Makefile.am): Use dirent.in.h instead of
13         dirent_.h.
14         * lib/fcntl.in.h: Renamed from lib/fcntl_.h.
15         * modules/fcntl (Files, Makefile.am): Use fcntl.in.h instead of
16         fcntl_.h.
17         * lib/float.in.h: Renamed from lib/float_.h.
18         * modules/float (Files, Makefile.am): Use float.in.h instead of
19         float_.h.
20         * lib/fnmatch.in.h: Renamed from lib/fnmatch_.h.
21         * modules/fnmatch (Files, Makefile.am): Use fnmatch.in.h instead of
22         fnmatch_.h.
23         * lib/getopt.in.h: Renamed from lib/getopt_.h.
24         * modules/getopt (Files, Makefile.am): Use getopt.in.h instead of
25         getopt_.h.
26         * lib/glob.in.h: Renamed from lib/glob_.h.
27         * modules/glob (Files, Makefile.am): Use glob.in.h instead of glob_.h.
28         * lib/iconv.in.h: Renamed from lib/iconv_.h.
29         * modules/iconv_open (Files, Makefile.am): Use iconv.in.h instead of
30         iconv_.h.
31         * lib/inttypes.in.h: Renamed from lib/inttypes_.h.
32         * modules/inttypes (Files, Makefile.am): Use inttypes.in.h instead of
33         inttypes_.h.
34
35 2007-09-30  Bruno Haible  <bruno@clisp.org>
36
37         * tests/test-getaddrinfo.c (AF_UNSPEC): Provide a fallback definition.
38         Needed on BeOS.
39
40 2007-09-30  Bruno Haible  <bruno@clisp.org>
41
42         * modules/dirname-tests (check_PROGRAMS): Renamed from noinst_PROGRAMS.
43
44 2007-09-29  Bruno Haible  <bruno@clisp.org>
45
46         * lib/stdio_.h (getdelim, getline): Add identifiers. Doc tweak.
47
48 2007-09-29  Bruno Haible  <bruno@clisp.org>
49
50         * lib/xreadlink.c (xreadlink): Simplify to a wrapper around areadlink.
51         * modules/xreadlink (Depends-on): Add areadlink, remove readlink etc.
52         * build-aux/install-reloc: Compile also areadlink.c.
53         * modules/relocatable-prog-wrapper (Files): Add lib/areadlink.[hc].
54
55 2007-09-29  Bruno Haible  <bruno@clisp.org>
56
57         * gnulib-tool (func_emit_initmacro_done): Indentation.
58
59 2007-09-29  Bruno Haible  <bruno@clisp.org>
60
61         * README: Add CVS checkout update instructions.
62         Info from Bob Proulx <bob@proulx.com>.
63
64 2007-09-28  Eric Blake  <ebb9@byu.net>
65
66         Provide move-if-change.
67         * build-aux/move-if-change: New file, based on best practice
68         rather than any canonical upstream location.
69
70 2007-09-28  Jim Meyering  <jim@meyering.net>
71
72         Fix canonicalize loop-detection corner case.
73         Do not attempt to stat the symlink values stored via seen_triple.
74         Without this, coreutils' tests/misc/readlink-fp-loop test would fail
75         on linux-2.6.18, (but not 2.6.22).
76         * lib/canonicalize.c (seen_triple): Use triple_compare_ino_str, not
77         triple_compare.  The former compares dev,ino,filename, while the latter
78         would actually stat dirname(filename) when dev and ino were equal.
79         * lib/hash-triple.c: Install <string.h>.
80         (STREQ): Define.
81         (triple_compare_ino_str): New function.
82         * lib/hash-triple.h (triple_compare_ino_str): Declare it.
83
84 2007-09-28  Eric Blake  <ebb9@byu.net>
85
86         Enforce that AC_REPLACE_FUNCS files exist.
87         * gnulib-tool (func_emit_initmacro_done): Make AC_LIBSOURCES
88         override check for typos.
89
90         Fix test-closein on Solaris 10.
91         * tests/test-closein.c (main): Don't assume stdin can be inherited
92         closed on all systems.
93         * tests/test-closein.sh: Likewise.
94         Reported by Piotr Tarnowski.
95
96 2007-09-28  Jim Meyering  <jim@meyering.net>
97
98         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Fix typo in comment.
99
100 2007-09-27  Jim Meyering  <jim@meyering.net>
101
102         canonicalize: Avoid a false-positive cycle failure.
103         * modules/canonicalize (Depends-on): Add file-set and hash-triple.
104         Sort.  Remove cycle-check.
105         * lib/canonicalize.c: Include file-set.h and hash-triple.h,
106         not cycle-check.h.
107         (seen_triple): New function.
108         (canonicalize_filename_mode): Use it instead of cycle-check.
109         * tests/test-canonicalize.c: Add a test for this bug.
110         * tests/test-canonicalize.sh: Set up and run the test.
111
112         New module, file-set, from coreutils.
113         * modules/file-set: Define it.
114         * lib/file-set.c, lib/file-set.h: Implement.
115
116         New module, hash-triple, from coreutils.
117         * modules/hash-triple: Define it.
118         * lib/hash-triple.c, lib/hash-triple.h: Implement.
119
120 2007-09-25  Eric Blake  <ebb9@byu.net>
121
122         Fix strerror on Interix.
123         * lib/string_.h (strerror): Declare replacement.
124         * doc/functions/strerror.texi (strerror): Document the Interix
125         shortcoming.
126         * modules/string (Makefile.am): Support new hooks.
127         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Add new hooks.
128         * m4/strerror.m4 (gl_FUNC_STRERROR): Defer to
129         gl_FUNC_STRERROR_SEPARATE.
130         (gl_FUNC_STRERROR_SEPARATE): Check for Interix bug.
131         * lib/strerror.c (rpl_strerror): Provide replacement.
132         * modules/strerror (Depends-on): Add string.
133         (configure.ac): Detect use of module.
134         * tests/test-strerror.c: New file.
135         * modules/strerror-tests: New test module.
136         * modules/argp (Depends-on): Add strerror.
137         * modules/error (Depends-on): Likewise.
138         Reported by Martin Koeppe.
139
140 2007-09-24  Bruno Haible  <bruno@clisp.org>
141
142         * README: Update git instructions.
143
144 2007-09-24  Eric Blake  <ebb9@byu.net>
145
146         Revert fpending breakage from 2007-09-08.
147         * m4/fpending.m4 (gl_FUNC_FPENDING): Don't require existence of
148         __fpending.c.
149
150 2007-09-24  Jim Meyering  <jim@meyering.net>
151
152         filenamecat.c: Add a test.
153         * lib/filenamecat.c (main) [TEST_FILE_NAME_CONCAT]: Add a test
154         showing how the function works when DIR is the empty string.
155
156 2007-09-21  Simon Josefsson  <simon@josefsson.org>
157
158         * tests/test-canonicalize.sh: Turn on executable bit.
159
160 2007-09-19  Eric Blake  <ebb9@byu.net>
161
162         * README: Update CVS instructions.
163
164 2007-09-18  Bruno Haible  <bruno@clisp.org>
165
166         * modules/areadlink: New file.
167         * lib/areadlink.h (areadlink): New declaration.
168         * lib/areadlink.c: New file, based on lib/xreadlink.c.
169
170 2007-09-17  Jim Meyering  <jim@meyering.net>
171
172         * lib/savewd.c (ESTALE) [!defined]: Define.
173         Reported to be required on Interix by Martin Koeppe.
174
175 2007-09-17  Bruno Haible  <bruno@clisp.org>
176
177         * gnulib-tool (func_version): Use $version.
178
179 2007-09-16  Bruno Haible  <bruno@clisp.org>
180
181         * m4/printf.m4 (gl_PRINTF_LONG_DOUBLE, gl_PRINTF_INFINITE,
182         gl_PRINTF_INFINITE_LONG_DOUBLE): Increase buf's size from 100 to 10000.
183         Needed on glibc-2.6.1 with -fstack-protector -D_FORTIFY_SOURCE=2.
184         Reported by Greg Schafer <gschafer@zip.com.au>.
185
186 2007-09-15  Bruno Haible  <bruno@clisp.org>
187
188         * gnulib-tool (sed): Try a little harder to make bash understand the
189         alias.
190         Reported by Bruce Korb <bruce.korb@gmail.com>.
191
192 2007-09-13  Eric Blake  <ebb9@byu.net>
193
194         * ChangeLog: Remove conflict markers.
195
196 2007-09-13  Simon Josefsson  <simon@josefsson.org>
197
198         * lib/gc-gnulib.c (gc_hash_open): Catch NULL calloc return value.
199         Reported by Bruno Haible <bruno@clisp.org>.
200
201 2007-09-12  Bruno Haible  <bruno@clisp.org>
202
203         * m4/lock.m4: Don't provide an AC_USE_SYSTEM_EXTENSIONS definition.
204         (gl_LOCK_EARLY_BODY): Use AC_GNU_SOURCE when AC_USE_SYSTEM_EXTENSIONS
205         is not defined.
206
207 2007-09-12  Eric Blake  <ebb9@byu.net>
208
209         Track CVS Autoconf on AC_USE_SYSTEM_EXTENSIONS.
210         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Update to CVS
211         Autoconf definition.
212         * modules/euidaccess (Depends-on): Add extensions, for
213         AC_USE_SYSTEM_EXTENSIONS with autoconf <= 2.59.
214         * modules/fnmatch (Depends-on): Likewise.
215         * modules/getaddrinfo (Depends-on): Likewise.
216         * modules/getdelim (Depends-on): Likewise.
217         * modules/getline (Depends-on): Likewise.
218         * modules/getsubopt (Depends-on): Likewise.
219         * modules/gettext (Depends-on): Likewise.
220         * modules/group-member (Depends-on): Likewise.
221         * modules/mbchar (Depends-on): Likewise.
222         * modules/memmem (Depends-on): Likewise.
223         * modules/mempcpy (Depends-on): Likewise.
224         * modules/memrchr (Depends-on): Likewise.
225         * modules/pagealign_alloc (Depends-on): Likewise.
226         * modules/readutmp (Depends-on): Likewise.
227         * modules/stpcpy (Depends-on): Likewise.
228         * modules/stpncpy (Depends-on): Likewise.
229         * modules/strchrnul (Depends-on): Likewise.
230         * modules/strndup (Depends-on): Likewise.
231         * modules/strsep (Depends-on): Likewise.
232         * modules/strverscmp (Depends-on): Likewise.
233         * modules/vasprintf (Depends-on): Likewise.
234         * modules/wcwidth (Depends-on): Likewise.
235         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): AC_GNU_SOURCE will be
236         obsolete in Autoconf 2.62; use AC_USE_SYSTEM_EXTENSIONS instead.
237         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_GNU): Likewise.
238         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDR_INFO): Likewise.
239         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Likewise.
240         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise.
241         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Likewise.
242         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
243         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER): Likewise.
244         * m4/mbchar.m4 (gl_MBCHAR): Likewise.
245         * m4/memmem.m4 (gl_FUNC_MEMMEM): Likewise.
246         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
247         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
248         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Likewise.
249         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC): Likewise.
250         * m4/readutmp.m4 (gl_READUTMP): Likewise.
251         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
252         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
253         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
254         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
255         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
256         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
257         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
258         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP): Likewise.
259         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): Likewise.
260         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
261         * m4/lock.m4 (gl_LOCK_EARLY_BODY): Likewise, but provide fallback,
262         so that lock.m4 can be used in gettext without extensions module.
263
264 2007-09-11  Bruno Haible  <bruno@clisp.org>
265
266         * m4/isc-posix.m4: Remove file.
267         Suggested by Eric Blake.
268
269 2007-09-11  Eric Blake  <ebb9@byu.net>
270
271         * ChangeLog: Restore lines accidentally truncated 2007-04-06.
272
273 2007-09-10  Bruno Haible  <bruno@clisp.org>
274
275         * posix-modules: Fix typo in error message.
276         Reported by Matt <mkraai@beckman.com>.
277
278 2007-09-09  Bruno Haible  <bruno@clisp.org>
279
280         * doc/functions/getdelim.texi: Update list of platforms lacking the
281         function.
282         * doc/functions/getline.texi: Likewise.
283
284 2007-09-09  Jim Meyering  <jim@meyering.net>
285
286         * lib/hash.c (hash_initialize): Detect calloc failure.
287         Reported by Bruno Haible.
288
289 2007-09-09  Bruno Haible  <bruno@clisp.org>
290
291         * lib/canonicalize-lgpl.c (__realpath): Set errno to ENOMEM when
292         malloc or realloc fails.
293
294 2007-09-09  Bruno Haible  <bruno@clisp.org>
295
296         * modules/getcwd (Depends-on): Add malloc-posix.
297         * modules/glob (Depends-on): Likewise.
298         * modules/putenv (Depends-on): Likewise.
299         * modules/strdup (Depends-on): Likewise.
300         * modules/getdelim (Depends-on): Add realloc-posix.
301         * modules/read-file (Depends-on): Likewise.
302
303 2007-09-09  Bruno Haible  <bruno@clisp.org>
304
305         * m4/malloc.m4 (gl_CHECK_MALLOC_POSIX): New macro.
306         (gl_FUNC_MALLOC_POSIX): Require it.
307         * m4/realloc.m4 (gl_FUNC_REALLOC_POSIX): Likewise.
308         * m4/calloc.m4 (gl_FUNC_CALLOC_POSIX): Likewise.
309         * modules/realloc (Files): Add m4/malloc.m4.
310         * modules/calloc (Files): Likewise.
311
312 2007-09-09  Bruno Haible  <bruno@clisp.org>
313
314         * modules/malloc-posix: New file.
315         * modules/malloc (Depends-on): Add malloc-posix.
316         * lib/malloc.c: Include errno.h.
317         (rpl_malloc): Merge the requirements of a glibc-compatible malloc
318         and a POSIX-compatible malloc into a single function. Set ENOMEM
319         when returning NULL.
320         * m4/malloc.m4: New file.
321         * doc/functions/malloc.texi: Mention the malloc-posix module.
322         * lib/stdlib_.h (malloc): New declaration.
323         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize
324         GNULIB_MALLOC_POSIX and HAVE_MALLOC_POSIX.
325         * modules/stdlib (stdlib.h): Substitute also GNULIB_MALLOC_POSIX
326         and HAVE_MALLOC_POSIX.
327
328 2007-09-09  Bruno Haible  <bruno@clisp.org>
329
330         * modules/realloc-posix: New file.
331         * modules/realloc (Depends-on): Add realloc-posix.
332         * lib/realloc.c: Include errno.h.
333         (rpl_realloc): Merge the requirements of a glibc-compatible realloc
334         and a POSIX-compatible realloc into a single function. Set ENOMEM
335         when returning NULL.
336         * m4/realloc.m4: New file.
337         * doc/functions/realloc.texi: Mention the realloc-posix module.
338         * lib/stdlib_.h (realloc): New declaration.
339         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize
340         GNULIB_REALLOC_POSIX and HAVE_REALLOC_POSIX.
341         * modules/stdlib (stdlib.h): Substitute also GNULIB_REALLOC_POSIX
342         and HAVE_REALLOC_POSIX.
343
344 2007-09-09  Bruno Haible  <bruno@clisp.org>
345
346         * modules/calloc-posix: New file.
347         * modules/calloc (Depends-on): Add calloc-posix.
348         * lib/calloc.c: Include errno.h.
349         (rpl_calloc): Merge the requirements of a glibc-compatible calloc
350         and a POSIX-compatible calloc into a single function. Set ENOMEM
351         when returning NULL.
352         * m4/calloc.m4 (gl_FUNC_CALLOC_POSIX): New macro.
353         * doc/functions/calloc.texi: Mention the calloc-posix module.
354         * lib/stdlib_.h (calloc): New declaration.
355         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize
356         GNULIB_CALLOC_POSIX and HAVE_CALLOC_POSIX.
357         * modules/stdlib (stdlib.h): Substitute also GNULIB_CALLOC_POSIX
358         and HAVE_CALLOC_POSIX.
359
360 2007-09-09  Bruno Haible  <bruno@clisp.org>
361
362         Allow for modules to show an arbitrary notice.
363         * modules/TEMPLATE-EXTENDED: Add 'Notice' field.
364         * gnulib-tool: New option --extract-notice.
365         (func_usage): Document it.
366         (sed_extract_prog): Update.
367         (func_get_notice): New function.
368         (func_modules_notice): New function.
369         (func_import, func_create_testdir): Invoke it.
370         Suggested by Jim Meyering.
371
372 2007-09-09  Bruno Haible  <bruno@clisp.org>
373
374         * gnulib-tool: New options --verbose, --quiet.
375         (func_usage): Document them.
376         (verbose): New variable.
377         (func_execute_command): New function.
378         (func_import): Don't show the module list and the file list if
379         $verbose < 0.
380         (func_create_testdir): Likewise. Use func_execute_command.
381         (func_create_megatestdir): Use func_execute_command.
382
383 2007-09-08  Bruno Haible  <bruno@clisp.org>
384
385         * gnulib-tool (func_import): Prefer rsync over wget when available,
386         for fetching the PO files.
387
388 2007-09-08  Bruno Haible  <bruno@clisp.org>
389
390         * posix-modules: New file. Portions copied from gnulib-tool.
391         * doc/gnulib.texi (POSIX Substitutes Library): New chapter.
392
393 2007-09-08  Jim Meyering  <jim@meyering.net>
394
395         Rename __fpending.c -> fpending.c and __fpending.h -> fpending.h
396         * lib/fpending.h: Rename from __fpending.h.
397         * lib/fpending.c: Rename from __fpending.c.
398         Include "fpending.h", not "__fpending.h".
399         * lib/__fpending.h, lib/__fpending.c: Remove files.
400         * modules/fpending (Files): Reflect new file names.
401         * lib/close-stream.c: Include "fpending.h", not "__fpending.h".
402
403 2007-09-08  Bruno Haible  <bruno@clisp.org>
404
405         * m4/inttypes-h.m4: Remove stub file.
406
407 2007-09-07  Simon Josefsson  <simon@josefsson.org>
408
409         * doc/headers/stdint.texi: Discuss #include_next issue.
410
411 2007-09-06  Paul Eggert  <eggert@cs.ucla.edu>
412
413         * build-aux/bootstrap: Remove obsolete comment about wget --help.
414
415 2007-09-06  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
416
417         * m4/time_h.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Fix misspelling
418         in variable name.
419
420 2007-09-03  Jim Meyering  <jim@meyering.net>
421
422         New module: git-version-gen.
423         * modules/git-version-gen: New file.
424
425         Import changes from coreutils for bootstrap script.
426
427         * build-aux/bootstrap (WGET_COMMAND): Remove code to set this variable.
428
429         bootstrap: uses rsync to download the .po files
430         * build-aux/bootstrap (po_download_command_format): New global.
431         (download_po_files): Use rsync.
432         (update_po_files): Don't remove .po files after download,
433         so future rsync runs can take advantage of the copies.
434
435         * build-aux/bootstrap (gnulib_tool): Make sha1sum check quietly.
436
437         Solve the unnecessary-.po-file-regeneration problem once and for all.
438         * build-aux/bootstrap (download_po_files): New function, renamed from
439         get_translations.  Now, downloads, but doesn't update LINGUAS.
440         (update_po_files): New function.
441
442         bootstrap: Ignore more.
443         * build-aux/bootstrap (symlink_to_dir): Add a directory name like
444         uniwidth to e.g., lib/.gitignore.
445         (slurp): Handle the sys_stat_.h -> sys mapping, too.
446
447         * build-aux/bootstrap: New setting: vc_ignore.
448         (insert_sorted_if_absent): Create $file if absent.
449         Adapt to new, possibly empty, list: $vc_ignore.
450
451         bootstrap: generate more ignorable names
452         * build-aux/bootstrap (slurp): When generating ignorable names,
453         also map .sin to .sed, .gperf to .c, and .y to .c.
454
455 2007-09-03  Jim Meyering  <jim@meyering.net>
456
457         * build-aux/git-version-gen: New file, from coreutils.  For details, see
458         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=bfe49f506
459
460 2007-09-02  Bruno Haible  <bruno@clisp.org>
461
462         Fix mis-recognition of 'mcs' on QNX 6.
463         * m4/csharpcomp.m4 (gt_CSHARPCOMP): Test whether the "mcs --version"
464         output contains the string "Mono".
465         * lib/csharpcomp.c (compile_csharp_using_mono): Likewise.
466         Reported by <kraai@ftbfs.org> at <https://savannah.gnu.org/bugs/?18337>.
467
468 2007-09-01  Bruno Haible  <bruno@clisp.org>
469
470         Fix collision between uniwidth/* and linebreak modules.
471         * lib/linebreak.h (locale_charset, uc_width, u8_width, u16_width,
472         u32_width): Remove declarations.
473         * lib/linebreak.c: Include uniwidth.h, uniwidth/cjk.h, streq.h.
474         (u32_mbtouc_unsafe, streq9, streq8, streq7, streq6, streq5, streq4,
475         streq3, streq2, streq1, streq0): Remove functions.
476         (STREQ): Remove macro.
477         (is_cjk_encoding): Remove function.
478         (nonspacing_table_data, nonspacing_table_ind): Remove constants.
479         (uc_width, u8_width, u16_width, u32_width): Remove functions.
480         * modules/linebreak (Depends-on): Add streq, uniwidth/width.
481         * NEWS: Document the change.
482
483 2007-09-01  Bruno Haible  <bruno@clisp.org>
484
485         * lib/streq.h: Add double-inclusion guard.
486
487 2007-09-01  Karl Berry  <karl@gnu.org>
488
489         * MODULES.html.sh: Rename mreadlink_with_size to areadlink_with_size.
490
491 2007-08-28  Jim Meyering  <jim@meyering.net>
492
493         Rename mreadlink_with_size to areadlink_with_size.
494         * NEWS: Document the change.
495         * lib/mreadlink-with-size.c (mreadlink_with_size): Rename this to...
496         * lib/areadlink-with-size.c (areadlink_with_size): ...this.
497         * lib/mreadlink.h: Rename this to...
498         * lib/areadlink.h: ...this.
499         * modules/mreadlink-with-size: Rename this to...
500         * modules/areadlink-with-size: ...this.
501         * lib/canonicalize.c: Reflect the renaming.
502         * modules/canonicalize: Likewise.
503
504 2007-08-26  Bruno Haible  <bruno@clisp.org>
505
506         * gnulib-tool (func_import): When deciding which files to remove,
507         consider also dangling symbolic links.
508         Reported by Eric Blake.
509
510 2007-08-26  Bruno Haible  <bruno@clisp.org>
511
512         * gnulib-tool (func_ln_if_changed): Use "test -h", not "test -L".
513
514 2007-08-23  Simon Josefsson  <simon@josefsson.org>
515
516         * lib/readline.c: Don't include getline.h, the prototype is now
517         found in stdio.h.
518
519 2007-08-23  Jim Meyering  <jim@meyering.net>
520
521         Getdelim touchup.
522         * lib/getdelim.c (getdelim): Don't bother to save/restore errno
523         around the funlockfile call, since funlockfile never sets errno.
524         Don't set errno upon failed realloc.
525
526 2007-08-22  Eric Blake  <ebb9@byu.net>
527
528         Getline touchups.
529         * lib/getdelim.c (getdelim): Revert regression that required *n to
530         be 0 when *lineptr is NULL.  Preserve errno across funlockfile.
531         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Check for declaration of
532         getdelim, rather than whether implementation is missing.
533         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise for getline.
534         * lib/stdio_.h (getline): Also declare if replacement is
535         required.
536         * doc/functions/getdelim.texi: New file.
537         * doc/functions/getline.texi: Likewise.
538         * doc/gnulib.texi (Function Substitutes): Add new files.
539         Reported by Bruno Haible.
540
541 2007-08-22  Ludovic Courtès  <ludo@gnu.org>
542
543         * users.txt: Add Guile.
544
545 2007-08-22  Eric Blake  <ebb9@byu.net>
546
547         * tests/test-getdelim.c (main): Use remove, not unlink.
548         * tests/test-getline.c (main): Likewise.
549
550         Move getline and getdelim into stdio.h, per POSIX 200x.
551         * modules/getline (Files): Remove getline.h.
552         (Depends-on): Add stdio.
553         (configure.ac): Add module indicator.
554         * modules/getdelim (Files): Remove getdelim.h.
555         (Depends-on): Add stdio.
556         (configure.ac): Add module indicator.
557         * modules/stdio (Makefile.am): Work with new indicators.
558         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Add new defaults.
559         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Work with stdio needs.
560         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise.
561         * lib/getdelim.h: Delete.
562         * lib/getline.h: Delete.
563         * lib/stdio_.h (getdelim, getline): Declare.
564         * modules/getdelim-tests: New module.
565         * modules/getline-tests: Likewise.
566         * tests/test-getdelim.c: New file.
567         * tests/test-getline.c: Likewise.
568         * NEWS: Document the change.
569         * lib/getline.c: Update choice of header.
570         * lib/csharpcomp.c: Likewise.
571         * lib/getpass.c: Likewise.
572         * lib/javacomp.c: Likewise.
573         * lib/javaversion.c: Likewise.
574         * lib/yesno.c: Likewise.
575         * lib/getdelim.c: Likewise.
576         (getdelim): Set errno on failure, and avoid memory leak.
577
578 2007-08-19  Bruno Haible  <bruno@clisp.org>
579
580         * modules/closein (Depends-on): Add freadahead.
581         * lib/closein.c: Include freadahead.h.
582         (close_stdin): Skip the fseeko and fflush calls if freadahead(stdin)
583         is zero.
584
585 2007-08-19  Bruno Haible  <bruno@clisp.org>
586
587         * modules/freadahead-tests: New file.
588         * tests/test-freadahead.sh: New file.
589         * tests/test-freadahead.c: New file.
590
591         * modules/freadahead: New file.
592         * lib/freadahead.h: New file.
593         * lib/freadahead.c: New file.
594         * MODULES.html.sh (File stream based Input/Output): Add freadahead,
595         fbufmode, fpurge, freadable, fwritable.
596
597 2007-08-19  Eric Blake  <ebb9@byu.net>
598
599         Test yesno in combination with closein.
600         * lib/yesno.c (yesno): Document use of stdin.
601         * modules/yesno-tests (Files): New module.
602         * tests/test-yesno.c (main): New file.
603         * tests/test-yesno.sh: Likewise.
604
605 2007-08-19  Bruno Haible  <bruno@clisp.org>
606
607         * lib/fbufmode.c (fbufmode): Add tentative support for Solaris/AMD64.
608         * lib/fseeko.c (rpl_fseeko): Likewise.
609         * lib/fseterr.c (fseterr): Likewise.
610
611 2007-08-19  Bruno Haible  <bruno@clisp.org>
612
613         * tests/test-lseek.c (main): Disable a test for BeOS.
614         * doc/functions/lseek.texi: Document the BeOS bug.
615
616 2007-08-19  Bruno Haible  <bruno@clisp.org>
617             Eric Blake  <ebb9@byu.net>
618
619         * lib/lseek.c: Include <sys/stat.h>.
620         (rpl_lseek): Add workaround code also for Unix platforms.
621         Needed for BeOS.
622         * m4/lseek.m4 (gl_FUNC_LSEEK): When cross-compiling, fail on BeOS.
623         * doc/functions/lseek.texi: Document BeOS definiency.
624
625 2007-08-18  Bruno Haible  <bruno@clisp.org>
626
627         * modules/fstrcmp-tests: New file.
628         * tests/test-fstrcmp.c: New file.
629
630 2007-08-18  Bruno Haible  <bruno@clisp.org>
631
632         * modules/fstrcmp: New file, from GNU gettext with modifications.
633         * lib/fstrcmp.h: New file, from GNU gettext.
634         * lib/fstrcmp.c: New file, from GNU gettext.
635         * MODULES.html.sh (String handling): Add fstrcmp.
636
637 2007-08-18  Bruno Haible  <bruno@clisp.org>
638
639         * lib/diffseq.h (struct context): Change type of 'heuristic' field to
640         'bool'.
641         (diag, compareseq): Remove const from the ctxt argument.
642         (USE_HEURISTIC): Undefine at the end.
643
644 2007-08-18  Jim Meyering  <jim@meyering.net>
645
646         New file: lib/idcache.h
647         * NEWS: Mention the addition.
648         * modules/idcache (Files): Add lib/idcache.h
649         * lib/idcache.c: Include "idcache.h".
650         Don't include <sys/types.h>.
651         Add a FIXME comment.
652         Move file-scoped "static" declarations to the top.
653         * lib/idcache.h: New file.  Include <sys/types.h> here, instead.
654
655 2007-08-17  Bruno Haible  <bruno@clisp.org>
656         and Paul Eggert  <eggert@cs.ucla.edu>
657
658         * MODULES.html.sh: Add diffseq.
659         * modules/diffseq: New file.
660         * lib/diffseq.h: New file, from GNU gettext with a few minor changes,
661         extracted from GNU gettext's fstrcmp.c and GNU diff's analyze.c.
662
663 2007-08-15  Paul Eggert  <eggert@cs.ucla.edu>
664
665         Import changes from coreutils for bootstrap script.
666
667         2007-07-21  Paul Eggert  <eggert@cs.ucla.edu>
668
669         * build-aux/bootstrap (slurp): Work even in environments where
670         "ls" defaults to "ls -A".  Put in a FIXME, though, since the
671         current code does not slurp files whose names start with ".", and
672         this looks like it might be a troublesome area.
673
674         2007-07-11  Jim Meyering  <jim@meyering.net>
675
676         If there's a GPL vN copyright comment, require that N == 3.
677
678         2007-07-08  Jim Meyering  <jim@meyering.net>
679
680         Run the coreutils-specific code only if tests/Makefile.am.in exists.
681         * build-aux/bootstrap (mam_template): Move definition out of loop.
682
683         Create symlinks for gl/{lib,m4}/*, just as for gnulib/{lib,m4}/*.
684
685         * build-aux/bootstrap (symlink_to_dir): Rename function from
686         symlink_to_gnulib.  Add a directory parameter.  Update all
687         callers.
688         (cp_mark_as_generated): Also check for -- and link to -- files in
689         gl/.
690
691         2007-07-08  Jim Meyering  <jim@meyering.net>
692
693         Adapt to deeper hierarchy in gnulib.
694         * build-aux/bootstrap (symlink_to_dir): If the destination
695         directory doesn't exist, create it. This is required at least for
696         "lib/uniwidth/cjk.h".
697
698         2007-05-15  Jim Meyering  <jim@meyering.net>
699
700         * build-aux/bootstrap: Now that generated Makefile.am files
701         are no longer under version control, they must be created at
702         bootstrap time.
703
704 2007-08-14  Ben Pfaff  <blp@gnu.org>
705
706         * lib/count-one-bits.h: Add comments.  From Bruno Haible.
707
708 2007-08-14  Paul Eggert  <eggert@cs.ucla.edu>
709
710         * lib/count-one-bits.h: Don't include <limits.h>; no longer needed
711         given the changes below.
712         (COUNT_ONE_BITS): Use 'verify' rather than 'verify_true'.  Work
713         even on hosts that have padding bits beyond the supported 64.
714
715 2007-08-10  Paul Eggert  <eggert@cs.ucla.edu>
716
717         * NEWS: In xstrtol, remove STRTOL_FATAL_ERROR and add xstrtol_fatal.
718         * lib/xstrtol.h: Don't include exitfail.h; that's now internal to
719         xstrtol.c.  Include getopt.h, since xstrtol_fatal's signature
720         depends on it.
721         (xstrtol_error): Remove.
722         (xstrtol_fatal): New decl, replacing the functionality of xstrtol_error
723         but with a different signature.
724         (ATTRIBUTE_NORETURN, __attribute__): New macros.
725         * lib/xstrtol-error.c: Include exitfail.h.
726         (xstrtol_fatal): New function, with a different signature from the
727         old xstrtol_error, so that the caller need not worry about passing
728         in an exit status, or about storage management of the option argument.
729         (xstrtol_error): Now a static function.  Redo signature to
730         implement xstrtol_fatal.  Output the correct number of hyphens in
731         front of the option so that the caller need not worry about
732         storage management.
733         (N_): New macro.
734         (_): Remove; not used now.
735         * modules/xstrtol: Depend on getopt.
736         * tests/test-xstrtol.c (main): Use new xstrtol_error function instead
737         of old STRTOL_FATAL_ERROR macro.
738         * tests/test-xstrtol.sh (t-xstrtol.xo): Adjust to match new behavior
739         of test program.
740         * tests/test-xstrtoimax.sh (t-xstrtoimax.xo): Likewise.
741         * tests/test-xstrtoumax.sh (t-xstrtoumax.xo): Likewise.
742
743 2007-08-08  Eric Blake  <ebb9@byu.net>
744
745         * lib/xstrtol-error.c: Add missing include.
746
747         Move xstrtol messages into gnulib domain, when --pobase is used.
748         * lib/xstrtol.h (_STRTOL_ERROR): Move messages out of macro...
749         * lib/xstrtol-error.c (xstrtol_error): ...into new file.
750         * modules/xstrtol (Files): Distribute new file.
751         * m4/xstrtol.m4 (gl_XSTRTOL): Build new file.
752         * lib/xstrtol.c (TESTING_XSTRTO): Move tests...
753         * tests/test-xstrtol.c: ...into new file.
754         * tests/test-xstrtoul.c: Also test xstrtoul.
755         * tests/test-xstrtoimax.c: Also test xstrtoimax.
756         * tests/test-xstrtoumax.c: Also test xstrtoumax.
757         * tests/test-xstrtol.sh: Drive the tests.
758         * tests/test-xstrtoimax.sh: Likewise.
759         * tests/test-xstrtoumax.sh: Likewise.
760         * modules/xstrtol-tests: New module.
761         * modules/xstrtoimax-tests: Likewise.
762         * modules/xstrtoumax-tests: Likewise.
763
764 2007-08-08  Jim Meyering  <jim@meyering.net>
765
766         New function: mfile_name_concat.
767         * lib/filenamecat.c (mfile_name_concat): New function, just like
768         file_name_concat, but return NULL upon failure rather than exiting
769         with a diagnostic.
770         * lib/filenamecat.h: Declare it.
771
772 2007-08-07  Bruno Haible  <bruno@clisp.org>
773
774         * m4/inttypes.m4 (gl_INTTYPES_H): Use GL_TRIGGER_STDC_LIMIT_MACROS
775         instead of __STDC_LIMIT_MACROS_TRIGGER. This avoids a redefinition
776         warning from gcc.
777         Reported by Eric Blake.
778
779 2007-08-07  Simon Josefsson  <simon@josefsson.org>
780
781         * modules/crypto/arctwo (License): Use the synonymous term "LGPLv2+".
782         * modules/crypto/arcfour (License): Likewise.
783         * modules/crypto/des-tests (License): Likewise.
784         * modules/crypto/gc-arctwo-tests (License): Likewise.
785         * modules/crypto/gc-des-tests (License): Likewise.
786         * modules/crypto/gc-hmac-md5-tests (License): Likewise.
787         * modules/crypto/gc-hmac-sha1-tests (License): Likewise.
788         * modules/crypto/gc-md2-tests (License): Likewise.
789         * modules/crypto/gc-md4-tests (License): Likewise.
790         * modules/crypto/gc-md5-tests (License): Likewise.
791         * modules/crypto/gc-pbkdf2-sha1-tests (License): Likewise.
792         * modules/crypto/gc-rijndael-tests (License): Likewise.
793         * modules/crypto/gc-sha1-tests (License): Likewise.
794         * modules/crypto/gc-tests (License): Likewise.
795         * modules/crypto/hmac-md5 (License): Likewise.
796         * modules/crypto/hmac-sha1 (License): Likewise.
797         * modules/crypto/md2-tests (License): Likewise.
798         * modules/crypto/md4-tests (License): Likewise.
799         * modules/crypto/md5 (License): Likewise.
800         * modules/crypto/rijndael (License): Likewise.
801         * modules/crypto/sha1 (License): Likewise.
802         * modules/memxor (License): Likewise.
803
804 2007-08-06  Paul Eggert  <eggert@cs.ucla.edu>
805         and Bruno Haible  <bruno@clisp.org>
806
807         * NEWS: Describe interface changes to human, xstrtol.
808         * lib/human.h: Include <xstrtol.h>.
809         (human_options): Return enum strtol_error, not int.  Remove
810         bool arg; take int * instead.
811         * lib/human.c: Don't include "gettext.h".
812         (_): Remove; no longer used.
813         Don't include <xstrtol.h>, since human.h does it.
814         (human_options): Adjust to abovementioned interface changes.
815         Do not report error to stderr; that's now the caller's
816         responsibility.
817         * lib/xstrtol.c (main) [defined TESTING_XSTRTO]: Adjust to
818         interface change.
819         * lib/xstrtol.h (_STRTOL_ERROR): Take Option, Arg rather than
820         Str, Argument_type_string.  All uses changed.  Put " argument"
821         in diagnostics to make them clearer.  Change wording of suffix
822         message for clarity.
823         (STRTOL_FATAL_ERROR): Take Option, Arg rather than Str,
824         Argument_type_string.
825         (STRTOL_FATAL_WARN): Remove; no longer used.
826         * modules/human (Depends-on): Remove gettext-h.
827
828 2007-08-06  Simon Josefsson  <simon@josefsson.org>
829
830         * build-aux/maint.mk, build-aux/GNUmakefile: Relicense to GPLv3+.
831
832 2007-07-31  Bruno Haible  <bruno@clisp.org>
833
834         * m4/stdint.m4 (gl_STDINT_H): Test whether WCHAR_MIN and WCHAR_MAX
835         are defined by <stdint.h> (as opposed to <wchar.h>, as on Dragonfly).
836         Reported by Joerg Sonnenberger <joerg@britannica.bec.de>.
837
838 2007-07-31  Bruno Haible  <bruno@clisp.org>
839
840         * lib/fflush.c (rpl_fflush): On BSD systems, use the __SNPT flag.
841         Suggested by Joerg Sonnenberger <joerg@britannica.bec.de>.
842
843 2007-07-30  Bruno Haible  <bruno@clisp.org>
844
845         * modules/base64 (License): Use the synonymous term "LGPLv2+".
846         * modules/c-ctype (License): Likewise.
847         * modules/c-strcase (License): Likewise.
848         * modules/check-version (License): Likewise.
849         * modules/iconv (License): Likewise.
850         * modules/iconv_open (License): Likewise.
851         * modules/read-file (License): Likewise.
852         * modules/striconv (License): Likewise.
853         * modules/strverscmp (License): Likewise.
854         * modules/vasprintf (License): Likewise.
855         * modules/crypto/des (License): Likewise.
856         * modules/crypto/gc (License): Likewise.
857         * modules/crypto/gc-arcfour (License): Likewise.
858         * modules/crypto/gc-arctwo (License): Likewise.
859         * modules/crypto/gc-des (License): Likewise.
860         * modules/crypto/gc-hmac-md5 (License): Likewise.
861         * modules/crypto/gc-hmac-sha1 (License): Likewise.
862         * modules/crypto/gc-md2 (License): Likewise.
863         * modules/crypto/gc-md4 (License): Likewise.
864         * modules/crypto/gc-md5 (License): Likewise.
865         * modules/crypto/gc-pbkdf2-sha1 (License): Likewise.
866         * modules/crypto/gc-random (License): Likewise.
867         * modules/crypto/gc-rijndael (License): Likewise.
868         * modules/crypto/gc-sha1 (License): Likewise.
869         * modules/crypto/md2 (License): Likewise.
870         * modules/crypto/md4 (License): Likewise.
871
872 2007-07-30  Jim Meyering  <jim@meyering.net>
873
874         * lib/fts.c (fts_read): Upon failure to chdir into a subdirectory,
875         set fts_info to FTS_DNR, not to FTS_ERR, so that the caller knows
876         it has valid stat data.  This bug would cause du not to count the
877         sizes of inaccessible directories.
878         Patch by Bryan Mason <bmason@redhat.com>, via Jose Maria Plans
879         in <http://bugzilla.redhat.com/250077>.
880
881 2007-07-25  Peter O'Gorman  <peter@pogma.com>
882             Bruno Haible  <bruno@clisp.org>
883
884         * m4/include_next.m4 (gl_INCLUDE_NEXT): Test whether #include_next
885         really works. Needed because AIX 4.3 "xlc -E" doesn't understand
886         #include_next, gives a diagnostic about it, but reports no error in
887         the exit code.
888         Reported by Gary V. Vaughan <gary@thewrittenword.com>.
889
890 2007-07-24  Ben Pfaff  <blp@gnu.org>
891
892         Improve name: "count-one-bits" is better than "popcount".
893         * MODULES.html.sh: Update name.
894         * lib/popcount.h: Renamed lib/count-one-bits.h.
895         (popcount): Renamed count_one_bits.
896         (popcountl): Renamed count_one_bits_l.
897         (popcountll): Renamed count_one_bits_ll.
898         * m4/popcount.m4: Renamed m4/count-one-bits.m4.
899         * modules/popcount: Renamed module/count-one-bits.
900         * modules/popcount-tests: Renamed module/count-one-bits-tests.
901         * tests/test-popcount.c: Renamed tests/test-count-one-bits.c.
902
903 2007-07-23  Ben Pfaff  <blp@gnu.org>
904
905         * lib/popcount.h (popcount32): Reduce size of constants, to allow
906         better code generation, and add U to large constants to avoid
907         warnings, in non-GCC case.
908         Suggested by Bruno Haible.
909
910 2007-07-23  Ben Pfaff  <blp@gnu.org>
911
912         * lib/popcount.h: Use verify_true instead of if...abort.
913         * modules/popcount: Depend on verify module.
914         Suggested by Jim Meyering.
915
916 2007-07-23  Bruno Haible  <bruno@clisp.org>
917
918         * gnulib-tool (func_import): Create a .cvsignore file also when the
919         directory is not yet in CVS but the toplevel directory is. When
920         creating a .cvsignore file, add ".deps" and ".dirstamp" to it.
921         Reported by Karl Berry.
922
923 2007-07-22  Ben Pfaff  <blp@gnu.org>
924
925         * lib/popcount.h: Use faster, branchless algorithm for non-GCC
926         case.
927         Suggested by Eric Blake.
928
929 2007-07-22  Ben Pfaff  <blp@gnu.org>
930
931         New module: popcount.
932         * MODULES.html.sh: Add popcount.
933         * modules/popcount: New file.
934         * modules/popcount-tests: New file.
935         * tests/test-popcount.c: New file.
936         * lib/popcount.h: New file.
937         * m4/popcount.m4: New file.
938
939 2007-07-22  Paul Eggert  <eggert@cs.ucla.edu>
940
941         * build-aux/announce-gen: Update to GPLv3.
942
943         * build-aux/config.guess: Update from config.
944
945 2007-07-21  Bruno Haible  <bruno@clisp.org>
946
947         * lib/error.c (_) [ENABLE_NLS]: Define to gettext.
948         * lib/verror.c (_) [ENABLE_NLS]: Likewise.
949
950 2007-07-20  Jim Meyering  <jim@meyering.net>
951
952         * check-module: Diagnose a self-dependency.
953
954 2007-07-19  Bruno Haible  <bruno@clisp.org>
955
956         * gnulib-tool (func_import): Don't abort if pobase or po_domain is
957         empty.
958         Reported by Eric Blake.
959
960 2007-07-18  Bruno Haible  <bruno@clisp.org>
961
962         * gnulib-tool: New options --po-base, --po-domain.
963         (func_usage): Document them.
964         (pobase, po_domain): New variables.
965         (func_emit_lib_Makefile_am): Augment AM_CPPFLAGS, defining
966         DEFAULT_TEXT_DOMAIN.
967         (func_emit_po_Makevars, func_emit_po_POTFILES_in): New functions.
968         (func_import): Consider pobase and po_domain. Create a po/ directory.
969         (func_create_testdir): Set pobase and po_domain to empty.
970         * build-aux/po/Makefile.in.in: New file, from GNU gettext 0.16.1.
971         * build-aux/po/remove-potcdate.sin: New file, from GNU gettext 0.16.1.
972
973 2007-07-18  Bruno Haible  <bruno@clisp.org>
974
975         * gnulib-tool (func_get_automake_snippet): Synthesize also an
976         EXTRA_DIST augmentation for files in build-aux/.
977
978 2007-07-16  Bruno Haible  <bruno@clisp.org>
979
980         * modules/lseek (License): Use the synonymous term "LGPLv2+".
981         * modules/getdelim (License): Likewise.
982
983 2007-07-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
984
985         * modules/arpa_inet (License): Use the synonymous term LGPLv2+.
986         * modules/d-type (License): Likewise.
987         * modules/extensions (License): Likewise.
988         * modules/fnmatch (License): Likewise.
989         * modules/fseeko (License): Likewise.
990         * modules/getaddrinfo (License): Likewise.
991         * modules/getline (License): Likewise.
992         * modules/getlogin_r (License): Likewise.
993         * modules/getpass (License): Likewise.
994         * modules/gettimeofday (License): Likewise.
995         * modules/glob (License): Likewise.
996         * modules/inet_ntop (License): Likewise.
997         * modules/malloc (License): Likewise.
998         * modules/malloca (License): Likewise.
999         * modules/memmem (License): Likewise.
1000         * modules/mempcpy (License): Likewise.
1001         * modules/memset (License): Likewise.
1002         * modules/minmax (License): Likewise.
1003         * modules/mktime (License): Likewise.
1004         * modules/netinet_in (License): Likewise.
1005         * modules/pathmax (License): Likewise.
1006         * modules/poll (License): Likewise.
1007         * modules/regex (License): Likewise.
1008         * modules/snprintf (License): Likewise.
1009         * modules/stdbool (License): Likewise.
1010         * modules/stdint (License): Likewise.
1011         * modules/stdio (License): Likewise.
1012         * modules/strcase (License): Likewise.
1013         * modules/strcasestr (License): Likewise.
1014         * modules/strdup (License): Likewise.
1015         * modules/string (License): Likewise.
1016         * modules/strndup (License): Likewise.
1017         * modules/strnlen (License): Likewise.
1018         * modules/strpbrk (License): Likewise.
1019         * modules/strptime (License): Likewise.
1020         * modules/strsep (License): Likewise.
1021         * modules/sys_select (License): Likewise.
1022         * modules/sys_socket (License): Likewise.
1023         * modules/sys_stat (License): Likewise.
1024         * modules/sys_time (License): Likewise.
1025         * modules/time (License): Likewise.
1026         * modules/time_r (License): Likewise.
1027         * modules/timegm (License): Likewise.
1028         * modules/unistd (License): Likewise.
1029         * modules/vsnprintf (License): Likewise.
1030         * modules/wctype (License): Likewise.
1031
1032 2007-07-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1033
1034         * modules/argz (License): LGPLv2+.
1035
1036 2007-07-15  Karl Berry  <karl@gnu.org>
1037
1038         * doc/gnulib.texi: revise node structure per new fdl.texi.
1039
1040 2007-07-14  Bruno Haible  <bruno@clisp.org>
1041
1042         * lib/uniname/gen-uninames.lisp (main): Emit a "do not edit" line to
1043         the output file.
1044         * lib/uniname/uninames.h: Regenerated.
1045
1046 2007-07-14  Karl Berry  <karl@gnu.org>
1047
1048         * doc/*gpl*.texi, doc/fdl.texi: new versions, consistently
1049         omitting sectioning and index commands.
1050
1051 2007-07-13  Bruno Haible  <bruno@clisp.org>
1052
1053         New gnulib-tool option --more-symlinks.
1054         * gnulib-tool (func_usage): Document --more-symlinks.
1055         (do_copyrights): New variable.
1056         Recognize option --more-symlinks.
1057         (func_import): Don't add a copyright notice transform to
1058         sed_transform_lib_file if do_copyrights is empty.
1059
1060 2007-07-13  Bruno Haible  <bruno@clisp.org>
1061
1062         * lib/vasnprintf.c (decimal_point_char): Define also if
1063         (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE)
1064         && !NEED_PRINTF_DIRECTIVE_A.
1065         Reported by Clemens Koller <clemens.koller@anagramm.de> via
1066         Gary V. Vaughan <gary@gnu.org>.
1067
1068 2007-07-13  Paul Eggert  <eggert@cs.ucla.edu>
1069
1070         * lib/inttypes_.h: Undo previous change, since it was fixed
1071         in a different way in the 2007-07-02 fix to m4/inttypes.m4.
1072
1073 2007-07-13  Bruno Haible  <bruno@clisp.org>
1074
1075         * lib/stdint_.h: Fix typo: _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H was
1076         misspelled as _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H.
1077
1078 2007-07-13  Jim Meyering  <jim@meyering.net>
1079
1080         df: Don't fail for Tru64's "file-on-file mount".
1081         * m4/fsusage.m4 (gl_FSUSAGE): Reject Tru64's buggy statvfs,
1082         so we fall through and use statfs instead.  Details here:
1083         <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/10878>
1084         Reported by Albert Chin.
1085
1086 2007-07-13  Bruno Haible  <bruno@clisp.org>
1087
1088         * modules/alloca-opt (License): Use the synonymous term "LGPLv2+".
1089         * modules/configmake (License): Likewise.
1090         * modules/gettext (License): Likewise.
1091         * modules/gettext-h (License): Likewise.
1092         * modules/include_next (License): Likewise.
1093         * modules/link-warning (License): Likewise.
1094         * modules/localcharset (License): Likewise.
1095         * modules/localename (License): Likewise.
1096         * modules/lock (License): Likewise.
1097         * modules/relocatable-lib-lgpl (License): Likewise.
1098         * modules/size_max (License): Likewise.
1099         * modules/vasnprintf (License): Likewise.
1100         * modules/wchar (License): Likewise.
1101         * modules/xsize (License): Likewise.
1102
1103 2007-07-13  Bruno Haible  <bruno@clisp.org>
1104
1105         * gnulib-tool (func_import): Treat LGPLv2 as synonymous to LGPL.
1106         (func_create_testdir): Handle copying terms "GPLv2+" and "LGPLv2+".
1107
1108 2007-07-12  Bruno Haible  <bruno@clisp.org>
1109
1110         * doc/gnulib-intro.texi (Copyright): Clarify the license abbreviations
1111         in the modules files.
1112
1113 2007-07-11  Karl Berry  <karl@gnu.org>
1114
1115         * MODULES.html.sh (func_module): use
1116          sed -e '\|^'"${includefile}"'$|d'
1117          instead of /.../d, to avoid errors on $includefile's containing /.
1118
1119 2007-07-10  Sergey Poznyakoff  <gray@gnu.org.ua>
1120
1121         * gnulib-tool (func_import): Avoid duplication of --avoid
1122         statements
1123         (func_dest_tmpfilename,func_create_testdir): Translate `-' in file
1124         names to `_' in variable names.
1125
1126 2007-07-10  Eric Blake  <ebb9@byu.net>
1127
1128         * lib/version-etc.c (version_etc_va): Default to GPLv3+.
1129         * NEWS: Document this change.
1130
1131 2007-07-08  Bruno Haible  <bruno@clisp.org>
1132
1133         Update to Unicode 5.0.
1134         * lib/uniwidth/width.c (nonspacing_table_data): Add U+00AD,
1135         U+0350..U+035F, U+05A2, U+05BA, U+05C5, U+05C7, U+0600..U+0603,
1136         U+0610..U+0615, U+0656..U+065E, U+07EB..U+07F3, U+0A01, U+0AE2..U+0AE3,
1137         U+0CBC. Remove U+0CBF, U+0CC6. Add U+0CE2..U+0CE3, U+135F,
1138         U+17B4..U+17B5, U+17DD. Remove U+180E. Add U+1920..U+1922,
1139         U+1927..U+192B, U+1932, U+1939..U+193B, U+1A17..U+1A18, U+1B00..U+1B03,
1140         U+1B34, U+1B36..U+1B3A, U+1B3C, U+1B42, U+1B6B..U+1B73, U+1DC0..U+1DCA,
1141         U+1DFE..U+1DFF, U+20EB..U+20EF, U+A802, U+A806, U+A80B, U+A825..U+A826,
1142         U+10A01..U+10A03, U+10A05..U+10A06, U+10A0C..U+10A0F, U+10A38..U+10A3A,
1143         U+10A3F, U+1D242..U+1D244.
1144         (nonspacing_table_ind): Update.
1145         (uc_width): Assign width 0 to U+E0100..U+E01EF. Assign width 1 to
1146         U+4DC0..U+4DFF. Assign width 2 to U+2329..U+232A, U+FE10..U+FE1F.
1147
1148 2007-07-08  Bruno Haible  <bruno@clisp.org>
1149
1150         Update to Unicode 5.0.
1151         * lib/uniname/gen-uninames.lisp (main): Add the range 0x12xxx to the
1152         code transform. Extend the name index field of unicode_name_to_code and
1153         unicode_code_to_name from 16 to 24 bits.
1154         * lib/uniname/uniname.c (unicode_character_name,
1155         unicode_name_character): Add the range 0x12xxx to the code transform.
1156         * lib/uniname/uninames.h: Regenerated.
1157         * tests/uniname/UnicodeDataNames.txt: Update to Unicode 5.0.
1158
1159 2007-07-07  Bruno Haible  <bruno@clisp.org>
1160
1161         * modules/wcwidth-tests: New file.
1162         * tests/test-wcwidth.c: New file.
1163
1164         Work around MacOS X wcwidth() bug.
1165         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Test against MacOS X 10.3 bug.
1166         * lib/wcwidth.c: Include localcharset.h, streq.h, uniwidth.h.
1167         (rpl_wcwidth): Special-case the UTF-8 locales. Fall back to the
1168         original wcwidth in non-UTF-8 locales.
1169         * modules/wcwidth (Depends-on): Add localcharset, streq,
1170         uniwidth/width.
1171         * doc/functions/wcwidth.texi: Update.
1172
1173 2007-07-07  Bruno Haible  <bruno@clisp.org>
1174
1175         * lib/wchar_.h: Include the GL_LINK_WARNING macro.
1176         (wcwidth): New declaration.
1177         * m4/wchar.m4 (gl_WCHAR_MODULE_INDICATOR, gl_WCHAR_H_DEFAULTS): New
1178         macros.
1179         (gl_WCHAR_H): Require gl_WCHAR_H_DEFAULTS. Don't set WCHAR_H to empty
1180         here. Prepare for creating <wchar.h> unconditionally.
1181         * modules/wchar (Depends-on): Add link-warning.
1182         (Makefile.am): Substitute also GNULIB_WCWIDTH, HAVE_DECL_WCWIDTH,
1183         REPLACE_WCWIDTH, and GL_LINK_WARNING.
1184         * lib/wcwidth.h: Remove file.
1185         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gl_WCHAR_H_DEFAULTS. Set
1186         HAVE_DECL_WCWIDTH, REPLACE_WCWIDTH, WCHAR_H.
1187         * modules/wcwidth (Files): Remove lib/wcwidth.h.
1188         (configure.ac): Invoke gl_WCHAR_MODULE_INDICATOR.
1189         (Include): Replace wcwidth.h with <wchar.h>.
1190         * lib/wcwidth.c: Include <wchar.h> instead of wcwidth.h.
1191         * lib/mbchar.h: Don't include wcwidth.h.
1192         * lib/mbswidth.c: Likewise.
1193         * NEWS: Mention the change.
1194
1195 2007-07-07  Bruno Haible  <bruno@clisp.org>
1196
1197         * lib/wcwidth.c: New file, extracted from lib/wcwidth.h.
1198         * lib/wcwidth.h: Don't include wctype.h. Replace inline function
1199         definition with an external declaration.
1200         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Use wcwidth.c when wcwidth is not
1201         defined as a function. Remove AC_C_INLINE requirement.
1202         * modules/wcwidth (Files): Add lib/wcwidth.c.
1203         (Makefile.am): Remove redundant statement.
1204
1205 2007-07-07  Bruno Haible  <bruno@clisp.org>
1206
1207         * MODULES.html.sh (Unicode string functions): Add the new modules.
1208
1209         * tests/uniwidth/test-u32-strwidth.c: New file.
1210         * modules/uniwidth/u32-strwidth-tests: New file.
1211
1212         * lib/uniwidth/u32-strwidth.c: New file.
1213         * modules/uniwidth/u32-strwidth: New file.
1214
1215         * tests/uniwidth/test-u16-strwidth.c: New file.
1216         * modules/uniwidth/u16-strwidth-tests: New file.
1217
1218         * lib/uniwidth/u16-strwidth.c: New file.
1219         * modules/uniwidth/u16-strwidth: New file.
1220
1221         * tests/uniwidth/test-u8-strwidth.c: New file.
1222         * modules/uniwidth/u8-strwidth-tests: New file.
1223
1224         * lib/uniwidth/u8-strwidth.c: New file.
1225         * modules/uniwidth/u8-strwidth: New file.
1226
1227         * tests/uniwidth/test-u32-width.c: New file.
1228         * modules/uniwidth/u32-width-tests: New file.
1229
1230         * lib/uniwidth/u32-width.c: New file.
1231         * modules/uniwidth/u32-width: New file.
1232
1233         * tests/uniwidth/test-u16-width.c: New file.
1234         * modules/uniwidth/u16-width-tests: New file.
1235
1236         * lib/uniwidth/u16-width.c: New file.
1237         * modules/uniwidth/u16-width: New file.
1238
1239         * tests/uniwidth/test-u8-width.c: New file.
1240         * modules/uniwidth/u8-width-tests: New file.
1241
1242         * lib/uniwidth/u8-width.c: New file.
1243         * modules/uniwidth/u8-width: New file.
1244
1245         * tests/uniwidth/test-uc_width.c: New file.
1246         * modules/uniwidth/width-tests: New file.
1247
1248         * lib/uniwidth/width.c: New file, from GNU libiconv.
1249         * lib/uniwidth/cjk.h: New file, from GNU libiconv.
1250         * modules/uniwidth/width: New file.
1251
1252         * lib/uniwidth.h: New file, from GNU libiconv.
1253         * modules/uniwidth/base: New file.
1254
1255 2007-07-07  Bruno Haible  <bruno@clisp.org>
1256
1257         * lib/uniname.h: New file, from GNU gettext.
1258         * lib/uniname/gen-uninames.lisp: New file, from GNU gettext.
1259         * lib/uniname/uninames.h: New file, from GNU gettext.
1260         * lib/uniname/uniname.c: New file, from GNU gettext.
1261         * tests/uniname/test-uninames.sh: New file.
1262         * tests/uniname/test-uninames.c: New file, from GNU gettext.
1263         * tests/uniname/UnicodeDataNames.txt: New file, from GNU gettext.
1264         * modules/uniname/base: New file.
1265         * modules/uniname/uniname: New file.
1266         * modules/uniname/uniname-tests: New file.
1267         * MODULES.html.sh (Unicode string functions): Add the new modules.
1268
1269 2007-07-06  Bruno Haible  <bruno@clisp.org>
1270
1271         * doc/Makefile (TEXI2HTML): Specify a --reference-limit.
1272
1273 2007-07-06  Bruno Haible  <bruno@clisp.org>
1274
1275         * lib/sys_time_.h: Use a recursion-safe inclusion guard rather than
1276         a split double-inclusion guard. Needed for cygwin, where <sys/time.h>
1277         includes <cygwin/sys_time.h> which includes <sys/select.h> which
1278         include <sys/time.h>.
1279         Reported by Eric Blake.
1280
1281 2007-07-06  Eric Blake  <ebb9@byu.net>
1282
1283         Fix testing canonicalize on cygwin.
1284         * modules/canonicalize-lgpl-tests (test_canonicalize_lgpl_LDADD):
1285         Revert patch from 2007-06-19.
1286         * tests/test-canonicalize-lgpl.c (main): Instead, skip test when
1287         canonicalize module is also in use.
1288         * tests/test-canonicalize.c: New file.
1289         * tests/test-canonicalize.sh: Likewise.
1290         * modules/canonicalize-tests: Likewise.
1291
1292 2007-07-06  Jim Meyering  <jim@meyering.net>
1293
1294         * lib/getugroups.c (getugroups): Detect getgrent failure.
1295         Adjust comment to reflect reality: this function may return -1.
1296
1297 2007-07-05  Sergey Poznyakoff  <gray@gnu.org.ua>
1298
1299         * build-aux/bootstrap (TP_URL,get_translations): Update to use
1300         the new TP address.
1301         (usage): Fix typo
1302         (gnulib_mk): New variable.
1303
1304 2007-07-05  Jim Meyering  <jim@meyering.net>
1305
1306         Don't let endgrent clobber errno, no matter how improbable.
1307         * lib/getugroups.c (getugroups): Save and restore errno around
1308         endgrent call.
1309
1310         Close the group DB even when failing with 2^31 or more members.
1311         * lib/getugroups.c (getugroups): Don't return without calling endgrent.
1312
1313 2007-07-04  Jim Meyering  <jim@meyering.net>
1314
1315         * lib/getugroups.h: New file.
1316         * lib/getugroups.c: Include "getugroups.h".
1317         Remove uses of "register" keyword.
1318         Move local variable, "cp", down into scope where used.
1319         Give "username" parameter the "const" attribute.
1320         * modules/getugroups (Files): Add lib/getugroups.h
1321
1322 2007-07-04  Karl Berry  <karl@gnu.org>
1323
1324         * MODULES.html.sh (func_all_modules): Complete rename of
1325         gpl/lgpl to gpl-2.0 and lgpl-2.1, and add gpl-3.0.
1326
1327 2007-07-02  Bruno Haible  <bruno@clisp.org>
1328
1329         * m4/inttypes.m4 (gl_INTTYPES_H): Define __STDC_LIMIT_MACROS in C++
1330         mode, when inttypes.h comes from gnulib.
1331         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
1332
1333 2007-07-02  Simon Josefsson  <simon@josefsson.org>
1334
1335         * NEWS: Mention lgpl module name change.
1336
1337         * modules/lgpl-2.1: Renamed from lgpl.
1338
1339         * NEWS: Mention gpl module name change.
1340
1341         * modules/gpl-3.0: New file, based on gpl-2.0.
1342
1343         * modules/gpl-2.0: Renamed from gpl.
1344
1345         * modules/gpl: Fix filename, doc/gpl.texi is now found at
1346         doc/gpl-2.0.texi.
1347
1348 2007-07-02  Paul Eggert  <eggert@cs.ucla.edu>
1349
1350         * lib/inttypes_.h [defined __cplusplus&&!defined __STDC_LIMIT_MACROS]:
1351         #define __STDC_LIMIT_MACROS temporarily while including
1352         <stdint.h>, so that __STDC_LIMIT_MACROS is defined.
1353         Problem reported by Joel E. Denny in
1354         <http://lists.gnu.org/archive/html/bug-gnulib/2007-07/msg00008.html>.
1355
1356 2007-07-01  Bruno Haible  <bruno@clisp.org>
1357
1358         * lib/unistdio.h: New file.
1359         * lib/unistdio/u-asnprintf.h: New file.
1360         * lib/unistdio/u-asprintf.h: New file.
1361         * lib/unistdio/u-printf-args.c: New file.
1362         * lib/unistdio/u-printf-args.h: New file.
1363         * lib/unistdio/u-printf-parse.h: New file.
1364         * lib/unistdio/u-snprintf.h: New file.
1365         * lib/unistdio/u-sprintf.h: New file.
1366         * lib/unistdio/u-vasprintf.h: New file.
1367         * lib/unistdio/u-vsnprintf.h: New file.
1368         * lib/unistdio/u-vsprintf.h: New file.
1369         * lib/unistdio/ulc-asnprintf.c: New file.
1370         * lib/unistdio/ulc-asprintf.c: New file.
1371         * lib/unistdio/ulc-fprintf.c: New file, based on lib/fprintf.c.
1372         * lib/unistdio/ulc-printf-parse.c: New file.
1373         * lib/unistdio/ulc-snprintf.c: New file.
1374         * lib/unistdio/ulc-sprintf.c: New file.
1375         * lib/unistdio/ulc-vasnprintf.c: New file.
1376         * lib/unistdio/ulc-vasprintf.c: New file.
1377         * lib/unistdio/ulc-vfprintf.c: New file, based on lib/vfprintf.c.
1378         * lib/unistdio/ulc-vsnprintf.c: New file.
1379         * lib/unistdio/ulc-vsprintf.c: New file.
1380         * lib/unistdio/u8-asnprintf.c: New file.
1381         * lib/unistdio/u8-asprintf.c: New file.
1382         * lib/unistdio/u8-printf-parse.c: New file.
1383         * lib/unistdio/u8-snprintf.c: New file.
1384         * lib/unistdio/u8-sprintf.c: New file.
1385         * lib/unistdio/u8-vasnprintf.c: New file.
1386         * lib/unistdio/u8-vasprintf.c: New file.
1387         * lib/unistdio/u8-vsnprintf.c: New file.
1388         * lib/unistdio/u8-vsprintf.c: New file.
1389         * lib/unistdio/u8-u8-asnprintf.c: New file.
1390         * lib/unistdio/u8-u8-asprintf.c: New file.
1391         * lib/unistdio/u8-u8-snprintf.c: New file.
1392         * lib/unistdio/u8-u8-sprintf.c: New file.
1393         * lib/unistdio/u8-u8-vasnprintf.c: New file.
1394         * lib/unistdio/u8-u8-vasprintf.c: New file.
1395         * lib/unistdio/u8-u8-vsnprintf.c: New file.
1396         * lib/unistdio/u8-u8-vsprintf.c: New file.
1397         * lib/unistdio/u16-asnprintf.c: New file.
1398         * lib/unistdio/u16-asprintf.c: New file.
1399         * lib/unistdio/u16-printf-parse.c: New file.
1400         * lib/unistdio/u16-snprintf.c: New file.
1401         * lib/unistdio/u16-sprintf.c: New file.
1402         * lib/unistdio/u16-vasnprintf.c: New file.
1403         * lib/unistdio/u16-vasprintf.c: New file.
1404         * lib/unistdio/u16-vsnprintf.c: New file.
1405         * lib/unistdio/u16-vsprintf.c: New file.
1406         * lib/unistdio/u16-u16-asnprintf.c: New file.
1407         * lib/unistdio/u16-u16-asprintf.c: New file.
1408         * lib/unistdio/u16-u16-snprintf.c: New file.
1409         * lib/unistdio/u16-u16-sprintf.c: New file.
1410         * lib/unistdio/u16-u16-vasnprintf.c: New file.
1411         * lib/unistdio/u16-u16-vasprintf.c: New file.
1412         * lib/unistdio/u16-u16-vsnprintf.c: New file.
1413         * lib/unistdio/u16-u16-vsprintf.c: New file.
1414         * lib/unistdio/u32-asnprintf.c: New file.
1415         * lib/unistdio/u32-asprintf.c: New file.
1416         * lib/unistdio/u32-printf-parse.c: New file.
1417         * lib/unistdio/u32-snprintf.c: New file.
1418         * lib/unistdio/u32-sprintf.c: New file.
1419         * lib/unistdio/u32-vasnprintf.c: New file.
1420         * lib/unistdio/u32-vasprintf.c: New file.
1421         * lib/unistdio/u32-vsnprintf.c: New file.
1422         * lib/unistdio/u32-vsprintf.c: New file.
1423         * lib/unistdio/u32-u32-asnprintf.c: New file.
1424         * lib/unistdio/u32-u32-asprintf.c: New file.
1425         * lib/unistdio/u32-u32-snprintf.c: New file.
1426         * lib/unistdio/u32-u32-sprintf.c: New file.
1427         * lib/unistdio/u32-u32-vasnprintf.c: New file.
1428         * lib/unistdio/u32-u32-vasprintf.c: New file.
1429         * lib/unistdio/u32-u32-vsnprintf.c: New file.
1430         * lib/unistdio/u32-u32-vsprintf.c: New file.
1431         * tests/unistdio/test-ulc-asnprintf1.c: New file.
1432         * tests/unistdio/test-ulc-asnprintf1.h: New file.
1433         * tests/unistdio/test-ulc-printf1.h: New file.
1434         * tests/unistdio/test-ulc-vasnprintf1.c: New file.
1435         * tests/unistdio/test-ulc-vasnprintf2.c: New file.
1436         * tests/unistdio/test-ulc-vasnprintf2.sh: New file.
1437         * tests/unistdio/test-ulc-vasnprintf3.c: New file.
1438         * tests/unistdio/test-ulc-vasnprintf3.sh: New file.
1439         * tests/unistdio/test-ulc-vasprintf1.c: New file.
1440         * tests/unistdio/test-ulc-vsnprintf1.c: New file.
1441         * tests/unistdio/test-ulc-vsprintf1.c: New file.
1442         * tests/unistdio/test-u8-asnprintf1.c: New file.
1443         * tests/unistdio/test-u8-asnprintf1.h: New file.
1444         * tests/unistdio/test-u8-printf1.h: New file.
1445         * tests/unistdio/test-u8-vasnprintf1.c: New file.
1446         * tests/unistdio/test-u8-vasnprintf2.c: New file.
1447         * tests/unistdio/test-u8-vasnprintf2.sh: New file.
1448         * tests/unistdio/test-u8-vasnprintf3.c: New file.
1449         * tests/unistdio/test-u8-vasnprintf3.sh: New file.
1450         * tests/unistdio/test-u8-vasprintf1.c: New file.
1451         * tests/unistdio/test-u8-vsnprintf1.c: New file.
1452         * tests/unistdio/test-u8-vsprintf1.c: New file.
1453         * tests/unistdio/test-u16-asnprintf1.c: New file.
1454         * tests/unistdio/test-u16-asnprintf1.h: New file.
1455         * tests/unistdio/test-u16-printf1.h: New file.
1456         * tests/unistdio/test-u16-vasnprintf1.c: New file.
1457         * tests/unistdio/test-u16-vasnprintf2.c: New file.
1458         * tests/unistdio/test-u16-vasnprintf2.sh: New file.
1459         * tests/unistdio/test-u16-vasnprintf3.c: New file.
1460         * tests/unistdio/test-u16-vasnprintf3.sh: New file.
1461         * tests/unistdio/test-u16-vasprintf1.c: New file.
1462         * tests/unistdio/test-u16-vsnprintf1.c: New file.
1463         * tests/unistdio/test-u16-vsprintf1.c: New file.
1464         * tests/unistdio/test-u32-asnprintf1.c: New file.
1465         * tests/unistdio/test-u32-asnprintf1.h: New file.
1466         * tests/unistdio/test-u32-printf1.h: New file.
1467         * tests/unistdio/test-u32-vasnprintf1.c: New file.
1468         * tests/unistdio/test-u32-vasnprintf2.c: New file.
1469         * tests/unistdio/test-u32-vasnprintf2.sh: New file.
1470         * tests/unistdio/test-u32-vasnprintf3.c: New file.
1471         * tests/unistdio/test-u32-vasnprintf3.sh: New file.
1472         * tests/unistdio/test-u32-vasprintf1.c: New file.
1473         * tests/unistdio/test-u32-vsnprintf1.c: New file.
1474         * tests/unistdio/test-u32-vsprintf1.c: New file.
1475         * modules/unistdio/base: New file.
1476         * modules/unistdio/u-printf-args: New file.
1477         * modules/unistdio/ulc-asnprintf: New file.
1478         * modules/unistdio/ulc-asprintf: New file.
1479         * modules/unistdio/ulc-fprintf: New file.
1480         * modules/unistdio/ulc-printf-parse: New file.
1481         * modules/unistdio/ulc-snprintf: New file.
1482         * modules/unistdio/ulc-sprintf: New file.
1483         * modules/unistdio/ulc-vasnprintf: New file.
1484         * modules/unistdio/ulc-vasprintf: New file.
1485         * modules/unistdio/ulc-vfprintf: New file.
1486         * modules/unistdio/ulc-vsnprintf: New file.
1487         * modules/unistdio/ulc-vsprintf: New file.
1488         * modules/unistdio/u8-asnprintf: New file.
1489         * modules/unistdio/u8-asprintf: New file.
1490         * modules/unistdio/u8-printf-parse: New file.
1491         * modules/unistdio/u8-snprintf: New file.
1492         * modules/unistdio/u8-sprintf: New file.
1493         * modules/unistdio/u8-vasnprintf: New file.
1494         * modules/unistdio/u8-vasprintf: New file.
1495         * modules/unistdio/u8-vsnprintf: New file.
1496         * modules/unistdio/u8-vsprintf: New file.
1497         * modules/unistdio/u8-u8-asnprintf: New file.
1498         * modules/unistdio/u8-u8-asprintf: New file.
1499         * modules/unistdio/u8-u8-snprintf: New file.
1500         * modules/unistdio/u8-u8-sprintf: New file.
1501         * modules/unistdio/u8-u8-vasnprintf: New file.
1502         * modules/unistdio/u8-u8-vasprintf: New file.
1503         * modules/unistdio/u8-u8-vsnprintf: New file.
1504         * modules/unistdio/u8-u8-vsprintf: New file.
1505         * modules/unistdio/u16-asnprintf: New file.
1506         * modules/unistdio/u16-asprintf: New file.
1507         * modules/unistdio/u16-printf-parse: New file.
1508         * modules/unistdio/u16-snprintf: New file.
1509         * modules/unistdio/u16-sprintf: New file.
1510         * modules/unistdio/u16-vasnprintf: New file.
1511         * modules/unistdio/u16-vasprintf: New file.
1512         * modules/unistdio/u16-vsnprintf: New file.
1513         * modules/unistdio/u16-vsprintf: New file.
1514         * modules/unistdio/u16-u16-asnprintf: New file.
1515         * modules/unistdio/u16-u16-asprintf: New file.
1516         * modules/unistdio/u16-u16-snprintf: New file.
1517         * modules/unistdio/u16-u16-sprintf: New file.
1518         * modules/unistdio/u16-u16-vasnprintf: New file.
1519         * modules/unistdio/u16-u16-vasprintf: New file.
1520         * modules/unistdio/u16-u16-vsnprintf: New file.
1521         * modules/unistdio/u16-u16-vsprintf: New file.
1522         * modules/unistdio/u32-asnprintf: New file.
1523         * modules/unistdio/u32-asprintf: New file.
1524         * modules/unistdio/u32-printf-parse: New file.
1525         * modules/unistdio/u32-snprintf: New file.
1526         * modules/unistdio/u32-sprintf: New file.
1527         * modules/unistdio/u32-vasnprintf: New file.
1528         * modules/unistdio/u32-vasprintf: New file.
1529         * modules/unistdio/u32-vsnprintf: New file.
1530         * modules/unistdio/u32-vsprintf: New file.
1531         * modules/unistdio/u32-u32-asnprintf: New file.
1532         * modules/unistdio/u32-u32-asprintf: New file.
1533         * modules/unistdio/u32-u32-snprintf: New file.
1534         * modules/unistdio/u32-u32-sprintf: New file.
1535         * modules/unistdio/u32-u32-vasnprintf: New file.
1536         * modules/unistdio/u32-u32-vasprintf: New file.
1537         * modules/unistdio/u32-u32-vsnprintf: New file.
1538         * modules/unistdio/u32-u32-vsprintf: New file.
1539         * modules/unistdio/ulc-asnprintf-tests: New file.
1540         * modules/unistdio/ulc-vasnprintf-tests: New file.
1541         * modules/unistdio/ulc-vasprintf-tests: New file.
1542         * modules/unistdio/ulc-vsnprintf-tests: New file.
1543         * modules/unistdio/ulc-vsprintf-tests: New file.
1544         * modules/unistdio/u8-asnprintf-tests: New file.
1545         * modules/unistdio/u8-vasnprintf-tests: New file.
1546         * modules/unistdio/u8-vasprintf-tests: New file.
1547         * modules/unistdio/u8-vsnprintf-tests: New file.
1548         * modules/unistdio/u8-vsprintf-tests: New file.
1549         * modules/unistdio/u16-asnprintf-tests: New file.
1550         * modules/unistdio/u16-vasnprintf-tests: New file.
1551         * modules/unistdio/u16-vasprintf-tests: New file.
1552         * modules/unistdio/u16-vsnprintf-tests: New file.
1553         * modules/unistdio/u16-vsprintf-tests: New file.
1554         * modules/unistdio/u32-asnprintf-tests: New file.
1555         * modules/unistdio/u32-vasnprintf-tests: New file.
1556         * modules/unistdio/u32-vasprintf-tests: New file.
1557         * modules/unistdio/u32-vsnprintf-tests: New file.
1558         * modules/unistdio/u32-vsprintf-tests: New file.
1559         * MODULES.html.sh (Unicode string functions): Add the new modules.
1560
1561 2007-07-01  Bruno Haible  <bruno@clisp.org>
1562
1563         * lib/sprintf.c (sprintf): Limit the available length estimation,
1564         to avoid address wraparound.
1565         * lib/vsprintf.c (vsprintf): Likewise.
1566         * modules/sprintf-posix (Dependencies): Add stdint.
1567         * modules/vsprintf-posix (Dependencies): Likewise.
1568
1569 2007-07-01  Bruno Haible  <bruno@clisp.org>
1570
1571         * gnulib-tool (self_abspathname): Determine PATH_SEPARATOR and handle
1572         Windows PATH as well. Conservative double-quoting. Comments.
1573
1574 2007-07-01  Bruno Haible  <bruno@clisp.org>
1575             Eric Blake  <ebb9@byu.net>
1576             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1577
1578         * gnulib-tool (self_abspathname): Fix algorithm to cope with
1579         empty components in $PATH, denoting '.'.
1580
1581 2007-07-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1582
1583         * gnulib-tool: Fix indentation.
1584         (func_create_megatestdir): Likewise.
1585         Report by Bruno Haible.
1586
1587 2007-06-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1588
1589         Sync from Automake.
1590         * build-aux/gnupload: Fix shell portability issues with for loops.
1591         Report by Karl Berry.
1592
1593 2007-06-29  Simon Josefsson  <simon@josefsson.org>
1594
1595         * build-aux/maint.mk (POURL): Use translationproject.org.
1596
1597 2007-06-27  Simon Josefsson  <simon@josefsson.org>
1598             Bruno Haible  <bruno@clisp.org>
1599
1600         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Require gl_HEADER_SYS_SOCKET
1601         before using HAVE_WS2TCPIP_H. Check for gai_strerror through an
1602         explicit link test, rather than AC_REPLACE_FUNCS - for mingw.
1603         (gl_PREREQ_GETADDRINFO): Require gl_HEADER_SYS_SOCKET before using
1604         HAVE_SYS_SOCKET_H and HAVE_WS2TCPIP_H.
1605
1606 2007-06-27  Bruno Haible  <bruno@clisp.org>
1607
1608         * build-aux/config.rpath: Upgrade to libtool-1.5.24.
1609         * build-aux/config.libpath: Upgrade to libtool-1.5.24.
1610
1611 2007-06-26  Karl Berry  <karl@gnu.org>
1612
1613         * MODULES.html.sh: remove xreadlink-with-size.
1614
1615 2007-06-23  Paul Eggert  <eggert@cs.ucla.edu>
1616
1617         * lib/time_.h: Port to Solaris 8 with Sun Studio 11, using a
1618         method that I hope also handles the double-include problem noted
1619         by Bruno Haible in
1620         <http://lists.gnu.org/archive/html/bug-gnulib/2007-05/msg00186.html>.
1621
1622 2007-06-23  Bruno Haible  <bruno@clisp.org>
1623
1624         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
1625         Don't let the 'mostlyclean' target fail if the last subdirectory could
1626         not be removed.
1627         Reported by Karl Berry.
1628
1629 2007-06-23  Bruno Haible  <bruno@clisp.org>
1630
1631         * gnulib-tool (echo): Add a speedier workaround for ksh.
1632         * tests/test-echo.sh: Likewise.
1633
1634 2007-06-23  Bruno Haible  <bruno@clisp.org>
1635
1636         * gnulib-tool (echo): Add workarounds also for bash versions < 2.04.
1637         * tests/test-echo.sh: Likewise.
1638
1639 2007-06-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1640
1641         * gnulib-tool (IFS): Initialize early, so we don't set it to
1642         empty later.
1643         (self_abspathname): Rewrite algorithm to set it, reindent.
1644         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am)
1645         (func_create_megatestdir): Merge some sed scripts.
1646
1647 2007-06-23  Paul Eggert  <eggert@cs.ucla.edu>
1648
1649         * m4/include_next.m4 (gl_CHECK_NEXT_HEADERS): Check some typos
1650         exposed by Sun Studio 11 cc on Solaris 8.
1651
1652 2007-06-22  Bruno Haible  <bruno@clisp.org>
1653
1654         * gnulib-tool (echo): Ensure the echo primitive does not interpret
1655         backslashes.
1656         * tests/test-echo.sh: New file.
1657
1658 2007-06-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1659
1660         * gnulib-tool (func_add_or_update, func_create_testdir): Do not
1661         simplify `sed_replace_build_aux' scripts, they are portable but
1662         echoing them with `echo' is not.
1663         Report and analysis by Fernando Ferreira <fernando.prog@netcabo.pt>.
1664
1665 2007-06-21  Karl Berry  <karl@gnu.org>
1666
1667         * config/srclist.txt: guess we can't handle the licenses via
1668         srclist at the moment.
1669
1670 2007-06-21  Paul Eggert  <eggert@cs.ucla.edu>
1671
1672         * MODULES.html.sh: Add include_next.
1673         * modules/include_next: New file.
1674
1675 2007-06-20  Paul Eggert  <eggert@cs.ucla.edu>
1676
1677         * m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
1678         INCLUDE_NEXT.
1679         (gl_CHECK_NEXT_HEADERS): New macro.
1680         * m4/fcntl_h.m4 (gl_FCNTL_H): use gl_CHECK_NEXT_HEADERS instead of
1681         the obsolescent gl_ABSOLUTE_HEADER.
1682         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Likewise.
1683         * m4/float_h.m4 (gl_FLOAT_H): Likewise.
1684         * m4/iconv_h.m4 (gl_ICONV_H): Likewise.
1685         * m4/inttypes.m4 (gl_INTTYPES_H): Likewise.
1686         * m4/locale_h.m4 (gl_LOCALE_H): Likewise.
1687         * m4/math_h.m4 (gl_MATH_H): Likewise.
1688         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Likewise.
1689         * m4/search_h.m4 (gl_SEARCH_H): Likewise.
1690         * m4/signal_h.m4 (gl_SIGNAL_H): Likewise.
1691         * m4/stdint.m4 (gl_STDINT_H): Likewise.
1692         * m4/stdio_h.m4 (gl_STDIO_H): Likewise.
1693         * m4/stdlib_h.m4 (gl_STDLIB_H): Likewise.
1694         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Likewise.
1695         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise.
1696         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Likewise.
1697         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Likewise.
1698         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Likewise.
1699         * m4/sysexits.m4 (gl_SYSEXITS): Likewise.
1700         * m4/time_h.m4 (gl_HEADER_TIME_H_BODY): Likewise.
1701         * m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
1702         * m4/wchar.m4 (gl_WCHAR_H): Likewise.
1703         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
1704         * m4/inttypes.m4 (gl_INTTYPES_H): Define
1705         _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H to avoid the problem of unclean
1706         builds, since ABSOLUTE_INTTYPES_H is no longer being defined.
1707         * m4/stdint.m4 (gl_STDINT_H): Likewise, for
1708         _GL_JUST_INCLUDE_SYSTEM_STDINT_H.
1709         * lib/fcntl_.h: Use @INCLUDE_NEXT@ @NEXT_foo_H@
1710         rather than @HAVE_INCLUDE_NEXT@ and @ABSOLUTE_foo_H@.
1711         * lib/float_.h: Likewise.
1712         * lib/inttypes_.h: Likewise.
1713         * lib/math_.h: Likewise.
1714         * lib/search_.h: Likewise.
1715         * lib/signal_.h: Likewise.
1716         * lib/stdint_.h: Likewise.
1717         * lib/stdio_.h: Likewise.
1718         * lib/stdlib_.h: Likewise.
1719         * lib/string_.h: Likewise.
1720         * lib/sys_stat_.h: Likewise.
1721         * lib/sys_time_.h: Likewise.
1722         * lib/time_.h: Likewise.
1723         * lib/unistd_.h: Likewise.
1724         * lib/wchar_.h: Likewise.
1725         * lib/wctype_.h: Likewise.
1726         * lib/dirent_.h: Likewise.
1727         * lib/iconv_.h: Likewise.
1728         * lib/locale_.h: Likewise.
1729         * lib/netinet_in_.h: Likewise.
1730         * lib/sys_select_.h: Likewise.
1731         * lib/sys_socket_.h: Likewise.
1732         * lib/sysexits_.h: Likewise.
1733         * modules/fcntl (Depends-on): Depend on include_next, not
1734         absolute_header.
1735         (Makefile): Substitute INCLUDE_NEXT and NEXT_foo_H, not
1736         HAVE_INCLUDE_NEXT and ABSOLUTE_foo_H.
1737         * modules/fchdir: Likewise.
1738         * modules/float: Likewise.
1739         * modules/iconv_open: Likewise.
1740         * modules/inttypes: Likewise.
1741         * modules/locale: Likewise.
1742         * modules/math: Likewise.
1743         * modules/netinet_in: Likewise.
1744         * modules/search: Likewise.
1745         * modules/signal: Likewise.
1746         * modules/stdint: Likewise.
1747         * modules/stdio: Likewise.
1748         * modules/stdlib: Likewise.
1749         * modules/string: Likewise.
1750         * modules/sys_select: Likewise.
1751         * modules/sys_socket: Likewise.
1752         * modules/sys_stat: Likewise.
1753         * modules/sys_time: Likewise.
1754         * modules/sysexits: Likewise.
1755         * modules/time: Likewise.
1756         * modules/unistd: Likewise.
1757         * modules/wchar: Likewise.
1758         * modules/wctype: Likewise.
1759         * modules/sys_stat: Change maintainer to "all".
1760         * modules/unistd: Likewise.
1761
1762 2007-06-20  Karl Berry  <karl@gnu.org>
1763
1764         * config/srclist.txt: track www changes in license files.
1765
1766 2007-06-20  Sergey Poznyakoff  <gray@gnu.org.ua>
1767
1768         * build-aux/bootstrap: Remove stray dot.
1769         Make sure build_aux settings are honored when linking
1770         gnulib_extra_files.
1771
1772 2007-06-19  Eric Blake  <ebb9@byu.net>
1773
1774         * modules/canonicalize-lgpl-tests (test_canonicalize_lgpl_LDADD):
1775         Allow compilation on cygwin.
1776
1777 2007-06-19  Jim Meyering  <jim@meyering.net>
1778
1779         xreadlink-with-size: Remove module.  No longer used.
1780         Ex-callers now use xreadlink or mreadlink-with-size.
1781         * modules/xreadlink-with-size: Remove module.
1782         * lib/xreadlink-with-size.c: Remove file.
1783         * lib/xreadlink.h (xreadlink_with_size): Remove prototype.
1784         (xreadlink): Remove inaccurate comment.  The one in xreadlink.c,
1785         just before the function definition *is* accurate.
1786
1787         Eliminate one way canonicalize_filename_mode could exit.
1788         * lib/canonicalize.c (canonicalize_filename_mode):
1789         Use mreadlink_with_size, not xreadlink_with_size.
1790
1791 2007-06-18  Paul Eggert  <eggert@cs.ucla.edu>
1792
1793         Detect porting problems to FreeBSD/arm, which has time_t wider than
1794         long int.  Original problem reported for GNU diff by Xin Li in
1795         <http://lists.gnu.org/archive/html/bug-gnu-utils/2007-06/msg00091.html>.
1796         * modules/getdate (Depends-on): Add intprops, verify.
1797         * lib/getdate.y: Include intprops.h, verify.h.  Verify that time_t
1798         is an integer type no wider than long int.
1799
1800 2007-06-18  Jim Meyering  <jim@meyering.net>
1801
1802         New module: mreadlink-with-size.
1803         * MODULES.html.sh: Add mreadlink-with-size.
1804         * modules/mreadlink-with-size: New module
1805         * modules/canonicalize (Depends-on): Depend on mreadlink-with-size,
1806         not xreadlink-with-size.
1807         * lib/mreadlink-with-size.c, lib/mreadlink.h: New files.
1808
1809 2007-06-16  Bruno Haible  <bruno@clisp.org>
1810
1811         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Catch the MacOS X 10.4 bug.
1812         * doc/functions/frexpl.texi: Document the MacOS X 10.4 bug.
1813         Reported by Gary V. Vaughan <gary@gnu.org>.
1814
1815 2007-06-15  Paul Eggert  <eggert@cs.ucla.edu>
1816
1817         Revamp lchown so that it lives in unistd.h where it belongs.
1818         * lib/lchown.h: Remove.
1819         * lib/dirchownmod.c: Don't include lib/lchown.h.
1820         * lib/fchownat.c: Likewise.
1821         * lib/openat.c: Likewise.
1822         * lib/lchown.c (REPLACE_CHOWN): Define to 0 if the system chown
1823         does not follow symlinks.
1824         (EOPNOTSUPP): Define if not defined.
1825         * lib/unistd_.h (chown): Do not replace if REPLADE_CHOWN
1826         is defined to 0.
1827         (lchown): New decl.
1828         * m4/lchown.m4 (gl_FUNC_LCHOWN): Require gl_UNISTD_H_DEFAULTS.
1829         Do not check for lchown decl.
1830         Set REPLACE_LCHOWN.
1831         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Set GNULIB_LCHOWN,
1832         REPLACE_LCHOWN.
1833         * modules/chown: Make it clear it follows symlinks.
1834         * modules/lchown: Make it clear it doesn't follow symlinks.
1835         (Files): Remove lib/lchown.h
1836         (Depends-on): Add unistd.
1837         (configure.ac): Add gl_UNISTD_MODULE_INDICATOR([lchown]).
1838         (Include): Include <unistd.h>, not "lchown.h".
1839         * modules/unistd (unistd.h): Substitude GNULIB_LCHOWN and
1840         REPLACE_LCHOWN.
1841
1842 2007-06-15  Jim Meyering  <jim@meyering.net>
1843
1844         Change license (GPL to LGPL) of fsusage and dependents.
1845         * modules/fsusage (License): Change to LGPL.
1846         * modules/full-read (License): Likewise.
1847         * modules/full-write (License): Likewise.
1848         * modules/safe-read (License): Likewise.
1849         * modules/safe-write (License): Likewise.
1850
1851 2007-06-14  Ben Pfaff  <blp@gnu.org>
1852
1853         Missing part of allocsa -> malloca transition.
1854         * modules/relocatable-prog-wrapper: gl_ALLOCSA should be
1855         gl_MALLOCA.
1856
1857 2007-06-12  Bruno Haible  <bruno@clisp.org>
1858
1859         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Guess no when cross-compiling
1860         to ia64, x86_64, i386.
1861         Reported by Eric Blake.
1862
1863 2007-06-12  Bruno Haible  <bruno@clisp.org>
1864
1865         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Guess no also when
1866         cross-compiling to x86_64.
1867
1868 2007-06-12  Paul Eggert  <eggert@cs.ucla.edu>
1869
1870         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Fix POSIX sed portability
1871         glitch reported by Ralf Wildenhues in
1872         <http://lists.gnu.org/archive/html/bug-gnulib/2007-06/msg00114.html>.
1873
1874         * m4/regex.m4 (gl_REGEX): Catch a bug with [[:alnum:]_-] reported by
1875         Vin Shelton.
1876
1877 2007-06-11  Bruno Haible  <bruno@clisp.org>
1878
1879         * lib/printf-args.c (PRINTF_FETCHARGS) [ENABLE_UNISTDIO]: Fix NULL
1880         replacement string.
1881         Reported by Eric Blake.
1882
1883 2007-06-10  Bruno Haible  <bruno@clisp.org>
1884
1885         Prepare vasnprintf code for use with Unicode strings.
1886         * lib/printf-args.h (PRINTF_FETCHARGS): New macro.
1887         (arg_type) [ENABLE_UNISTDIO]: Define TYPE_U8_STRING, TYPE_U16_STRING,
1888         TYPE_U32_STRING.
1889         (argument) [ENABLE_UNISTDIO]: Add a_u8_string, a_u16_string,
1890         a_u32_string variants.
1891         (PRINTF_FETCHARGS): Renamed from printf_fetchargs.
1892         * lib/printf-args.c: Don't include config.h and the specification
1893         header if PRINTF_FETCHARGS is already defined.
1894         (PRINTF_FETCHARGS): Renamed from printf_fetchargs.
1895         (PRINTF_FETCHARGS) [ENABLE_UNISTDIO]: Add code for TYPE_U8_STRING,
1896         TYPE_U16_STRING, TYPE_U32_STRING.
1897         * lib/printf-parse.h [ENABLE_UNISTDIO] (u8_directive, u8_directives,
1898         u16_directive, u16_directives, u32_directive, u32_directives): New
1899         types.
1900         (ulc_printf_parse, u8_printf_parse, u16_printf_parse, u32_printf_parse):
1901         New declarations.
1902         * lib/printf-parse.c: Don't include config.h and the specification
1903         header if PRINTF_PARSE is already defined. Eliminate the set of
1904         parameters for WIDE_CHAR_VERSION; the user of this file must provide
1905         them now. Include c-ctype.h.
1906         (PRINTF_PARSE) [ENABLE_UNISTDIO]: Add code implementing the 'U'
1907         directive and CHAR_T_ONLY_ASCII.
1908         * lib/vasnprintf.c: Don't include config.h and the specification header
1909         if VASNPRINTF is already defined.
1910         (DCHAR_IS_TCHAR, DCHAR_CPY): New macros.
1911         (VASNPRINTF): Use PRINTF_FETCHARGS instead of printf_fetchargs. Use
1912         DCHAR_CPY. Handle the case that DCHAR_T and FCHAR_T are not the same
1913         type. Handle the case that TCHAR_T and FCHAR_T are not of the same
1914         size. Handle the case that DCHAR_T and TCHAR_T are not the same type,
1915         add a conversion from TCHAR_T[] to DCHAR_T[], and rework the padding
1916         code accordingly.
1917         (VASNPRINTF) [ENABLE_UNISTDIO]: Implement the 'U' directive. Enable
1918         pad_ourselves also in this case, with the 'c' and 's' directives, and
1919         with a different notion of "width".
1920         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_WITH_EXTRAS): New macros.
1921
1922 2007-06-10  Bruno Haible  <bruno@clisp.org>
1923
1924         * modules/unistr/u32-mbsnlen: New file.
1925         * lib/unistr/u32-mbsnlen.c: New file.
1926
1927         * modules/unistr/u16-mbsnlen: New file.
1928         * lib/unistr/u16-mbsnlen.c: New file.
1929
1930         * modules/unistr/u8-mbsnlen: New file.
1931         * lib/unistr/u8-mbsnlen.c: New file.
1932
1933         * lib/unistr.h (u8_mbsnlen, u16_mbsnlen, u32_mbsnlen): New
1934         declarations.
1935
1936 2007-06-10  Bruno Haible  <bruno@clisp.org>
1937
1938         * lib/string_.h (mbsnlen): New declaration.
1939         * lib/mbsnlen.c: New file.
1940         * m4/mbsnlen.m4: New file.
1941         * modules/mbsnlen: New file.
1942         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Set GNULIB_MBSNLEN.
1943         * modules/string (string.h): Substitute GNULIB_MBSNLEN.
1944         * MODULES.html.sh (Internationalization functions): Add mbsnlen.
1945
1946 2007-06-10  Bruno Haible  <bruno@clisp.org>
1947
1948         * lib/mbslen.c: Include <stdlib.h>, needed for MB_CUR_MAX.
1949
1950 2007-06-10  Bruno Haible  <bruno@clisp.org>
1951
1952         * lib/mbiter.h: Include <stddef.h>, needed for ptrdiff_t.
1953         * lib/mbuiter.h: Likewise.
1954
1955 2007-06-10  Bruno Haible  <bruno@clisp.org>
1956
1957         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Check for _snprintf
1958         declaration.
1959
1960 2007-06-10  Karl Berry  <karl@gnu.org>
1961
1962         * config/srclist.txt: remove gettext entries, Bruno prefers
1963         to update individually.
1964
1965 2007-06-10  Bruno Haible  <bruno@clisp.org>
1966
1967         * lib/vasnprintf.c (VASNPRINTF) [!USE_SNPRINTF]: Remove variable
1968         'maxlen'. Ensure only length + width bytes are allocated, not
1969         length + 1 + width.
1970
1971 2007-06-09  Bruno Haible  <bruno@clisp.org>
1972
1973         * lib/vasnprintf.c (FCHAR_T, DCHAR_T, TCHAR_T): New macros.
1974         (CHAR_T): Remove macro.
1975         (VASNPRINTF): Update.
1976
1977 2007-06-09  Bruno Haible  <bruno@clisp.org>
1978
1979         * MODULES.html.sh (Unicode string functions): Add the new modules.
1980
1981         * modules/uniconv/u32-conv-to-enc: New file.
1982         * lib/uniconv/u32-conv-to-enc.c: New file.
1983         * modules/uniconv/u32-conv-to-enc-tests: New file.
1984         * tests/uniconv/test-u32-conv-to-enc.c: New file.
1985
1986         * modules/uniconv/u16-conv-to-enc: New file.
1987         * lib/uniconv/u16-conv-to-enc.c: New file.
1988         * lib/uniconv/u-conv-to-enc.h: New file.
1989         * modules/uniconv/u16-conv-to-enc-tests: New file.
1990         * tests/uniconv/test-u16-conv-to-enc.c: New file.
1991
1992         * modules/uniconv/u8-conv-to-enc: New file.
1993         * lib/uniconv/u8-conv-to-enc.c: New file.
1994         * modules/uniconv/u8-conv-to-enc-tests: New file.
1995         * tests/uniconv/test-u8-conv-to-enc.c: New file.
1996
1997         * lib/uniconv.h (u8_conv_to_encoding, u16_conv_to_encoding,
1998         u32_conv_to_encoding): New declarations.
1999
2000 2007-06-09  Bruno Haible  <bruno@clisp.org>
2001
2002         * tests/uniconv/test-u32-strconv-to-enc.c (main): Remove unused code.
2003
2004 2007-06-09  Bruno Haible  <bruno@clisp.org>
2005
2006         Rename 'allocsa' -> 'malloca', 'freesa' -> 'freea'.
2007         * modules/malloca: Renamed from modules/allocsa, updated.
2008         * lib/malloca.h: Renamed from lib/allocsa.h, updated.
2009         * lib/malloca.c: Renamed from lib/allocsa.c, updated.
2010         * lib/malloca.valgrind: Renamed from lib/allocsa.valgrind, updated.
2011         * m4/malloca.m4: Renamed from m4/allocsa.m4, updated.
2012         * modules/malloca-tests: Renamed from modules/allocsa-tests, updated.
2013         * tests/test-malloca.c: Renamed from tests/test-allocsa.c, updated.
2014         * modules/xmalloca: Renamed from modules/xallocsa, updated.
2015         * lib/xmalloca.h: Renamed from lib/xallocsa.h, updated.
2016         * lib/xmalloca.c: Renamed from lib/xallocsa.c, updated.
2017         * modules/c-strcasestr (Depends-on): Update.
2018         * lib/c-strcasestr.c: Update.
2019         * modules/c-strstr (Depends-on): Update.
2020         * lib/c-strstr.c: Update.
2021         * modules/canonicalize-lgpl (Depends-on): Update.
2022         * lib/canonicalize-lgpl.c: Update.
2023         * modules/clean-temp (Depends-on): Update.
2024         * lib/clean-temp.c: Update.
2025         * modules/csharpcomp (Depends-on): Update.
2026         * lib/csharpcomp.c: Update.
2027         * modules/csharpexec (Depends-on): Update.
2028         * lib/csharpexec.c: Update.
2029         * modules/javacomp (Depends-on): Update.
2030         * lib/javacomp.c: Update.
2031         * modules/javaexec (Depends-on): Update.
2032         * lib/javaexec.c: Update.
2033         * modules/mbscasestr (Depends-on): Update.
2034         * lib/mbscasestr.c: Update.
2035         * modules/mbsstr (Depends-on): Update.
2036         * lib/mbsstr.c: Update.
2037         * modules/setenv (Depends-on): Update.
2038         * lib/setenv.c: Update.
2039         * modules/strcasestr (Depends-on): Update.
2040         * lib/strcasestr.c: Update.
2041         * modules/striconveha (Depends-on): Update.
2042         * lib/striconveha.c: Update.
2043         * modules/relocatable-prog-wrapper (Files): Update.
2044         * lib/relocwrapper.c: Update.
2045         * build-aux/install-reloc: Update.
2046         * MODULES.html.sh (Memory management functions <stdlib.h>): Update.
2047
2048 2007-06-08  Bruno Haible  <bruno@clisp.org>
2049
2050         Port to uClibc.
2051         * lib/fbufmode.c (fbufmode): Add special code for uClibc.
2052         * lib/fpurge.c (fpurge): Likewise.
2053         * lib/freading.c (freading): Likewise.
2054         * lib/fseeko.c (rpl_fseeko): Likewise.
2055         * lib/fseterr.c (fseterr): Likewise.
2056         * lib/fwriting.c (fwriting): Likewise.
2057         * tests/test-fflush.c (main): Avoid a failure on uClibc.
2058
2059 2007-06-08  Bruno Haible  <bruno@clisp.org>
2060
2061         * m4/intlmacosx.m4: New file, extracted from gettext.m4.
2062         * m4/gettext.m4 (gt_INTL_MACOSX): Remove macro, moved to intlmacosx.m4.
2063         * modules/gettext (Files): Add m4/intlmacosx.m4.
2064
2065 2007-06-07  Bruno Haible  <bruno@clisp.org>
2066
2067         * modules/localename-tests: New file.
2068         * tests/test-localename.c: New file.
2069
2070         New module 'localename'.
2071         * lib/localename.h: New file.
2072         * lib/localename.c: New file, from GNU gettext.
2073         * m4/localename.m4: New file.
2074         * modules/localename: New file.
2075
2076 2007-06-07  Bruno Haible  <bruno@clisp.org>
2077
2078         Work around the lack of <wchar.h> on some builds of uClibc.
2079         * doc/headers/wchar.texi: Update.
2080         * lib/wchar_.h: Include <wchar.h> only if it exists.
2081         * m4/wchar.m4 (gl_WCHAR_H): Check for <wchar.h>. Set HAVE_WCHAR_H.
2082         * m4/stdint.m4 (gl_STDINT_H): Check for <wchar.h>.
2083         (gl_STDINT_TYPE_PROPERTIES): Don't try to include <wchar.h> if it
2084         doesn't exist.
2085         * modules/wchar (wchar.h): Substitute HAVE_WCHAR_H.
2086         * modules/mbfile (Depends-on): Add wchar.
2087         * modules/mbiter (Depends-on): Likewise.
2088         * modules/mbuiter (Depends-on): Likewise.
2089         Reported by Simon Josefsson.
2090
2091 2007-06-06  Paul Eggert  <eggert@cs.ucla.edu>
2092
2093         Work around problem reported by Steven M. Schweda in
2094         <http://lists.gnu.org/archive/html/bug-tar/2007-06/msg00002.html>:
2095         Tru64 5.1B with the Compaq compiler environment installed declares
2096         an 'isblank' function but does not define it in the C library.
2097         * lib/fnmatch.c (isblank): Check for HAVE_ISBLANK, too.
2098         * lib/regex_internal.h (isblank): Likewise.
2099         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for isblank existence.
2100         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
2101
2102 2007-06-05  Bruno Haible  <bruno@clisp.org>
2103
2104         Fix *printf so that it recognizes non-IEEE numbers on i386, x86_64,
2105         ia64.
2106         * modules/printf-safe: New file.
2107         * modules/fprintf-posix (Depends-on): Add printf-safe.
2108         * modules/printf-posix (Depends-on): Likewise.
2109         * modules/snprintf-posix (Depends-on): Likewise.
2110         * modules/sprintf-posix (Depends-on): Likewise.
2111         * modules/vasnprintf-posix (Depends-on): Likewise.
2112         * modules/vasprintf-posix (Depends-on): Likewise.
2113         * modules/vfprintf-posix (Depends-on): Likewise.
2114         * modules/vprintf-posix (Depends-on): Likewise.
2115         * modules/vsnprintf-posix (Depends-on): Likewise.
2116         * modules/vsprintf-posix (Depends-on): Likewise.
2117         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Require
2118         AC_C_BIGENDIAN. Define CHECK_PRINTF_SAFE if printf-safe is used. Test
2119         non-IEEE numbers on i386, x86_64, ia64. When cross-compiling, guess
2120         "no" on i386, x86_64, ia64.
2121         * tests/test-snprintf-posix.h (LDBL80_WORDS): New macro.
2122         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
2123         on i386, x86_64, ia64.
2124         * tests/test-sprintf-posix.h (LDBL80_WORDS): New macro.
2125         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
2126         on i386, x86_64, ia64.
2127         * tests/test-vasnprintf-posix.c: Include float.h.
2128         (LDBL80_WORDS): New macro.
2129         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
2130         on i386, x86_64, ia64.
2131         * tests/test-vasprintf-posix.c: Include float.h.
2132         (LDBL80_WORDS): New macro.
2133         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
2134         on i386, x86_64, ia64.
2135         * tests/test-snprintf-posix.c: Include float.h.
2136         * tests/test-sprintf-posix.c: Likewise.
2137         * tests/test-vsnprintf-posix.c: Likewise.
2138         * tests/test-vsprintf-posix.c: Likewise.
2139
2140 2007-06-05  Bruno Haible  <bruno@clisp.org>
2141
2142         Fix isnanl so that it recognizes non-IEEE numbers on i386, x86_64, ia64.
2143         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Require AC_C_BIGENDIAN. Test
2144         non-IEEE numbers on i386, x86_64, ia64.
2145         (gl_LONG_DOUBLE_EXPONENT_LOCATION): Require AC_C_BIGENDIAN.
2146         * lib/isnan.c (FUNC): Add special code for i386, x86_64, ia64.
2147         * tests/test-isnanl.h: Include float.h.
2148         (main): Check also non-IEEE numbers on i386, x86_64, ia64.
2149
2150 2007-06-05  Bruno Haible  <bruno@clisp.org>
2151
2152         * lib/vasnprintf.c (VASNPRINTF): Do the extra handling of NaN and Inf
2153         also the %a / %A. Handle the %a / %A code before this extra handling.
2154
2155 2007-06-05  Bruno Haible  <bruno@clisp.org>
2156
2157         * lib/vasnprintf.c [NEED_PRINTF_LONG_DOUBLE ||
2158         NEED_PRINTF_INFINITE_LONG_DOUBLE]: Include fpucw.h.
2159
2160 2007-06-05  Bruno Haible  <bruno@clisp.org>
2161
2162         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE): Fix
2163         typo in variable name.
2164
2165 2007-06-05  Eric Blake  <ebb9@byu.net>
2166
2167         * m4/lseek.m4 (gl_FUNC_LSEEK): Work when cross-compiling.
2168         Reported by Simon Josefsson.
2169
2170 2007-06-04  Bruno Haible  <bruno@clisp.org>
2171
2172         Avoid test failures on some PowerPC platforms.
2173         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP):
2174         Define differently for PowerPC.
2175         * tests/test-frexpl.c (MIN_NORMAL_EXP): Likewise.
2176         Reported by Gary V. Vaughan <gary@gnu.org>.
2177
2178 2007-06-02  Bruno Haible  <bruno@clisp.org>
2179
2180         Fix test-stdint failure on FreeBSD/ia64.
2181         * m4/stdint.m4 (gl_STDINT_H): Check the values of PTRDIFF_MIN,
2182         PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN,
2183         WCHAR_MAX, WINT_MIN, WINT_MAX entirely, not only for plausibility.
2184         * doc/headers/stdint.texi: Update.
2185
2186 2007-06-01  Bruno Haible  <bruno@clisp.org>
2187
2188         * tests/test-binary-io.c (main): Pass a third argument to open().
2189         Reported by Gary V. Vaughan <gary@gnu.org>.
2190
2191 2007-06-01  Bruno Haible  <bruno@clisp.org>
2192
2193         * doc/functions/frexpl.texi: Update for mingw.
2194
2195 2007-06-01  Bruno Haible  <bruno@clisp.org>
2196
2197         * tests/test-lseek.c (main): Disable test of errno for invalid third
2198         argument.
2199         * doc/functions/lseek.texi: Update.
2200         Reported by Gary V. Vaughan <gary@gnu.org>.
2201
2202 2007-05-28  Bruno Haible  <bruno@clisp.org>
2203
2204         * m4/intl.m4 (AM_INTL_SUBDIR): Substitute variables WOE32, WINDRES.
2205
2206 2007-05-31  Eric Blake  <ebb9@byu.net>
2207
2208         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Guess no on mingw when
2209         cross compiling.
2210
2211 2007-05-30  Eric Blake  <ebb9@byu.net>
2212         and Bruno Haible  <bruno@clisp.org>
2213
2214         Work around mingw test failures exposed by m4-1.4.9b.
2215         * m4/stdint.m4 (gl_STDINT_H): Detect mingw bug.
2216         * tests/test-unistd.c: Disable uid_t and git_t tests for the
2217         moment.
2218
2219 2007-05-30  Bruno Haible  <bruno@clisp.org>
2220
2221         * tests/test-lseek.c: Explicitly close file descriptors 0 and 1 before
2222         assuming that they are closed. Needed on HP-UX 11.
2223
2224 2007-05-29  Bruno Haible  <bruno@clisp.org>
2225
2226         Fix a problem with #include_next.
2227         * lib/dirent_.h: Split the double-inclusion guard.
2228         * lib/fcntl_.h: Likewise.
2229         * lib/float_.h: Likewise.
2230         * lib/iconv_.h: Likewise.
2231         * lib/inttypes_.h: Likewise.
2232         * lib/locale_.h: Likewise.
2233         * lib/math_.h: Likewise.
2234         * lib/netinet_in_.h: Likewise.
2235         * lib/search_.h: Likewise.
2236         * lib/signal_.h: Likewise.
2237         * lib/stdint_.h: Likewise.
2238         * lib/stdio_.h: Likewise.
2239         * lib/stdlib_.h: Likewise.
2240         * lib/string_.h: Likewise.
2241         * lib/sys_select_.h: Likewise.
2242         * lib/sys_socket_.h: Likewise.
2243         * lib/sys_stat_.h: Likewise.
2244         * lib/sys_time_.h: Likewise.
2245         * lib/sysexits_.h: Likewise.
2246         * lib/time_.h: Likewise.
2247         * lib/unistd_.h: Likewise.
2248         * lib/wchar_.h: Likewise.
2249         * lib/wctype_.h: Likewise.
2250
2251 2007-05-29  Bruno Haible  <bruno@clisp.org>
2252
2253         * tests/test-unistd.c: Disable the tests for useconds_t and intptr_t
2254         for the moment.
2255
2256 2007-05-29  Bruno Haible  <bruno@clisp.org>
2257
2258         * m4/isnan.m4 (gl_DOUBLE_EXPONENT_LOCATION): Silence the AC_C_BIGENDIAN
2259         invocation.
2260         Reported by Eric Blake.
2261
2262 2007-05-29  Bruno Haible  <bruno@clisp.org>
2263
2264         * m4/isnanf.m4 (gl_FLOAT_EXPONENT_LOCATION): Fix typo in cross-
2265         compiling case.
2266
2267 2007-05-29  Eric Blake  <ebb9@byu.net>
2268             Bruno Haible  <bruno@clisp.org>
2269
2270         * m4/isnanf.m4 (gl_FUNC_ISNANF_NO_LIBM): Avoid syntax error on
2271         cross compiles.
2272
2273 2007-05-28  Eric Blake  <ebb9@byu.net>
2274
2275         * modules/closein-tests (test_closein_LDADD): Support test on
2276         cygwin with libtool.
2277
2278 2007-05-28  Bruno Haible  <bruno@clisp.org>
2279
2280         * tests/uniconv/test-u16-conv-from-enc.c: Remove #ifdef HAVE_CONFIG_H.
2281         * tests/uniconv/test-u16-strconv-from-enc.c: Likewise.
2282         * tests/uniconv/test-u16-strconv-to-enc.c: Likewise.
2283         * tests/uniconv/test-u32-conv-from-enc.c: Likewise.
2284         * tests/uniconv/test-u32-strconv-from-enc.c: Likewise.
2285         * tests/uniconv/test-u32-strconv-to-enc.c: Likewise.
2286         * tests/uniconv/test-u8-conv-from-enc.c: Likewise.
2287         * tests/uniconv/test-u8-strconv-from-enc.c: Likewise.
2288         * tests/uniconv/test-u8-strconv-to-enc.c: Likewise.
2289
2290 2007-05-28  Eric Blake  <ebb9@byu.net>
2291
2292         Unconditionally include <config.h> in unit tests.
2293         * tests/test-alloca-opt.c: Remove #ifdef HAVE_CONFIG_H.
2294         * tests/test-allocsa.c, tests/test-arcfour.c,
2295         tests/test-arctwo.c, tests/test-argmatch.c, tests/test-argp.c,
2296         tests/test-array_list.c, tests/test-array_oset.c,
2297         tests/test-atexit.c, test-avltree_list.c, test-avltree_oset.c,
2298         test-avltreehash_list.c, test-base64.c, test-binary-io.c,
2299         test-c-ctype.c, test-c-strcasecmp.c, test-c-strcasestr.c,
2300         test-c-strncasecmp.c, test-c-strstr.c, test-canonicalize-lgpl.c,
2301         test-carray_list.c, test-crc.c, test-des.c, test-dirname.c,
2302         test-fflush.c, test-fprintf-posix.c, test-gc-arcfour.c,
2303         test-gc-arctwo.c, test-gc-des.c, test-gc-hmac-md5.c,
2304         test-gc-hmac-sha1.c, test-gc-md2.c, test-gc-md4.c, test-gc-md5.c,
2305         test-gc-pbkdf2-sha1.c, test-gc-rijndael.c, test-gc-sha1.c,
2306         test-gc.c, test-getpass.c, test-hmac-md5.c, test-hmac-sha1.c,
2307         test-iconv.c, test-linked_list.c, test-linkedhash_list.c,
2308         test-lock.c, test-mbscasecmp.c, test-mbscasestr1.c,
2309         test-mbscasestr2.c, test-mbscasestr3.c, test-mbscasestr4.c,
2310         test-mbschr.c, test-mbscspn.c, test-mbsncasecmp.c, test-mbspbrk.c,
2311         test-mbspcasecmp.c, test-mbsrchr.c, test-mbsspn.c, test-mbsstr1.c,
2312         test-mbsstr2.c, test-mbsstr3.c, test-md2.c, test-md4.c,
2313         test-md5.c, test-memmem.c, test-printf-posix.c,
2314         test-rbtree_list.c, test-rbtree_oset.c, test-rbtreehash_list.c,
2315         test-read-file.c, test-rijndael.c, test-snprintf-posix.c,
2316         test-snprintf.c, test-sprintf-posix.c, test-stdint.c,
2317         test-strcasestr.c, test-striconv.c, test-striconveh.c,
2318         test-striconveha.c, test-tls.c, test-vasnprintf-posix.c,
2319         test-vasnprintf-posix2.c, test-vasnprintf.c,
2320         test-vasprintf-posix.c, test-vasprintf.c, test-verify.c,
2321         test-vfprintf-posix.c, test-vprintf-posix.c,
2322         test-vsnprintf-posix.c, test-vsnprintf.c, test-vsprintf-posix.c,
2323         test-xvasprintf.c: Likewise.
2324
2325 2007-05-28  Bruno Haible  <bruno@clisp.org>
2326
2327         * gnulib-tool (func_import): Remember the --with-tests command-line
2328         option through the macro gl_WITH_TESTS in the gnulib-cache.m4.
2329         Reported by Eric Blake.
2330
2331 2007-05-28  Bruno Haible  <bruno@clisp.org>
2332
2333         * modules/ftell-tests: New file.
2334         * tests/test-ftell.c: New file, based on tests/test-ftello.c.
2335         * tests/test-ftell.sh: New file, based on tests/test-ftello.sh.
2336
2337         * lib/ftell.c: New file.
2338         * modules/ftell: New file.
2339         * m4/ftell.m4: New file.
2340         * doc/functions/ftell.texi: Update.
2341         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FTELL,
2342         REPLACE_FTELL.
2343         * lib/stdio_.h (rpl_ftell): New declaration.
2344         * modules/stdio (Makefile.am): Substitute also GNULIB_FTELL,
2345         REPLACE_FTELL.
2346
2347 2007-05-28  Eric Blake  <ebb9@byu.net>
2348
2349         * lib/allocsa.h (safe_alloca): Avoid compiler warning.
2350
2351 2007-05-28  Bruno Haible  <bruno@clisp.org>
2352
2353         * modules/fseek-tests: New file.
2354         * tests/test-fseek.c: New file, based on tests/test-fseeko.c.
2355         * tests/test-fseek.sh: New file, based on tests/test-fseeko.sh.
2356
2357         * lib/fseek.c: New file.
2358         * modules/fseek: New file.
2359         * m4/fseek.m4: New file.
2360         * doc/functions/fseek.texi: Update.
2361         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FSEEK,
2362         REPLACE_FSEEK.
2363         * lib/stdio_.h (rpl_fseek): New declaration.
2364         * modules/stdio (Makefile.am): Substitute also GNULIB_FSEEK,
2365         REPLACE_FSEEK.
2366
2367 2007-05-28  Bruno Haible  <bruno@clisp.org>
2368
2369         * lib/stdio_.h (fflush): More comments.
2370
2371 2007-05-28  Bruno Haible  <bruno@clisp.org>
2372
2373         * m4/lseek.m4 (gl_FUNC_LSEEK): When not cross-compiling, perform a real
2374         runtime test.
2375
2376 2007-05-28  Eric Blake  <ebb9@byu.net>
2377
2378         Improve lseek module.
2379         * lib/lseek.c (rpl_lseek): Detect EBADF on mingw.
2380         * lib/unistd_.h (lseek): Scale back link warning message.
2381         * tests/test-lseek.c: Beef up test.
2382         * tests/test-lseek.sh: Exercise more facets of lseek.
2383         Reported by Bruno Haible.
2384
2385 2007-05-28  Bruno Haible  <bruno@clisp.org>
2386
2387         * tests/test-unistd.c: Test all the types that <unistd.h> is expected
2388         to define.
2389
2390 2007-05-27  Bruno Haible  <bruno@clisp.org>
2391
2392         * m4/iconv.m4 (AM_ICONV_LINK): Fix 2007-03-31 patch.
2393
2394 2007-05-27  Bruno Haible  <bruno@clisp.org>
2395
2396         * modules/openmp: New file.
2397         * m4/openmp.m4: New file, taken from autoconf's CVS with changes by
2398         Noah Misch.
2399
2400 2007-05-26  Bruno Haible  <bruno@clisp.org>
2401
2402         * modules/chdir-long (Depends-on): Add fchdir.
2403         * modules/chdir-safer (Depends-on): Likewise.
2404         * modules/fts (Depends-on): Likewise.
2405         * modules/fts-lgpl (Depends-on): Likewise.
2406         * modules/openat (Depends-on): Likewise.
2407         * modules/savewd (Depends-on): Likewise.
2408
2409 2007-05-24  Eric Blake  <ebb9@byu.net>
2410
2411         Fix lseek on mingw.
2412         * modules/lseek: New module.
2413         * m4/lseek.m4: New file.
2414         * lib/lseek.c: New file.
2415         * modules/lseek-tests: New file.
2416         * tests/test-lseek.c: New file.
2417         * tests/test-lseek.sh: New file.
2418         * MODULES.html.sh: Document lseek module.
2419         * modules/fflush (Depends-on): Add lseek, fseeko.
2420         * modules/fseeko (Depends-on): Likewise.
2421         * modules/ftello (Depends-on): Likewise.
2422         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Replace fseek[o] if lseek is
2423         broken.
2424         * m4/ftello.m4 (gl_FUNC_FTELLO): Replace ftell[o] if lseek is
2425         broken.
2426         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Trigger fseeko module.
2427         * lib/fseeko.c (rpl_fseeko): Quit early on non-seekable files.
2428         * lib/ftello.c (rpl_ftello): Likewise.
2429         * tests/test-fseeko.c (main): Test this.
2430         * tests/test-fseeko.sh: Likewise.
2431         * tests/test-ftello.c (main): Likewise.
2432         * tests/test-ftello.sh: Likewise.
2433         * lib/stdio_.h (fseek, ftell): Simplify, since missing fseeko now
2434         implies replacing fseek.
2435         * modules/stdio (Makefile.am): No longer need HAVE_FSEEKO,
2436         HAVE_FTELLO.
2437         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add lseek info.
2438         * modules/unistd (Makefile.am): Likewise.
2439         * lib/unistd_.h (lseek): Declare a replacement.
2440         * doc/functions/lseek.texi (lseek): Document this fix.
2441         * doc/functions/fseek.texi (fseek): Likewise.
2442         * doc/functions/ftell.texi (ftell): Likewise.
2443
2444 2007-05-24  Bruno Haible  <bruno@clisp.org>
2445
2446         * tests/test-vasnprintf-posix.c (test_function): Allow up to 50 bytes
2447         in the printed representation of a NaN.
2448         * tests/test-vasprintf-posix.c (test_function): Likewise.
2449         * tests/test-snprintf-posix.h (test_function): Likewise.
2450         * tests/test-sprintf-posix.h (test_function): Likewise.
2451         Reported by Eric Blake.
2452
2453 2007-05-23  Eric Blake  <ebb9@byu.net>
2454
2455         Fix fseeko/ftello on cygwin 1.5.24.
2456         * doc/functions/fseeko.texi (fseeko): Document the fix.
2457         * doc/functions/ftello.texi (ftello): Document the fix.
2458         * doc/functions/stdin.texi (stdin): Document the cygwin bug.
2459         * doc/functions/stdout.text (stdout): New file.
2460         * doc/functions/stderr.text (stderr): New file.
2461         * doc/gnulib.texi (Function Substitutes): Use new files.
2462         * tests/test-fseeko.c (main): Check for broken fseeko on cygwin
2463         prior to 1.7.0.
2464         * tests/test-ftello.c (main): Likewise for ftello.
2465         * tests/test-fseeko.sh: New file.
2466         * tests/test-ftello.sh: New file.
2467         * modules/fseeko-tests (Makefile.am): Ensure test-fseeko is run
2468         with seekable stdin.
2469         * modules/ftello-tests (Makefile.am): Likewise for test-ftello.
2470         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Detect the cygwin bug.
2471         (gl_REPLACE_FSEEKO): New macro.
2472         * m4/ftello.m4 (gl_FUNC_FTELLO, gl_REPLACE_FTELLO): Likewise.
2473         * modules/fseeko (Files): Distribute fseeko.c.
2474         * modules/ftello (Files): Distribute ftello.c.
2475         * lib/fseeko.c (rpl_fseeko) [__CYGWIN__]: Convert stdin to 64-bit
2476         mode.
2477         * lib/ftello.c (rpl_ftello): New file.
2478         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Allow replacement of
2479         fseeko, ftello.
2480         (gl_STDIN_LARGE_OFFSET): New macro.
2481         * modules/stdio (Makefile.am): Perform the replacement.
2482         * lib/stdio_.h (rpl_fseeko, rpl_ftello): Define when needed.
2483
2484 2007-05-23  Bruno Haible  <bruno@clisp.org>
2485
2486         * lib/stdio_.h (fseeko, ftello): Provide a link warning only if
2487         GNULIB_POSIXCHECK is defined.
2488
2489 2007-05-21  Bruno Haible  <bruno@clisp.org>
2490
2491         * m4/printf.m4 (gl_PRINTF_INFINITE, gl_PRINTF_INFINITE_LONG_DOUBLE):
2492         Check also the output for NaN arguments. When cross-compiling, guess
2493         no on IRIX.
2494         * lib/vasnprintf.c: Update comments.
2495         * tests/test-vasnprintf-posix.c (strisnan): New function.
2496         (test_function): Use it.
2497         * tests/test-vasprintf-posix.c (strisnan): New function.
2498         (test_function): Use it.
2499         * tests/test-snprintf-posix.h (strisnan): New function.
2500         (test_function): Use it.
2501         * tests/test-sprintf-posix.h (strisnan): New function.
2502         (test_function): Use it.
2503         Reported by Eric Blake.
2504
2505 2007-05-20  Bruno Haible  <bruno@clisp.org>
2506
2507         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Add test for large finite
2508         numbers that fails on BeOS.
2509         * doc/functions/frexpl.texi: Update.
2510
2511 2007-05-20  Jim Meyering  <jim@meyering.net>
2512
2513         * NEWS: Mention the incompatible change (s/futimens/gl_futimens/)
2514         forced upon us by glibc-2.6.
2515
2516 2007-05-20  Bruno Haible  <bruno@clisp.org>
2517
2518         Fix *printf result for NaN, Inf on AIX, Solaris, OSF/1.
2519         * m4/printf.m4 (gl_PRINTF_INFINITE): Update cross-compiling guesses.
2520         (gl_PRINTF_INFINITE_LONG_DOUBLE): New macro.
2521         * lib/vasnprintf.c: Use NEED_PRINTF_INFINITE_DOUBLE instead of
2522         NEED_PRINTF_INFINITE.
2523         (is_infinitel): New function.
2524         (VASNPRINTF): Handle NEED_PRINTF_INFINITE_LONG_DOUBLE case.
2525         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE): Renamed from
2526         gl_PREREQ_VASNPRINTF_INFINITE.
2527         (gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE): New macro.
2528         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
2529         gl_PRINTF_INFINITE_LONG_DOUBLE and test its result. Invoke
2530         gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE and
2531         gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE instead of
2532         gl_PREREQ_VASNPRINTF_INFINITE.
2533         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
2534         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
2535         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
2536         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
2537         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
2538         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2539         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
2540         * doc/functions/fprintf.texi: Update.
2541         * doc/functions/printf.texi: Update.
2542         * doc/functions/snprintf.texi: Update.
2543         * doc/functions/sprintf.texi: Update.
2544         * doc/functions/vfprintf.texi: Update.
2545         * doc/functions/vprintf.texi: Update.
2546         * doc/functions/vsnprintf.texi: Update.
2547         * doc/functions/vsprintf.texi: Update.
2548
2549 2007-05-20  Bruno Haible  <bruno@clisp.org>
2550
2551         * m4/frexpl.m4 (gl_FUNC_FREXPL_NO_LIBM): Set REPLACE_FREXPL if frexpl
2552         was not found in libc.
2553         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Likewise.
2554
2555 2007-05-20  Bruno Haible  <bruno@clisp.org>
2556
2557         * tests/test-vasnprintf-posix.c (test_function): Allow NaN to be
2558         printed as "-nan" instead of "nan".
2559         * tests/test-vasprintf-posix.c (test_function): Likewise.
2560         * tests/test-snprintf-posix.h (test_function): Likewise.
2561         * tests/test-sprintf-posix.h (test_function): Likewise.
2562         Needed for HP-UX 11.
2563
2564 2007-05-20  Jim Meyering  <jim@meyering.net>
2565
2566         Fix buggy test for the fchownat-deref bug.
2567         * m4/openat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): Create the dangling
2568         symlink required for the run-test.  Without it, this test would
2569         always declare that fchownat doesn't work, and client code would
2570         unnecessarily use the replacement function with fixed libc.
2571         (gl_FUNC_FCHOWNAT): Eliminate a variable that wasn't initialized.
2572         Reported by Greg Schafer.
2573
2574 2007-05-19  Bruno Haible  <bruno@clisp.org>
2575
2576         * m4/isnanf.m4 (gl_ISNANF_WORKS): New macro.
2577         (gl_FUNC_ISNANF_NO_LIBM): Invoke it.
2578         * lib/isnan.c (FUNC): Use run-time expressions for SGI compiler.
2579         Needed for IRIX 6.5 and Solaris 2.5.1.
2580
2581 2007-05-19  Bruno Haible  <bruno@clisp.org>
2582
2583         * tests/test-vasnprintf-posix.c (have_minus_zero): New function.
2584         (test_function): Skip tests involving -0.0 on platforms where
2585         -0.0 = 0.0.
2586         * tests/test-vasprintf-posix.c (have_minus_zero): New function.
2587         (test_function): Skip tests involving -0.0 on platforms where
2588         -0.0 = 0.0.
2589         * tests/test-snprintf-posix.h (have_minus_zero): New function.
2590         (test_function): Skip tests involving -0.0 on platforms where
2591         -0.0 = 0.0.
2592         * tests/test-sprintf-posix.h (have_minus_zero): New function.
2593         (test_function): Skip tests involving -0.0 on platforms where
2594         -0.0 = 0.0.
2595         * tests/test-fprintf-posix.h (test_function): Remove all -0.0 related
2596         tests.
2597         * tests/test-printf-posix.h (test_function): Likewise.
2598         * tests/test-printf-posix.output: Remove all -0.0 related results.
2599         Needed for IRIX 6.5.
2600
2601 2007-05-19  Bruno Haible  <bruno@clisp.org>
2602
2603         * tests/test-vasnprintf-posix.c (test_function): Allow NaN to be
2604         printed as "nan0x7fffffff" instead of "nan".
2605         * tests/test-vasprintf-posix.c (test_function): Likewise.
2606         * tests/test-snprintf-posix.h (test_function): Likewise.
2607         * tests/test-sprintf-posix.h (test_function): Likewise.
2608         * tests/test-fprintf-posix.h (NaN): Remove macro.
2609         (test_function): Remove all NaN related tests.
2610         * tests/test-printf-posix.h (NaN): Remove macro.
2611         (test_function): Remove all NaN related tests.
2612         * tests/test-printf-posix.output: Remove all NaN related results.
2613         Needed for IRIX 6.5.
2614
2615 2007-05-19  Bruno Haible  <bruno@clisp.org>
2616
2617         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Fix C89 syntax error in test code.
2618         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Likewise.
2619
2620 2007-05-19  Bruno Haible  <bruno@clisp.org>
2621
2622         * lib/float_.h: New file.
2623         * m4/float_h.m4: New file.
2624         * modules/float: New file.
2625         * modules/isnanl (Dependencies): Add float.
2626         * modules/isnanl-nolibm (Dependencies): Likewise.
2627         * modules/mathl (Dependencies): Likewise.
2628         * modules/printf-frexpl (Dependencies): Likewise.
2629         * modules/signbit (Dependencies): Likewise.
2630         * modules/vasnprintf (Dependencies): Likewise.
2631         * doc/headers/float.texi: Update.
2632
2633 2007-05-19  Jim Meyering  <jim@meyering.net>
2634
2635         * lib/utimens.c (gl_futimens): Rename from futimens,
2636         now that glibc-2.6 declares futimens.
2637         * lib/utimens.h: Likewise.
2638
2639 2007-05-19  Bruno Haible  <bruno@clisp.org>
2640
2641         Avoid test failures on mingw.
2642         * tests/test-fprintf-posix.sh: Convert CR/LF to LF in output.
2643         * tests/test-printf-posix.sh: Likewise.
2644         * tests/test-vfprintf-posix.sh: Likewise.
2645         * tests/test-vprintf-posix.sh: Likewise.
2646
2647 2007-05-19  Bruno Haible  <bruno@clisp.org>
2648
2649         Fix *printf result for NaN, Inf, -0.0 on mingw.
2650         * m4/printf.m4 (gl_PRINTF_INFINITE): New macro.
2651         * lib/vasnprintf.c: Include math.h and isnan.h.
2652         (is_infinite_or_zero): New function.
2653         (VASNPRINTF): Fix also the handling of infinite or zero 'double'
2654         values in the %f, %F, %e, %E, %g, %G directives.
2655         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE): New macro.
2656         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
2657         gl_PRINTF_INFINITE and test its result. Invoke
2658         gl_PREREQ_VASNPRINTF_INFINITE.
2659         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
2660         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
2661         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
2662         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
2663         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
2664         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2665         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
2666         * doc/functions/fprintf.texi: Update.
2667         * doc/functions/printf.texi: Update.
2668         * doc/functions/snprintf.texi: Update.
2669         * doc/functions/sprintf.texi: Update.
2670         * doc/functions/vfprintf.texi: Update.
2671         * doc/functions/vprintf.texi: Update.
2672         * doc/functions/vsnprintf.texi: Update.
2673         * doc/functions/vsprintf.texi: Update.
2674
2675 2007-05-19  Bruno Haible  <bruno@clisp.org>
2676
2677         * lib/vasnprintf.c (convert_to_decimal): Add an extra_zeroes argument.
2678         (scale10_round_decimal_long_double): Inline scale10_round_long_double.
2679         Instead of multiplying with 10^k, set extra_zeroes to k.
2680         (scale10_round_long_double): Remove function.
2681
2682 2007-05-18  Bruno Haible  <bruno@clisp.org>
2683
2684         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_ZERO]: Fix logic bug
2685         introduced on 2007-05-06.
2686
2687 2007-05-18  Bruno Haible  <bruno@clisp.org>
2688
2689         * tests/test-vasnprintf-posix.c (test_function): Also test the %e and
2690         %g directives.
2691         * tests/test-vasprintf-posix.c (test_function): Likewise.
2692         * tests/test-snprintf-posix.h (test_function): Likewise.
2693         * tests/test-sprintf-posix.h (test_function): Likewise.
2694
2695 2007-05-18  Bruno Haible  <bruno@clisp.org>
2696
2697         * tests/test-vasnprintf-posix.c (SIZEOF): New macro.
2698         (strmatch): New function.
2699         (test_function): Test the %f directive on numbers of various exponents.
2700         * tests/test-vasprintf-posix.c (SIZEOF): New macro.
2701         (strmatch): New function.
2702         (test_function): Test the %f directive on numbers of various exponents.
2703         * tests/test-snprintf-posix.h (strmatch): New function.
2704         (test_function): Test the %f directive on numbers of various exponents.
2705         * tests/test-sprintf-posix.h (strmatch): New function.
2706         (test_function): Test the %f directive on numbers of various exponents.
2707         * tests/test-snprintf-posix.c (SIZEOF): New macro.
2708         * tests/test-sprintf-posix.c (SIZEOF): New macro.
2709         * tests/test-vsnprintf-posix.c (SIZEOF): New macro.
2710         * tests/test-vsprintf-posix.c (SIZEOF): New macro.
2711
2712 2007-05-18  Bruno Haible  <bruno@clisp.org>
2713
2714         Add support for 'long double' number output.
2715         * m4/printf.m4 (gl_PRINTF_LONG_DOUBLE): New macro.
2716         * lib/vasnprintf.c: Include math.h and float+.h.
2717         (mp_limb_t): New type.
2718         (GMP_LIMB_BITS): New macro.
2719         (mp_twolimb_t): New type.
2720         (GMP_TWOLIMB_BITS): New macro.
2721         (mpn_t): New type.
2722         (multiply, divide, convert_to_decimal, decode_long_double,
2723         scale10_round_long_double, scale10_round_decimal_long_double,
2724         floorlog10l): New functions.
2725         (VASNPRINTF) [NEED_PRINTF_LONG_DOUBLE]: Implement 'long double' support
2726         for the %f, %F, %e, %E, %g, %G directives.
2727         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_LONG_DOUBLE): New macro.
2728         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
2729         gl_PRINTF_LONG_DOUBLE and test its result. Invoke
2730         gl_PREREQ_VASNPRINTF_LONG_DOUBLE.
2731         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
2732         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
2733         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
2734         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
2735         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
2736         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2737         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
2738         * modules/fprintf-posix (Depends-on): Add frexpl-nolibm.
2739         * modules/snprintf-posix (Depends-on): Likewise.
2740         * modules/sprintf-posix (Depends-on): Likewise.
2741         * modules/vasnprintf-posix (Depends-on): Likewise.
2742         * modules/vasprintf-posix (Depends-on): Likewise.
2743         * modules/vfprintf-posix (Depends-on): Likewise.
2744         * modules/vsnprintf-posix (Depends-on): Likewise.
2745         * modules/vsprintf-posix (Depends-on): Likewise.
2746         * modules/vasnprintf (Files): Add lib/float+.h.
2747         * doc/functions/fprintf.texi: Update.
2748         * doc/functions/printf.texi: Update.
2749         * doc/functions/snprintf.texi: Update.
2750         * doc/functions/sprintf.texi: Update.
2751         * doc/functions/vfprintf.texi: Update.
2752         * doc/functions/vprintf.texi: Update.
2753         * doc/functions/vsnprintf.texi: Update.
2754         * doc/functions/vsprintf.texi: Update.
2755
2756 2007-05-18  Bruno Haible  <bruno@clisp.org>
2757
2758         * lib/vasnprintf.c (USE_SNPRINTF): Define to 0 on BeOS.
2759
2760 2007-05-18  Bruno Haible  <bruno@clisp.org>
2761
2762         * lib/vasnprintf.c (VASNPRINTF) [WIN32]: Use %I64d instead of %lld
2763         for printing 64-bit integers. Needed for mingw.
2764
2765 2007-05-18  Bruno Haible  <bruno@clisp.org>
2766
2767         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Invoke
2768         gl_FUNC_FREXPL_WORKS.
2769         * modules/printf-frexpl (Files): Add m4/frexpl.m4.
2770
2771 2007-05-18  Bruno Haible  <bruno@clisp.org>
2772
2773         * modules/frexpl-nolibm-tests: New file.
2774
2775         * modules/frexpl-nolibm: New file.
2776         * m4/frexpl.m4 (gl_FUNC_FREXPL_NO_LIBM): New macro.
2777
2778 2007-05-17  Paul Eggert  <eggert@cs.ucla.edu>
2779
2780         * lib/dirent_.h: Prefer #include_next <foo.h> to #include
2781         @ABSOLUTE_FOO_H@ if @HAVE_INCLUDE_NEXT@.  This works better with
2782         GCC 4.2, which otherwise issues a lot of warnings.
2783         * lib/iconv_.h, lib/locale_.h, lib/netinet_in_.h, lib/sys_select_.h:
2784         * lib/sys_socket_.h, lib/sys_stat_.h, lib/sysexits_.h, lib/unistd_.h:
2785         Likewise.
2786         * modules/fchdir (dirent.h): Substitute @HAVE_INCLUDE_NEXT@.
2787         * modules/iconv_open (iconv.h): Likewise.
2788         * modules/locale (locale.h): Likewise.
2789         * modules/netinet_in (netinet/in.h): Likewise.
2790         * modules/sys_select (sys_select.h): Likewise.
2791         * modules/sys_socket (sys/socket.h): Likewise.
2792         * modules/sys_stat (sys/stat.h): Likewise.
2793         * modules/sysexits (sysexits.h): Likewise.
2794         * modules/unistd (unistd.h): Likewise.
2795
2796 2007-05-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2797
2798         * modules/closein-tests (Makefile.am): Distribute
2799         `test-closein.sh'.
2800
2801 2007-05-17  Bruno Haible  <bruno@clisp.org>
2802
2803         * tests/test-printf-posix.output: Renamed from
2804         tests/test-fprintf-posix.out.
2805         * modules/fprintf-posix-tests: Update.
2806         * modules/printf-posix-tests: Update.
2807         * modules/vfprintf-posix-tests: Update.
2808         * modules/vprintf-posix-tests: Update.
2809         * tests/test-fprintf-posix.sh: Update.
2810         * tests/test-printf-posix.sh: Update.
2811         * tests/test-vfprintf-posix.sh: Update.
2812         * tests/test-vprintf-posix.sh: Update.
2813         Reported by Ralf Wildenhues.
2814
2815 2007-05-16  Paul Eggert  <eggert@cs.ucla.edu>
2816
2817         * lib/fcntl_.h: Prefer #include_next <foo.h> to #include
2818         @ABSOLUTE_FOO_H@ if @HAVE_INCLUDE_NEXT@.  This works better with
2819         GCC 4.2, which otherwise issues a lot of warnings.
2820         * lib/inttypes_.h, lib/math_.h, lib/search_.h, lib/signal_.h:
2821         * lib/stdint_.h, lib/stdio_.h, lib/stdlib_.h, lib/string_.h:
2822         * lib/sys_time_.h, lib/time_.h, lib/wchar_.h, lib/wctype_.h: Likewise.
2823         * lib/stdlib_.h: Don't bother with #pragma GCC system_header, as
2824         it should no longer be needed.
2825         * lib/string_.h: Likewise.
2826         * modules/absolute-header (HAVE_INCLUDE_NEXT): New 'make' define.
2827         * modules/fcntl (fcntl.h): Substitute @HAVE_INCLUDE_NEXT@.
2828         * modules/inttypes (inttypes.h): Likewise.
2829         * modules/math (math.h): Likewise.
2830         * modules/search (search.h): Likewise.
2831         * modules/signal (signal.h): Likewise.
2832         * modules/stdint (stdint.h): Likewise.
2833         * modules/stdio (stdio.h): Likewise.
2834         * modules/stdlib (stdlib.h): Likewise.
2835         * modules/string (string.h): Likewise.
2836         * modules/sys_time (sys/time.h): Likewise.
2837         * modules/time (time.h): Likewise.
2838         * modules/wchar (wchar.h): Likewise.
2839         * modules/wctype (wtype.h): Likewise.
2840
2841 2007-05-16  Thien-Thi Nguyen  <ttn@gnuvola.org>  (tiny change)
2842
2843         * doc/gnulib-tool.texi (CVS Issues): Fix typo.
2844
2845 2007-05-13  Bruno Haible  <bruno@clisp.org>
2846
2847         * stpcpy.m4 (gl_FUNC_STPCPY): Require AC_C_RESTRICT.
2848         * stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
2849         * strsep.m4 (gl_FUNC_STRSEP): Likewise.
2850         * strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
2851         (gl_PREREQ_STRTOK_R): Don't require it here.
2852
2853 2007-05-13  Bruno Haible  <bruno@clisp.org>
2854
2855         * lib/stdlib_.h (mkdtemp, mkstemp): Comment out argument name. Needed
2856         when used in C++ mode.
2857
2858 2007-05-12  Bruno Haible  <bruno@clisp.org>
2859
2860         * lib/linebuffer.h: Tweak doc.
2861         * lib/linebuffer.c: Likewise.
2862
2863 2007-05-12  James Youngman  <jay@gnu.org>
2864
2865         * lib/linebuffer.c (readlinebuffer_delim): New function,
2866         like readlinebuffer, but use a caller-specified delimiter.
2867         (readlinebuffer): Just call readlinebuffer_delim with '\n'
2868         as the delimiter.
2869         * lib/linebuffer.h (readlinebuffer_delim): Declare it.
2870
2871 2007-05-12  Sergey Poznyakoff  <gray@gnu.org.ua>
2872
2873         * m4/openat.m4 (gl_FUNC_OPENAT): Do not require openat-die.
2874         * modules/openat (Files): Remove openat-die.c.
2875         (Depends-on): Add openat-die.
2876         * modules/openat-die: New module.
2877
2878 2007-05-06  Bruno Haible  <bruno@clisp.org>
2879
2880         * m4/printf.m4 (gl_PRINTF_FLAG_GROUPING, gl_VSNPRINTF_ZEROSIZE_C99):
2881         Update with info about Cygwin.
2882         * doc/functions/fprintf.texi: Update.
2883         * doc/functions/printf.texi: Update.
2884         * doc/functions/snprintf.texi: Update.
2885         * doc/functions/sprintf.texi: Update.
2886         * doc/functions/vfprintf.texi: Update.
2887         * doc/functions/vprintf.texi: Update.
2888         * doc/functions/vsnprintf.texi: Update.
2889         * doc/functions/vsprintf.texi: Update.
2890         Reported by Eric Blake.
2891
2892 2007-05-06  Bruno Haible  <bruno@clisp.org>
2893
2894         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_ZERO]: Perform the
2895         padding ourselves for the floating-point directives.
2896         * m4/printf.m4 (gl_PRINTF_FLAG_ZERO): New macro.
2897         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_ZERO): New macro.
2898         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
2899         gl_PRINTF_FLAG_ZERO and test its result. Invoke
2900         gl_PREREQ_VASNPRINTF_FLAG_ZERO.
2901         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
2902         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
2903         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
2904         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
2905         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
2906         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2907         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
2908         * tests/test-snprintf-posix.h (test_function): Also check the width
2909         and some flags in the %f directive.
2910         * tests/test-sprintf-posix.h (test_function): Likewise.
2911         * tests/test-vasnprintf-posix.c (test_function): Likewise.
2912         * tests/test-vasprintf-posix.c (test_function): Likewise.
2913         * doc/functions/fprintf.texi: Update.
2914         * doc/functions/printf.texi: Update.
2915         * doc/functions/snprintf.texi: Update.
2916         * doc/functions/sprintf.texi: Update.
2917         * doc/functions/vfprintf.texi: Update.
2918         * doc/functions/vprintf.texi: Update.
2919         * doc/functions/vsnprintf.texi: Update.
2920         * doc/functions/vsprintf.texi: Update.
2921
2922 2007-05-06  Bruno Haible  <bruno@clisp.org>
2923
2924         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_GROUPING]: Don't
2925         pass the ' flag character to sprintf or snprintf.
2926         * m4/printf.m4 (gl_PRINTF_FLAG_GROUPING): New macro.
2927         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_GROUPING): New macro.
2928         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
2929         gl_PRINTF_FLAG_GROUPING and test its result. Invoke
2930         gl_PREREQ_VASNPRINTF_FLAG_GROUPING.
2931         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
2932         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
2933         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
2934         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
2935         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
2936         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2937         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
2938         * tests/test-snprintf-posix.h (test_function): Also check the grouping
2939         flag.
2940         * tests/test-sprintf-posix.h (test_function): Likewise.
2941         * tests/test-vasnprintf-posix.c (test_function): Likewise.
2942         * tests/test-vasprintf-posix.c (test_function): Likewise.
2943         * doc/functions/fprintf.texi: Update.
2944         * doc/functions/printf.texi: Update.
2945         * doc/functions/snprintf.texi: Update.
2946         * doc/functions/sprintf.texi: Update.
2947         * doc/functions/vfprintf.texi: Update.
2948         * doc/functions/vprintf.texi: Update.
2949         * doc/functions/vsnprintf.texi: Update.
2950         * doc/functions/vsprintf.texi: Update.
2951
2952 2007-05-01  Bruno Haible  <bruno@clisp.org>
2953
2954         * tests/test-argp-2.sh (func_compare): Drop .exe suffix.
2955
2956 2007-05-03  Paul Eggert  <eggert@cs.ucla.edu>
2957
2958         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Use better
2959         comment for D_INO_IN_DIRENT.  Problem reported by James Youngman.
2960
2961 2007-05-02  Paul Eggert  <eggert@cs.ucla.edu>
2962
2963         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Test whether
2964         readdir returns garbage in d_ino.  Problem reported by Kaz Sasayama in
2965         <http://lists.gnu.org/archive/html/bug-gnulib/2007-05/msg00021.html>.
2966
2967 2007-05-02  Sergey Poznyakoff  <gray@gnu.org.ua>
2968
2969         * lib/argp-help.c (struct hol_entry): New member `ord'.
2970         (HOL_ENTRY_PTRCMP): Use ord for comparison
2971         (hol_sort): Initialize ord.
2972
2973 2007-05-01  Bruno Haible  <bruno@clisp.org>
2974
2975         * doc/functions/_Exit_C99.texi: Renamed from doc/functions/_Exit.texi.
2976         Reported by Eric Blake.
2977         * doc/gnulib.texi (Function Substitutes): Update.
2978
2979 2007-05-01  Bruno Haible  <bruno@clisp.org>
2980
2981         * doc/functions.texi: Remove file, now redundant through
2982         doc/functions/*.texi.
2983
2984 2007-05-01  Bruno Haible  <bruno@clisp.org>
2985
2986         * modules/argp (Depends-on): Add sleep.
2987
2988 2007-05-01  Bruno Haible  <bruno@clisp.org>
2989
2990         * modules/sleep-tests: New file.
2991         * tests/test-sleep.c: New file.
2992
2993         * modules/sleep: New file.
2994         * lib/sleep.c: New file.
2995         * m4/sleep.m4: New file.
2996         * lib/unistd_.h (sleep): New declaration.
2997         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_SLEEP,
2998         HAVE_SLEEP.
2999         * modules/unistd (Makefile.am): Substitute GNULIB_SLEEP, HAVE_SLEEP.
3000         * doc/functions/sleep.texi: Document the sleep module.
3001
3002 2007-05-01  Bruno Haible  <bruno@clisp.org>
3003
3004         * lib/sigprocmask.h: Remove file.
3005         * lib/signal_.h: Incorporate the previous contents of sigprocmask.h.
3006         * lib/sigprocmask.c: Include <signal.h> instead of sigprocmask.h.
3007         * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Substitute GNULIB_SIGPROCMASK,
3008         HAVE_POSIX_SIGNALBLOCKING, HAVE_SIGSET_T.
3009         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Require
3010         gl_SIGNAL_H_DEFAULTS. Set HAVE_POSIX_SIGNALBLOCKING as a shell variable.
3011         (gl_PREREQ_SIGPROCMASK): Require gl_SIGNAL_H_DEFAULTS. Set
3012         HAVE_SIGSET_T as a shell variable.
3013         * modules/signal (Makefile.am): Substitute GNULIB_SIGPROCMASK,
3014         HAVE_POSIX_SIGNALBLOCKING, HAVE_SIGSET_T into signal.h.
3015         * modules/sigprocmask (Files): Remove lib/sigprocmask.h.
3016         (Depends-on): Add signal. Remove verify.
3017         (configure.ac): Invoke gl_SIGNAL_MODULE_INDICATOR.
3018         (Include): Mention <signal.h> instead of sigprocmask.h.
3019         * NEWS: Mention the change.
3020         * lib/fatal-signal.c: Don't include sigprocmask.h.
3021
3022 2007-05-01  Bruno Haible  <bruno@clisp.org>
3023
3024         * modules/signal: New file.
3025         * lib/signal_.h: New file.
3026         * m4/signal_h.m4: New file.
3027
3028 2007-05-01  Bruno Haible  <bruno@clisp.org>
3029
3030         * lib/wctype_.h: Test HAVE_ISWCNTRL at configure time.
3031         * m4/wctype.m4 (gl_WCTYPE_H): Substitute HAVE_ISWCNTRL.
3032         * modules/wctype (Makefile.am): Substitute HAVE_ISWCNTRL instead of
3033         HAVE_WCTYPE_CTMP_BUG into wctype.h.
3034
3035 2007-05-01  Bruno Haible  <bruno@clisp.org>
3036
3037         * lib/sys_stat_.h: Test HAVE_LSTAT, HAVE_DECL_MKDIR, HAVE_IO_H at
3038         configure time.
3039         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Substitute HAVE_LSTAT,
3040         HAVE_DECL_MKDIR, HAVE_IO_H via AC_SUBST.
3041         * modules/sys_stat (Makefile.am): Substitute their values into
3042         sys/stat.h.
3043
3044 2007-05-01  Bruno Haible  <bruno@clisp.org>
3045
3046         * lib/glob_.h: Test HAVE_SYS_CDEFS_H at configure time.
3047         * m4/glob.m4 (gl_PREREQ_GLOB): Substitute HAVE_SYS_CDEFS_H via AC_SUBST.
3048         * modules/glob (Makefile.am): Put HAVE_SYS_CDEFS_H value into glob.h.
3049
3050 2007-05-01  Bruno Haible  <bruno@clisp.org>
3051
3052         * doc/header/assert.texi: Undo last change: don't mention the gnulib
3053         'assert' module here.
3054
3055 2007-05-01  Bruno Haible  <bruno@clisp.org>
3056
3057         * doc/functions/*.texi: New files.
3058         * doc/functions/google-ranking.txt: New file.
3059         * doc/gnulib.texi (Function Substitutes): New chapter.
3060         (ctime, inet_ntoa): Remove sections.
3061         * doc/ctime.texi: Remove file.
3062         * doc/inet_ntoa.texi: Remove file.
3063         * doc/Makefile (gnulib.info, gnulib.html, gnulib.dvi): Update
3064         dependencies.
3065         (%.info): New rule, specifying a --reference-limit.
3066
3067 2007-05-01  Bruno Haible  <bruno@clisp.org>
3068
3069         * MODULES.html.sh (posix_functions): Remove 'exec', 'toc'.
3070
3071 2007-05-01  Bruno Haible  <bruno@clisp.org>
3072
3073         * modules/mkdir (Depends-on): Add sys_stat, because sys_stat provides
3074         the portability of 'mkdir' to mingw systems.
3075
3076 2007-05-01  Bruno Haible  <bruno@clisp.org>
3077
3078         * doc/headers/google-ranking.txt: New file.
3079
3080 2007-04-30  Eric Blake  <ebb9@byu.net>
3081
3082         Prefer fseeko to fseek.
3083         * modules/getpass (Depends-on): Add fseeko.
3084         * lib/getpass.c (getpass): Use fseeko, not fseek.
3085
3086 2007-04-30  Sergey Poznyakoff  <gray@gnu.org.ua>
3087
3088         * lib/argp-help.c (hol_entry_cmp): Option sorting algorithm
3089         assumes the sorting is stable, while most qsort implementations
3090         are not.  Use argument addresses to ensure they never compare as
3091         equal.
3092
3093         * tests/test-argp-2.sh (usage-indent test): Fix output
3094         (func_compare): Restore diff options
3095         * tests/test-argp.c: Restore #include "progname.h"
3096
3097 2007-04-29  Bruno Haible  <bruno@clisp.org>
3098
3099         * m4/printf.m4 (gl_VSNPRINTF_ZEROSIZE_C99): New macro.
3100         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
3101         gl_VSNPRINTF_ZEROSIZE_C99. Test gl_cv_func_vsnprintf_zerosize_c99.
3102         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
3103         * modules/snprintf-posix-tests (Files): Add tests/test-snprintf.c.
3104         (configure.ac): Define CHECK_SNPRINTF_POSIX.
3105         (TESTS, check_PROGRAMS): Add test-snprintf.
3106         * modules/vsnprintf-posix-tests (Files): Add tests/test-vsnprintf.c.
3107         (configure.ac): Define CHECK_VSNPRINTF_POSIX.
3108         (TESTS, check_PROGRAMS): Add test-vsnprintf.
3109         * tests/test-snprintf.c (main) [!CHECK_SNPRINTF_POSIX]: Disable
3110         assertions that fail on HP-UX, OSF/1, or IRIX.
3111         * tests/test-vsnprintf.c (main) [!CHECK_VSNPRINTF_POSIX]: Likewise.
3112
3113 2007-04-29  Bruno Haible  <bruno@clisp.org>
3114
3115         * MODULES.html.sh (posix_functions): Remove 'contents'.
3116
3117 2007-04-29  Karl Berry  <karl@gnu.org>
3118
3119         * config/srclist.txt (gendocs_template_min): new entry.
3120
3121 2007-04-29  Bruno Haible  <bruno@clisp.org>
3122
3123         Work around fpurge bug on BSD systems.
3124         * modules/fpurge (Makefile.am): Compile fpurge.c unconditionally.
3125         * m4/fpurge.m4 (gl_FUNC_FPURGE): Don't invoke AC_LIBOBJ.
3126         * lib/fpurge.h (fpurge): Don't handle __fpurge wrapper here. Define
3127         fpurge to rpl_fpurge if the system already has this function.
3128         * lib/fpurge.c (fpurge): Handle also the __fpurge wrapper case and
3129         the case where the system already has this function. Correct invariants
3130         on BSD systems.
3131         * lib/fseeko.c (rpl_fseeko): Update recognition of preceding fflush on
3132         BSD systems.
3133
3134 2007-04-29  Sergey Poznyakoff  <gray@gnu.org.ua>
3135
3136         * lib/argp-help.c (hol_cluster_cmp): Reverse comparison.  Change
3137         proposed by Sven Verdoolaege.
3138
3139         * tests/test-argp.c: Fix option ordering.  Test deeply clustered
3140         options.
3141         * tests/test-argp-2.sh (func_compare): Use diff instead of cmp.
3142         (usage and help tests): Update
3143
3144 2007-04-29  Bruno Haible  <bruno@clisp.org>
3145
3146         * tests/test-fflush.c (main): Use a file of size 17, not 10.
3147         Print more information in case of failure. Disable a test on BeOS.
3148
3149 2007-04-29  Bruno Haible  <bruno@clisp.org>
3150
3151         * tests/**/test-*.[hc] (ASSERT): Use fprintf to show the line number.
3152         This helps debugging on systems on which no gdb is available.
3153
3154 2007-04-29  Bruno Haible  <bruno@clisp.org>
3155
3156         * lib/freading.h: Improve comments.
3157         * lib/fwriting.h: Likewise.
3158         * tests/test-freading.c (main): Don't check freading immediately after
3159         repositioning. Needed for glibc.
3160
3161 2007-04-29  Bruno Haible  <bruno@clisp.org>
3162
3163         * lib/freading.c (freading): Trivial simplification.
3164
3165 2007-04-28  Bruno Haible  <bruno@clisp.org>
3166
3167         * tests/test-fwriting.c (main): Also test the interaction between
3168         fflush and fwriting.
3169         * modules/fwriting-tests (Depends-on): Add fflush.
3170
3171         * tests/test-freading.c (main): Also test the interaction between
3172         fflush and freading.
3173         * modules/freading-tests (Depends-on): Add fflush.
3174
3175 2007-04-28  Bruno Haible  <bruno@clisp.org>
3176
3177         * lib/stdio_.h (fseek, ftell): Provide link warnings suggesting to use
3178         fseeko and ftello.
3179         Suggested by Eric Blake.
3180
3181 2007-04-28  Jim Meyering  <jim@meyering.net>
3182
3183         Avoid false-negative in gl_STDINT_H's C99 conformance test.
3184         * m4/stdint.m4 (gl_STDINT_H): When checking whether stdint.h conforms
3185         to C99, include all of gl_STDINT_INCLUDES, not just <stddef.h>.
3186
3187 2007-04-27  Eric Blake  <ebb9@byu.net>
3188
3189         * doc/headers/assert.texi (assert.h): Document assert module use.
3190
3191 2007-04-27  Bruno Haible  <bruno@clisp.org>
3192
3193         * doc/headers/*.texi: New files.
3194         * doc/gnulib.texi (Header File Substitutes): New chapter.
3195         * doc/Makefile (gnulib.info, gnulib.html, gnulib.dvi): Specify
3196         dependencies.
3197         (standards.info ,standards.html, standards.dvi): Update dependencies.
3198         (mostlyclean, clean): New targets.
3199
3200 2007-04-27  Bruno Haible  <bruno@clisp.org>
3201
3202         * lib/sysexits_.h: Renamed from lib/sysexit_.h.
3203         * modules/sysexits (Files, Makefile.am): Update.
3204
3205         * lib/sys_socket_.h: Renamed from lib/socket_.h.
3206         * modules/sys_socket (Files, Makefile.am): Update.
3207
3208         * lib/sys_stat_.h: Renamed from lib/stat_.h.
3209         * modules/sys_stat (Files, Makefile.am): Update.
3210
3211 2007-04-27  Eric Blake  <ebb9@byu.net>
3212
3213         * lib/freading.h: Improve comments.
3214         * lib/fwriting.h: Likewise.
3215         * lib/fflush.c: Likewise.
3216
3217         Fix closein for mingw.
3218         * modules/closein-tests: Add tests for closein.
3219         * tests/test-closein.c: New file.
3220         * tests/test-closein.sh: Likewise.
3221         * lib/unistd_.h [!SEEK_CUR]: Mingw also needs stdlib.h for _exit.
3222         * lib/closein.c (close_stdin): Don't fflush non-seekable streams.
3223
3224 2007-04-27  Bruno Haible  <bruno@clisp.org>
3225
3226         * lib/inttypes_.h [_DECC]: Don't use #include_next if the compiler
3227         version is < 6.
3228         * lib/math_.h [__DECC]: Likewise.
3229         * lib/stdio_.h [__DECC]: Likewise.
3230         * lib/stdlib_.h [__DECC]: Likewise.
3231         * lib/string_.h [__DECC]: Likewise.
3232         * lib/time_.h [__DECC]: Likewise.
3233         * lib/wchar_.h [__DECC]: Likewise.
3234         * lib/wctype_.h [__DECC]: Likewise.
3235
3236 2007-04-27  Bruno Haible  <bruno@clisp.org>
3237
3238         * tests/test-fbufmode.c (main): Relax test, to avoid failure on mingw.
3239
3240 2007-04-27  Bruno Haible  <bruno@clisp.org>
3241
3242         * lib/fflush.c: Add comments.
3243         * modules/fpurge-tests (Depends-on): Add fflush.
3244         * modules/freadable-tests (Depends-on): Likewise.
3245         * modules/fwritable-tests (Depends-on): Likewise.
3246
3247 2007-04-27  Charles Wilson  <libtool@cwilson.fastmail.fm>
3248
3249         * m4/argz.m4 (gl_FUNC_ARGZ): Use !HAVE_WORKING_ARGZ instead of
3250         SYSTEM_ARGZ_IS_BROKEN.  Also, minor stylistic improvements.
3251         Report by Bruno Haible <bruno@clisp.org>.
3252
3253 2007-04-26  Eric Blake  <ebb9@byu.net>
3254
3255         Fix fflush on mingw.
3256         * modules/fflush (Depends-on): Add freading.
3257         * lib/fflush.c (rpl_fflush): Use freading to avoid losing buffered
3258         but unread data.
3259
3260 2007-04-26  Eric Blake  <ebb9@byu.net>
3261         and Bruno Haible  <bruno@clisp.org>
3262
3263         Implement freading and fwriting.
3264         * lib/freading.c: New file.
3265         * lib/freading.h: Likewise.
3266         * m4/freading.m4: Likewise.
3267         * modules/freading: Likewise.
3268         * modules/freading-tests: Likewise.
3269         * tests/test-freading.c: Likewise.
3270         * lib/fwriting.c: New file.
3271         * lib/fwriting.h: Likewise.
3272         * m4/fwriting.m4: Likewise.
3273         * modules/fwriting: Likewise.
3274         * modules/fwriting-tests: Likewise.
3275         * tests/test-fwriting.c: Likewise.
3276         * MODULES.html.sh (File stream based Input/Output): Mention them.
3277
3278 2007-04-26  Bruno Haible  <bruno@clisp.org>
3279
3280         * lib/stdio_.h (fseeko, ftello): Check that off_t has the same size as
3281         'long' when we assume it.
3282         Suggested by Eric Blake.
3283
3284 2007-04-26  Bruno Haible  <bruno@clisp.org>
3285
3286         Ensure fseeko, ftello are declared on glibc systems.
3287         * modules/fflush (configure.ac-early): Require AC_FUNC_FSEEKO.
3288         * modules/fseeko (configure.ac-early): Likewise.
3289         * modules/ftello (configure.ac-early): Likewise.
3290         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Don't define HAVE_FSEEKO, rely on
3291         AC_FUNC_FSEEKO for this.
3292         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Inline gl_CHECK_FSEEKO.
3293         (gl_CHECK_FSEEKO): Remove macro.
3294
3295 2007-04-26  Bruno Haible  <bruno@clisp.org>
3296
3297         * tests/test-fflush.c (main): Also check the ftell result after
3298         fflush and fseek/fseeko.
3299         * lib/fflush.c (rpl_fflush): For BSD implementations, update the
3300         file descriptor position cache in the stream.
3301         * lib/fseeko.c (rpl_fseeko): Likewise.
3302
3303 2007-04-26  Bruno Haible  <bruno@clisp.org>
3304
3305         * modules/fflush-tests (Depends-on): Add fseeko.
3306
3307 2007-04-25  Charles Wilson  <libtool@cwilson.fastmail.fm>
3308             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3309
3310         * lib/argz_.h: ensure error_t definition is obtained in same
3311         mechanism system argz.h would have.
3312         * m4/argz.m4 (gl_FUNC_ARGZ): add new test to check if $host's
3313         argz facilities are known bad.  Err on the side of caution if
3314         cross-compiling.
3315
3316 2007-04-25  Eric Blake  <ebb9@byu.net>
3317
3318         * lib/fpurge.c (includes): Use stdlib.h for free.
3319         * tests/test-fflush.c (main): Also test fflush-fseeko.
3320
3321 2007-04-25  Bruno Haible  <bruno@clisp.org>
3322
3323         Make fflush+fseek POSIX-compliant on FreeBSD and MacOS X.
3324         * lib/fseeko.c: New file.
3325         * lib/stdio_.h: Include <sys/types.h> when off_t is needed.
3326         (fseeko, fseek): Define to replacements if REPLACE_FFLUSH.
3327         * m4/fseeko.m4 (gl_CHECK_FSEEKO): New macro, extracted from
3328         gl_FUNC_FSEEKO.
3329         (gl_FUNC_FSEEKO): Invoke it.
3330         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Arrange to compile fseeko.c. Invoke
3331         gl_CHECK_FSEEKO. Define HAVE_FSEEKO.
3332         * modules/fflush (Files): Add lib/fseeko.c, m4/fseeko.m4.
3333
3334 2007-04-25  Bruno Haible  <bruno@clisp.org>
3335
3336         * modules/fflush (Depends-on): Add ftello.
3337
3338 2007-04-25  Bruno Haible  <bruno@clisp.org>
3339
3340         * modules/ftello-tests: New file.
3341         * tests/test-ftello.c: New file.
3342
3343         * modules/ftello: New file.
3344         * m4/ftello.m4: New file.
3345         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FTELLO,
3346         HAVE_FTELLO.
3347         * lib/stdio_.h (ftello): New declaration.
3348         * modules/stdio (Makefile.am): Substitute also GNULIB_FTELLO,
3349         HAVE_FTELLO.
3350
3351 2007-04-25  Bruno Haible  <bruno@clisp.org>
3352
3353         * modules/fseeko-tests: New file.
3354         * tests/test-fseeko.c: New file.
3355
3356         * modules/fseeko: New file.
3357         * m4/fseeko.m4: New file.
3358         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FSEEKO,
3359         HAVE_FSEEKO.
3360         * lib/stdio_.h (fseeko): New declaration.
3361         * modules/stdio (Makefile.am): Substitute also GNULIB_FSEEKO,
3362         HAVE_FSEEKO.
3363
3364 2007-04-25  Bruno Haible  <bruno@clisp.org>
3365
3366         * lib/stdio_.h (fflush): Add support for GNULIB_POSIXCHECK.
3367
3368 2007-04-25  Bruno Haible  <bruno@clisp.org>
3369
3370         * lib/unistd_.h: Include <stdio.h> if needed to get the SEEK_* macros.
3371         * tests/test-stdio.c: Check that the various SEEK_* macros are defined.
3372         * tests/test-unistd.c: Likewise.
3373         * tests/test-fcntl.c: Likewise.
3374
3375 2007-04-23  Eric Blake  <ebb9@byu.net>
3376
3377         * lib/fflush.c: Fix missing include.
3378         Reported by Bruno Haible.
3379
3380 2007-04-23  Bruno Haible  <bruno@clisp.org>
3381
3382         * lib/fpurge.c (fpurge) [glibc, BSD]: Free a malloc()ed ungetc buffer.
3383         Reported by Eric Blake.
3384
3385 2007-04-23  Bruno Haible  <bruno@clisp.org>
3386
3387         * lib/fbufmode.c (fbufmode): Port to Solaris/SPARC64.
3388
3389 2007-04-23  Bruno Haible  <bruno@clisp.org>
3390
3391         * lib/fseterr.c (fseterr): Don't hardcode the value of _IOERR.
3392
3393 2007-04-23  Bruno Haible  <bruno@clisp.org>
3394
3395         * tests/test-fbufmode.c (main): Be prepared to a failure of setvbuf.
3396         Needed on HP-UX 11.
3397
3398 2007-04-16  Eric Blake  <ebb9@byu.net>
3399
3400         Make fflush rely on fpurge.
3401         * lib/fflush.c (rpl_fflush): Rely on fpurge module, rather than
3402         open coding all variants.
3403         * modules/fflush (Depends-on): Add fpurge and unistd.
3404         * modules/fflush-tests (Depends-on): Unistd is no longer extra.
3405         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Simplify.
3406
3407         Fix --with-tests compilation on cygwin.
3408         * modules/argmatch-tests (Makefile.am): List gnulib library first
3409         in LDADD.
3410         * modules/argp-tests (Makefile.am): Likewise.
3411         * modules/array-list-tests (Makefile.am): Likewise.
3412         * modules/array-oset-tests (Makefile.am): Likewise.
3413         * modules/avltree-list-tests (Makefile.am): Likewise.
3414         * modules/avltree-oset-tests (Makefile.am): Likewise.
3415         * modules/avltreehash-list-tests (Makefile.am): Likewise.
3416         * modules/carray-list-tests (Makefile.am): Likewise.
3417         * modules/dirname-tests (Makefile.am): Likewise.
3418         * modules/frexp-tests (Makefile.am): Likewise.
3419         * modules/isnanl-tests (Makefile.am): Likewise.
3420         * modules/linked-list-tests (Makefile.am): Likewise.
3421         * modules/linkedhash-list-tests (Makefile.am): Likewise.
3422         * modules/lock-tests (Makefile.am): Likewise.
3423         * modules/rbtree-list-tests (Makefile.am): Likewise.
3424         * modules/rbtree-oset-tests (Makefile.am): Likewise.
3425         * modules/rbtreehash-list-tests (Makefile.am): Likewise.
3426         * modules/tls-tests (Makefile.am): Likewise.
3427         * modules/tsearch-tests (Makefile.am): Likewise.
3428         * modules/xvasprintf-tests (Makefile.am): Likewise.
3429
3430         Fix fpurge for cygwin.
3431         * lib/fpurge.c (fpurge): Fix order of operation flub, and return a
3432         value.
3433         * modules/fpurge-tests (Depends-on): Clean up trash.
3434
3435 2007-04-16  Simon Josefsson  <simon@josefsson.org>
3436
3437         * lib/gc-libgcrypt.c (gc_hash_open): Shut up compiler warnings.
3438
3439         * m4/autobuild.m4: Re-indent.
3440
3441 2007-04-13  Bruno Haible  <bruno@clisp.org>
3442
3443         * modules/fpurge-tests: New file.
3444         * tests/test-fpurge.c: New file.
3445
3446         * modules/fpurge: New file.
3447         * lib/fpurge.h: New file.
3448         * lib/fpurge.c: New file.
3449         * m4/fpurge.m4: New file.
3450
3451 2007-04-13  Bruno Haible  <bruno@clisp.org>
3452
3453         * modules/fbufmode-tests: New file.
3454         * tests/test-fbufmode.c: New file.
3455
3456         * modules/fbufmode: New file.
3457         * lib/fbufmode.h: New file.
3458         * lib/fbufmode.c: New file.
3459         * m4/fbufmode.m4: New file.
3460
3461 2007-04-13  Bruno Haible  <bruno@clisp.org>
3462
3463         * modules/fwritable-tests: New file.
3464         * tests/test-fwritable.c: New file.
3465
3466         * modules/fwritable: New file.
3467         * lib/fwritable.h: New file.
3468         * lib/fwritable.c: New file.
3469         * m4/fwritable.m4: New file.
3470
3471 2007-04-13  Bruno Haible  <bruno@clisp.org>
3472
3473         * modules/freadable-tests: New file.
3474         * tests/test-freadable.c: New file.
3475
3476         * modules/freadable: New file.
3477         * lib/freadable.h: New file.
3478         * lib/freadable.c: New file.
3479         * m4/freadable.m4: New file.
3480
3481 2007-04-13  Bruno Haible  <bruno@clisp.org>
3482
3483         * modules/fflush-tests (Makefile.am): Remove EXTRA_DIST. Augment
3484         MOSTLYCLEANFILES.
3485
3486 2007-04-13  Paul Eggert  <eggert@cs.ucla.edu>
3487
3488         * build-aux/bootstrap (gnulib_tool_option_extras): New var, used by
3489         gzip bootstrap.conf to avoid dragging in i18n machinery.
3490         (gnulib_tool_option): Use it.
3491
3492 2007-04-13  Bruno Haible  <bruno@clisp.org>
3493
3494         * tests/test-vasnprintf-posix.c (test_function): Add tests for %f and
3495         %F directives.
3496         * tests/test-vasprintf-posix.c (test_function): Likewise.
3497         * tests/test-snprintf-posix.h (test_function): Likewise.
3498         * tests/test-sprintf-posix.h (test_function): Likewise.
3499         * tests/test-fprintf-posix.h (test_function): Likewise.
3500         * tests/test-printf-posix.h (test_function): Likewise.
3501         * tests/test-fprintf-posix.out: Likewise.
3502
3503 2007-04-13  Bruno Haible  <bruno@clisp.org>
3504
3505         * modules/lock-tests (configure.ac): For LIBSCHED, try also -lposix4.
3506         * modules/tls-tests (configure.ac): Likewise.
3507         Reported by Arto C. Nirkko <anirkko@insel.ch>.
3508
3509 2007-04-13  Bruno Haible  <bruno@clisp.org>
3510
3511         * lib/tls.c (glthread_tls_get): Fix return type.
3512         Patch by Arto C. Nirkko <anirkko@insel.ch>.
3513
3514 2007-04-12  Eric Blake  <ebb9@byu.net>
3515
3516         * modules/gettime (Depends-on): Remove gettime.
3517         Reported by Dmitry V. Levin.
3518
3519 2007-04-12  Bruno Haible  <bruno@clisp.org>
3520
3521         * modules/fflush (Include): Mention <stdio.h>.
3522         * modules/strtoimax (Include): Mention <inttypes.h>.
3523         * modules/strtoumax (Include): Likewise.
3524
3525 2007-04-12  Eric Blake  <ebb9@byu.net>
3526
3527         * .cvsignore: New file.
3528         * .gitignore: Likewise.
3529
3530 2007-04-12  Bruno Haible  <bruno@clisp.org>
3531
3532         * modules/iconv-tests (test_iconv_LDADD): Mention -liconv after LDADD,
3533         not before, since $(LDADD) often contains libgnu.a.
3534         * modules/striconv-tests (test_striconv_LDADD): Likewise.
3535         * modules/striconveh-tests (test_striconveh_LDADD): Likewise.
3536         * modules/striconveha-tests (test_striconveha_LDADD): Likewise.
3537         Needed on Cygwin.
3538
3539 2007-04-12  Eric Blake  <ebb9@byu.net>
3540
3541         Work around glibc's failure to flush stdin on fclose.
3542         * lib/closein.c (close_stdin): Flush stdin before closing.
3543
3544         Work around glibc's failure to reset seekable stdin on exit.
3545         * modules/closein: New module.
3546         * lib/closein.c: New file.
3547         * lib/closein.h: Likewise.
3548         * m4/closein.m4: Likewise.
3549         * MODULES.html.sh (File stream based Input/Output): Document it.
3550
3551 2007-04-12  Simon Josefsson  <simon@josefsson.org>
3552
3553         * gnulib-tool: Rename generated 'autobuild' script to
3554         'do-autobuild' in --create-megatestdir output.
3555
3556         * doc/gnulib.texi (Build robot for gnulib): Fix.
3557
3558 2007-04-12  Simon Josefsson  <simon@josefsson.org>
3559
3560         * modules/sysexits (Depends-on): Add absolute-header.
3561
3562 2007-04-12  Eric Blake  <ebb9@byu.net>
3563
3564         No need to preserve errno on success.
3565         * lib/fflush.c (rpl_fflush): Simplify errno tracking.
3566         Reported by Bruno Haible.
3567
3568 2007-04-12  Simon Josefsson  <simon@josefsson.org>
3569
3570         * MODULES.html.sh (Support for maintaining and releasing
3571         projects): Add autobuild.  Suggested by Eric Blake <ebb9@byu.net>.
3572
3573 2007-04-12  Simon Josefsson  <simon@josefsson.org>
3574
3575         * gnulib-tool (func_modules_add_dummy): Respect --avoid=dummy.
3576
3577 2007-04-12  Simon Josefsson  <simon@josefsson.org>
3578
3579         * modules/autobuild: New module.
3580
3581         * m4/autobuild.m4: New file.
3582
3583 2007-04-11  Bruno Haible  <bruno@clisp.org>
3584
3585         * lib/vasnprintf.c (VASNPRINTF): Implement the %F directive using the
3586         %f directive, if NEED_PRINTF_DIRECTIVE_F is defined.
3587         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_F): New macro.
3588         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_F): New macro.
3589         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
3590         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3591         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3592         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
3593         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3594         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3595         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Invoke
3596         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3597         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3598         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Invoke
3599         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3600         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3601         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Invoke
3602         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3603         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3604         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Invoke
3605         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3606         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3607         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Invoke
3608         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3609         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3610         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Invoke
3611         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3612         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3613         Reported by Eric Blake.
3614
3615 2007-04-11  Bruno Haible  <bruno@clisp.org>
3616
3617         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Fix test. It always failed.
3618
3619 2007-04-10  Bruno Haible  <bruno@clisp.org>
3620
3621         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct result
3622         for NaN and Infinity. Needed on FreeBSD 6.1.
3623         * tests/test-vasnprintf-posix.c (test_function): Undo last change
3624         regarding results for "%010a" of Infinity and NaN.
3625         * tests/test-vasprintf-posix.c (test_function): Likewise.
3626         * tests/test-snprintf-posix.h (test_function): Likewise.
3627         * tests/test-sprintf-posix.h (test_function): Likewise.
3628         * tests/test-fprintf-posix.h (test_function): Likewise.
3629         * tests/test-printf-posix.h (test_function): Likewise.
3630         * tests/test-fprintf-posix.out: Likewise.
3631
3632 2007-04-10  Bruno Haible  <bruno@clisp.org>
3633
3634         * modules/locale-tests: New file.
3635         * tests/test-locale.c: New file.
3636
3637         * modules/locale: New file.
3638         * lib/locale_.h: New file.
3639         * m4/locale_h.m4: New file.
3640
3641 2007-04-10  Paul Eggert  <eggert@cs.ucla.edu>
3642             Bruno Haible  <bruno@clisp.org>
3643
3644         * m4/signbit.m4 (gl_SIGNBIT): When the sign bit position could not
3645         be determined, test for availability of the copysignf, copysign,
3646         copysignl functions.
3647         * lib/signbitf.c (gl_signbitf): Use copysignf if available in libc.
3648         * lib/signbitd.c (gl_signbitd): Use copysign if available in libc.
3649         * lib/signbitl.c (gl_signbitl): Use copysignl if available in libc.
3650
3651 2007-04-09  Eric Blake  <ebb9@byu.net>
3652
3653         * lib/stdio_.h [REPLACE_FFLUSH]: Declare rpl_fflush.
3654         * modules/stdio (Makefile.am): Support fflush.
3655         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
3656         * modules/fflush: New file.
3657         * lib/fflush.c: Likewise.
3658         * m4/fflush.m4: Likewise.
3659         * modules/fflush-tests: New test.
3660         * tests/test-fflush.c: Likewise.
3661         * MODULES.html.sh (Input/output <stdio.h>): Document new module.
3662
3663 2007-04-06  Bruno Haible  <bruno@clisp.org>
3664
3665         * lib/vasnprintf.c: Include <math.h>. Don't include float+.h.
3666         (VASNPRINTF): Use signbit for faster determination whether to print a
3667         minus sign.
3668         * modules/vasnprintf (Files): Remove lib/float+.h.
3669         * modules/fprintf-posix (Depends-on): Add signbit.
3670         * modules/snprintf-posix (Depends-on): Likewise.
3671         * modules/sprintf-posix (Depends-on): Likewise.
3672         * modules/vasnprintf-posix (Depends-on): Likewise.
3673         * modules/vasprintf-posix (Depends-on): Likewise.
3674         * modules/vfprintf-posix (Depends-on): Likewise.
3675         * modules/vsnprintf-posix (Depends-on): Likewise.
3676         * modules/vsprintf-posix (Depends-on): Likewise.
3677
3678 2007-04-06  Bruno Haible  <bruno@clisp.org>
3679
3680         * tests/test-frexp.c (main): Test also the sign bit of zero results.
3681         * tests/test-frexpl.c (main): Likewise.
3682         * tests/test-ldexpl.c (main): Likewise.
3683         * modules/frexp-tests (Depends-on): Add signbit.
3684         * modules/frexpl-tests (Depdends-on): Likewise.
3685         * modules/ldexpl-tests (Depdends-on): Likewise.
3686
3687 2007-04-06  Bruno Haible  <bruno@clisp.org>
3688
3689         * modules/signbit-tests: New file.
3690         * tests/test-signbit.c: New file.
3691
3692         * modules/signbit: New file.
3693         * lib/signbitf.c: New file.
3694         * lib/signbitd.c: New file.
3695         * lib/signbitl.c: New file.
3696         * m4/signbit.m4: New file.
3697         * lib/math_.h (gl_signbitf, gl_signbitd, gl_signbitl): New declarations.
3698         (signbit): New macro.
3699         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_SIGNBIT and
3700         REPLACE_SIGNBIT.
3701         * modules/math (Makefile.am) Substibute also GNULIB_SIGNBIT and
3702         REPLACE_FREXPL into math.h.
3703
3704 2007-04-06  Bruno Haible  <bruno@clisp.org>
3705
3706         * modules/isnanf-nolibm-tests: New file.
3707         * tests/test-isnanf.c: New file.
3708
3709         * modules/isnanf-nolibm: New file.
3710         * lib/isnanf.h: New file.
3711         * lib/isnanf.c: New file.
3712         * lib/isnan.c: Consider the USE_FLOAT macro.
3713         * m4/isnanf.m4: New file.
3714
3715 2007-04-06  Bruno Haible  <bruno@clisp.org>
3716
3717         * modules/gettext-h (configure.ac): AC_SUBST LIBINTL and LTLIBINTL.
3718         (Link): New section.
3719
3720         * modules/canonicalize-lgpl-tests (Makefile.am): Undo last change.
3721
3722 2007-04-06  Bruno Haible  <bruno@clisp.org>
3723
3724         Assume the 'long double' type.
3725         * m4/longdouble.m4: Remove file.
3726         * config/srclist.txt: Don't mention longdouble.m4.
3727         * lib/allocsa.h: Assume HAVE_LONG_DOUBLE to be true.
3728         * lib/float+.h: Likewise.
3729         * lib/frexp.c: Likewise.
3730         * lib/printf-args.h: Likewise.
3731         * lib/printf-args.c: Likewise.
3732         * lib/printf-frexp.c: Likewise.
3733         * lib/printf-parse.c: Likewise.
3734         * lib/vasnprintf.c: Likewise.
3735         * m4/allocsa.m4: Remove gt_TYPE_LONGDOUBLE invocation.
3736         * m4/intl.m4: Likewise.
3737         * m4/isnanl.m4: Likewise.
3738         * m4/printf.m4: Likewise.
3739         * m4/printf-frexpl.m4: Likewise.
3740         * m4/vasnprintf.m4: Likewise.
3741         * modules/allocsa (Files): Remove m4/longdouble.m4.
3742         * modules/gettext (Files): Likewise.
3743         * modules/relocatable-prog-wrapper (Files): Likewise.
3744         * modules/vasnprintf (Files): Likewise.
3745         * modules/isnanl (Files): Likewise.
3746         (Include): Simplify.
3747         * modules/isnanl-nolibm (Files): Remove m4/longdouble.m4.
3748         (Include): Simplify.
3749         * modules/printf-frexpl (Files): Remove m4/longdouble.m4.
3750         (Include): Simplify.
3751         * modules/snprintf-posix-tests (Files): Remove m4/longdouble.m4.
3752         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3753         * modules/sprintf-posix-tests (Files): Remove m4/longdouble.m4.
3754         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3755         * modules/vasnprintf-posix-tests (Files): Remove m4/longdouble.m4.
3756         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3757         * modules/vasprintf-posix-tests (Files): Remove m4/longdouble.m4.
3758         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3759         * modules/vsnprintf-posix-tests (Files): Remove m4/longdouble.m4.
3760         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3761         * modules/vsprintf-posix-tests (Files): Remove m4/longdouble.m4.
3762         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3763         * tests/test-isnanl-nolibm.c: Assume HAVE_LONG_DOUBLE to be true.
3764         * tests/test-isnanl.c: Likewise.
3765         * tests/test-snprintf-posix.h: Likewise.
3766         * tests/test-sprintf-posix.h: Likewise.
3767         * tests/test-vasnprintf-posix.c: Likewise.
3768         * tests/test-vasnprintf-posix2.c: Likewise.
3769         * tests/test-vasprintf-posix.c: Likewise.
3770
3771 2007-04-06  Bruno Haible  <bruno@clisp.org>
3772
3773         Fix problem with Compaq (ex-DEC) Desktop C compiler on Tru64.
3774         * lib/math_.h [__DECC]: Include the overridden include file through
3775         #include_next, outside the double-inclusion guard.
3776         * lib/stdio_.h [__DECC]: Likewise.
3777         * lib/stdlib_.h [__DECC]: Likewise.
3778         * lib/string_.h [__DECC]: Likewise.
3779         * lib/time_.h [__DECC]: Likewise.
3780         * lib/wchar_.h [__DECC]: Likewise.
3781         * lib/wctype_.h [__DECC]: Likewise.
3782         * lib/inttypes_.h [__DECC]: Likewise.
3783         Reported by Albert Chin <china@thewrittenword.com> in
3784         <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00088.html>.
3785
3786 2007-04-04  Eric Blake  <ebb9@byu.net>
3787
3788         * m4/stdint.m4 (gl_STDINT_H): Detect WINT_MAX bug in cygwin
3789         1.5.x.
3790
3791 2007-04-04  Bruno Haible  <bruno@clisp.org>
3792
3793         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct
3794         rounding. Don't assume that FreeBSD 6 and NetBSD 4 pass this test.
3795
3796 2007-04-04  Bruno Haible  <bruno@clisp.org>
3797
3798         * tests/test-vasnprintf-posix.c (test_function): Allow two possible
3799         results for "%010a" of Infinity and NaN.
3800         * tests/test-vasprintf-posix.c (test_function): Likewise.
3801         * tests/test-snprintf-posix.h (test_function): Likewise.
3802         * tests/test-sprintf-posix.h (test_function): Likewise.
3803         * tests/test-fprintf-posix.h (test_function): Remove these tests.
3804         * tests/test-printf-posix.h (test_function): Likewise.
3805         * tests/test-fprintf-posix.out: Update.
3806         Needed for FreeBSD 6.1.
3807
3808 2007-04-04  Bruno Haible  <bruno@clisp.org>
3809
3810         * DEPENDENCIES: Remove mentions of tar and gzip, since they are not
3811         directly used by the gnulib modules nor by gnulib-tool.
3812
3813 2007-04-04  Paul Eggert  <eggert@cs.ucla.edu>
3814
3815         * DEPENDENCIES: Give overall description of version dependency
3816         desirability.  Use more-typical names for apps.
3817         Add shell, coreutils, diffutils, grep, tar, gzip.
3818
3819 2007-04-04  Simon Josefsson  <simon@josefsson.org>
3820
3821         * MODULES.html.sh: Rename crypto modules.  Remove iconvme.
3822
3823 2007-04-04  Karl Berry  <karl@gnu.org>
3824
3825         * MODULES.html.sh (func_module): missing '.
3826
3827 2007-04-03  Bruno Haible  <bruno@clisp.org>
3828
3829         * modules/argmatch-tests (Makefile.am): New variable
3830         test_argmatch_LDADD.
3831         * modules/argp-tests (Makefile.am): New variable test_argp_LDADD.
3832         * modules/array-list-tests (Makefile.am): New variable
3833         test_array_list_LDADD.
3834         * modules/array-oset-tests (Makefile.am): New variable
3835         test_array_oset_LDADD.
3836         * modules/avltree-list-tests (Makefile.am): New variable
3837         test_avltree_list_LDADD.
3838         * modules/avltree-oset-tests (Makefile.am): New variable
3839         test_avltree_oset_LDADD.
3840         * modules/avltreehash-list-tests (Makefile.am): New variable
3841         test_avltreehash_list_LDADD.
3842         * modules/canonicalize-lgpl-tests (Makefile.am): New variable
3843         test_canonicalize_lgpl_LDADD.
3844         * modules/carray-list-tests (Makefile.am): New variable
3845         test_carray_list_LDADD.
3846         * modules/dirname-tests (Makefile.am): New variable
3847         test_dirname_LDADD.
3848         * modules/linked-list-tests (Makefile.am): New variable
3849         test_linked_list_LDADD.
3850         * modules/linkedhash-list-tests (Makefile.am): New variable
3851         test_linkedhash_list_LDADD.
3852         * modules/rbtree-list-tests (Makefile.am): New variable
3853         test_rbtree_list_LDADD.
3854         * modules/rbtree-oset-tests (Makefile.am): New variable
3855         test_rbtree_oset_LDADD.
3856         * modules/rbtreehash-list-tests (Makefile.am): New variable
3857         test_rbtreehash_list_LDADD.
3858         * modules/xvasprintf-tests (Makefile.am): New variable
3859         test_xvasprintf_LDADD.
3860         Reported by Eric Blake.
3861
3862 2007-04-03  Eric Blake  <ebb9@byu.net>
3863
3864         * DEPENDENCIES: Weaken m4 requirements.
3865
3866 2007-04-03  Bruno Haible  <bruno@clisp.org>
3867
3868         * modules/frexp-tests (configure.ac): Remove AC_SUBST.
3869         * modules/isnanl-tests (configure.ac): Likewise.
3870
3871 2007-04-03  Ben Pfaff  <blp@gnu.org>
3872
3873         * modules/iconv_open: Add $(srcdir)/ to source directory
3874         references in Makefile fragments that call gperf, to fix VPATH
3875         builds.
3876
3877 2007-04-03  Bruno Haible  <bruno@clisp.org>
3878
3879         * modules/ldexpl (Depends-on): Add isnanl, remove isnanl-nolibm.
3880         * lib/ldexpl.c: Undo last change.
3881
3882 2007-04-03  Bruno Haible  <bruno@clisp.org>
3883
3884         * modules/printf-frexpl (Depends-on): Undo last change.
3885         (Files): Add m4/ldexpl.m4.
3886
3887 2007-04-03  Bruno Haible  <bruno@clisp.org>
3888
3889         * m4/isnanl.m4 (gl_FUNC_ISNANL): Substitute ISNANL_LIBM.
3890         * modules/isnanl (Link): New section.
3891
3892         * m4/frexp.m4 (gl_FUNC_FREXP): Substitute FREXP_LIBM.
3893         * modules/frexp (Link): New section.
3894
3895         * m4/frexpl.m4 (gl_FUNC_FREXPL): Substitute FREXPL_LIBM.
3896         * modules/frexpl (Link): New section.
3897
3898         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Substitute LDEXPL_LIBM.
3899         * modules/ldexpl (Link): New section.
3900
3901 2007-04-03  Bruno Haible  <bruno@clisp.org>
3902
3903         * modules/TEMPLATE-EXTENDED: New file.
3904         * gnulib-tool (func_all_modules, func_verify_module): Exclude it.
3905
3906 2007-04-03  Bruno Haible  <bruno@clisp.org>
3907
3908         * DEPENDENCIES: New file.
3909         Suggested by Simon Josefsson.
3910
3911 2007-04-03  Bruno Haible  <bruno@clisp.org>
3912
3913         * doc/gnulib.texi: Escape @.
3914
3915 2007-04-03  James Youngman  <jay@gnu.org>
3916         and Paul Eggert  <eggert@cs.ucla.edu>
3917
3918         * lib/stat-time.h (get_stat_birthtime): Check for zero-valued
3919         birthtime on all systems that have birthtime, not just those which
3920         use st_birthtimensec rather than st_birthtim.  Putting zero in
3921         st_birthtim.tv_sec is how (for example) FreeBSD/x86 6.1 indicates
3922         that the birth time is not available for files on an NFS mount.
3923
3924 2007-04-03  Simon Josefsson  <simon@josefsson.org>
3925
3926         * modules/memxor: Move back from crypto/, suggested by Bruno.
3927         * modules/crypto/hmac-sha1: Fix memxor dependency.
3928
3929         * modules/crypto/gc: Moved from ../.
3930
3931 2007-04-02  Eric Blake  <ebb9@byu.net>
3932
3933         * lib/ldexpl.c (includes): Avoid libm.
3934
3935         * modules/printf-frexpl (Depends-on): Depend on ldexpl.
3936
3937 2007-04-02  Bruno Haible  <bruno@clisp.org>
3938
3939         * lib/sysexit_.h (EX_OK): Disable the EX_OK definition from <unistd.h>
3940         on IRIX.
3941
3942 2007-04-02  Bruno Haible  <bruno@clisp.org>
3943
3944         * m4/intdiv0.m4 (gt_INTDIV0): Avoid performing the test for real on
3945         x86 or x86_64 platforms running MacOS X.
3946         Reported by Ryan Schmidt <@ryandesign.com>.
3947
3948 2007-04-02  Bruno Haible  <bruno@clisp.org>
3949
3950         * m4/intdiv0.m4 (gt_INTDIV0): When cross-compiling, treat x86_64 like
3951         i386.
3952
3953 2007-04-01  Simon Josefsson  <simon@josefsson.org>
3954
3955         * modules/crypto/arcfour: Moved from ../.
3956         * modules/crypto/arcfour-tests: Moved from ../.
3957         * modules/crypto/arctwo: Moved from ../.
3958         * modules/crypto/arctwo-tests: Moved from ../.
3959         * modules/crypto/des: Moved from ../.
3960         * modules/crypto/des-tests: Moved from ../.
3961         * modules/crypto/gc-arcfour: Moved from ../.
3962         * modules/crypto/gc-arcfour-tests: Moved from ../.
3963         * modules/crypto/gc-arctwo: Moved from ../.
3964         * modules/crypto/gc-arctwo-tests: Moved from ../.
3965         * modules/crypto/gc-des: Moved from ../.
3966         * modules/crypto/gc-des-tests: Moved from ../.
3967         * modules/crypto/gc-hmac-md5: Moved from ../.
3968         * modules/crypto/gc-hmac-md5-tests: Moved from ../.
3969         * modules/crypto/gc-hmac-sha1: Moved from ../.
3970         * modules/crypto/gc-hmac-sha1-tests: Moved from ../.
3971         * modules/crypto/gc-md2: Moved from ../.
3972         * modules/crypto/gc-md2-tests: Moved from ../.
3973         * modules/crypto/gc-md4: Moved from ../.
3974         * modules/crypto/gc-md4-tests: Moved from ../.
3975         * modules/crypto/gc-md5: Moved from ../.
3976         * modules/crypto/gc-md5-tests: Moved from ../.
3977         * modules/crypto/gc-pbkdf2-sha1: Moved from ../.
3978         * modules/crypto/gc-pbkdf2-sha1-tests: Moved from ../.
3979         * modules/crypto/gc-random: Moved from ../.
3980         * modules/crypto/gc-rijndael: Moved from ../.
3981         * modules/crypto/gc-rijndael-tests: Moved from ../.
3982         * modules/crypto/gc-sha1: Moved from ../.
3983         * modules/crypto/gc-sha1-tests: Moved from ../.
3984         * modules/crypto/gc-tests: Moved from ../.
3985         * modules/crypto/hmac-md5: Moved from ../.
3986         * modules/crypto/hmac-md5-tests: Moved from ../.
3987         * modules/crypto/hmac-sha1: Moved from ../.
3988         * modules/crypto/hmac-sha1-tests: Moved from ../.
3989         * modules/crypto/md2: Moved from ../.
3990         * modules/crypto/md2-tests: Moved from ../.
3991         * modules/crypto/md4: Moved from ../.
3992         * modules/crypto/md4-tests: Moved from ../.
3993         * modules/crypto/md5: Moved from ../.
3994         * modules/crypto/md5-tests: Moved from ../.
3995         * modules/crypto/memxor: Moved from ../.
3996         * modules/crypto/rijndael: Moved from ../.
3997         * modules/crypto/rijndael-tests: Moved from ../.
3998         * modules/crypto/sha1: Moved from ../.
3999
4000 2007-03-30  James Youngman  <jay@gnu.org>
4001
4002         * tests/test-stat-time.c (prepare_test): use chmod() rather than
4003         rename() to change the ctime of a file (because ctime is unaffected
4004         by rename on jfs2 on AIX 5.1).
4005         (main): Start by doing cleanup, in case a previous run failed leaving
4006         test files behind.
4007
4008 2007-03-31  Bruno Haible  <bruno@clisp.org>
4009
4010         Support old proprietary implementations of iconv.
4011         * modules/iconv_open: New file.
4012         * lib/iconv_.h: New file.
4013         * m4/iconv_h.m4: New file.
4014         * lib/iconv_open.c: New file.
4015         * lib/iconv_open-aix.gperf: New file.
4016         * lib/iconv_open-hpux.gperf: New file.
4017         * lib/iconv_open-irix.gperf: New file.
4018         * lib/iconv_open-osf.gperf: New file.
4019         * m4/iconv_open.m4: New file.
4020         * modules/linebreak (Depends-on): Add iconv_open.
4021         * modules/striconv (Depends-on): Likewise.
4022         * modules/striconveh (Depends-on): Likewise.
4023         * modules/unicodeio (Depends-on): Likewise.
4024         * lib/striconveh.h (mem_cd_iconveh, str_cd_iconveh): Allow cd to be
4025         (iconv_t)(-1).
4026         * lib/striconveh.c (mem_cd_iconveh_internal): Use an indirect
4027         conversion if cd is (iconv_t)(-1).
4028         (mem_iconveh, str_iconveh): Don't fail just because a direct conversion
4029         is not possible.
4030
4031 2007-03-31  Bruno Haible  <bruno@clisp.org>
4032
4033         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
4034         work on Solaris either. Protect also second use of "autodetect_jp".
4035
4036 2007-03-31  Bruno Haible  <bruno@clisp.org>
4037
4038         * m4/frexpl.m4 (gl_FUNC_FREXPL): Set HAVE_DECL_FREXPL to 0 when
4039         the function is not present.
4040
4041 2007-03-31  Bruno Haible  <bruno@clisp.org>
4042
4043         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Set HAVE_DECL_LDEXPL to 0 when
4044         the function is not present.
4045
4046 2007-03-31  Bruno Haible  <bruno@clisp.org>
4047
4048         * m4/iconv.m4 (AM_ICONV_LINK): Fix 2007-03-29 patch. Test also against
4049         a bug in HP-UX iconv_open().
4050
4051 2007-03-31  Bruno Haible  <bruno@clisp.org>
4052
4053         * MODULES.html.sh (func_module): Don't show gnulib-common.m4.
4054         (Mathematics <math.h>): New section, add fpieee.
4055         (Input/output <stdio.h>): Add fseterr.
4056         (Mathematics <math.h>): New section, add printf-frexp.
4057         (Container data structures): Add sublist.
4058         (Core language properties): Add fpucw, inline.
4059         (Functions for greatest-width integer types <inttypes.h>): Add
4060         imaxabs, imaxdiv, inttypes.
4061         (Mathematics <math.h>): Add frexp, frexpl, isnan-nolibm, isnanl,
4062         isnanl-nolibm, ldexp.
4063         (Mathematics <math.h>): New section, add printf-frexpl.
4064         (Support for systems lacking POSIX:2001): Add fprintf-posix,
4065         printf-posix, snprintf-posix, sprintf-posix, string, search, socklen,
4066         sys_select, sys_socket, vasnprintf-posix, vasprintf-posix,
4067         vfprintf-posix, vprintf-posix, vsnprintf-posix, vsprintf-posix.
4068         (Unicode string functions): Add unistr/u*-mbtoucr.
4069         (Java): Add javacomp-script, javaexec-script.
4070         (C#): Add csharpcomp-script, csharpexec-script.
4071         (Support for building libraries and executables): Add havelib,
4072         relocatable-*.
4073         (Support for maintaining and releasing projects): Renamed from
4074         'Support for maintaining and release projects'. Add announce-gen.
4075
4076 2007-03-31  Bruno Haible  <bruno@clisp.org>
4077
4078         * README: Talk primarily about git.
4079         (git and CVS): Renamed from CVS.
4080         * doc/gnulib.texi (Introduction, Build robot for gnulib): Mention that
4081         gnulib is available through git.
4082         * doc/gnulib-tool.texi (CVS Issues): Mention git and svn as well.
4083
4084 2007-03-30  Bruno Haible  <bruno@clisp.org>
4085
4086         * lib/alloca_.h: Change prefix of double-inclusion guard macro to _GL_.
4087         * lib/poll_.h: Likewise.
4088         * lib/stat_.h: Likewise.
4089         * lib/sys_time_.h: Likewise.
4090         * lib/sysexit_.h: Likewise.
4091         * lib/glob_.h: Prefix double-inclusion guard macro with _GL_.
4092         * lib/stdbool_.h: Likewise.
4093         * lib/byteswap_.h: Add double-inclusion guard.
4094
4095 2007-03-30  Sergey Poznyakoff  <gray@mirddin.farlep.net>
4096
4097         * lib/sysexit_.h: Prefix double-inclusion guard macro with _GNULIB.
4098
4099 2007-03-30  Karl Berry  <karl@gnu.org>
4100
4101         * config/srclist-update: double space after USA in the license
4102         substitution, since that's how it's usually (?) written.
4103
4104 2007-03-30  Paul Eggert  <eggert@cs.ucla.edu>
4105
4106         * lib/write-any-file.c (can_write_any_file): Fix else-else bug
4107         reported by Bruno Haible.
4108
4109 2007-03-29  Bruno Haible  <bruno@clisp.org>
4110
4111         * m4/iconv.m4 (AM_ICONV_LINK): Require AC_CANONICAL_HOST. Test against
4112         a bug in AIX iconv().
4113
4114 2007-03-29  Bruno Haible  <bruno@clisp.org>
4115
4116         * modules/ldexpl-tests: New file.
4117         * tests/test-ldexpl.c: New file.
4118
4119 2007-03-29  Bruno Haible  <bruno@clisp.org>
4120
4121         * lib/ldexpl.c: Include fpucw.h.
4122         (ldexpl): Use BEGIN/END_LONG_DOUBLE_ROUNDING. Skip the last unneeded
4123         multiplication.
4124         * modules/ldexpl (Depends-on): Add fpucw.
4125
4126 2007-03-29  Bruno Haible  <bruno@clisp.org>
4127
4128         * modules/ldexpl: New file.
4129         * m4/ldexpl.m4: New file.
4130         * lib/math_.h (ldexpl): Define to a replacement if REPLACE_LDEXPL is
4131         set.
4132         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize also GNULIB_LDEXPL,
4133         REPLACE_LDEXPL.
4134         * modules/math (Makefile.am): Substitute also GNULIB_LDEXPL,
4135         REPLACE_LDEXPL.
4136         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Invoke
4137         gl_FUNC_LDEXPL_WORKS.
4138         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Remove test for ldexpl.
4139         * modules/mathl (Files): Remove lib/ldexpl.c.
4140         (Depends-on): Add ldexpl.
4141
4142 2007-03-29  Bruno Haible  <bruno@clisp.org>
4143
4144         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Declare frexpl.
4145
4146 2007-03-29  Bruno Haible  <bruno@clisp.org>
4147
4148         * tests/test-striconveh.c (main): Don't assume that a direct conversion
4149         between ISO-8859-1 and ISO-8859-2 is possible. Needed for OSF/1, IRIX
4150         and possibly also HP-UX.
4151         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
4152         work on AIX, IRIX, HP-UX, OSF/1.
4153         * tests/uniconv/test-u16-conv-from-enc.c (main): Likewise.
4154         * tests/uniconv/test-u16-strconv-from-enc.c (main): Likewise.
4155         * tests/uniconv/test-u32-conv-from-enc.c (main): Likewise.
4156         * tests/uniconv/test-u32-strconv-from-enc.c (main): Likewise.
4157         * tests/uniconv/test-u8-conv-from-enc.c (main): Likewise.
4158         * tests/uniconv/test-u8-strconv-from-enc.c (main): Likewise.
4159
4160 2007-03-29  Bruno Haible  <bruno@clisp.org>
4161
4162         * tests/test-stat-time.c: Include <fcntl.h>, not <sys/fcntl.h>.
4163
4164 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
4165
4166         * lib/acl-internal.h (acl_get_fd, acl_set_fd): undef before defining,
4167         to work around a problem on OSF/1 5.1 reported by Bruno Haible.
4168
4169 2007-03-29  Eric Blake  <ebb9@byu.net>
4170
4171         * lib/acl-internal.h: Remove redundant include.
4172         (ACL_NOT_WELL_SUPPORTED): Also filter on EBUSY, returned by
4173         Cygwin when a file is locked.
4174
4175 2007-03-29  Bruno Haible  <bruno@clisp.org>
4176
4177         * lib/vasprintf.c [IN_LIBASPRINTF]: Include different specification
4178         file.
4179         * lib/asprintf.c [IN_LIBASPRINTF]: Likewise.
4180
4181 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
4182
4183         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Don't bother to
4184         try to remove a parent directory if the child couldn't be removed
4185         (except for the first rmdir, which could fail because the child
4186         doesn't exist).  Problem reported by Jeff Blaine in
4187         <http://lists.gnu.org/archive/html/bug-tar/2007-03/msg00014.html>.
4188
4189 2007-03-28  Bruno Haible  <bruno@clisp.org>
4190
4191         * lib/striconveh.c (utf8conv_carefully): New function.
4192         (mem_cd_iconveh_internal): Invoke it.
4193
4194 2007-03-28  Bruno Haible  <bruno@clisp.org>
4195
4196         * lib/striconveh.c (mem_cd_iconveh_internal): Use u8_mbtoucr instead
4197         of u8_mbtouc in order to distinguish invalid and incomplete UTF-8
4198         input.
4199         * modules/striconveh (Depends-on): Add unistr/u8-mbtoucr. Replace
4200         utf8-ucs4 with unistr/u8-mbtouc. Replace ucs4-utf8 with
4201         unistr/u8-uctomb.
4202
4203 2007-03-28  Bruno Haible  <bruno@clisp.org>
4204
4205         * modules/unistr/u8-mbtoucr: New file.
4206         * lib/unistr/u8-mbtoucr.c: New file.
4207         * modules/unistr/u16-mbtoucr: New file.
4208         * lib/unistr/u16-mbtoucr.c: New file.
4209         * modules/unistr/u16-mbtoucr: New file.
4210         * lib/unistr/u16-mbtoucr.c: New file.
4211         * lib/unistr.h (u8_mbtoucr, u16_mbtoucr, u32_mbtoucr): New declarations.
4212
4213 2007-03-27  Simon Josefsson  <simon@josefsson.org>
4214             Bruno Haible  <bruno@clisp.org>
4215
4216         * m4/vasprintf.m4: Convert AC_SUBST into shell variable for
4217         REPLACE_VASPRINTF.  Set HAVE_VASPRINTF.  Add
4218         AC_REQUIRE([gl_STDIO_H_DEFAULTS]).
4219
4220         * m4/stdio_h.m4: Add stubs for vasprintf too.
4221
4222         * modules/stdio: Support vasprintf in sed command.
4223
4224         * modules/vasprintf: Depend on stdio for prototypes.  Remove
4225         vasprintf.h.  Add stdio module indicator.
4226
4227         * lib/stdio_.h: Declare asprintf and vasprintf, based on
4228         vasprintf.h.
4229
4230         * lib/vasprintf.h: File removed.
4231
4232         * lib/asprintf.c: Use stdio.h instead of vasprintf.h.
4233         * lib/vasprintf.c: Ditto.
4234         * lib/xvasprintf.c: Ditto.
4235         * tests/test-vasprintf-posix.c: Ditto.
4236         * tests/test-vasprintf.c: Ditto.
4237
4238 2007-03-27  Bruno Haible  <bruno@clisp.org>
4239
4240         Make vasnprintf multithread-safe.
4241         * lib/vasnprintf.c (decimal_point_char): New function.
4242         (VASNPRINTF): Use it.
4243         Suggested by Simon Josefsson.
4244
4245 2007-03-27  Eric Blake  <ebb9@byu.net>
4246
4247         Support sub-second birthtime on cygwin.
4248         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Also check for st_birthtim.
4249         * lib/stat-time.h (STAT_TIMESPEC): Adjust comments.
4250         (get_stat_birthtime): Also work with st_birthtim.
4251
4252 2007-03-27  Paul Eggert  <eggert@cs.ucla.edu>
4253
4254         * lib/stat-time.h (USE_BIRTHTIME): Remove.
4255         (get_stat_atime_ns, get_stat_ctime_ns, get_stat_mtime_ns):
4256         (get_stat_birthtime_ns): Do not try to use "spare" fields.
4257         (get_stat_birthtime_ns): Simplify compile-time tests.
4258         (get_stat_birthtime): Change the API to look like
4259         get_stat_mtime etc., except return a negative tv_nsec on error.
4260         * m4/stat-time.m4 (gl_STAT_TIME, gl_STAT_BIRTHTIME):
4261         Don't check for "spare" fields.
4262         (gl_STAT_BIRTHTIME): Don't check for struct stat.st_birthtimespec.tv_sec
4263         or for struct stat.st_birthtime, as these tests aren't used.
4264         * tests/test-stat-time.c (test_birthtime): Adjust to new API.
4265
4266 2007-03-27  Bruno Haible  <bruno@clisp.org>
4267
4268         * lib/stat-time.h: Include <sys/stat.h>.
4269
4270 2007-03-27  James Youngman  <jay@gnu.org>
4271
4272         * lib/stat-time.h (get_stat_birthtime): New function for
4273           retrieving st_birthtime as provided by UFS2 (hence *BSD).
4274         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Probe for st_birthtime
4275           and its variants.
4276         * modules/stat-time (configure.ac): call gl_STAT_BIRTHTIME.
4277         * modules/stat-time-test: New file.
4278         * tests/test-stat-time.c: New test, devised by Bruno Haible.
4279
4280 2007-03-26  Bruno Haible  <bruno@clisp.org>
4281
4282         Better support of signalling NaNs.
4283         * lib/atanl.c: Include isnanl.h.
4284         (atanl): Perform test for NaN at the beginning of the function and
4285         through a call to isnanl.
4286         * lib/cosl.c: Include isnanl.h.
4287         (cosl): Perform test for NaN at the beginning of the function and
4288         through a call to isnanl.
4289         * lib/ldexpl.c: Include isnanl.h.
4290         (ldexpl): Perform test for NaN through a call to isnanl.
4291         * lib/logl.c: Include isnanl.h.
4292         (logl): Perform test for NaN at the beginning of the function and
4293         through a call to isnanl.
4294         * lib/sinl.c: Include isnanl.h.
4295         (sinl): Perform test for NaN at the beginning of the function and
4296         through a call to isnanl.
4297         * lib/sqrtl.c: Include isnanl.h.
4298         (sqrtl): Perform test for NaN at the beginning of the function and
4299         through a call to isnanl.
4300         * lib/tanl.c: Include isnanl.h.
4301         (tanl): Perform test for NaN at the beginning of the function and
4302         through a call to isnanl.
4303         * lib/trigl.c (ieee754_rem_pio2l): Remove test for NaN.
4304         * modules/mathl (Depends-on): Add isnanl.
4305
4306 2007-03-26  Eric Blake  <ebb9@byu.net>
4307
4308         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Fix
4309         regression in logic sense of previous patch.
4310
4311 2007-03-26  Bruno Haible  <bruno@clisp.org>
4312
4313         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Don't use
4314         unportable shell command "if ! ...".
4315         Reported by Ralf Wildenhues.
4316
4317 2007-03-25  Bruno Haible  <bruno@clisp.org>
4318
4319         * lib/sysexit_,h: If HAVE_SYSEXITS_H is defined, include the original
4320         <sysexits.h> file, and only add EX_CONFIG.
4321         * m4/sysexits.m4 (gl_SYSEXITS): If <sysexits.h> exists, check its
4322         absolute file name and whether it is sufficient. Substitute also
4323         HAVE_SYSEXITS_H and ABSOLUTE_SYSEXITS_H.
4324         * modules/sysexits (Makefile.am): Substitute HAVE_SYSEXITS_H and
4325         ABSOLUTE_SYSEXITS_H into sysexits.h.
4326
4327 2007-03-25  Bruno Haible  <bruno@clisp.org>
4328
4329         * lib/getaddrinfo.c (getaddrinfo): Don't access hints->ai_flags when
4330         hints is NULL.
4331
4332 2007-03-25  Bruno Haible  <bruno@clisp.org>
4333
4334         * lib/uniconv/u8-conv-from-enc.c (u8_conv_from_encoding): Add a cast.
4335         * lib/uniconv/u8-strconv-to-enc.c (u8_strconv_to_encoding): Likewise.
4336
4337 2007-03-25  Bruno Haible  <bruno@clisp.org>
4338
4339         * lib/vasnprintf.c: Include langinfo.h.
4340         (VASNPRINTF): Prefer nl_langinfo over localeconv, since it's more
4341         multithread-safe.
4342         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): New macro.
4343         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke it.
4344         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
4345         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
4346         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
4347         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
4348         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
4349         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX: Likewise.
4350         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
4351         Reported by Simon Josefsson.
4352
4353 2007-03-25  Bruno Haible  <bruno@clisp.org>
4354
4355         * lib/printf-parse.c [!IN_LIBINTL]: Include <stdint.h>, for intmax_t.
4356         (PRINTF_PARSE): Make the support for size specifier 'j' unconditional.
4357         * modules/vasnprintf (Depends-on): Add stdint.
4358
4359 2007-03-25  Bruno Haible  <bruno@clisp.org>
4360
4361         * modules/fpieee: New file.
4362         * m4/fpieee.m4: New file.
4363         * modules/isnan-nolibm (Depends-on): Add fpieee.
4364         * modules/isnanl-nolibm (Depends-on): Add fpieee.
4365         * modules/isnanl (Depends-on): Add fpieee.
4366
4367 2007-03-25  Bruno Haible  <bruno@clisp.org>
4368
4369         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Test also finite numbers.
4370
4371 2007-03-25  Bruno Haible  <bruno@clisp.org>
4372
4373         Avoid test failures on IRIX 6.5.
4374         * tests/test-frexpl.c (MIN_NORMAL_EXP): New macro.
4375         (main): Use it.
4376         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP): New
4377         macros.
4378         (main): Use them.
4379
4380 2007-03-25  Bruno Haible  <bruno@clisp.org>
4381
4382         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): New macro.
4383         (gl_FUNC_FREXPL): Invoke it. Set REPLACE_FREXPL to 1 if it frexpl
4384         exists but doesn't work.
4385         * lib/math_.h (frexpl): Define as a replacement macro if REPLACE_FREXPL
4386         is set. Don't provide a prototype if REPLACE_FREXPL is not set.
4387         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_FREXPL.
4388         * modules/math (Makefile.am) Substibute also REPLACE_FREXPL into math.h.
4389
4390 2007-03-25  Bruno Haible  <bruno@clisp.org>
4391
4392         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Add check whether frexp(inf)
4393         returns inf. Needed on IRIX 6.5.
4394
4395 2007-03-25  Bruno Haible  <bruno@clisp.org>
4396
4397         * tests/test-frexpl.c: Include isnanl-nolibm.h.
4398         (main): Use isnanl instead of x != x idiom.
4399         * modules/frexpl-tests (Depends-on): Add isnanl-nolibm.
4400
4401         * tests/test-frexp.c: Include isnan.h.
4402         (main): Use isnan instead of x != x idiom.
4403         * modules/frexp-tests (Depends-on): Add isnan-nolibm.
4404
4405 2007-03-25  Bruno Haible  <bruno@clisp.org>
4406
4407         * tests/test-frexp.c (NaN): New function/macro.
4408         (main): Use it instead of 0.0 / 0.0.
4409         * tests/test-isnan.c (NaN): New function/macro.
4410         (main): Use it instead of 0.0 / 0.0.
4411         * tests/test-vasnprintf-posix.c (NaN): New function/macro.
4412         (test_function): Use it instead of 0.0 / 0.0.
4413         * tests/test-vasprintf-posix.c (NaN): New function/macro.
4414         (test_function): Use it instead of 0.0 / 0.0.
4415         * tests/test-snprintf-posix.h (NaN): New function/macro.
4416         (test_function): Use it instead of 0.0 / 0.0.
4417         * tests/test-sprintf-posix.h (NaN): New function/macro.
4418         (test_function): Use it instead of 0.0 / 0.0.
4419         * tests/test-fprintf-posix.h (NaN): New function/macro.
4420         (test_function): Use it instead of 0.0 / 0.0.
4421         * tests/test-printf-posix.h (NaN): New function/macro.
4422         (test_function): Use it instead of 0.0 / 0.0.
4423
4424         * lib/isnan.c (FUNC): Work around a DEC C compiler bug.
4425
4426 2007-03-25  Bruno Haible  <bruno@clisp.org>
4427
4428         * lib/glob_.h: Include <sys/stat.h>. Avoids warnings on AIX 5.1.
4429
4430 2007-03-25  Bruno Haible  <bruno@clisp.org>
4431
4432         * lib/regexec.c (merge_state_with_log): Make static.
4433
4434 2007-03-25  Bruno Haible  <bruno@clisp.org>
4435
4436         * lib/trigl.c (kernel_rem_pio2): Make static.
4437
4438 2007-03-25  Bruno Haible  <bruno@clisp.org>
4439
4440         * lib/sincosl.c (sincosl_table): Make static.
4441
4442 2007-03-25  Bruno Haible  <bruno@clisp.org>
4443
4444         * lib/argp.h (__restrict): Define to empty, rather than to 'restrict',
4445         if the compiler does not support C99.
4446
4447 2007-03-25  Bruno Haible  <bruno@clisp.org>
4448
4449         * modules/time (Makefile.am): Ensure all rule action lines start with a
4450         tab.
4451
4452 2007-03-24  Bruno Haible  <bruno@clisp.org>
4453
4454         * modules/tsearch-tests: New file.
4455         * tests/test-tsearch.sh: New file.
4456         * tests/test-tsearch.c: New file, mostly copied from glibc.
4457
4458         * modules/search-tests: New file.
4459         * tests/test-search.c: New file.
4460
4461         * modules/search: New file.
4462         * lib/search_.h: New file, incorporating lib/tsearch.h.
4463         * m4/search_h.m4: New file.
4464         * lib/tsearch.h: Remove file.
4465         * lib/tsearch.c: Include search.h instead of tsearch.h.
4466         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Require gl_SEARCH_H_DEFAULTS. Set
4467         HAVE_TSEARCH.
4468         * modules/tsearch (Files): Remove lib/tsearch.h.
4469         (Depends-on): Add search.
4470         (configure.ac): Invoke gl_SEARCH_MODULE_INDICATOR.
4471         (Include): Change tsearch.h into search.h.
4472
4473 2007-03-24  Bruno Haible  <bruno@clisp.org>
4474
4475         * modules/fpucw: New file.
4476         * lib/fpucw.h: New file.
4477         * lib/frexp.c: Include fpucw.h.
4478         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
4479         (FUNC): Use them.
4480         * lib/printf-frexp.c: Include fpucw.h.
4481         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
4482         (FUNC): Use them.
4483         * lib/vasnprintf.c: Include fpucw.h.
4484         (VASNPRINTF): Invoke BEGIN/END_LONG_DOUBLE_ROUNDING around the
4485         'long double' calculations.
4486         * tests/test-frexpl.c: Include fpucw.h.
4487         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
4488         * tests/test-printf-frexpl.c: Include fpucw.h.
4489         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
4490         * modules/frexpl (Depends-on): Add fpucw.
4491         * modules/printf-frexpl (Depends-on): Likewise.
4492         * modules/fprintf-posix (Depends-on): Likewise.
4493         * modules/snprintf-posix (Depends-on): Likewise.
4494         * modules/sprintf-posix (Depends-on): Likewise.
4495         * modules/vasnprintf-posix (Depends-on): Likewise.
4496         * modules/vasprintf-posix (Depends-on): Likewise.
4497         * modules/vfprintf-posix (Depends-on): Likewise.
4498         * modules/vsnprintf-posix (Depends-on): Likewise.
4499         * modules/vsprintf-posix (Depends-on): Likewise.
4500         * modules/frexpl-tests (Depends-on): Likewise.
4501         * modules/printf-frexpl-tests (Depends-on): Likewise.
4502
4503 2007-03-24  Bruno Haible  <bruno@clisp.org>
4504
4505         * lib/float+.h: New file.
4506         * lib/isnan.c: Include float+.h.
4507         (SIZE): New macro.
4508         (FUNC): Compare only SIZE bytes of the value.
4509         * lib/vasnprintf.c: Include float+.h.
4510         (VASNPRINTF): When comparing agains +0.0L or +0.0, compare only
4511         SIZEOF_LDBL or SIZEOF_DBL bytes.
4512         * modules/isnan-nolibm (Files): Add lib/float+.h.
4513         * modules/isnanl-nolibm (Files): Add lib/float+.h.
4514         * modules/isnanl (Files): Add lib/float+.h.
4515         * modules/vasnprintf (Files): Add lib/float+.h.
4516
4517 2007-03-24  Bruno Haible  <bruno@clisp.org>
4518
4519         * lib/vasnprintf.c [!HAVE_LONG_DOUBLE]: Include printf-frexp.h. Don't
4520         include isnanl-nolibm.h.
4521
4522 2007-03-24  Bruno Haible  <bruno@clisp.org>
4523
4524         * tests/test-read-file.c (main): Don't produce spurious output for
4525         expected situations. Make the test fail if it encountered unexpected
4526         results.
4527
4528 2007-03-24  Bruno Haible  <bruno@clisp.org>
4529
4530         * m4/locale-fr.m4 (gt_LOCALE_FR): Remove the special-casing of NetBSD,
4531         since its fr_FR.ISO8859-1 locale wouldn't pass the tests.
4532
4533 2007-03-24  Bruno Haible  <bruno@clisp.org>
4534
4535         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Fix last change.
4536
4537 2007-03-24  Bruno Haible  <bruno@clisp.org>
4538
4539         * modules/unistr/base (Depends-on): Remove utf8-ucs4-unsafe,
4540         utf16-ucs4-unsafe, utf8-ucs4, utf16-ucs4, ucs4-utf8, ucs4-utf16.
4541
4542         * modules/unistr/u8-mbtouc: Add source files from module utf8-ucs4.
4543         * modules/utf8-ucs4: Turn into a symbolic link to module
4544         unistr/u8-mbtouc.
4545
4546         * modules/unistr/u8-mbtouc-unsafe: Add source files from module
4547         utf8-ucs4-unsafe.
4548         * modules/utf8-ucs4-unsafe: Turn into a symbolic link to module
4549         unistr/u8-mbtouc-unsafe.
4550
4551         * modules/unistr/u16-mbtouc: Add source files from module utf16-ucs4.
4552         * modules/utf16-ucs4: Turn into a symbolic link to module
4553         unistr/u16-mbtouc.
4554
4555         * modules/unistr/u16-mbtouc-unsafe: Add source files from module
4556         utf16-ucs4-unsafe.
4557         * modules/utf16-ucs4-unsafe: Turn into a symbolic link to module
4558         unistr/u16-mbtouc-unsafe.
4559
4560         * modules/unistr/u8-uctomb: Add source files from module utf4-utf8.
4561         * modules/ucs4-utf8: Turn into a symbolic link to module
4562         unistr/u8-ubtomb.
4563
4564         * modules/unistr/u16-uctomb: Add source files from module utf4-utf16.
4565         * modules/ucs4-utf16: Turn into a symbolic link to module
4566         unistr/u16-ubtomb.
4567
4568 2007-03-24  Bruno Haible  <bruno@clisp.org>
4569
4570         * lib/unistr/u8-mbtouc-aux.c: Renamed from lib/unistr/utf8-ucs4.c.
4571         Enable the function only if HAVE_INLINE.
4572         * lib/unistr/u8-mbtouc-unsafe-aux.c: Renamed from
4573         lib/unistr/utf8-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
4574         * lib/unistr/u16-mbtouc-aux.c: Renamed from lib/unistr/utf16-ucs4.c.
4575         Enable the function only if HAVE_INLINE.
4576         * lib/unistr/u16-mbtouc-unsafe-aux.c: Renamed from
4577         lib/unistr/utf16-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
4578         * lib/unistr/u8-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf8.c.
4579         Enable the function only if HAVE_INLINE.
4580         * lib/unistr/u16-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf16.c.
4581         Enable the function only if HAVE_INLINE.
4582         * modules/utf8-ucs4: Update.
4583         * modules/utf8-ucs4-unsafe: Update.
4584         * modules/utf16-ucs4: Update.
4585         * modules/utf16-ucs4-unsafe: Update.
4586         * modules/ucs4-utf8: Update.
4587         * modules/ucs4-utf16: Update.
4588
4589 2007-03-24  Bruno Haible  <bruno@clisp.org>
4590
4591         * lib/utf8-ucs4.h: Remove file.
4592         * lib/utf8-ucs4-unsafe.h: Remove file.
4593         * lib/utf16-ucs4.h: Remove file.
4594         * lib/utf16-ucs4-unsafe.h: Remove file.
4595         * lib/ucs4-utf8.h: Remove file.
4596         * lib/ucs4-utf16.h: Remove file.
4597         * lib/unistr.h: Include their previous contents.
4598         * m4/utf-ucs4.m4: Remove file.
4599         * m4/ucs4-utf.m4: Remove file.
4600         * modules/utf8-ucs4 (Files): Remove lib/utf8-ucs4.h.
4601         (Depends-on): Add unistr/base.
4602         (configure.ac): Remove gl_UTF_UCS4.
4603         (Makefile.am): Update.
4604         (Include): Change to unistr.h.
4605         * modules/utf8-ucs4-unsafe (Files): Remove lib/utf8-ucs4-unsafe.h.
4606         (Depends-on): Add unistr/base.
4607         (configure.ac): Remove gl_UTF_UCS4.
4608         (Makefile.am): Update.
4609         (Include): Change to unistr.h.
4610         * modules/utf16-ucs4 (Files): Remove lib/utf16-ucs4.h.
4611         (Depends-on): Add unistr/base.
4612         (configure.ac): Remove gl_UTF_UCS4.
4613         (Makefile.am): Update.
4614         (Include): Change to unistr.h.
4615         * modules/utf16-ucs4-unsafe (Files): Remove lib/utf16-ucs4-unsafe.h.
4616         (Depends-on): Add unistr/base.
4617         (configure.ac): Remove gl_UTF_UCS4.
4618         (Makefile.am): Update.
4619         (Include): Change to unistr.h.
4620         * modules/ucs4-utf8 (Files): Remove lib/ucs4-utf8.h.
4621         (Depends-on): Add unistr/base.
4622         (configure.ac): Remove gl_UCS4_UTF.
4623         (Makefile.am): Update.
4624         (Include): Change to unistr.h.
4625         * modules/ucs4-utf16 (Files): Remove lib/ucs4-utf16.h.
4626         (Depends-on): Add unistr/base.
4627         (configure.ac): Remove gl_UCS4_UTF.
4628         (Makefile.am): Update.
4629         (Include): Change to unistr.h.
4630         * lib/unistr/utf8-ucs4.c: Include unistr.h instead of utf8-ucs4.h.
4631         * lib/unistr/utf8-ucs4-unsafe.c: Include unistr.h instead of
4632         utf8-ucs4-unsafe.h.
4633         * lib/unistr/utf16-ucs4.c: Include unistr.h instead of utf16-ucs4.h.
4634         * lib/unistr/utf16-ucs4-unsafe.c: Include unistr.h instead of
4635         utf16-ucs4-unsafe.h.
4636         * lib/unistr/ucs4-utf8.c: Include unistr.h instead of ucs4-utf8.h.
4637         * lib/unistr/ucs4-utf16.c: Include unistr.h instead of ucs4-utf16.h.
4638         * lib/unistr/u8-chr.c: Don't include ucs4-utf8.h.
4639         * lib/unistr/u8-strchr.c: Likewise.
4640         * lib/unistr/u8-strrchr.c: Likewise.
4641         * lib/unistr/u16-chr.c: Don't include ucs4-utf16.h.
4642         * lib/unistr/u16-strchr.c: Likewise.
4643         * lib/unistr/u16-strrchr.c: Likewise.
4644         * lib/striconveh.c: Update.
4645         * lib/linebreak.c: Update.
4646
4647 2007-03-24  Bruno Haible  <bruno@clisp.org>
4648
4649         * lib/argp-help.c (fill_in_uparams, canon_doc_option): Cast the
4650         arguments of isspace, isalpha, isalnum, isdigit to 'unsigned char'.
4651
4652 2007-03-22  Bruno Haible  <bruno@clisp.org>
4653
4654         * lib/strptime.c (__strptime_internal): Use ANSI C syntax.
4655
4656 2007-03-23  Paul Eggert  <eggert@cs.ucla.edu>
4657
4658         * MODULES.html.sh (File system functions): New module write-any-file.
4659         * modules/write-any-file, lib/write-any-file.c, lib/write-any-file.h:
4660         * m4/write-any-file.m4: New files.
4661
4662 2007-03-23  Eric Blake  <ebb9@byu.net>
4663
4664         * gnulib-tool: Rearrange space-tab sequences, since some editors
4665         like to eat them.
4666
4667 2007-03-23  Eric Blake  <ebb9@byu.net>
4668
4669         * lib/version-etc.c (version_etc_va): Update license wording to
4670         be more concise.  Recommended by Richard Stallman.
4671
4672 2007-03-22  Bruno Haible  <bruno@clisp.org>
4673
4674         * lib/poll.c (MSG_PEEK): New fallback definition.
4675
4676 2007-03-22  Bruno Haible  <bruno@clisp.org>
4677
4678         * modules/sys_socket-tests (configure.ac): Check for shutdown function.
4679         * tests/test-sys_socket.c (a): Test only if shutdown() exists.
4680         (main): Update.
4681         Fixes a compilation error on BeOS.
4682
4683 2007-03-22  Bruno Haible  <bruno@clisp.org>
4684
4685         * modules/frexpl-tests: New file.
4686         * tests/test-frexpl.c: New file.
4687
4688         * modules/frexpl: New file.
4689         * m4/frexpl.m4: New file.
4690         * modules/math (Makefile.am): Also substitute GNULIB_FREXPL into math.h.
4691         * lib/math_.h (frexpl): Test GNULIB_FREXPL instead of GNULIB_MATHL.
4692         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_FREXPL.
4693         * modules/mathl (Files): Remove lib/frexpl.c, lib/frexp.c.
4694         (Depends-on): Add frexpl. Remove isnanl-nolibm.
4695         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Don't test for frexpl.
4696
4697 2007-03-22  Bruno Haible  <bruno@clisp.org>
4698
4699         * lib/frexpl.c: Share code with lib/frexp.c.
4700         * modules/mathl (Files): Add lib/frexp.c.
4701         (Depends-on): Add isnanl-nolibm.
4702
4703 2007-03-22  Bruno Haible  <bruno@clisp.org>
4704
4705         * modules/printf-frexp (Files): Add m4/frexp.m4.
4706         * m4/printf-frexp.m4 (gl_FUNC_PRINTF_FREXP): Define HAVE_FREXP_IN_LIBC
4707         only if the found frexp function actually works.
4708
4709 2007-03-22  Bruno Haible  <bruno@clisp.org>
4710
4711         * lib/frexp.c: Remove older implementation that uses divisions.
4712
4713 2007-03-21  Bruno Haible  <bruno@clisp.org>
4714
4715         * modules/frexp-tests: New file.
4716         * tests/test-frexp.c: New file.
4717
4718         * modules/frexp: New file.
4719         * lib/frexp.c: New file.
4720         * m4/frexp.m4: New file.
4721         * lib/math_.h (frexp): New declaration.
4722         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Also initialize GNULIB_FREXP and
4723         REPLACE_FREXP.
4724         * modules/math (math.h): Also substitute GNULIB_FREXP, REPLACE_FREXP.
4725
4726 2007-03-21  Bruno Haible  <bruno@clisp.org>
4727
4728         * modules/isnanl-tests: New file.
4729         * tests/test-isnanl.c: New file.
4730
4731         * modules/isnanl: New file.
4732         * lib/isnanl.h: New file.
4733         * m4/isnanl.m4 (gl_FUNC_ISNANL): New macro.
4734         (gl_FUNC_ISNANL_NO_LIBM): Invoke gl_HAVE_ISNANL_NO_LIBM,
4735         gl_FUNC_ISNANL_WORKS.
4736         (gl_HAVE_ISNANL_NO_LIBM, gl_HAVE_ISNANL_IN_LIBM, gl_FUNC_ISNANL_WORKS):
4737         New macros.
4738
4739 2007-03-21  Bruno Haible  <bruno@clisp.org>
4740
4741         * modules/isnanl-nolibm (Files): Add lib/isnanl-nolibm.h, remove
4742         lib/isnanl.h.
4743         (Include): Update.
4744         * lib/isnanl-nolibm.h: Renamed from lib/isnanl.h.
4745         * lib/vasnprintf.c: Update.
4746         * modules/isnanl-nolibm-tests (Files): Add tests/test-isnanl-nolibm.c,
4747         tests/test-isnanl.h, remove tests/test-isnanl.c.
4748         (Makefile.am): Update.
4749         * tests/test-isnanl-nolibm.c: New file.
4750         * tests/test-isnanl.h: New file.
4751         * tests/test-isnanl.c: Remove file.
4752
4753 2007-03-21  Jim Meyering  <jim@meyering.net>
4754
4755         When trying to open ".", treat ESTALE like EACCES.
4756         * lib/savewd.c (savewd_save): Resort to forking not just upon
4757         failure with EACCES, but also when errno is ESTALE.
4758
4759 2007-03-20  Bruno Haible  <bruno@clisp.org>
4760
4761         * lib/string_.h (strndup): Enable declaration also if HAVE_STRNDUP.
4762         Needed on AIX 5.1. Reported by Matthew Woehlke.
4763
4764 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
4765
4766         Suggestions by Bruno Haible:
4767         * lib/acl-internal.h: Include "gettext.h" rather than rolling
4768         our own.
4769         (ACL_NOT_WELL_SUPPORTED): Parenthesize arg when used.
4770         * modules/acl (Depends-on): Add gettext.
4771
4772 2007-03-19  Bruno Haible  <bruno@clisp.org>
4773
4774         * modules/iconvme: Remove file.
4775         * lib/iconvme.h: Remove file.
4776         * lib/iconvme.c: Remove file.
4777         * m4/iconvme.m4: Remove file.
4778
4779 2007-03-19  Bruno Haible  <bruno@clisp.org>
4780
4781         * doc/relocatable-maint.texi: Break long shell script line.
4782         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
4783
4784 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
4785
4786         Add limited support for Solaris 10 ZFS-style ACLs: just enough to
4787         handle file_has_acl.
4788         * lib/acl-internal.h, lib/acl_entries.c, lib/file-has-acl.c: New files.
4789         * lib/acl.c: Move header inclusions and related macro defns into
4790         lib/acl-internal.h.
4791         (S_ISLNK): Remove defn, since that's now done for us.
4792         (file_has_acl): Move to lib/file-has-acl.c.
4793         Call acl_trivial if available.  This is the crucial part of the fix.
4794         (acl_entries): Move to lib/acl_entries.c.  Now extern, since it's
4795         shared within the library.  Rewrite a bit, partly to make it compatible
4796         with the GNU coding style.
4797         * m4/acl.m4 (AC_FUNC_ACL): Add AC_LIBOBJ([file-has-acl]).
4798         Remove unnecessary double-quotes.
4799         Don't test for acl_to_text; the build will catch that.
4800         Replace acl_entries if it doesn't exist and it is needed.
4801         Check for -lsec and acl_trivial (as used on Solaris 10).
4802         * modules/acl (Files): Add lib/acl-internal.h, lib/acl_entries.c,
4803         lib/file-has-acl.c.
4804         (Depends-on): Add sys_stat, for S_ISLNK.
4805
4806 2007-03-19  Ben Pfaff  <blp@gnu.org>
4807
4808         * doc/gnulib.texi: Fix typos.
4809         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
4810
4811 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
4812
4813         * lib/getcwd.c (__getcwd): Remove redundant comparison of buf to NULL.
4814         If size is zero here, buf must be zero.
4815
4816 2007-03-19  Simon Josefsson  <simon@josefsson.org>
4817
4818         * des.c: Remove weak_keys_chksum.  Reported by Bruno Haible
4819         <bruno@clisp.org>.
4820
4821 2007-03-18  Bruno Haible  <bruno@clisp.org>
4822
4823         * lib/vasnprintf.c (VASNPRINTF): Undo first part of last patch.
4824         Suggested by Eric Blake.
4825
4826 2007-03-18  Ben Pfaff  <blp@gnu.org>
4827
4828         * doc/relocatable.texi: Recommend using as prefix a directory
4829         that does not exist and will never be created.  Based on
4830         discussion with Bruno Haible, Ralf Wildenhues, Matthew Woehlke,
4831         and others.
4832
4833 2007-03-17  Bruno Haible  <bruno@clisp.org>
4834
4835         * lib/fchownat.c: Include lchown.h.
4836
4837 2007-03-17  Bruno Haible  <bruno@clisp.org>
4838
4839         Fix endless loop when the given allocated size was > INT_MAX.
4840         * lib/vasnprintf.c (EOVERFLOW): New fallback definition.
4841         (VASNPRINTF): Fail with EOVERFLOW when the given allocated size is
4842         larger than INT_MAX, or when it grow to a value larger than INT_MAX.
4843         * lib/vsprintf.c (vsprintf): Don't pass a size > INT_MAX to vasnprintf.
4844         * lib/sprintf.c (sprintf): Likewise.
4845
4846 2007-03-17  Bruno Haible  <bruno@clisp.org>
4847
4848         * tests/test-argp-2.sh (func_compare): Output a context diff.
4849
4850 2007-03-17  Bruno Haible  <bruno@clisp.org>
4851
4852         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Check also the
4853         locale's decimal-point character.
4854
4855 2007-03-17  Bruno Haible  <bruno@clisp.org>
4856
4857         * lib/vasnprintf.c (VASNPRINTF): Clear out the memory used for arg_mem
4858         before comparing it. Needed because on some platforms (e.g. x86) a
4859         'long double' occupies less bytes than sizeof (long double).
4860
4861 2007-03-17  Bruno Haible  <bruno@clisp.org>
4862
4863         * tests/test-crc.c (main): Make printf statements 64-bit clean.
4864         * tests/test-gc-pbkdf2-sha1.c (main): Likewise.
4865         * tests/test-getaddrinfo.c (simple): Likewise.
4866         * tests/test-read-file.c (main): Likewise.
4867
4868 2007-03-17  Bruno Haible  <bruno@clisp.org>
4869
4870         * tests/test-dirname.c (main): Make printf statements 64-bit clean.
4871
4872 2007-03-17  Bruno Haible  <bruno@clisp.org>
4873
4874         * tests/test-xvasprintf.c (test_xvasprintf, test_xasprintf): Remove
4875         unused variable.
4876
4877 2007-03-17  Bruno Haible  <bruno@clisp.org>
4878
4879         * tests/test-c-strcasecmp.c: Include c-strcase.h.
4880         * tests/test-c-strncasecmp.c: Likewise.
4881
4882 2007-03-17  Bruno Haible  <bruno@clisp.org>
4883
4884         * modules/stdlib (Depends-on): Add unistd.
4885         * lib/stdlib_.h: Include <unistd.h> if mkstemp is desired.
4886         Needed for MacOS X 10.3.
4887
4888 2007-03-17  Bruno Haible  <bruno@clisp.org>
4889
4890         * lib/unistr/u-strdup.h: Include <stdlib.h>.
4891
4892 2007-03-17  Bruno Haible  <bruno@clisp.org>
4893
4894         * lib/unistr/u-cpy-alloc.h: Include <stdlib.h>.
4895
4896 2007-03-17  Bruno Haible  <bruno@clisp.org>
4897
4898         * gnulib-tool (func_import): Update .cvsignore and .gitignore files
4899         to reflect files copied from gnulib (with or without modifications).
4900         Suggested by Jim Meyering.
4901
4902 2007-03-17  Eric Blake  <ebb9@byu.net>
4903
4904         * NEWS: Document stdlib change from 2007-02-18.
4905
4906 2007-03-17  Jim Meyering  <jim@meyering.net>
4907
4908         Detect use of AC_CONFIG_AUX_DIR also when its argument is quoted.
4909         * build-aux/bootstrap: Put ""s around use of $build_aux, in case
4910         someone uses a name containing shell meta-characters.
4911         Reported by Alfred M. Szmidt.
4912
4913         * build-aux/bootstrap: Don't use \> in grep regexp.  For HP-UX.
4914
4915 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
4916
4917         * build-aux/bootstrap (with_gettext): New variable.  Run autopoint
4918         and copy gettext configuration files only if configure.ac contains
4919         a use of AM_GNU_GETTEXT_VERSION.
4920
4921 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
4922
4923         * build-aux/bootstrap (gnulib_name): New variable.
4924         (gnulib_tool_options): Use it.
4925
4926 2007-03-13  Simon Josefsson  <simon@josefsson.org>
4927
4928         * tests/test-des.c: Use new namespace.
4929
4930 2007-03-15  Bruno Haible  <bruno@clisp.org>
4931
4932         * lib/dummy.c (gl_dummy_symbol): Renamed from 'dummy'.
4933         Reported by James Youngman <jay@gnu.org>.
4934
4935 2007-03-15  Bruno Haible  <bruno@clisp.org>
4936
4937         * lib/glob.c (glob): Add 'restrict' so that prototype matches the
4938         declared prototype. Needed with cc on OSF/1 5.1.
4939
4940 2007-03-15  Bruno Haible  <bruno@clisp.org>
4941
4942         * lib/gl_list.h (gl_listelement_dispose_fn): New type.
4943         (gl_list_create_empty, gl_list_create): Add dispose_fn argument.
4944         (struct gl_list_implementation): Add dispose_fn argument to the
4945         'create_empty', 'create' methods.
4946         (struct gl_list_impl_base): Add field 'dispose_fn'.
4947         * lib/gl_list.c (gl_list_create_empty, gl_list_create): Add dispose_fn
4948         argument.
4949         * lib/gl_array_list.c (gl_array_create_empty, gl_array_create): Add
4950         dispose_fn argument.
4951         (gl_array_remove_node, gl_array_remove_at, gl_array_list_free): Call
4952         dispose_fn on the dropped values.
4953         * lib/gl_carray_list.c (gl_carray_create_empty, gl_carray_create): Add
4954         dispose_fn argument.
4955         (gl_carray_remove_at, gl_carray_list_free): Call dispose_fn on the
4956         dropped values.
4957         * lib/gl_anyavltree_list2.h (gl_tree_create): Add dispose_fn argument.
4958         (gl_tree_remove_node): Call dispose_fn on the dropped value.
4959         * lib/gl_anyrbtree_list2.h (gl_tree_create): Add dispose_fn argument.
4960         (gl_tree_remove_node): Call dispose_fn on the dropped value.
4961         * lib/gl_anytree_list2.h (gl_tree_create_empty): Add dispose_fn
4962         argument.
4963         (gl_tree_list_free): Call dispose_fn on the dropped values.
4964         * lib/gl_anytreehash_list2.h (gl_tree_list_free): Call dispose_fn on
4965         the dropped values.
4966         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
4967         Add dispose_fn argument.
4968         (gl_linked_remove_node, gl_linked_remove_at, gl_linked_list_free):
4969         Call dispose_fn on the dropped values.
4970         * lib/gl_sublist.c (gl_sublist_create_empty, gl_sublist_create_fill):
4971         Add dispose_fn argument.
4972         (gl_sublist_create): Initialize the 'dispose_fn' field.
4973         * lib/clean-temp.c (create_temp_dir, register_fd): Update.
4974         * tests/test-array_list.c (main): Update.
4975         * tests/test-carray_list.c (main): Update.
4976         * tests/test-avltree_list.c (main): Update.
4977         * tests/test-rbtree_list.c (main): Update.
4978         * tests/test-avltreehash_list.c (main): Update.
4979         * tests/test-rbtreehash_list.c (main): Update.
4980         * tests/test-linked_list.c (main): Update.
4981         * tests/test-linkedhash_list.c (main): Update.
4982         * tests/test-array_oset.c (main): Update.
4983
4984 2007-03-15  Bruno Haible  <bruno@clisp.org>
4985
4986         * lib/gl_oset.h (gl_setelement_dispose_fn): New type.
4987         (gl_oset_create_empty): Add dispose_fn argument.
4988         (struct gl_oset_implementation): Add dispose_fn argument to
4989         'create_empty' method.
4990         (struct gl_oset_impl_base): Add dispose_fn field.
4991         * lib/gl_oset.c (gl_oset_create_empty): Add dispose_fn argument.
4992         * lib/gl_array_oset.c (gl_array_create_empty): Add dispose_fn argument.
4993         (gl_array_remove_at, gl_array_free): Call dispose_fn on the dropped
4994         values.
4995         * lib/gl_anytree_oset.h (gl_tree_create_empty): Add dispose_fn argument.
4996         (gl_tree_oset_free): Call dispose_fn on the dropped values.
4997         * lib/gl_avltree_oset.c (gl_tree_remove_node): Call dispose_fn on the
4998         dropped value.
4999         * lib/gl_rbtree_oset.c (gl_tree_remove_node): Call dispose_fn on the
5000         dropped value.
5001         * tests/test-array_oset.c (main): Update.
5002         * tests/test-avltree_oset.c (main): Update.
5003         * tests/test-rbtree_oset.c (main): Update.
5004         * lib/gl_anytreehash_list1.h (add_to_bucket): Update.
5005
5006 2007-03-13  Bruno Haible  <bruno@clisp.org>
5007
5008         * tests/test-stdbool.c (i): Update after last patch.
5009
5010 2007-03-12  Bruno Haible  <bruno@clisp.org>
5011
5012         * lib/quotearg.c: Include <wctype.h> early, before the definition of
5013         the iswprint macro. Needed on Solaris 2.5.1.
5014
5015 2007-03-12  Bruno Haible  <bruno@clisp.org>
5016
5017         * tests/test-printf-frexp.c (main): Declare x as volatile.
5018
5019 2007-03-12  Simon Josefsson  <simon@josefsson.org>
5020
5021         * doc/gnulib.texi (Build robot for gnulib): New section.
5022
5023 2007-03-12  Jim Meyering  <jim@meyering.net>
5024
5025         * build-aux/bootstrap: New file.
5026         * build-aux/bootstrap.conf: New file, from coreutils.
5027
5028 2007-03-11  Bruno Haible  <bruno@clisp.org>
5029
5030         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Require AC_C_INLINE.
5031
5032 2007-03-12  Simon Josefsson  <simon@josefsson.org>
5033
5034         * lib/des.h, lib/des.c, lib/gc-gnulib.c: Use gl_ namespace, to
5035         avoid collisions with 'des_setkey'.  Reported by Bruno Haible
5036         <bruno@clisp.org>.  Also change 'tripledes_' to '3des_'.
5037
5038 2007-03-11  Bruno Haible  <bruno@clisp.org>
5039
5040         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): If the test program fails to
5041         compile, set LOCALE_TR_UTF8 to 'none' instead of empty.
5042
5043 2007-03-11  Bruno Haible  <bruno@clisp.org>
5044
5045         * lib/stdint_.h (INT64_MIN, INTMAX_MIN): Avoid using the ~INT..._MAX
5046         formula. Needed for SunPRO C 5.0.
5047
5048 2007-03-11  Bruno Haible  <bruno@clisp.org>
5049
5050         * modules/long-options (Depends-on): Add getopt.
5051
5052 2007-03-11  Bruno Haible  <bruno@clisp.org>
5053
5054         * modules/modechange (Depends-on): Add stdbool.
5055
5056 2007-03-11  Bruno Haible  <bruno@clisp.org>
5057
5058         * modules/i-ring (Depends-on): Add stdbool.
5059
5060 2007-03-11  Bruno Haible  <bruno@clisp.org>
5061
5062         * modules/gc-des (Depends-on): Add stdbool.
5063
5064 2007-03-11  Bruno Haible  <bruno@clisp.org>
5065
5066         * m4/mktime.m4 (gl_PREREQ_MKTIME): Require AC_C_INLINE.
5067
5068 2007-03-11  Bruno Haible  <bruno@clisp.org>
5069
5070         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Require AC_C_RESTRICT.
5071
5072 2007-03-11  Bruno Haible  <bruno@clisp.org>
5073
5074         * lib/unistr/u32-mbtouc-unsafe.c (u32_mbtouc_unsafe): Fix syntax error.
5075
5076 2007-03-11  Bruno Haible  <bruno@clisp.org>
5077
5078         * lib/vasnprintf.c (sprintf): Undefine.
5079
5080 2007-03-11  Bruno Haible  <bruno@clisp.org>
5081
5082         * lib/isnan.c (rpl_isnan, rpl_isnanl): Work around bug regarding
5083         initializers in SunPRO C and Compaq C compilers.
5084
5085 2007-03-11  Bruno Haible  <bruno@clisp.org>
5086
5087         * lib/gl_array_oset.c (gl_array_iterator_next): Make pointer
5088         decrementing code ANSI C compliant.
5089
5090 2007-03-11  Bruno Haible  <bruno@clisp.org>
5091
5092         * lib/dummy.c [__sun]: Define a dummy variable, not just a typedef.
5093         Needed for Solaris 2.5.1 ranlib and SunPRO C 5.0.
5094
5095 2007-03-11  Bruno Haible  <bruno@clisp.org>
5096
5097         * tests/test-stdbool.c (s, d, e, xlcbug): Disable checks that gnulib's
5098         <stdbool.h> substitute doesn't pass.
5099
5100 2007-03-11  Bruno Haible  <bruno@clisp.org>
5101
5102         * lib/vasnprintf.c (snprintf): Undefine. Avoids an endless recursion.
5103
5104 2007-03-11  Bruno Haible  <bruno@clisp.org>
5105
5106         * gnulib-tool (func_create_megatestdir): Create also an autobuild
5107         script, for submission to autobuild.josefsson.org.
5108
5109 2007-03-10  Bruno Haible  <bruno@clisp.org>
5110
5111         * modules/canonicalize-lgpl-tests: New file.
5112         * tests/test-canonicalize-lgpl.sh: New file.
5113         * tests/test-canonicalize-lgpl.c: New file.
5114
5115         * modules/c-strcase-tests: New file.
5116         * tests/test-c-strcase.sh: New file.
5117         * tests/test-c-strcasecmp.c: New file.
5118         * tests/test-c-strncasecmp.c: New file.
5119
5120         * modules/atexit-tests: New file.
5121         * tests/test-atexit.sh: New file.
5122         * tests/test-atexit.c: New file.
5123
5124 2007-03-10  Bruno Haible  <bruno@clisp.org>
5125
5126         * tests/test-binary-io.sh: Use temporary filenames that are not so
5127         likely to clash with those of other tests (in a parallel make).
5128         * tests/test-binary-io.c: Likewise.
5129
5130 2007-03-10  Bruno Haible  <bruno@clisp.org>
5131
5132         * lib/fseterr.c (fseterr): Port to Solaris/SPARC64. Deactivate the
5133         fallback; use #error instead.
5134         Suggested by Simon Josefsson.
5135
5136 2007-03-10  Bruno Haible  <bruno@clisp.org>
5137
5138         * gnulib-tool (func_create_testdir): Treat MOSTLYCLEANFILES like
5139         CLEANFILES. Put spaces in each line of $cleaned_files, not only the
5140         first and the last.
5141
5142 2007-03-10  Bruno Haible  <bruno@clisp.org>
5143
5144         * lib/stdint_.h (uint_least64_t): Fix typo in last patch.
5145
5146 2007-03-10  Bruno Haible  <bruno@clisp.org>
5147
5148         * modules/snprintf-posix-tests (EXTRA_DIST): New variable. Needed for
5149         "make distcheck".
5150         * modules/sprintf-posix-tests (EXTRA_DIST): Likewise.
5151         * modules/vsnprintf-posix-tests (EXTRA_DIST): Likewise.
5152         * modules/vsprintf-posix-tests (EXTRA_DIST): Likewise.
5153
5154 2007-03-10  Bruno Haible  <bruno@clisp.org>
5155
5156         * modules/allocsa-tests (test_allocsa_SOURCES): Remove redundant
5157         variable.
5158         * modules/dirname-tests (test_dirname_SOURCES): Remove redundant
5159         variable.
5160
5161 2007-03-09  Eric Blake  <ebb9@byu.net>
5162         and Matthew Woehlke  <mw_triad@users.sourceforge.net>  (tiny change)
5163
5164         * lib/stdint_.h (int64_t, uint64_t): Don't undefine if 64-bit
5165         types are not being provided by gnulib.
5166         (GL_INT64_T, GL_UINT64_T): New witnesses of whether gnulib 64-bit
5167         types are supported.
5168
5169 2007-03-10  Bruno Haible  <bruno@clisp.org>
5170
5171         * lib/stdio_.h (__attribute__): New macro.
5172         (fprintf, vfprintf, printf, vprintf, snprintf, vsnprintf, sprintf,
5173         vsprintf): Specify __attribute__ __format__ for GCC.
5174         Suggested by Eric Blake.
5175
5176 2007-03-09  Bruno Haible  <bruno@clisp.org>
5177
5178         * modules/printf-posix-tests: New file.
5179         * tests/test-printf-posix.sh: New file.
5180         * tests/test-printf-posix.c: New file.
5181
5182         * modules/printf-posix: New file.
5183         * lib/printf.c: New file.
5184         * m4/printf-posix-rpl.m4: New file.
5185         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_PRINTF_POSIX,
5186         REPLACE_PRINTF.
5187         * lib/stdio_.h (printf): New declaration.
5188         (format, __format__, ____printf____, ____scanf____, ____strftime____,
5189         ____strfmon____): New macros.
5190         * modules/stdio (Makefile.am): Substitute also GNULIB_PRINTF_POSIX,
5191         REPLACE_PRINTF.
5192
5193 2007-03-09  Bruno Haible  <bruno@clisp.org>
5194
5195         * tests/test-vasnprintf-posix2.sh: New file.
5196         * tests/test-vasnprintf-posix2.c: New file.
5197         * modules/vasnprintf-posix-tests (Files): Add them and m4/locale-fr.m4.
5198         (configure.ac): Invoke gt_LOCALE_FR and gt_LOCALE_FR_UTF8.
5199         (Makefile.am): Activate test-vasnprintf-posix2.sh.
5200
5201         * lib/vasnprintf.c (VASNPRINTF): For the 'a' and 'A' directives, use
5202         a locale dependent decimal point, rather than always '.'.
5203
5204 2007-03-09  Eric Blake  <ebb9@byu.net>
5205
5206         * lib/stdlib_.h (EXIT_FAILURE): GNU code expects this to be 1, in
5207         spite of platforms like Tandem/NSK that define it to -1.
5208
5209 2007-03-08  Bruno Haible  <bruno@clisp.org>
5210
5211         * modules/vprintf-posix-tests: New file.
5212         * tests/test-vprintf-posix.sh: New file.
5213         * tests/test-vprintf-posix.c: New file.
5214         * tests/test-printf-posix.h: New file.
5215
5216         * modules/vprintf-posix: New file.
5217         * lib/vprintf.c: New file.
5218         * m4/vprintf-posix.m4: New file.
5219         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VPRINTF_POSIX,
5220         REPLACE_VPRINTF.
5221         * lib/stdio_.h (vprintf): New declaration.
5222         * modules/stdio (Makefile.am): Substitute also GNULIB_VPRINTF_POSIX,
5223         REPLACE_VPRINTF.
5224
5225 2007-03-08  Bruno Haible  <bruno@clisp.org>
5226
5227         * modules/fprintf-posix-tests: New file.
5228         * tests/test-fprintf-posix.sh: New file.
5229         * tests/test-fprintf-posix.c: New file.
5230
5231         * modules/fprintf-posix: New file.
5232         * lib/fprintf.c: New file.
5233         * m4/fprintf-posix.m4: New file.
5234         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FPRINTF_POSIX,
5235         REPLACE_FPRINTF.
5236         * lib/stdio_.h (fprintf): New declaration.
5237         * modules/stdio (Makefile.am): Substitute also GNULIB_FPRINTF_POSIX,
5238         REPLACE_FPRINTF.
5239
5240 2007-03-08  Bruno Haible  <bruno@clisp.org>
5241
5242         * modules/vfprintf-posix-tests: New file.
5243         * tests/test-vfprintf-posix.sh: New file.
5244         * tests/test-vfprintf-posix.c: New file.
5245         * tests/test-fprintf-posix.h: New file.
5246         * tests/test-fprintf-posix.out: New file.
5247
5248         * modules/vfprintf-posix: New file.
5249         * lib/vfprintf.c: New file.
5250         * m4/vfprintf-posix.m4: New file.
5251         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VFPRINTF_POSIX,
5252         REPLACE_VFPRINTF.
5253         * lib/stdio_.h (vfprintf): New declaration.
5254         * modules/stdio (Makefile.am): Substitute also GNULIB_VFPRINTF_POSIX,
5255         REPLACE_VFPRINTF.
5256
5257 2007-03-08  Bruno Haible  <bruno@clisp.org>
5258
5259         * lib/stdio_.h: Treat __need___FILE like __need_FILE.
5260
5261 2007-03-08  Bruno Haible  <bruno@clisp.org>
5262
5263         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Use 'case' statements
5264         instead of 'expr' invocations.
5265         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
5266         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
5267         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
5268         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
5269         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
5270         Suggested by Paul Eggert.
5271
5272 2007-03-08  Bruno Haible  <bruno@clisp.org>
5273
5274         * modules/fseterr-tests: New file.
5275         * tests/test-fseterr.c: New file.
5276
5277         * modules/fseterr: New file.
5278         * lib/fseterr.h: New file.
5279         * lib/fseterr.c: New file.
5280
5281 2007-03-08  Bruno Haible  <bruno@clisp.org>
5282
5283         * lib/fnmatch_.h: Convert tabs in the middle of lines to spaces.
5284         * lib/getopt_.h: Likewise.
5285         * lib/mbswidth.h: Likewise.
5286         * lib/setenv.h: Likewise.
5287         * lib/vasnprintf.h: Likewise.
5288         * lib/vasprintf.h: Likewise.
5289         * lib/verror.h: Likewise.
5290         * lib/xsetenv.h: Likewise.
5291         * lib/xvasprintf.h: Likewise.
5292
5293 2007-03-08  Jim Meyering  <jim@meyering.net>
5294
5295         * users.txt: Add parted.
5296
5297         * ChangeLog: Restore 1500 lines mistakenly removed from the end.
5298
5299 2007-03-07  Bruno Haible  <bruno@clisp.org>
5300
5301         * m4/printf.m4: Make the shell script snippets copy&pastable.
5302
5303 2007-03-02  Bruno Haible  <bruno@clisp.org>
5304
5305         * lib/netinet_in_.h: New file.
5306         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Test whether netinet/in.h
5307         is self-contained. Set ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H.
5308         * modules/netinet_in (Files): Add lib/netinet_in_.h.
5309         (Depends-on): Add absolute-header.
5310         (Makefile.am): Substitute ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H
5311         into netinet/in.h.
5312
5313 2007-03-03  Bruno Haible  <bruno@clisp.org>
5314
5315         * lib/sys_select_.h: New file.
5316         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SELECT): Test whether sys/select.h
5317         is self-contained. Set ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H.
5318         * modules/sys_select (Files): Add lib/sys_select_.h.
5319         (Depends-on): Add absolute-header.
5320         (Makefile.am): Substitute ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H
5321         into sys/select.h.
5322
5323 2007-03-02  Bruno Haible  <bruno@clisp.org>
5324
5325         * lib/socket_.h: If sys/socket.h exists, include that and <sys/types.h>
5326         before it. Turn HAVE_WINSOCK2_H and HAVE_WS2TCPIP_H into configute-time
5327         values.
5328         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Test also whether
5329         <sys/socket.h> is self-contained. Set ABSOLUTE_SYS_SOCKET_H,
5330         HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H.
5331         * modules/sys_socket (Depends-on): Add absolute-header.
5332         (Makefile.am): Substitute ABSOLUTE_SYS_SOCKET_H, HAVE_SYS_SOCKET_H,
5333         HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H into sys/socket.h.
5334         (Include): Remove requirement of inclusion of <sys/types.h>.
5335
5336 2007-03-02  Bruno Haible  <bruno@clisp.org>
5337
5338         * lib/byteswap_.h (bswap_32): Fix formula.
5339
5340 2007-03-06  Bruno Haible  <bruno@clisp.org>
5341
5342         * modules/sprintf-posix-tests: New file.
5343         * tests/test-sprintf-posix.c: New file.
5344
5345         * modules/sprintf-posix: New file.
5346         * lib/sprintf.c: New file.
5347         * m4/sprintf-posix.m4: New file.
5348         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_SPRINTF_POSIX,
5349         REPLACE_SPRINTF.
5350         * lib/stdio_.h (sprintf): New declaration.
5351         * modules/stdio (Makefile.am): Substitute also GNULIB_SPRINTF_POSIX,
5352         REPLACE_SPRINTF.
5353
5354 2007-03-06  Bruno Haible  <bruno@clisp.org>
5355
5356         * modules/vsprintf-posix-tests: New file.
5357         * tests/test-vsprintf-posix.c: New file.
5358         * tests/test-sprintf-posix.h: New file.
5359
5360         * modules/vsprintf-posix: New file.
5361         * lib/vsprintf.c: New file.
5362         * m4/vsprintf-posix.m4: New file.
5363         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VSPRINTF_POSIX,
5364         REPLACE_VSPRINTF.
5365         * lib/stdio_.h (vsprintf): New declaration.
5366         * modules/stdio (Makefile.am): Substitute also GNULIB_VSPRINTF_POSIX,
5367         REPLACE_VSPRINTF.
5368
5369 2007-03-06  Bruno Haible  <bruno@clisp.org>
5370
5371         * modules/vsnprintf (Depend-on): Remove minmax.
5372
5373 2007-03-06  Bruno Haible  <bruno@clisp.org>
5374
5375         * modules/snprintf-posix-tests: New file.
5376         * tests/test-snprintf-posix.c: New file.
5377
5378         * modules/snprintf-posix: New file.
5379         * m4/snprintf-posix.m4: New file.
5380         * m4/snprintf.m4 (gl_REPLACE_SNPRINTF): New macro, extracted from
5381         gl_FUNC_SNPRINTF.
5382         (gl_FUNC_SNPRINTF): Invoke it.
5383         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_SNPRINTF.
5384         * lib/stdio_.h (snprintf): Define as a replacement if REPLACE_SNPRINTF
5385         is set.
5386         * modules/stdio (Makefile.am): Substitute also REPLACE_SNPRINTF.
5387
5388 2007-03-06  Bruno Haible  <bruno@clisp.org>
5389
5390         * modules/vsnprintf-posix-tests: New file.
5391         * tests/test-vsnprintf-posix.c: New file.
5392         * tests/test-snprintf-posix.h: New file.
5393
5394         * modules/vsnprintf-posix: New file.
5395         * m4/vsnprintf-posix.m4: New file.
5396         * m4/vsnprintf.m4 (gl_REPLACE_VSNPRINTF): New macro, extracted from
5397         gl_FUNC_VSNPRINTF.
5398         (gl_FUNC_VSNPRINTF): Invoke it.
5399         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_VSNPRINTF.
5400         * lib/stdio_.h (vsnprintf): Define as a replacement if
5401         REPLACE_VSNPRINTF is set.
5402         * modules/stdio (Makefile.am): Substitute also REPLACE_VSNPRINTF.
5403
5404 2007-03-06  Bruno Haible  <bruno@clisp.org>
5405
5406         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Test for vasnprintf here.
5407         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): ... not here.
5408
5409 2007-03-06  Bruno Haible  <bruno@clisp.org>
5410
5411         * lib/math_.h (acosl): Declare also if HAVE_DECL_ACOSL is set.
5412         (asinl): Declare also if HAVE_DECL_ASINL is set.
5413         (atanl): Declare also if HAVE_DECL_ATANL is set.
5414         (ceill): Declare also if HAVE_DECL_CEILL is set.
5415         (cosl): Declare also if HAVE_DECL_COSL is set.
5416         (expl): Declare also if HAVE_DECL_EXPL is set.
5417         (floorl): Declare also if HAVE_DECL_FLOORL is set.
5418         (frexpl): Declare also if HAVE_DECL_FREXPL is set.
5419         (ldexpl): Declare also if HAVE_DECL_LDEXPL is set.
5420         (logl): Declare also if HAVE_DECL_LOGL is set.
5421         (sinl): Declare also if HAVE_DECL_SINL is set.
5422         (sqrtl): Declare also if HAVE_DECL_SQRTL is set.
5423         (tanl): Declare also if HAVE_DECL_TANL is set.
5424         * modules/math (Makefile.am): Substitute the values of HAVE_DECL_*.
5425         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Set HAVE_DECL_* to 1.
5426         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Fix tests for the
5427         declaration of frexpl, ldexpl.
5428         * modules/printf-frexpl (Depends-on): Add math.
5429         * lib/printf-frexp.c (frexpl, ldexpl): Undo last change.
5430
5431 2007-03-05  Bruno Haible  <bruno@clisp.org>
5432
5433         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Also test whether
5434         frexpl and ldexpl are declared.
5435         * lib/printf-frexp.c (frexpl, ldexpl): Provide fallback declarations.
5436
5437 2007-03-05  Bruno Haible  <bruno@clisp.org>
5438
5439         * gnulib-tool (func_get_automake_snippet): Don't synthesize an
5440         EXTRA_lib_SOURCES augmentation for the relocatable-prog-wrapper module.
5441
5442 2007-03-05  Bruno Haible  <bruno@clisp.org>
5443
5444         * lib/stdio_.h: Include <stddef.h>.
5445
5446 2007-03-05  Bruno Haible  <bruno@clisp.org>
5447
5448         * m4/printf.m4 (gl_SNPRINTF_DIRECTIVE_N): New macro.
5449
5450 2007-03-05  Bruno Haible  <bruno@clisp.org>
5451
5452         * m4/printf.m4: Update with info about OpenBSD 3.9, HP-UX 10.20,
5453         NetBSD 4, from Ralf Wildenhues.
5454
5455 2007-03-04  Bruno Haible  <bruno@clisp.org>
5456
5457         * lib/vasprintf.h: Update #if logic for the case when the functions
5458         exist but are overridden.
5459
5460 2007-03-04  Bruno Haible  <bruno@clisp.org>
5461
5462         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Exclude two buggy
5463         implementations: glibc-2.4 and MacOS X 10.3.
5464         * tests/test-vasnprintf-posix.c (test_function): Test also the case
5465         that exhibits the bugs in glibc-2.4 and MacOS X 10.3.
5466         * tests/test-vasprintf-posix.c (test_function): Likewise.
5467
5468 2007-03-04  Bruno Haible  <bruno@clisp.org>
5469
5470         * modules/vasprintf-posix-tests: New file.
5471         * tests/test-vasprintf-posix.c: New file.
5472
5473         * modules/vasprintf-posix: New file.
5474         * lib/vasprintf.h (asprintf, vasprintf): Rename if REPLACE_VASPRINTF is
5475         defined.
5476         * m4/vasprintf-posix.m4: New file.
5477         * m4/vasprintf.m4 (gl_REPLACE_VASPRINTF): New macro, extracted from
5478         gl_FUNC_VASPRINTF.
5479         (gl_FUNC_VASPRINTF): Invoke it.
5480         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Define REPLACE_VASNPRINTF
5481         here.
5482         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Not here.
5483
5484 2007-03-04  Bruno Haible  <bruno@clisp.org>
5485
5486         * lib/sys_time_.h: Rename GETTIMEOFDAY_REPLACEMENT to
5487         REPLACE_GETTIMEOFDAY.
5488         * modules/sys_time (Makefile.am): Likewise.
5489         * m4/sys_time_h.m4: Likewise.
5490         * m4/gettimeofday.m4: Likewise.
5491
5492 2007-03-04  Bruno Haible  <bruno@clisp.org>
5493
5494         * modules/vasnprintf-posix-tests: New file.
5495         * tests/test-vasnprintf-posix.c: New file.
5496
5497         * modules/vasnprintf-posix: New file.
5498         * lib/vasnprintf.c: Include isnan.h, isnanl.h, printf-frexp.h,
5499         printf-frexpl.h.
5500         (VASNPRINTF): Handle the 'a' and 'A' directives here, if needed.
5501         * lib/vasnprintf.h (asnprintf, vasnprintf): Rename if
5502         REPLACE_VASNPRINTF is defined.
5503         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): New macro, extracted from
5504         gl_FUNC_VASNPRINTF.
5505         (gl_FUNC_VASNPRINTF): Invoke it.
5506         * m4/vasnprintf-posix.m4: New file.
5507         * m4/printf.m4: New file.
5508
5509 2007-03-04  Bruno Haible  <bruno@clisp.org>
5510
5511         Compile progreloc.c only if --enable-relocatable is specified.
5512         * m4/relocatable.m4 (gl_RELOCATABLE): Arrange to compile progreloc.c
5513         if --enable-relocatable was specified.
5514         * modules/relocatable-prog (Makefile.am): Remove progreloc.c from
5515         lib_SOURCES.
5516
5517 2007-03-04  Jim Meyering  <jim@meyering.net>
5518
5519         * lib/acl.c (ACL_NOT_WELL_SUPPORTED): New macro.
5520         Use it consistently, rather than enumerating errno constants.
5521
5522 2007-03-04  Bruno Haible  <bruno@clisp.org>
5523
5524         * modules/xvasprintf-tests: New file.
5525         * tests/test-xvasprintf.c: New file.
5526
5527         * modules/vasprintf-tests: New file.
5528         * tests/test-vasprintf.c: New file.
5529
5530         * modules/vasnprintf-tests: New file.
5531         * tests/test-vasnprintf.c: New file.
5532
5533         * modules/vsnprintf-tests: New file.
5534         * tests/test-vsnprintf.c: New file.
5535
5536         * modules/snprintf-tests: New file.
5537         * tests/test-snprintf.c: New file.
5538
5539 2007-03-04  Bruno Haible  <bruno@clisp.org>
5540
5541         Compile relocatable.c only if --enable-relocatable is specified.
5542         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY_BODY): Renamed from
5543         gl_RELOCATABLE_LIBRARY.
5544         (gl_RELOCATABLE_LIBRARY, gl_RELOCATABLE_LIBRARY_SEPARATE): New macros.
5545         * m4/relocatable.m4 (gl_RELOCATABLE): Invoke gl_RELOCATABLE_LIBRARY.
5546         (gl_RELOCATABLE_BODY): Require gl_RELOCATABLE_LIBRARY_BODY instead of
5547         gl_RELOCATABLE_LIBRARY.
5548         * modules/relocatable-lib (configure.ac): Invoke gl_RELOCATABLE_LIBRARY.
5549         (Makefile.am): Remove lib_SOURCES.
5550         * modules/relocatable-lib-lgpl (configure.ac): Invoke
5551         gl_RELOCATABLE_LIBRARY.
5552         (Makefile.am): Remove lib_SOURCES.
5553         * modules/relocatable-prog (Makefile.am): Don't compile relocatable.c
5554         always.
5555         * modules/relocatable-prog-wrapper (configure.ac): Invoke
5556         gl_RELOCATABLE_LIBRARY_SEPARATE instead of gl_RELOCATABLE_LIBRARY.
5557
5558 2007-03-04  Bruno Haible  <bruno@clisp.org>
5559
5560         * modules/argmatch-tests: New file.
5561         * tests/test-argmatch.c: New file.
5562
5563         * tests/test-allocsa.c (main): Halve the number of loop runs.
5564
5565         * modules/alloca-opt-tests: New file.
5566         * tests/test-alloca-opt.c: New file.
5567
5568 2007-03-04  Jim Meyering  <jim@meyering.net>
5569
5570         Work around difference between Linux ACLs and Solaris 10 ZFS.
5571         * lib/acl.c (set_acl): Revert to using chmod_or_fchmod also
5572         for EINVAL.
5573
5574 2007-03-03  Bruno Haible  <bruno@clisp.org>
5575
5576         * modules/relocatable-prog (Depends-on): Add back progreloc's
5577         dependencies: canonicalize-lgpl, xalloc, xreadlink, stdbool, unistd.
5578
5579 2007-03-03  Bruno Haible  <bruno@clisp.org>
5580
5581         * modules/relocatable-lib-lgpl: Renamed from modules/relocatable-lib.
5582         * modules/relocatable-lib: New file.
5583
5584 2007-03-03  Bruno Haible  <bruno@clisp.org>
5585
5586         * modules/relocatable-prog: Renamed from modules/relocatable.
5587         * doc/relocatable-maint.texi: Talk about module 'relocatable-prog'.
5588
5589 2007-03-03  Bruno Haible  <bruno@clisp.org>
5590
5591         * modules/relocatable-script (Files): Add doc/relocatable.texi,
5592         m4/relocatable-lib.m4.
5593         (Depends-on): Remove 'relocatable'.
5594         (configure.ac): Add gl_RELOCATABLE_NOP.
5595
5596 2007-03-03  Bruno Haible  <bruno@clisp.org>
5597
5598         * modules/relocatable-prog-wrapper: New file.
5599         * modules/relocatable (Depends-on): Add it. Remove all other
5600         dependencies except progname.
5601         (Files): Remove build-aux/install-reloc, lib/relocwrapper.c.
5602
5603         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): New macro.
5604         (gl_FUNC_STRERROR): Nop.
5605         * lib/strerror.c: Compile the file only if !HAVE_STRERROR.
5606
5607         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): New macro.
5608         * lib/setenv.c: Compile the file only if _LIBC || !HAVE_SETENV.
5609
5610         * m4/readlink.m4 (gl_FUNC_READLINK_SEPARATE): New macro.
5611         (gl_FUNC_READLINK): Update.
5612
5613         * m4/canonicalize-lgpl.m4 (gl_CANONICALIZE_LGPL_SEPARATE): New macro.
5614
5615 2007-03-03  Bruno Haible  <bruno@clisp.org>
5616
5617         * lib/xreadlink.c: Include <unistd.h> unconditionally.
5618         * modules/xreadlink (Depends-on): Add unistd.
5619         * modules/xreadlink-with-size (Depends-on): Likewise.
5620
5621 2007-03-03  Bruno Haible  <bruno@clisp.org>
5622
5623         * m4/setenv.m4 (gl_FUNC_SETENV, gl_FUNC_UNSETENV): New macros,
5624         extracted from gt_FUNC_SETENV.
5625         (gt_FUNC_SETENV): Remove macro.
5626         * modules/setenv (configure.ac): Add gl_FUNC_SETENV, gl_FUNC_UNSETENV,
5627         remove gt_FUNC_SETENV.
5628
5629 2007-03-03  Bruno Haible  <bruno@clisp.org>
5630
5631         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY): Define
5632         ENABLE_RELOCATABLE here.
5633         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Don't define it here.
5634
5635 2007-03-03  Bruno Haible  <bruno@clisp.org>
5636
5637         * modules/rbtreehash-list-tests (Depends-on): Add progname.
5638         * tests/test-rbtreehash_list.c: Include progname.h.
5639         (main): Call set_program_name.
5640
5641         * modules/rbtree-oset-tests (Depends-on): Add progname.
5642         * tests/test-rbtree_oset.c: Include progname.h.
5643         (main): Call set_program_name.
5644
5645         * modules/rbtree-list-tests (Depends-on): Add progname.
5646         * tests/test-rbtree_list.c: Include progname.h.
5647         (main): Call set_program_name.
5648
5649         * modules/linked-list-tests (Depends-on): Add progname.
5650         * tests/test-linked_list.c: Include progname.h.
5651         (main): Call set_program_name.
5652
5653 2007-03-03  Bruno Haible  <bruno@clisp.org>
5654
5655         * lib/glob-libc.h (_Restrict_): New macro, copied from lib/regex.h.
5656         All uses of __restrict changed to _Restrict_.
5657         * lib/glob_.h (__restrict): Remove macro.
5658
5659 2007-03-02  Bruno Haible  <bruno@clisp.org>
5660
5661         * modules/gettext (configure.ac): Require gettext infrastructure
5662         from version 0.16.1.
5663
5664 2007-03-02  Bruno Haible  <bruno@clisp.org>
5665
5666         * modules/linkedhash-list-tests (Depends-on): Add progname.
5667         * tests/test-linkedhash_list.c: Include progname.h.
5668         (main): Call set_program_name.
5669
5670         * modules/carray-list-tests (Depends-on): Add progname.
5671         * tests/test-carray_list.c: Include progname.h.
5672         (main): Call set_program_name.
5673
5674         * modules/avltreehash-list-tests (Depends-on): Add progname.
5675         * tests/test-avltreehash_list.c: Include progname.h.
5676         (main): Call set_program_name.
5677
5678         * modules/avltree-oset-tests (Depends-on): Add progname.
5679         * tests/test-avltree_oset.c: Include progname.h.
5680         (main): Call set_program_name.
5681
5682         * modules/avltree-list-tests (Depends-on): Add progname.
5683         * tests/test-avltree_list.c: Include progname.h.
5684         (main): Call set_program_name.
5685
5686         * modules/array-oset-tests (Depends-on): Add progname.
5687         * tests/test-array_oset.c: Include progname.h.
5688         (main): Call set_program_name.
5689
5690         * modules/array-list-tests (Depends-on): Add progname.
5691         * tests/test-array_list.c: Include progname.h.
5692         (main): Call set_program_name.
5693
5694         * modules/argp-tests (Depends-on): Add progname.
5695         * tests/test-argp.c: Include argp.h first. Include progname.h.
5696         (main): Call set_program_name.
5697
5698 2007-03-02  Paul Eggert  <eggert@cs.ucla.edu>
5699
5700         * doc/gnulib-tool.texi (Initial import): Reword description of
5701         _FILE_OFFSET_BITS and _GNU_SOURCE, since they sometimes have a
5702         limited effect even if defined after the first system include.
5703
5704 2007-03-01  Bruno Haible  <bruno@clisp.org>
5705
5706         * build-aux/config.libpath: Update to libtool-1.5.22.
5707         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
5708
5709 2007-03-01  Bruno Haible  <bruno@clisp.org>
5710
5711         * doc/relocatable-maint.texi: Recommend to set foo_CPPFLAGS, not
5712         foo_CFLAGS.
5713         Reported by Ralf Wildenhues.
5714
5715 2007-03-01  Bruno Haible  <bruno@clisp.org>
5716
5717         * build-aux/install-reloc: Remove object files left over by some
5718         compilers.
5719         Reported by Ralf Wildenhues.
5720
5721 2007-03-01  Bruno Haible  <bruno@clisp.org>
5722
5723         * build-aux/install-reloc: Break long lines.
5724
5725 2007-03-01  Bruno Haible  <bruno@clisp.org>
5726
5727         * doc/relocatable.texi: Document that it may not work on OpenBSD.
5728         Reported by Ralf Wildenhues.
5729
5730 2007-03-01  Bruno Haible  <bruno@clisp.org>
5731
5732         * doc/gnulib-tool.texi (Initial import): Remove paragraph about
5733         include ordering constraints.
5734
5735 2007-03-01  Paul Eggert  <eggert@cs.ucla.edu>
5736
5737         Followup to the 2007-02-12 patch, using suggestions from Bruno Haible in
5738         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00136.html>.
5739         * doc/gnulib-tool.texi (Initial import): Mention _FILE_OFFSET_BITS
5740         as another example.
5741         * lib/time_.h: Fix misspelling.
5742         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
5743         Require gl_HEADER_TIME_H_DEFAULTS.
5744         * m4/strptime.m4 (gl_FUNC_STRPTIME): Likewise.
5745         * m4/time_r.m4 (gl_TIME_R): Likewise.
5746         * m4/timegm.m4 (gl_FUNC_TIMEGM): Likewise.
5747
5748 2007-03-01  Bruno Haible  <bruno@clisp.org>
5749
5750         * m4/utimecmp.m4 (gl_UTIMECMP): Don't require gl_TIMESPEC.
5751         * m4/utimens.m4 (gl_UTIMENS): Likewise.
5752
5753 2007-03-01  Jim Meyering  <jim@meyering.net>
5754
5755         * modules/xreadlink (Maintainer): Add my name.
5756         * modules/xreadlink-with-size (Depends-on): Alphabetize.
5757
5758 2007-02-26  Ben Pfaff  <blp@cs.stanford.edu>
5759             Bruno Haible  <bruno@clisp.org>
5760
5761         * build-aux/install-reloc: Compile also c-ctype.c.
5762         * build-aux/relocatable.sh.in: New file.
5763         * doc/relocatable.texi: New file.
5764         * doc/relocatable-maint.texi: New file.
5765         * doc/gnulib.texi: Include relocatable-maint.texi.
5766         * lib/progreloc.c: Include unistd.h unconditionally.
5767         * lib/relocwrapper.c: Include unistd.h unconditionally.
5768         Include c-ctype.h.
5769         (add_dotbin): Use c_tolower.
5770         * m4/relocatable-lib.m4: New file, extracted from m4/relocatable.m4.
5771         (gl_RELOCATABLE_LIBRARY): Renamed from AC_RELOCATABLE_LIBRARY.
5772         (gl_RELOCATABLE_NOP): Renamed from AC_RELOCATABLE_NOP.
5773         * m4/relocatable.m4 (AC_RELOCATABLE_LIBRARY, AC_RELOCATABLE_NOP): Move
5774         to m4/relocatable-lib.m4.
5775         (gl_RELOCATABLE): Renamed from AC_RELOCATABLE. Set also
5776         RELOCATABLE_CONFIG_H_DIR, RELOCATABLE_SRC_DIR, RELOCATABLE_BUILD_DIR.
5777         (gl_RELOCATABLE_BODY): Renamed from AC_RELOCATABLE_BODY. Don't
5778         require obsolete macro AC_EXEEXT. Don't check for unistd.h. Don't set
5779         SET_RELOCATABLE. Instead set RELOCATABLE_LDFLAGS, INSTALL_PROGRAM_ENV.
5780         * modules/relocatable: New file.
5781         * modules/relocatable-lib: New file.
5782         * modules/relocatable-script: New file.
5783
5784 2007-02-28  Bruno Haible  <bruno@clisp.org>
5785
5786         Import --enable-relocatable infrastructure.
5787         * build-aux/config.libpath: New file, from GNU gettext.
5788         * build-aux/install-reloc: New file, from GNU gettext.
5789         * build-aux/reloc-ldflags: New file, from GNU gettext.
5790         * lib/relocatable.h: New file, from GNU gettext.
5791         * lib/relocatable.c: New file, from GNU gettext.
5792         * lib/relocwrapper.c: New file, from GNU gettext.
5793         * m4/relocatable.m4: New file, from GNU gettext.
5794
5795 2007-02-28  Bruno Haible  <bruno@clisp.org>
5796
5797         * MODULES.html.sh (File system functions): Add xreadlink-with-size.
5798
5799         * modules/xreadlink: New file, from GNU gettext with modifications.
5800         * lib/xreadlink.c: New file, from GNU gettext.
5801         * lib/xreadlink.h: Add comments.
5802         (xreadlink): New declaration.
5803
5804         * modules/xreadlink-with-size: Renamed from modules/xreadlink.
5805         (Files): Remove m4/xreadlink.m4. Replace lib/xreadlink.c with
5806         lib/xreadlink-with-size.c.
5807         (configure.ac): Remove gl_XREADLINK invocation.
5808         (Makefile.am): Augment lib_SOURCES.
5809         * m4/xreadlink.m4: Remove file.
5810         * lib/xreadlink-with-size.c: Renamed from lib/xreadlink.c.
5811         (xreadlink_with_size): Renamed from xreadink.
5812         * lib/xreadlink.h (xreadlink_with_size): Renamed from xreadink.
5813         * modules/canonicalize (Depends-on): Replace xreadlink with
5814         xreadlink-with-size.
5815         * lib/canonicalize.c (canonicalize_filename_mode): Update.
5816
5817 2007-02-25  Jim Meyering  <jim@meyering.net>
5818
5819         * build-aux/announce-gen: When complaining about excess arguments,
5820         list them.
5821
5822 2007-02-25  Paul Eggert  <eggert@cs.ucla.edu>
5823
5824         * README: Document signed integer overflow situation more
5825         accurately.
5826
5827 2007-02-25  Bruno Haible  <bruno@clisp.org>
5828
5829         * lib/vasnprintf.c (VASNPRINTF): Fix estimate of size needed for a
5830         'a' or 'A' conversion.
5831
5832 2007-02-25  Bruno Haible  <bruno@clisp.org>
5833
5834         * modules/filename: Renamed from modules/pathname.
5835         (Files): Replace lib/pathname.h with lib/filename.h. Replace
5836         lib/concatpath.c with lib/concat-filename.c.
5837         (Makefile.am): Update.
5838         (Include): Replace pathname.h with filename.h.
5839         * lib/filename.h: Renamed from lib/pathname.h.
5840         (concatenated_filename): Renamed from concatenated_pathname.
5841         * lib/concat-filename.c: Renamed from lib/concatpath.c.
5842         (concatenated_filename): Renamed from concatenated_pathname.
5843         * lib/findprog.c: Include filename.h instead of pathname.h.
5844         (find_in_path): Update.
5845         * lib/javacomp.c: Include filename.h instead of pathname.h.
5846         (is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_14_usable,
5847         is_envjavac_oldgcj_14_13_usable, is_envjavac_nongcj_usable,
5848         is_gcj_present, is_gcj43_usable, is_oldgcj_14_14_usable,
5849         is_oldgcj_14_13_usable, is_javac_usable): Update.
5850         * lib/javaexec.c: Include filename.h instead of pathname.h.
5851         (execute_java_class): Update.
5852         * modules/findprog: Update.
5853         * modules/javacomp: Update.
5854         * modules/javaexec: Update.
5855         * MODULES.html.sh (File system functions): Add 'filename', remove
5856         'pathname'.
5857
5858 2007-02-25  Bruno Haible  <bruno@clisp.org>
5859
5860         * modules/printf-frexpl-tests: New file.
5861         * tests/test-printf-frexpl.c: New file.
5862
5863         * modules/printf-frexpl: New file.
5864         * lib/printf-frexpl.h: New file.
5865         * lib/printf-frexpl.c: New file.
5866         * m4/printf-frexpl.m4: New file.
5867
5868 2007-02-25  Bruno Haible  <bruno@clisp.org>
5869
5870         * modules/printf-frexp-tests: New file.
5871         * tests/test-printf-frexp.c: New file.
5872
5873         * modules/printf-frexp: New file.
5874         * lib/printf-frexp.h: New file.
5875         * lib/printf-frexp.c: New file.
5876         * m4/printf-frexp.m4: New file.
5877
5878 2007-02-25  Bruno Haible  <bruno@clisp.org>
5879
5880         Assume automake >= 1.10 for the tests.
5881         * modules/arcfour-tests (TESTS): Remove $(EXEEXT) suffix.
5882         * modules/arctwo-tests: Likewise.
5883         * modules/argp-tests: Likewise.
5884         * modules/avltree-list-tests: Likewise.
5885         * modules/avltree-oset-tests: Likewise.
5886         * modules/avltreehash-list-tests: Likewise.
5887         * modules/carray-list-tests: Likewise.
5888         * modules/crc-tests: Likewise.
5889         * modules/des-tests: Likewise.
5890         * modules/gc-arcfour-tests: Likewise.
5891         * modules/gc-arctwo-tests: Likewise.
5892         * modules/gc-des-tests: Likewise.
5893         * modules/gc-hmac-md5-tests: Likewise.
5894         * modules/gc-hmac-sha1-tests: Likewise.
5895         * modules/gc-md2-tests: Likewise.
5896         * modules/gc-md4-tests: Likewise.
5897         * modules/gc-md5-tests: Likewise.
5898         * modules/gc-pbkdf2-sha1-tests: Likewise.
5899         * modules/gc-rijndael-tests: Likewise.
5900         * modules/gc-sha1-tests: Likewise.
5901         * modules/gc-tests: Likewise.
5902         * modules/getaddrinfo-tests: Likewise.
5903         * modules/hmac-md5-tests: Likewise.
5904         * modules/hmac-sha1-tests: Likewise.
5905         * modules/linked-list-tests: Likewise.
5906         * modules/linkedhash-list-tests: Likewise.
5907         * modules/lock-tests: Likewise.
5908         * modules/md2-tests: Likewise.
5909         * modules/md4-tests: Likewise.
5910         * modules/md5-tests: Likewise.
5911         * modules/rbtree-list-tests: Likewise.
5912         * modules/rbtree-oset-tests: Likewise.
5913         * modules/rbtreehash-list-tests: Likewise.
5914         * modules/read-file-tests: Likewise.
5915         * modules/rijndael-tests: Likewise.
5916         * modules/stdint-tests: Likewise.
5917         * modules/tls-tests: Likewise.
5918
5919 2007-02-24  Bruno Haible  <bruno@clisp.org>
5920
5921         * lib/isnanl.h (isnanl): Define through isnan if isnan is a macro.
5922         * m4/isnan.m4 (gl_FUNC_ISNAN_NO_LIBM): Don't check for isnan as a
5923         function; instead check whether isnan with a double argument links.
5924         * m4/isnanl.m4 (gl_FUNC_ISNANL_NO_LIBM): Don't check for isnanl as a
5925         function; instead check whether isnan with a 'long double' argument
5926         links.
5927         Reported by Eric Blake <ebb9@byu.net>.
5928
5929 2007-02-24  Bruno Haible  <bruno@clisp.org>
5930
5931         * lib/isnan.c: Support the 'long double' case if USE_LONG_DOUBLE is
5932         defined.
5933         * lib/isnanl.c: Remove all code. Just include isnan.c.
5934         * modules/isnanl-nolibm (Files): Add lib/isnan.c.
5935
5936 2007-02-25  Jim Meyering  <jim@meyering.net>
5937
5938         Avoid conflicting types for 'unsetenv' on FreeBSD.
5939         * lib/putenv.c (_unsetenv): Rename from "unsetenv", to avoid
5940         conflicting with FreeBSD's (5.0 and 6.1) function declaration
5941         in stdlib.h.
5942
5943 2007-02-24  Bruno Haible  <bruno@clisp.org>
5944
5945         * modules/isnanl-nolibm-tests: New file.
5946         * tests/test-isnanl.c: New file.
5947
5948         * modules/isnanl-nolibm: New file.
5949         * lib/isnanl.h: New file.
5950         * lib/isnanl.c: New file.
5951         * m4/isnanl.m4: New file.
5952
5953 2007-02-24  Bruno Haible  <bruno@clisp.org>
5954
5955         * modules/isnan-nolibm-tests: New file.
5956         * tests/test-isnan.c: New file.
5957
5958         * modules/isnan-nolibm: New file.
5959         * lib/isnan.h: New file.
5960         * lib/isnan.c: New file.
5961         * m4/isnan.m4: New file.
5962
5963 2007-02-24  Bruno Haible  <bruno@clisp.org>
5964
5965         * lib/frexpl.c (frexpl): Correct return values for x = 1.0L. Don't
5966         assume that an exponent fits in 20 bits.
5967
5968 2007-02-24  Jim Meyering  <jim@meyering.net>
5969
5970         * m4/regex.m4: Update the description of the configure-time option,
5971         --without-included-regex, to state accurately what the defaults are,
5972         and perhaps to give people an idea why using this option is risky.
5973
5974 2007-02-24  Paul Eggert  <eggert@cs.ucla.edu>
5975
5976         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check for a nanosleep that
5977         loops on small arguments.  This attempts to avoid the problem
5978         Bruno Haible reported for AIX 4.3.2 in
5979         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00309.html>.
5980
5981 2007-02-23  Bruno Haible  <bruno@clisp.org>
5982
5983         * m4/perl.m4 (gl_PERL): Require version 5.005, not 5.003.
5984         Needed for help2man.
5985
5986 2007-02-23  Karl Berry  <karl@gnu.org>
5987
5988         * doc/gnulib-tool.texi (CVS Issues): mention that when foo_.h
5989         exists, foo.h should be cvs-ignored, not committed.
5990
5991 2007-02-23  Eric Blake  <ebb9@byu.net>
5992
5993         * lib/getdate.h (includes):  Include <time.h>, not "timespec.h".
5994         * lib/stat-time.h (includes): Likewise.
5995         * lib/utimecmp.c (includes): Likewise.
5996         * lib/utimens.h (includes): Likewise.
5997         * lib/getdate.y (includes): Also include "timespec.h" for use
5998         internal to the module.
5999         * modules/utimens (Depends-on): Revert yesterday's patch.
6000         * modules/nanosleep (Depends-on): Add missing dependency.
6001
6002 2007-02-22  Bruno Haible  <bruno@clisp.org>
6003
6004         * lib/glob.c: Don't include getlogin_r.h.
6005
6006 2007-02-22  Jim Meyering  <jim@meyering.net>
6007
6008         * modules/utimens (Depends-on): Add timespec, required for
6009         utimens.h's inclusion of timespec.h.
6010
6011 2007-02-21  Paul Eggert  <eggert@cs.ucla.edu>
6012
6013         * lib/getcwd.c (__getcwd): Undo previous change; it mishandled
6014         long unreadable paths in GNU/Linux.  Problem reported by Andreas
6015         Schwab in
6016         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00261.html>.
6017         I'll try to think of a better way to fix the Solaris problem.
6018
6019         * lib/getcwd.c (__getcwd): Don't assume getcwd (NULL, 0) works
6020         like glibc; on Solaris 10, it fails with errno == EINVAL.
6021         POSIX says the behavior is unspecified if the first argument is NULL,
6022         so play it safe and never pass NULL to the system getcwd.
6023
6024 2007-02-21  Jim Meyering  <jim@meyering.net>
6025
6026         * lib/gettimeofday.c (rpl_gettimeofday): Remove declaration
6027         of gettimeofday.  It would conflict with the one now always
6028         provided via sys_time_.h.  Reported by Matthew Woehlke, as
6029         an IRIX 6.5 build failure.
6030
6031 2007-02-20  Paul Eggert  <eggert@cs.ucla.edu>
6032
6033         Minor fixups to port to Solaris 10 with Sun C 5.8.
6034         * lib/getcwd.c [!_LIBC]: Include dirfd.h, since we use dirfd.
6035         * modules/getcwd (Depends-on): Add dirfd.
6036         * lib/putenv.c (putenv): #undef it.
6037         (rpl_putenv): New decl.
6038         (malloc, free): Include <stdlib.h> rather than prototyping separately.
6039
6040 2007-02-20  Bruno Haible  <bruno@clisp.org>
6041
6042         * modules/stdio-tests: New file.
6043         * tests/test-stdio.c: New file.
6044
6045         * modules/vsnprintf (Files): Remove lib/vsnprintf.h.
6046         (Depends-on): Add stdio.
6047         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
6048         (Include): Use <stdio.h> instead of vsnprintf.h.
6049         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
6050         HAVE_DECL_VSNPRINTF.
6051         * lib/vsnprintf.c: Include <stdio.h> instead of vsnprintf.h.
6052
6053         * modules/snprintf (Files): Remove lib/snprintf.h.
6054         (Depends-on): Add stdio.
6055         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
6056         (Include): Use <stdio.h> instead of snprintf.h.
6057         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
6058         HAVE_DECL_SNPRINTF.
6059         * lib/snprintf.c: Include <stdio.h> instead of snprintf.h.
6060         * lib/getaddrinfo.c: Likewise.
6061
6062         * modules/stdio: New file.
6063         * lib/stdio_.h: New file, incorporating snprintf.h and vsnprintf.h.
6064         * lib/snprintf.h: Remove file.
6065         * lib/vsnprintf.h: Remove file.
6066         * lib/.cppi-disable: Remove snprintf.h.
6067         * m4/stdio_h.m4: New file.
6068         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdio.
6069
6070 2007-02-20  Jim Meyering  <jim@meyering.net>
6071
6072         * lib/ftruncate.c [HAVE_CHSIZE]: Document that this code is
6073         used by e.g., mingw.  From Bruno Haible.
6074
6075 2007-02-19  Bruno Haible  <bruno@clisp.org>
6076
6077         * lib/string_.h: Use "#pragma GCC system_header" to suppress some gcc
6078         warnings.
6079         Reported by Ben Pfaff <blp@cs.stanford.edu>.
6080
6081 2007-02-19  Bruno Haible  <bruno@clisp.org>
6082
6083         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Don't request a complaint mail
6084         from mingw users.
6085
6086 2007-02-19  Bruno Haible  <bruno@clisp.org>
6087
6088         * lib/stdlib_.h: Use "#pragma GCC system_header" to suppress some gcc
6089         warnings.
6090         Reported by Joel E. Denny <jdenny@ces.clemson.edu> via Paul Eggert.
6091
6092 2007-02-19  Jim Meyering  <jim@meyering.net>
6093
6094         Don't use FD after a successful "fdopendir (fd)".
6095         * lib/getcwd.c (__getcwd) [AT_FDCWD]: fdopendir (fd) usually closes fd.
6096         Reset it by calling dirfd on the just-obtained DIR*.
6097
6098         * m4/ftruncate.m4: Adjust comment to give this module a 3-year reprieve.
6099         Prompted by a report from Bruno Haible that mingw lacks ftruncate.
6100
6101 2007-02-18  Bruno Haible  <bruno@clisp.org>
6102
6103         * lib/readlink.c: Include <unistd.h>.
6104         * m4/readlink.m4 (gl_FUNC_READLINK): Require gl_UNISTD_H_DEFAULTS. Set
6105         HAVE_READLINK.
6106         * modules/readlink (Depends-on): Add unistd.
6107         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
6108         (Include): Add <unistd.h>.
6109
6110         * lib/getlogin_r.h: Remove file.
6111         * lib/getlogin_r.c: Include <unistd.h> instead of getlogin_r.h.
6112         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE): Remove macro.
6113         (gl_GETLOGIN_R): Inline it here. Require gl_UNISTD_H_DEFAULTS. Set
6114         HAVE_DECL_GETLOGIN_R.
6115         * modules/getlogin_r (Files): Remove lib/getlogin_r.h.
6116         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
6117         (Include): Use <unistd.h> instead of getlogin_r.h.
6118
6119         * lib/getcwd.h: Remove file.
6120         * lib/getcwd.c: Include <unistd.h> instead of getcwd.h.
6121         * lib/xgetcwd.c: Likewise.
6122         * m4/getcwd.m4 (gl_FUNC_GETCWD): Require gl_UNISTD_H_DEFAULTS. Set
6123         REPLACE_GETCWD. Don't define __GETCWD_PREFIX.
6124         * modules/getcwd (Files): Remove lib/getcwd.h.
6125         (Depends-on): Add unistd.
6126         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
6127         (Include): Use <unistd.h> instad of getcwd.h.
6128
6129         * lib/ftruncate.c: Include <unistd.h> first.
6130         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Require gl_UNISTD_H_DEFAULTS.
6131         Set HAVE_FTRUNCATE.
6132         * modules/ftruncate (Depends-on): Add unistd.
6133         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
6134
6135         * lib/fchdir.c: Include <unistd.h> first.
6136         * lib/dirent_.h: Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT.
6137         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_UNISTD_H_DEFAULTS instead
6138         of gl_HEADER_UNISTD_DEFAULTS. Set REPLACE_FCHDIR. Don't set UNISTD_H.
6139         * modules/fchdir (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
6140         (Makefile.am): Substitute also REPLACE_FCHDIR into dirent.h.
6141
6142         * lib/dup2.c: Include <unistd.h> first.
6143         * m4/dup2.m4 (gl_FUNC_DUP2): Require gl_UNISTD_H_DEFAULTS. Set
6144         HAVE_DUP2.
6145         * modules/dup2 (Depends-on): Add unistd.
6146         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
6147
6148         * lib/chown.c: Include <unistd.h> first. Undefine chown later.
6149         * m4/chown.m4 (gl_FUNC_CHOWN): Require gl_UNISTD_H_DEFAULTS. Set
6150         REPLACE_CHOWN. Don't define chown as a macro here.
6151         * modules/chown (Depends-on): Add unistd.
6152         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
6153
6154         * lib/unistd_.h: Test HAVE_UNISTD_H determined at configure time.
6155         Add definition for GL_LINK_WARNING.
6156         (chown, dup2): New declarations.
6157         (fchdir): Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT. Provide optional
6158         link warning.
6159         (ftruncate): New declaration.
6160         (getcwd): New declaration, taken from old getcwd.h.
6161         (getlogin_r): New declaration, taken from old getlogin_r.h.
6162         (readlink): New declaration.
6163         * m4/unistd_h.m4 (gl_UNISTD_H): Renamed from gl_HEADER_UNISTD. Don't
6164         set UNISTD_H. Inline gl_PREREQ_UNISTD. Set HAVE_UNISTD_H.
6165         (gl_PREREQ_UNISTD): Remove macro.
6166         (gl_UNISTD_MODULE_INDICATOR): New macro.
6167         (gl_UNISTD_H_DEFAULTS): Renamed from gl_HEADER_UNISTD_DEFAULTS. Set
6168         many new variables. Don't set UNISTD_H.
6169         * modules/unistd (Description): Change.
6170         (Depends-on): Add link-warning.
6171         (configure.ac): Update.
6172         (Makefile.am): Create unistd.h always. Substitute many new variables
6173         into it.
6174
6175 2007-02-18  Bruno Haible  <bruno@clisp.org>
6176
6177         * lib/stdlib_.h (getsubopt): New declaration, copied from getsubopt.h.
6178         * modules/stdlib (stdlib.h): Also substitute GNULIB_GETSUBOPT and
6179         HAVE_GETSUBOPT.
6180         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Also initialize
6181         GNULIB_GETSUBOPT and HAVE_GETSUBOPT.
6182         * lib/getsubopt.h: Remove file.
6183         * modules/getsubopt (Files): Remove lib/getsubopt.h.
6184         (Depends-on): Add stdlib.
6185         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
6186         (Includes): Use <stdlib.h> instead of getsubopt.h.
6187         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Require gl_STDLIB_H_DEFAULTS.
6188         Set HAVE_GETSUBOPT.
6189         * lib/getsubopt.c: Don't include getsubopt.h.
6190
6191 2007-02-18  Bruno Haible  <bruno@clisp.org>
6192
6193         * modules/fchdir (Depends-on): Add dup2.
6194
6195 2007-02-18  Bruno Haible  <bruno@clisp.org>
6196
6197         * lib/stdlib_.h: Handle glibc's special invocation convention
6198         specially.
6199
6200 2007-02-18  Bruno Haible  <bruno@clisp.org>
6201
6202         * modules/stdlib-tests: New file.
6203         * tests/test-stdlib.c: New file.
6204
6205         * modules/mkstemp (Files): Remove lib/mkstemp.h.
6206         (Depends-on): Add stdlib.
6207         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
6208         (Includes): Use <stdlib.h> instead of mkstemp.h.
6209         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require gl_STDLIB_H_DEFAULTS. Set
6210         REPLACE_MKSTEMP. Remove definition of __MKSTEMP_PREFIX.
6211         * lib/mkstemp.c: Don't include mkstemp.h.
6212         * lib/mkstemp-safer.c: Include <stdlib.h> instead of mkstemp.h.
6213         * lib/stdlib--.h: Don't include mkstemp.h.
6214
6215         * modules/mkdtemp (Files): Remove lib/mkdtemp.h.
6216         (Depends-on): Add stdlib.
6217         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
6218         (Includes): Use <stdlib.h> instead of mkdtemp.h.
6219         * m4/mkdtemp.m4 (gt_FUNC_MKDTEMP): Require gl_STDLIB_H_DEFAULTS. Set
6220         HAVE_MKDTEMP.
6221         * lib/mkdtemp.c: Don't include mkdtemp.h.
6222         * lib/clean-temp.c: Don't include mkdtemp.h.
6223
6224         * modules/exit (Files): Remove lib/exit.h.
6225         (Depends-on): Add stdlib.
6226         (Makefile.am): Remove lib_SOURCES.
6227         (Include): Use <stdlib.h> instead of exit.h.
6228         * lib/argmatch.c: Don't include exit.h.
6229         * lib/execute.c: Likewise.
6230         * lib/pagealign_alloc.c: Likewise.
6231         * lib/pipe.c: Likewise.
6232         * lib/wait-process.c: Likewise.
6233         * lib/copy-file.c: Include <stdlib.h> instead of exit.h.
6234         * lib/exitfail.c: Likewise.
6235         * lib/savewd.c: Likewise.
6236         * lib/xsetenv.c: Likewise.
6237
6238         * modules/stdlib: New file.
6239         * lib/stdlib_.h: New file, incorporating exit.h, mkdtemp.h, mkstemp.h
6240         and extra comments about mkstemp().
6241         * lib/exit.h: Remove file.
6242         * lib/mkdtemp.h: Remove file.
6243         * lib/mkstemp.h: Remove file.
6244         * m4/stdlib_h.m4: New file.
6245         * MODULES.html.sh (Support for systems lacking ANSI C 89): Add stdlib.
6246
6247 2007-02-18  Bruno Haible  <bruno@clisp.org>
6248
6249         * modules/math-tests: New file.
6250         * tests/test-math.c: New file.
6251
6252         * modules/math: New file.
6253         * modules/mathl (Files): Remove lib/mathl.h.
6254         (Depends-on): Add math.
6255         (Makefile.am): Don't mention mathl.h.
6256         (Include): Use <math.h> instead of mathl.h.
6257         * lib/math_.h: New file.
6258         * lib/mathl.h: Remove file.
6259         * lib/acosl.c: Include <config.h> and <math.h> first. Don't include
6260         mathl.h.
6261         * lib/asinl.c: Likewise.
6262         * lib/atanl.c: Likewise.
6263         * lib/ceill.c: Likewise.
6264         * lib/cosl.c: Likewise.
6265         * lib/expl.c: Likewise.
6266         * lib/floorl.c: Likewise.
6267         * lib/frexpl.c: Likewise.
6268         * lib/ldexpl.c: Likewise.
6269         * lib/logl.c: Likewise.
6270         * lib/sincosl.c: Likewise.
6271         * lib/sinl.c: Likewise.
6272         * lib/sqrtl.c: Likewise.
6273         * lib/tanl.c: Likewise.
6274         * lib/trigl.c: Likewise.
6275         * m4/math_h.m4: New file.
6276         * MODULES.html.sh (Mathematics): Add math.
6277
6278 2007-02-17  Bruno Haible  <bruno@clisp.org>
6279
6280         * modules/wctype-tests: New file.
6281         * tests/test-wctype.c: New file.
6282
6283         * modules/wchar-tests: New file.
6284         * tests/test-wchar.c: New file.
6285
6286         * modules/unistd-tests: New file.
6287         * tests/test-unistd.c: New file.
6288
6289         * modules/time-tests: New file.
6290         * tests/test-time.c: New file.
6291
6292         * modules/sysexits-tests: New file.
6293         * tests/test-sysexits.c: New file.
6294
6295         * modules/sys_time-tests: New file.
6296         * tests/test-sys_time.c: New file.
6297
6298         * modules/sys_stat-tests: New file.
6299         * tests/test-sys_stat.c: New file.
6300
6301         * modules/sys_socket-tests: New file.
6302         * tests/test-sys_socket.c: New file.
6303
6304         * modules/sys_select-tests: New file.
6305         * tests/test-sys_select.c: New file.
6306
6307         * modules/string-tests: New file.
6308         * tests/test-string.c: New file.
6309
6310         * modules/stdbool-tests: New file.
6311         * tests/test-stdbool.c: New file.
6312
6313         * modules/netinet_in-tests: New file.
6314         * tests/test-netinet_in.c: New file.
6315
6316         * modules/inttypes-tests: New file.
6317         * tests/test-inttypes.c: New file.
6318
6319         * modules/fcntl-tests: New file.
6320         * tests/test-fcntl.c: New file.
6321
6322         * modules/byteswap-tests: New file.
6323         * tests/test-byteswap.c: New file.
6324
6325         * modules/arpa_inet-tests: New file.
6326         * tests/test-arpa_inet.c: New file.
6327
6328 2007-02-17  Bruno Haible  <bruno@clisp.org>
6329
6330         * lib/inttypes_.h: Add definition for GL_LINK_WARNING.
6331         (imaxabs, imaxdiv, strtoimax, strtoumax): Don't declare the function
6332         if the corresponding module is not enabled. Emit link warnings if
6333         the function is used nevertheless.
6334         * m4/inttypes.m4 (gl_INTTYPES_H): Never use the existing <inttypes.h>.
6335         Don't AC_SUBST HAVE_DECL_IMAXABS, HAVE_DECL_IMAXDIV,
6336         HAVE_DECL_STRTOIMAX, HAVE_DECL_STRTOUMAX.
6337         (gl_INTTYPES_MODULE_INDICATOR, gl_INTTYPES_H_DEFAULTS): New macros.
6338         * modules/inttypes (Depends-on): Add link-warning.
6339         (Makefile.am): Copy the contents of build-aux/link-warning.h into
6340         inttypes.h. Substitute also GNULIB_IMAXABS, GNULIB_IMAXDIV,
6341         GNULIB_STRTOIMAX, GNULIB_STRTOUMAX.
6342         * modules/imaxabs (configure.ac): Invoke gl_INTTYPES_MODULE_INDICATOR.
6343         * modules/imaxdiv (configure.ac): Likewise.
6344         * modules/strtoimax (configure.ac): Likewise.
6345         * modules/strtoumax (configure.ac): Likewise.
6346
6347 2007-02-17  Bruno Haible  <bruno@clisp.org>
6348
6349         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of
6350         gl_STRING_MODULE_INDICATOR_DEFAULTS.
6351         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Remove macro.
6352         (gl_HEADER_STRING_H_BODY, gl_STRING_MODULE_INDICATOR): Update.
6353
6354 2007-02-17  Bruno Haible  <bruno@clisp.org>
6355
6356         * modules/link-warning: New file.
6357         * build-aux/link-warning.h: New file, extracted from lib/string_.h.
6358         * lib/string_.h (GL_LINK_WARNING): Remove definition.
6359         * modules/string (Depends-on): Add link-warning.
6360         (Makefile.am): Copy the contents of build-aux/link-warning.h into
6361         string.h.
6362         * MODULES.html.sh (Support for building libraries and executables): Add
6363         link-warning.
6364
6365 2007-02-17  Bruno Haible  <bruno@clisp.org>
6366
6367         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strcasecmp,
6368         strncasecmp, strchr, strchrnul, strdup, strndup, strnlen, strcspn,
6369         strpbrk, strspn, strrchr, strsep, strstr, strcasestr, strtok_r): Break
6370         long lines.
6371
6372 2007-02-17  Ben Pfaff  <blp@cs.stanford.edu>
6373             Bruno Haible  <bruno@clisp.org>
6374
6375         * modules/tmpfile: New file.
6376         * lib/tmpfile.c: New file.
6377         * m4/tmpfile.m4: New file.
6378         * MODULES.html.sh (func_all_modules): New section "Input/output".
6379
6380 2007-02-15  Bruno Haible  <bruno@clisp.org>
6381
6382         * lib/clean-temp.c [WIN32 && !CYGWIN]: Include <windows.h>.
6383         (supports_delete_on_close): New function.
6384         (open_temp, fopen_temp): Use _O_TEMPORARY when supported.
6385
6386 2007-02-14  Bruno Haible  <bruno@clisp.org>
6387
6388         * modules/mbspcasecmp-tests: New file.
6389         * tests/test-mbspcasecmp.sh: New file.
6390         * tests/test-mbspcasecmp.c: New file.
6391
6392         New module mbspcasecmp.
6393         * modules/mbspcasecmp: New file.
6394         * lib/mbspcasecmp.c: New file.
6395         * lib/string_.h (strncasecmp): Change warning message.
6396         (mbspcasecmp): New declaration.
6397         * m4/mbspcasecmp.m4: New file.
6398         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6399         GNULIB_MBSPCASECMP.
6400         * modules/string (string.h): Also substitute GNULIB_MBSPCASECMP.
6401         * MODULES.html.sh (Internationalization functions): Add mbspcasecmp.
6402
6403 2007-02-14  Bruno Haible  <bruno@clisp.org>
6404
6405         * modules/mbsncasecmp-tests: New file.
6406         * tests/test-mbsncasecmp.sh: New file.
6407         * tests/test-mbsncasecmp.c: New file.
6408
6409         New module mbsncasecmp.
6410         * modules/mbsncasecmp: New file.
6411         * lib/mbsncasecmp.c: New file.
6412         * lib/string_.h (mbsncasecmp): New declaration.
6413         * m4/mbsncasecmp.m4: New file.
6414         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6415         GNULIB_MBSNCASECMP.
6416         * modules/string (string.h): Also substitute GNULIB_MBSNCASECMP.
6417         * MODULES.html.sh (Internationalization functions): Add mbsncasecmp.
6418
6419 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
6420
6421         * lib/exclude.c (FNM_EXTMATCH): Define if system does not.
6422         Verify that it doesn't overlap with our flags.
6423         (fnmatch_no_wildcards): Don't use strcasecmp or strncasecmp, which
6424         do not have the desired effect in multibyte locales; instead, use
6425         mbscasecmp.
6426         * modules/exclude (Depends-on): Depend on mbscasecmp, not strcase.
6427         Add dependency on xalloc.  Depend on fnmatch, not fnmatch-gnu, since
6428         we don't require GNU fnmatch ourselves (if our users require it, they
6429         should do so explicitly).
6430
6431         Fix regex code so it doesn't rely on strcasecmp.
6432         * lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
6433         Otherwise, include gnulib's langinfo.h.
6434         * lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
6435         undesirable behavior in non-C locales.  Instead, rely on localecharset.
6436         * m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
6437         * modules/regex (FILES): Remove m4/codeset.m4.
6438         (Depends-on): Add localcharset.  Remove strcase.
6439
6440 2007-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6441
6442         * m4/unlinkdir.m4 (gl_UNLINKDIR): Fix m4 quoting bug.
6443         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
6444
6445 2007-02-13  Bruno Haible  <bruno@clisp.org>
6446
6447         * m4/intdiv0.m4 (gt_INTDIV0): Assume ANSI C. Fix underquoting bug.
6448         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6449
6450 2007-02-12  Bruno Haible  <bruno@clisp.org>
6451
6452         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
6453         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): If
6454         GNULIB_POSIXCHECK and the gnulib module not enabled, provoke a link-
6455         time warning rather than a link error.
6456
6457 2007-02-12  Bruno Haible  <bruno@clisp.org>
6458
6459         * m4/locale-fr.m4 (gt_LOCALE_FR): Fix m4 quoting bug.
6460         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
6461         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6462
6463 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
6464
6465         * lib/string_.h (strncasecmp): Fix typo: this macro takes 3
6466         args, not 2.
6467
6468 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
6469
6470         New module 'time', so that apps can include <time.h> as per
6471         POSIX and GNU instead of separate include files like time_r.h
6472         and timegm.h.  This implementation tries out a simpler approach
6473         for replacing decls in standard include files (as compared to
6474         the string module), somewhat as an experiment.
6475
6476         * config/srclist.txt: Comment out mktime.c for now.
6477         * doc/gnulib-tool.texi (Initial import): Don't use time_r as an example
6478         since it doesn't apply any more.  Use generic wording instead.
6479         * MODULES.html.sh (Support for systems lacking POSIX:2001): New module
6480         'time'.
6481         * lib/time_.h, m4/time_h.m4, modules/time: New files.
6482         * lib/strptime.h, lib/time_r.h, lib/timegm.h: Remove.
6483         * lib/mktime.c: Include config.h depending on _LIBC, not HAVE_CONFIG_H.
6484         Don't include <sys/types.h>; no longer needed since we assume C89.
6485         * lib/mktime.c: Don't include "time_r.h"; no longer needed.
6486         * lib/strftime.c: Likewise.
6487         * lib/time_r.c: Likewise.
6488         * lib/nanosleep.c (nanosleep): #undef after include files, not before.
6489         * lib/nanosleep.c: Include <time.h> first, to check interface.
6490         * lib/strptime.c: Likewise.
6491         * lib/time_r.c: Likewise.
6492         * lib/timegm.c: Likewise.
6493         * lib/strptime.c: Don't include strptime.h or time_r.h; no longer
6494         needed.
6495         * lib/timegm.c: Don't include timegm.h; no longer needed.
6496         * lib/timespec.h: Don't include <sys/time.h> before <time.h>;
6497         time.h now handles any problems in that area.
6498         (struct timespec, nanosleep): Remove; time.h now arranges for these.
6499         * lib/xnanosleep.c: Don't include timespec.h; no longer needed now
6500         that time.h defines struct timespec.
6501         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check that nanosleep is declared.
6502         Set REPLACE_NANOSLEEP.  Don't AC_DEFINE nanosleep; the time module now
6503         handles that.
6504         * m4/strptime.m4 (gl_FUNC_STPRTIME): Set REPLACE_STRPTIME.
6505         * m4/time_r.m4 (gl_TIME_R): Don't define HAVE_TIME_R_POSIX; no longer
6506         needed.  Set REPLACE_LOCALTIME.
6507         * m4/timegm.m4 (gl_FUNC_TIMEGM): Set REPLACE_TIMEGM.
6508         * m4/timespec.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Move to time_h.m4.
6509         (gl_TIMESPEC): Don't check for sys/time.h or struct timespec or
6510         nanosleep; time_h.m4 now does that.  Don't require
6511         gl_USE_SYSTEM_EXTENSIONS; no longer needed directly, and the time
6512         module handles this now.
6513         * modules/getdate (Depends-on): Remove timespec.  Add time.
6514         * modules/nanosleep (Depends-on): Likewise.
6515         * modules/stat-time (Depends-on): Likewise.
6516         * modules/nanosleep (Include): Include time.h, not timespec.h.
6517         * modules/strptime (Files): Remove lib/strptime.h.
6518         (Depends-on): Add extensions, time.
6519         (Include): Include time.h, not strptime.h.
6520         * modules/time_r (Files): Remove lib/time_r.h.
6521         (Depends-on): Add time.
6522         (Include): Include time.h, not time_r.h.
6523         * modules/timegm: Likewise.
6524         * modules/timespec (Description): Now does timespec-related decls
6525         of our own, instead of struct timespec itself.
6526         (Depends-on): Add time; remove extensions.
6527         (Maintainer): Add self.
6528         * modules/utimecmp (Depends-on): Add time; remove timespec.
6529         * modules/utimens (Depends-on): Likewise.
6530         * modules/xnanosleep (Depends-on): Likewise.
6531
6532 2007-02-11  Bruno Haible  <bruno@clisp.org>
6533
6534         * lib/c-strstr.c: Include allocsa.h.
6535         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
6536         * lib/c-strcasestr.c: Include allocsa.h.
6537         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
6538         * lib/strcasestr.c: Include allocsa.h.
6539         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
6540         * lib/mbsstr.c: Include allocsa.h.
6541         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
6542         allocsa/freesa instead of malloc/free.
6543         * lib/mbscasestr.c: Include allocsa.h.
6544         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
6545         allocsa/freesa instead of malloc/free.
6546         * modules/c-strstr (Depends-on): Add allocsa.
6547         * modules/c-strcasestr (Depends-on): Likewise.
6548         * modules/strcasestr (Depends-on): Likewise.
6549         * modules/mbsstr (Depends-on): Likewise.
6550         * modules/mbscasestr (Depends-on): Likewise.
6551
6552 2007-02-11  Bruno Haible  <bruno@clisp.org>
6553
6554         * lib/mbsspn.c (mbsspn): Fix bug. Remove unnecessary strlen call.
6555
6556         * modules/mbsspn-tests: New file.
6557         * tests/test-mbsspn.sh: New file.
6558         * tests/test-mbsspn.c: New file.
6559
6560 2007-02-11  Bruno Haible  <bruno@clisp.org>
6561
6562         * lib/mbspbrk.c (mbspbrk): Remove unneeded cast.
6563
6564         * modules/mbspbrk-tests: New file.
6565         * tests/test-mbspbrk.sh: New file.
6566         * tests/test-mbspbrk.c: New file.
6567
6568 2007-02-11  Bruno Haible  <bruno@clisp.org>
6569
6570         * lib/mbscspn.c (mbscspn): Remove unnecessary strlen call and
6571         unneeded cast.
6572
6573         * modules/mbscspn-tests: New file.
6574         * tests/test-mbscspn.sh: New file.
6575         * tests/test-mbscspn.c: New file.
6576
6577 2007-02-11  Bruno Haible  <bruno@clisp.org>
6578
6579         * modules/mbscasecmp-tests: New file.
6580         * tests/test-mbscasecmp.sh: New file.
6581         * tests/test-mbscasecmp.c: New file.
6582
6583 2007-02-11  Bruno Haible  <bruno@clisp.org>
6584
6585         Ensure O(n) worst-case complexity of mbscasestr.
6586         * lib/mbscasestr.c: Include stdbool.h.
6587         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
6588         functions.
6589         (mbscasestr): Add some bookkeeping. Invoke knuth_morris_pratt_* when
6590         the bookkeeping indicates that it's worth it.
6591         * modules/mbscasestr (Depends-on): Add stdbool, mbslen, strnlen.
6592
6593         * modules/mbscasestr-tests: New file.
6594         * tests/test-mbscasestr1.c: New file.
6595         * tests/test-mbscasestr2.sh: New file.
6596         * tests/test-mbscasestr2.c: New file.
6597         * tests/test-mbscasestr3.sh: New file.
6598         * tests/test-mbscasestr3.c: New file.
6599         * tests/test-mbscasestr4.sh: New file.
6600         * tests/test-mbscasestr4.c: New file.
6601         * m4/locale-tr.m4: New file.
6602
6603 2007-02-11  Bruno Haible  <bruno@clisp.org>
6604
6605         Ensure O(n) worst-case complexity of mbsstr.
6606         * lib/mbsstr.c: Include stdbool.h.
6607         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
6608         functions.
6609         (mbsstr): Add some bookkeeping. Invoke knuth_morris_pratt_* when the
6610         bookkeeping indicates that it's worth it.
6611         * modules/mbsstr (Depends-on): Add stdbool, mbslen, strnlen.
6612
6613         * modules/mbsstr-tests: New file.
6614         * tests/test-mbsstr1.c: New file.
6615         * tests/test-mbsstr2.sh: New file.
6616         * tests/test-mbsstr2.c: New file.
6617         * tests/test-mbsstr3.sh: New file.
6618         * tests/test-mbsstr3.c: New file.
6619         * m4/locale-fr.m4: New file.
6620
6621 2007-02-11  Bruno Haible  <bruno@clisp.org>
6622
6623         * lib/mbsrchr.c (mbsrchr): Fix bug.
6624
6625         * modules/mbsrchr-tests: New file.
6626         * tests/test-mbsrchr.sh: New file.
6627         * tests/test-mbsrchr.c: New file.
6628
6629 2007-02-11  Bruno Haible  <bruno@clisp.org>
6630
6631         * lib/mbschr.c (mbschr): Fix bug.
6632
6633         * modules/mbschr-tests: New file.
6634         * tests/test-mbschr.sh: New file.
6635         * tests/test-mbschr.c: New file.
6636         * m4/locale-zh.m4: New file.
6637
6638 2007-02-11  Bruno Haible  <bruno@clisp.org>
6639
6640         Support for copying multibyte string iterators.
6641         * lib/mbiter.h: Include <string.h>.
6642         (mbiter_multi_copy): New function.
6643         (mbi_copy): New macro.
6644         * lib/mbuiter.h: Include <string.h>.
6645         (mbuiter_multi_copy): New function.
6646         (mbui_copy): New macro.
6647
6648 2007-02-11  Bruno Haible  <bruno@clisp.org>
6649
6650         New module mbslen.
6651         * modules/mbslen: New file.
6652         * lib/mbslen.c: New file.
6653         * lib/string_.h (mbslen): New declaration.
6654         * m4/mbslen.m4: New file.
6655         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6656         GNULIB_MBSLEN.
6657         * modules/string (string.h): Also substitute GNULIB_MBSLEN.
6658         * MODULES.html.sh (Internationalization functions): Add mbslen.
6659
6660 2007-02-11  Bruno Haible  <bruno@clisp.org>
6661
6662         Ensure O(n) worst-case complexity of strcasestr substitute.
6663         * lib/strcasestr.c: Include stdbool.h.
6664         (knuth_morris_pratt): New function.
6665         (strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when the
6666         bookkeeping indicates that it's worth it.
6667         * modules/strcasestr (Depends-on): Add stdbool, strnlen.
6668
6669         * modules/strcasestr-tests: New file.
6670         * tests/test-strcasestr.c: New file.
6671
6672 2007-02-11  Bruno Haible  <bruno@clisp.org>
6673
6674         Ensure O(n) worst-case complexity of c_strcasestr.
6675         * lib/c-strcasestr.c: Include stdbool.h, string.h.
6676         (knuth_morris_pratt): New function.
6677         (c_strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when
6678         the bookkeeping indicates that it's worth it.
6679         * modules/c-strcasestr (Depends-on): Add stdbool, strnlen.
6680
6681         * modules/c-strcasestr-tests: New file.
6682         * tests/test-c-strcasestr.c: New file.
6683
6684 2007-02-11  Bruno Haible  <bruno@clisp.org>
6685
6686         Ensure O(n) worst-case complexity of c_strstr.
6687         * lib/c-strstr.c: Include stdbool.h, string.h.
6688         (knuth_morris_pratt): New function.
6689         (c_strstr): Add some bookkeeping. Invoke knuth_morris_pratt when the
6690         bookkeeping indicates that it's worth it.
6691         * modules/c-strstr (Depends-on): Add stdbool, strnlen.
6692
6693         * lib/c-strstr.c: Complete rewrite for maintainability.
6694
6695         * modules/c-strstr-tests: New file.
6696         * tests/test-c-strstr.c: New file.
6697
6698 2007-02-11  Bruno Haible  <bruno@clisp.org>
6699
6700         * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils
6701         5.2.1 and earlier, whereby \055 was treated just like the range
6702         delimiter '-'.
6703         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
6704
6705 2007-02-08  Bruno Haible  <bruno@clisp.org>
6706
6707         * modules/regex (Depends-on): Add stdbool.
6708         Reported by Dalibor Topic <robilad@kaffe.org>.
6709
6710 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
6711
6712         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
6713         Prefer returning from main to exiting from it.
6714         Remove unnecessary parens after sizeof.
6715
6716 2007-02-05  Bruno Haible  <bruno@clisp.org>
6717
6718         New module mbssep.
6719         * modules/mbssep: New file.
6720         * lib/mbssep.c: New file.
6721         * lib/string_.h (strsep): Add a conditional link warning.
6722         (mbssep): New declaration.
6723         * m4/mbssep.m4: New file.
6724         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6725         GNULIB_MBSSEP.
6726         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
6727         * MODULES.html.sh (Internationalization functions): Add mbssep.
6728
6729 2007-02-05  Bruno Haible  <bruno@clisp.org>
6730
6731         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
6732         Optimize search in case of 1 delimiter.
6733
6734 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
6735
6736         * lib/acl.h: Include sys/types.h before sys/acl.h.
6737
6738 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
6739
6740         Merge upstream fix for glibc bugzilla #3957:
6741
6742         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
6743
6744         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
6745         bit for RE_HAT_LISTS_NOT_NEWLINE.
6746         (build_charclass_op): Remove bogus comment.
6747
6748 2007-02-05  Simon Josefsson  <simon@josefsson.org>
6749
6750         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
6751
6752 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
6753
6754         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
6755         * lib/memmem.c [!defined _LIBC]: Include config.h.
6756
6757 2007-02-04  Bruno Haible  <bruno@clisp.org>
6758
6759         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
6760         warning message.
6761
6762 2007-02-04  Bruno Haible  <bruno@clisp.org>
6763
6764         New module mbstok_r.
6765         * modules/mbstok_r: New file.
6766         * lib/mbstok_r.c: New file.
6767         * lib/string_.h (strtok_r): Change argument names to match the
6768         comments. Add a conditional link warning.
6769         (mbstok_r): New declaration.
6770         * m4/mbstok_r.m4: New file.
6771         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6772         GNULIB_MBSTOK_R.
6773         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
6774         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
6775
6776 2007-02-04  Bruno Haible  <bruno@clisp.org>
6777
6778         New module mbsspn.
6779         * modules/mbsspn: New file.
6780         * lib/mbsspn.c: New file.
6781         * lib/string_.h (strspn): Add a conditional link warning.
6782         (mbsspn): New declaration.
6783         * m4/mbsspn.m4: New file.
6784         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6785         GNULIB_MBSSPN.
6786         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
6787         * MODULES.html.sh (Internationalization functions): Add mbsspn.
6788
6789 2007-02-04  Bruno Haible  <bruno@clisp.org>
6790
6791         New module mbspbrk.
6792         * modules/mbspbrk: New file.
6793         * lib/mbspbrk.c: New file.
6794         * lib/string_.h (strpbrk): Add a conditional link warning.
6795         (mbspbrk): New declaration.
6796         * m4/mbspbrk.m4: New file.
6797         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6798         GNULIB_MBSPBRK.
6799         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
6800         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
6801
6802 2007-02-04  Bruno Haible  <bruno@clisp.org>
6803
6804         New module mbscspn.
6805         * modules/mbscspn: New file.
6806         * lib/mbscspn.c: New file.
6807         * lib/string_.h (strcspn): Add a conditional link warning.
6808         (mbscspn): New declaration.
6809         * m4/mbscspn.m4: New file.
6810         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6811         GNULIB_MBSCSPN.
6812         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
6813         * MODULES.html.sh (Internationalization functions): Add mbscspn.
6814
6815 2007-02-04  Bruno Haible  <bruno@clisp.org>
6816
6817         New module mbscasestr, reduced goal of strcasestr.
6818         * modules/mbscasestr: New file.
6819         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
6820         (mbscasestr): Renamed from strcasestr.
6821         * lib/strcasestr.c: Don't include mbuiter.h.
6822         (strcasestr): Remove support for multibyte locales.
6823         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
6824         Change the conditional link warning.
6825         (mbscasestr): New declaration.
6826         * m4/mbscasestr.m4: New file.
6827         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
6828         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
6829         REPLACE_STRCASESTR.
6830         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
6831         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
6832         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
6833         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
6834         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
6835         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
6836         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
6837         (Depends-on): Remove mbuiter.
6838         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
6839
6840 2007-02-04  Bruno Haible  <bruno@clisp.org>
6841
6842         Simplify handling of strncasecmp.
6843         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
6844         the conditional link warning.
6845         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
6846         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
6847         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
6848         * modules/strcase (configure.ac): Don't invoke
6849         gl_STRING_MODULE_INDICATOR.
6850         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
6851
6852 2007-02-04  Bruno Haible  <bruno@clisp.org>
6853
6854         New module mbscasecmp, reduced goal of strcasecmp.
6855         * modules/mbscasecmp: New file.
6856         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
6857         (mbscasecmp): Renamed from strcasecmp.
6858         * lib/strcasecmp.c: Don't include mbuiter.h.
6859         (strcasecmp): Remove support for multibyte locales.
6860         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
6861         Change the conditional link warning.
6862         (mbscasecmp): New declaration.
6863         * m4/mbscasecmp.m4: New file.
6864         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
6865         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
6866         REPLACE_STRCASECMP.
6867         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
6868         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6869         GNULIB_MBSCASECMP.
6870         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
6871         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
6872         * modules/strcase (Files): Remove m4/mbrtowc.m4.
6873         (Depends-on): Remove mbuiter.
6874         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
6875
6876 2007-02-04  Bruno Haible  <bruno@clisp.org>
6877
6878         New module mbsstr. Remove module strstr.
6879         * modules/mbsstr: New file.
6880         * modules/strstr: Remove file.
6881         * lib/mbsstr.c: Renamed from lib/strstr.c.
6882         (mbsstr): Renamed from strstr.
6883         * lib/string_.h (strstr): Remove declaration. Change the conditional
6884         link warning.
6885         (mbsstr): New declaration.
6886         * m4/mbsstr.m4: New file.
6887         * m4/strstr.m4: Remove file.
6888         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
6889         REPLACE_STRSTR.
6890         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
6891         Don't initialize GNULIB_STRSTR.
6892         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
6893         substitute GNULIB_STRSTR and REPLACE_STRSTR.
6894         * MODULES.html.sh (Internationalization functions): Add mbsstr.
6895         (Support for systems lacking ANSI C 89): Remove strstr.
6896
6897 2007-02-04  Bruno Haible  <bruno@clisp.org>
6898
6899         New module mbsrchr.
6900         * modules/mbsrchr: New file.
6901         * lib/mbsrchr.c: New file.
6902         * lib/string_.h (strrchr): Add a conditional link warning.
6903         (mbsrchr): New declaration.
6904         * m4/mbsrchr.m4: New file.
6905         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6906         GNULIB_MBSRCHR.
6907         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
6908         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
6909
6910 2007-02-04  Bruno Haible  <bruno@clisp.org>
6911
6912         New module mbschr.
6913         * modules/mbschr: New file.
6914         * lib/mbschr.c: New file.
6915         * lib/string_.h (strchr): Add a conditional link warning.
6916         (mbschr): New declaration.
6917         * m4/mbschr.m4: New file.
6918         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6919         GNULIB_MBSCHR.
6920         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
6921         * MODULES.html.sh (Internationalization functions): Add mbschr.
6922
6923 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
6924
6925         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
6926
6927         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
6928
6929 2007-02-04  Bruno Haible  <bruno@clisp.org>
6930
6931         New module description section 'configure.ac-early'.
6932         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
6933         (func_get_autoconf_early_snippet): New function.
6934         (func_import, func_create_testdir): Use it. Remove special cases for
6935         modules 'extensions' and 'lock'.
6936         * modules/extensions (configure.ac-early): Require
6937         gl_USE_SYSTEM_EXTENSIONS.
6938         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
6939
6940 2007-02-04  Bruno Haible  <bruno@clisp.org>
6941
6942         Make use of gcj-4.3's -fsource and -ftarget option.
6943         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
6944         and if so try the options -fsource and -ftarget.
6945         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
6946         source_version, ftarget_option, target_version arguments.
6947         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
6948         (is_envjavac_oldgcj_14_14_usable): Renamed from
6949         is_envjavac_gcj_14_14_usable.
6950         (is_envjavac_oldgcj_14_13_usable): Renamed from
6951         is_envjavac_gcj_14_13_usable.
6952         (is_gcj_present): Update.
6953         (is_gcj_43, is_gcj43_usable): New functions.
6954         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
6955         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
6956         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
6957         try the options -fsource and -ftarget.
6958
6959 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
6960
6961         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
6962         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
6963         larger value.
6964
6965 2007-02-03  Jim Meyering  <jim@meyering.net>
6966
6967         Give tools a better chance to allocate space for very large buffers.
6968         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
6969
6970         Make pwd and readlink work also when run with an unreadable parent dir
6971         on systems with openat support.
6972         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
6973         provided getcwd function, even when we have openat support.
6974         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
6975
6976 2007-02-02  Bruno Haible  <bruno@clisp.org>
6977
6978         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
6979         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
6980         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
6981         portability problems if one of these functions is only used on specific
6982         platforms.
6983         Reported by Paul Eggert.
6984
6985 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
6986
6987         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
6988         is causing more trouble than it's curing.
6989         * lib/regex_internal.h (__mempcpy): Remove.
6990         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
6991         (and make the code a tad smaller to boot).
6992         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
6993
6994 2007-02-02  Jim Meyering  <jim@meyering.net>
6995
6996         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
6997         section, not in the Makefile.am: one.
6998
6999 2007-02-02  Eric Blake  <ebb9@byu.net>
7000
7001         * lib/strchrnul.c: Always include config.h first.
7002
7003         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
7004         gnulib strstr is not necessary here.
7005
7006 2007-02-02  Simon Josefsson  <simon@josefsson.org>
7007
7008         * m4/socklen.m4: Fix typo.
7009
7010 2007-02-02  Eric Blake  <ebb9@byu.net>
7011
7012         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
7013         * modules/netinet_in (Makefile.am): Likewise.
7014
7015 2007-02-01  Bruno Haible  <bruno@clisp.org>
7016
7017         * lib/string_.h (GL_LINK_WARNING): New macro.
7018         (strcasecmp, strstr, strcasestr): If provided by the system,
7019         conditionally define as a macro that leads to a warning instead of to
7020         an error.
7021         (strncasecmp): Conditionally define as a macro that leads to a warning.
7022
7023 2007-02-01  Karl Berry  <karl@gnu.org>
7024
7025         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
7026
7027 2007-02-01  Bruno Haible  <bruno@clisp.org>
7028
7029         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
7030         renamings.
7031
7032 2007-02-01  Eric Blake  <ebb9@byu.net>
7033
7034         * modules/regex (Depends-on): Revert dependence on mempcpy.
7035         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
7036         module's definition of mempcpy.
7037         Reported by Paul Eggert.
7038
7039 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
7040
7041         * lib/string_.h: If the gnulib module XYZ is not present, undefine
7042         the symbol XYZ before redefining it.  This fixes a problem with
7043         programs that don't use XYZ, when compiled on systems that define
7044         XYZ to something else.
7045
7046 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
7047
7048         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
7049         occurs when "mkdir -m foo" creates a setgid directory that is (1)
7050         writeable to group or other and (2) is intended to have a special
7051         mode bit that is set or cleared.  In such a case, the directory
7052         should be neither group- nor other-writeable until the special
7053         mode bits are right.
7054
7055 2007-01-31  Eric Blake  <ebb9@byu.net>
7056
7057         * modules/mountlist (Depends-on): Add strstr.
7058
7059         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
7060         bug.
7061         * modules/string (Makefile.am): Remove redundant replacement.
7062         * modules/regex (Depends-on): Add mempcpy.
7063
7064 2007-01-31  Bruno Haible  <bruno@clisp.org>
7065
7066         New module description field 'Link'.
7067         * gnulib-tool (func_usage): Document --extract-link-directive.
7068         (sed_extract_prog): Recognize 'Link' directive.
7069         (func_get_link_directive): New function.
7070         (func_import): Show summary of link directives.
7071         Handle --extract-link-directive option.
7072         * modules/acl (Link): New section.
7073         * modules/clock-time (Link): New section.
7074         * modules/euidaccess (Link): New section.
7075         * modules/gettext (Link): New section.
7076         * modules/iconv (Link): New section.
7077         * modules/lock (Link): New section.
7078         * modules/nanosleep (Link): New section.
7079         * modules/readline (Link): New section.
7080
7081 2007-01-27  Bruno Haible  <bruno@clisp.org>
7082
7083         Enforce the use of gnulib modules for unportable <string.h> functions.
7084         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
7085         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
7086         (gl_HEADER_STRING_H_BODY): Require it.
7087         * lib/string_.h: If the gnulib module XYZ is not present, redefine
7088         the symbol XYZ to one that gives a link error.
7089         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
7090         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
7091         * modules/mempcpy (configure.ac): Likewise.
7092         * modules/memrchr (configure.ac): Likewise.
7093         * modules/stpcpy (configure.ac): Likewise.
7094         * modules/stpncpy (configure.ac): Likewise.
7095         * modules/strcase (configure.ac): Likewise.
7096         * modules/strcasestr (configure.ac): Likewise.
7097         * modules/strchrnul (configure.ac): Likewise.
7098         * modules/strdup (configure.ac): Likewise.
7099         * modules/strndup (configure.ac): Likewise.
7100         * modules/strnlen (configure.ac): Likewise.
7101         * modules/strpbrk (configure.ac): Likewise.
7102         * modules/strsep (configure.ac): Likewise.
7103         * modules/strstr (configure.ac): Likewise.
7104         * modules/strtok_r (configure.ac): Likewise.
7105
7106 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
7107
7108         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
7109
7110 2007-01-30  Jim Meyering  <jim@meyering.net>
7111
7112         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
7113
7114 2007-01-29  Bruno Haible  <bruno@clisp.org>
7115
7116         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
7117         * lib/execute.c: Likewise.
7118         * lib/pipe.c: Likewise.
7119         * lib/printf-args.h: Likewise.
7120         * lib/printf-args.c: Likewise.
7121         * lib/printf-parse.c: Likewise.
7122         * lib/vasnprintf.c: Likewise.
7123
7124 2007-01-29  Eric Blake  <ebb9@byu.net>
7125
7126         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
7127         declaration.
7128
7129 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
7130
7131         * lib/strptime.h (strptime): Use 'restrict' for args where
7132         POSIX requires this.
7133         * lib/strptime.c (strptime): Likewise.
7134         Change license notice from LGPL to GPL, since gnulib-tool will
7135         change this as needed.
7136         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
7137         defined.
7138         Include "strptime.h" first, to check interface.
7139         Do not #undef _LIBC and _NL_CURRENT.
7140         Do not include <stdlib.h>; no longer needed.
7141         Include "time_r.h" and declare ptime_locale_status
7142         only if _LIBC is not defined.
7143         (__P): Remove unused macro.
7144         (match_string): Bring back glibc version, but use it only if _LIBC
7145         is defined.
7146         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
7147         Remove unnecessary assertion and abort() call.
7148         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
7149         * m4/strptime.m4: Fix serial number comment.
7150         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
7151         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
7152         (Depends-on): Add time_r.
7153
7154 2007-01-29  Bruno Haible  <bruno@clisp.org>
7155
7156         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
7157         strptime.
7158         * modules/strptime (Depends-on): Add stdbool.
7159         * lib/strptime.h: Include <time.h> always. Add comments.
7160
7161 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
7162
7163         * modules/strptime: New file.
7164         * lib/strptime.h: New file.
7165         * lib/strptime.c: New file.
7166         * m4/strptime.m4: New file.
7167
7168 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
7169
7170         * MODULES.html.sh: New module mpsort.
7171         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
7172
7173         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
7174         a circularity problem with HP-UX ia64 reported by Bob Proulx in
7175         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
7176         All uses changed.
7177         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
7178         All uses changed.
7179         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
7180         to _Restrict_.
7181         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
7182         the parameter matches the prototype.
7183
7184 2007-01-28  Jim Meyering  <jim@meyering.net>
7185
7186         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
7187         sys/time.h here, reverting that part of the previous patch:
7188         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
7189
7190 2007-01-28  Bruno Haible  <bruno@clisp.org>
7191
7192         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
7193         value of $(SYS_TIME_H).
7194         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
7195         remove it conditionally, too. [added by Jim Meyering]
7196         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
7197         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
7198         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
7199         GETTIMEOFDAY_REPLACEMENT to 1.
7200
7201 2007-01-28  Bruno Haible  <bruno@clisp.org>
7202
7203         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
7204         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
7205         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
7206         Set UNISTD_H instead of UNISTD_H2.
7207         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
7208
7209 2007-01-28  Bruno Haible  <bruno@clisp.org>
7210
7211         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
7212         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
7213
7214 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7215
7216         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
7217         (func_create_testdir): Ensure C locale for `grep' and `tr'
7218         character ranges.
7219         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
7220         ACLOCAL_AMFLAGS parsing state machine.
7221
7222 2007-01-27  Bruno Haible  <bruno@clisp.org>
7223
7224         * modules/unistr/base: Update.
7225
7226 2007-01-27  Bruno Haible  <bruno@clisp.org>
7227
7228         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
7229         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
7230         * modules/unistr/u32-mbtouc-unsafe: Renamed from
7231         modules/unistr/u32-mbtouc.
7232         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
7233         * lib/unistr.h: Update.
7234         * lib/linebreak.c: Update.
7235         * modules/unistr/u32-mbtouc: Renamed from
7236         modules/unistr/u32-mbtouc-safe.
7237         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
7238         * lib/unistr.h: Update.
7239         * lib/unistr/u32-to-u8.c: Update.
7240         * lib/unistr/u32-to-u16.c: Update.
7241
7242 2007-01-27  Bruno Haible  <bruno@clisp.org>
7243
7244         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
7245         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
7246         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
7247         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
7248         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
7249         * modules/unistr/u16-mbtouc-unsafe: Renamed from
7250         modules/unistr/u16-mbtouc.
7251         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
7252         * lib/unistr.h: Update.
7253         * lib/linebreak.c: Update.
7254         * modules/linebreak: Update.
7255         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
7256         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
7257         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
7258         * modules/unistr/u16-mbtouc: Renamed from
7259         modules/unistr/u16-mbtouc-safe.
7260         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
7261         * lib/unistr.h: Update.
7262         * lib/unistr/u16-to-u8.c: Update.
7263         * modules/unistr/u16-to-u8: Update.
7264         * lib/unistr/u16-to-u32.c: Update.
7265         * modules/unistr/u16-to-u32: Update.
7266
7267 2007-01-27  Bruno Haible  <bruno@clisp.org>
7268
7269         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
7270         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
7271         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
7272         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
7273         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
7274         * modules/unistr/u8-mbtouc-unsafe: Renamed from
7275         modules/unistr/u8-mbtouc.
7276         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
7277         * lib/unistr.h: Update.
7278         * lib/striconveh.c: Update.
7279         * modules/striconveh: Update.
7280         * lib/linebreak.c: Update.
7281         * modules/linebreak: Update.
7282         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
7283         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
7284         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
7285         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
7286         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
7287         * lib/unistr.h: Update.
7288         * lib/striconveh.c: Update.
7289         * modules/striconveh: Update.
7290         * lib/unistr/u8-to-u16.c: Update.
7291         * modules/unistr/u8-to-u16: Update.
7292         * lib/unistr/u8-to-u32.c: Update.
7293         * modules/unistr/u8-to-u32: Update.
7294
7295 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7296
7297         Sync from Libtool.
7298         * lib/argz.c: Do not include strings.h nor memory.h, include
7299         string.h unconditionally.  Patch by Simon Josefsson.
7300
7301 2007-01-27  Bruno Haible  <bruno@clisp.org>
7302
7303         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
7304         from gl_HEADER_STRING_H_BODY.
7305         (gl_HEADER_STRING_H_BODY): Require it.
7306         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
7307         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
7308         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
7309         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
7310         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
7311         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
7312         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
7313         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
7314         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
7315         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
7316         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
7317         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
7318         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
7319         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
7320         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
7321
7322 2007-01-27  Bruno Haible  <bruno@clisp.org>
7323
7324         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
7325         check_PROGRAMS into noinst_PROGRAMS.
7326         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
7327         check_PROGRAMS in this case.
7328         (func_import): Set for_test to false.
7329         (func_create_testdir): Set for_test to true.
7330
7331 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
7332             Bruno Haible  <bruno@clisp.org>
7333
7334         * modules/strcasestr (Files): Remove lib/strcasestr.h.
7335         (Depends-on): Add string.
7336         (Includes): Use <string.h> instead of strcasestr.h.
7337         * modules/string (Makefile.am): Also substitute the value of
7338         REPLACE_STRCASESTR.
7339         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
7340         assume strcasestr is declared in <string.h> not <strings.h>. Also
7341         set REPLACE_STRCASESTR.
7342         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
7343         REPLACE_STRCASESTR.
7344         * lib/strcasestr.h: Remove file.
7345         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
7346         * lib/string_.h (strcasestr): New declaration.
7347
7348 2007-01-27  Bruno Haible  <bruno@clisp.org>
7349
7350         * lib/string_.h: Use 'extern'.
7351
7352 2007-01-27  Jim Meyering  <jim@meyering.net>
7353
7354         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
7355         of set-but-not-used local, "q".
7356
7357         * lib/mempcpy.c: Include <config.h> before <string.h>.
7358         This fixes a compilation error on HP-UX, due to the system's
7359         "restrict"-using mempcpy prototype.
7360
7361 2007-01-26  Bruno Haible  <bruno@clisp.org>
7362
7363         Small optimization.
7364         * lib/javacomp.c: Include c-strstr.h.
7365          (is_envjavac_gcj): Use c_strstr instead of strstr.
7366         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
7367
7368 2007-01-26  Bruno Haible  <bruno@clisp.org>
7369
7370         * MODULES.html.sh (Unicode string functions): Add the new modules.
7371
7372         * modules/uniconv/u32-strconv-to-locale: New file.
7373         * lib/uniconv/u32-strconv-to-locale.c: New file.
7374
7375         * modules/uniconv/u16-strconv-to-locale: New file.
7376         * lib/uniconv/u16-strconv-to-locale.c: New file.
7377
7378         * modules/uniconv/u8-strconv-to-locale: New file.
7379         * lib/uniconv/u8-strconv-to-locale.c: New file.
7380
7381         * modules/uniconv/u32-strconv-from-locale: New file.
7382         * lib/uniconv/u32-strconv-from-locale.c: New file.
7383
7384         * modules/uniconv/u16-strconv-from-locale: New file.
7385         * lib/uniconv/u16-strconv-from-locale.c: New file.
7386
7387         * modules/uniconv/u8-strconv-from-locale: New file.
7388         * lib/uniconv/u8-strconv-from-locale.c: New file.
7389
7390         * modules/uniconv/u32-strconv-to-enc: New file.
7391         * lib/uniconv/u32-strconv-to-enc.c: New file.
7392         * modules/uniconv/u32-strconv-to-enc-tests: New file.
7393         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
7394
7395         * modules/uniconv/u16-strconv-to-enc: New file.
7396         * lib/uniconv/u16-strconv-to-enc.c: New file.
7397         * lib/uniconv/u-strconv-to-enc.h: New file.
7398         * modules/uniconv/u16-strconv-to-enc-tests: New file.
7399         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
7400
7401         * modules/uniconv/u8-strconv-to-enc: New file.
7402         * lib/uniconv/u8-strconv-to-enc.c: New file.
7403         * modules/uniconv/u8-strconv-to-enc-tests: New file.
7404         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
7405
7406         * modules/uniconv/u32-strconv-from-enc: New file.
7407         * lib/uniconv/u32-strconv-from-enc.c: New file.
7408         * modules/uniconv/u32-strconv-from-enc-tests: New file.
7409         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
7410
7411         * modules/uniconv/u16-strconv-from-enc: New file.
7412         * lib/uniconv/u16-strconv-from-enc.c: New file.
7413         * modules/uniconv/u16-strconv-from-enc-tests: New file.
7414         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
7415
7416         * modules/uniconv/u8-strconv-from-enc: New file.
7417         * lib/uniconv/u8-strconv-from-enc.c: New file.
7418         * lib/uniconv/u-strconv-from-enc.h: New file.
7419         * modules/uniconv/u8-strconv-from-enc-tests: New file.
7420         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
7421
7422         * modules/uniconv/u32-conv-from-enc: New file.
7423         * lib/uniconv/u32-conv-from-enc.c: New file.
7424         * modules/uniconv/u32-conv-from-enc-tests: New file.
7425         * tests/uniconv/test-u32-conv-from-enc.c: New file.
7426
7427         * modules/uniconv/u16-conv-from-enc: New file.
7428         * lib/uniconv/u16-conv-from-enc.c: New file.
7429         * lib/uniconv/u-conv-from-enc.h: New file.
7430         * modules/uniconv/u16-conv-from-enc-tests: New file.
7431         * tests/uniconv/test-u16-conv-from-enc.c: New file.
7432
7433         * modules/uniconv/u8-conv-from-enc: New file.
7434         * lib/uniconv/u8-conv-from-enc.c: New file.
7435         * modules/uniconv/u8-conv-from-enc-tests: New file.
7436         * tests/uniconv/test-u8-conv-from-enc.c: New file.
7437
7438         * modules/uniconv/base: New file.
7439         * lib/uniconv.h: New file.
7440
7441 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
7442
7443         * doc/gnulib-tool.texi (Initial import): Update to match current
7444         behavior with strdup module.
7445         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
7446         * lib/memmem.h: Remove; all uses removed.  This is now done
7447         by <string.h>.
7448         * lib/mempcpy.h: Likewise.
7449         * lib/memrchr.h: Likewise.
7450         * lib/stpcpy.h: Likewise.
7451         * lib/stpncpy.h: Likewise.
7452         * lib/strcase.h: Likewise.
7453         * lib/strchrnul.h: Likewise.
7454         * lib/strdup.h: Likewise.
7455         * lib/strndup.h: Likewise.
7456         * lib/strnlen.h: Likewise.
7457         * lib/strpbrk.h: Likewise.
7458         * lib/strsep.h: Likewise.
7459         * lib/strstr.h: Likewise.
7460         * lib/strtok_r.h: Likewise.
7461         * lib/string_.h: New file.
7462         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
7463         Rely on <string.h> instead.
7464         * lib/canon-host.c: Likewise.
7465         * lib/chdir-long.c: Likewise.
7466         * lib/concatpath.c: Likewise.
7467         * lib/exclude.c: Likewise.
7468         * lib/fchdir.c: Likewise.
7469         * lib/getaddrinfo.c: Likewise.
7470         * lib/getcwd.c: Likewise.
7471         * lib/getsubopt.c: Likewise.
7472         * lib/glob.c: Likewise.
7473         * lib/hard-locale.c: Likewise.
7474         * lib/iconvme.c: Likewise.
7475         * lib/javacomp.c: Likewise.
7476         * lib/mempcpy.c: Likewise.
7477         * lib/memrchr.c: Likewise.
7478         * lib/regex_internal.h: Likewise.
7479         * lib/stpncpy.c: Likewise.
7480         * lib/strcasecmp.c: Likewise.
7481         * lib/strchrnul.c: Likewise.
7482         * lib/strdup.c: Likewise.
7483         * lib/striconv.c: Likewise.
7484         * lib/striconveh.c: Likewise.
7485         * lib/striconveha.c: Likewise.
7486         * lib/strncasecmp.c: Likewise.
7487         * lib/strndup.c: Likewise.
7488         * lib/strnlen.c: Likewise.
7489         * lib/strsep.c: Likewise.
7490         * lib/strstr.c: Likewise.
7491         * lib/strtok_r.c: Likewise.
7492         * lib/userspec.c: Likewise.
7493         * lib/w32spawn.h: Likewise.
7494         * lib/xstrndup.c: Likewise.
7495         * lib/mountlist.c (strstr): Remove decl.
7496         * m4/string_h.m4: New file.
7497         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
7498         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
7499         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
7500         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
7501         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
7502         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
7503         Set REPLACE_STRCASECMP if necessary.
7504         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
7505         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
7506         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
7507         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
7508         HAVE_DECL_STRDUP if necessary.
7509         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
7510         since gl_FUNC_STRNDUP does that now.
7511         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
7512         Check for decl here...
7513         (gl_PREREQ_STRNLEN): ... not here.
7514         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
7515         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
7516         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
7517         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
7518         necessary.
7519         * modules/string: New file.
7520         * modules/memmem (Files): Remove special-purpose include file.
7521         (Depends-on): Add string.
7522         (Include): Include <string.h>, not the removed file.
7523         * modules/mempcpy: Likewise.
7524         * modules/memrchr: Likewise.
7525         * modules/stpcpy: Likewise.
7526         * modules/stpncpy: Likewise.
7527         * modules/strcase: Likewise.
7528         * modules/strchrnul: Likewise.
7529         * modules/strdup: Likewise.
7530         * modules/strndup: Likewise.
7531         * modules/strnlen: Likewise.
7532         * modules/strpbrk: Likewise.
7533         * modules/strsep: Likewise.
7534         * modules/strstr: Likewise.
7535         * modules/strtok_r: Likewise.
7536         * tests/test-dirname.c: Don't include "strdup.h", since
7537         <string.h> now suffices.
7538         * tests/test-memmem.c: Don't include "memmem.h", since
7539         <string.h> now suffices.
7540
7541 2007-01-25  Bruno Haible  <bruno@clisp.org>
7542
7543         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
7544         *resultp is 0.
7545
7546         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
7547         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
7548         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
7549         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
7550
7551         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
7552         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
7553         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
7554         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
7555         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
7556         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
7557
7558 2007-01-24  Bruno Haible  <bruno@clisp.org>
7559
7560         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
7561         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
7562         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
7563         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
7564         gl_FUNC_FTS_CORE.
7565         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
7566         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
7567         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
7568         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
7569         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
7570         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
7571         gl_FUNC_FCHOWNAT.
7572         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
7573         gl_FUNC_STRFTIME.
7574         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
7575         Reported by Ralf Wildenhues.
7576
7577 2007-01-24  Bruno Haible  <bruno@clisp.org>
7578
7579         Drop AC_REQUIRE calls that are redundant with the module dependencies.
7580         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
7581         gl_GETADDRINFO.
7582         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
7583         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
7584         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
7585
7586 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
7587
7588         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
7589         Don't use 'exit'; just return from 'main'.
7590         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
7591
7592         * lib/fnmatch_.h: Readjust white space and comments to match
7593         glibc, to avoid spurious diffs.
7594
7595 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
7596
7597         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
7598         2004-12-01 change by Jakub Jelinek, since this code won't compile
7599         if !LIBC.  Problem reported by Bob Proulx.
7600
7601 2007-01-23  Bruno Haible  <bruno@clisp.org>
7602
7603         * lib/striconveh.c: Include c-strcaseeq.h.
7604         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
7605         * modules/striconveh (Depends-on): Add c-strcaseeq.
7606
7607 2007-01-23  Bruno Haible  <bruno@clisp.org>
7608
7609         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
7610
7611         * modules/c-strcaseeq: New file.
7612         * lib/c-strcaseeq.h: New file.
7613
7614         * modules/streq: New file.
7615         * lib/streq.h: New file.
7616
7617 2007-01-23  Bruno Haible  <bruno@clisp.org>
7618
7619         * modules/striconveha-tests: New file.
7620         * tests/test-striconveha.c: New file.
7621
7622         * lib/striconveha.h: Include <stdbool.h>.
7623         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
7624         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
7625         (mem_iconveha_notranslit): Renamed from mem_iconveha.
7626         (mem_iconveha): New function.
7627         (str_iconveha_notranslit): Renamed from str_iconveha.
7628         (str_iconveha): New function.
7629         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
7630         c-strcase.
7631
7632 2007-01-23  Bruno Haible  <bruno@clisp.org>
7633
7634         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
7635         encodings without forgiving before trying any encoding with handler.
7636         (str_iconveha): Try all encodings without forgiving before trying any
7637         encoding with handler.
7638
7639 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
7640
7641         Import the following changes from libc.
7642
7643         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
7644
7645         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
7646
7647         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
7648
7649         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
7650         normal_bracket label.
7651
7652         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
7653
7654         [BZ #361]
7655         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
7656         to normal_bracket after fetching the next character.
7657
7658 2007-01-22  Bruno Haible  <bruno@clisp.org>
7659
7660         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
7661         argument.
7662         * lib/striconveh.c (iconv_carefully_1): New function.
7663         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
7664         argument.
7665         (str_cd_iconveh): Update.
7666         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
7667         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
7668         * tests/test-striconveh.c (MAGIC): New macro.
7669         (new_offsets): New function.
7670         (main): Test call with and without offsets.
7671
7672 2007-01-22  Bruno Haible  <bruno@clisp.org>
7673
7674         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
7675         * modules/sys_select (Makefile.am): Likewise.
7676         * modules/sys_socket (Makefile.am): Likewise.
7677         * modules/sys_time (Makefile.am): Likewise.
7678
7679 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
7680
7681         * modules/gettimeofday (License): Change from GPL to LGPL, since
7682         gettimeofday is a library function.
7683
7684 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7685
7686         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
7687
7688 2007-01-21  Bruno Haible  <bruno@clisp.org>
7689
7690         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
7691
7692 2007-01-21  Bruno Haible  <bruno@clisp.org>
7693
7694         * modules/striconveha: New file.
7695         * lib/striconveha.h: New file.
7696         * lib/striconveha.c: New file.
7697         * MODULES.html.sh (Internationalization functions): Add striconveha.
7698         * lib/striconv.c (str_iconv): Optimize the case of an empty input
7699         string.
7700         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
7701
7702 2007-01-21  Bruno Haible  <bruno@clisp.org>
7703
7704         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
7705         * lib/striconveh.c (str_iconveh): Likewise.
7706
7707 2007-01-21  Bruno Haible  <bruno@clisp.org>
7708
7709         * lib/striconveh.h (mem_iconveh): New declaration.
7710         * lib/striconveh.c (mem_iconveh): New function.
7711         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
7712
7713 2007-01-21  Bruno Haible  <bruno@clisp.org>
7714
7715         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
7716
7717         * lib/striconveh.h (mem_cd_iconveh): Change specification.
7718         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
7719         original result buffer.
7720         (str_cd_iconveh): Update.
7721         * tests/test-striconveh.c (main): Update.
7722
7723         * lib/striconv.h (mem_cd_iconv): Change specification.
7724         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
7725         result buffer.
7726         (str_cd_iconv): Update.
7727         * tests/test-striconv.c (main): Update.
7728
7729 2007-01-21  Bruno Haible  <bruno@clisp.org>
7730
7731         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
7732
7733 2007-01-20  Jim Meyering  <jim@meyering.net>
7734
7735         * lib/userspec.c (parse_with_separator): If a user or group string
7736         starts with "+", skip the corresponding name-to-ID look-up, since
7737         such a look-up must fail: user and group names may not include "+".
7738
7739 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
7740
7741         * lib/poll.c: Include sys/time.h and time.h unconditionally,
7742         since we now assume the sys_time module.
7743         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
7744         check for sys/time.h; no longer needed.
7745         * modules/poll (Depends-on): Depend on sys_time.
7746
7747 2007-01-18  Bruno Haible  <bruno@clisp.org>
7748
7749         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
7750         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
7751
7752         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
7753         gettimeofday.
7754
7755         * tests/test-gettimeofday.c: Include <time.h>.
7756         (dummy): Remove variable.
7757
7758         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
7759         gl_HEADER_SYS_TIME_H.
7760         (gl_HEADER_SYS_TIME_H): New macro.
7761
7762         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
7763         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7764         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
7765         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
7766         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7767         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
7768         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
7769         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7770         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
7771         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
7772         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7773
7774         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
7775         last change; it caused a compilation error when cross-compiling to
7776         Cygwin.
7777
7778 2007-01-18  Jim Meyering  <jim@meyering.net>
7779
7780         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
7781         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
7782         than the race-prone "test -d sys || mkdir sys".
7783         (configure.ac): Use AC_PROG_MKDIR_P.
7784         * modules/sys_select: Likewise.
7785         * modules/sys_socket: Likewise.
7786         * modules/sys_time: Likewise.
7787
7788 2007-01-18  Eric Blake  <ebb9@byu.net>
7789
7790         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
7791         replace gettimeofday.
7792         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
7793         name, to avoid infinite recursion.
7794
7795 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
7796
7797         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
7798         module sys_time.
7799         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
7800         assume timespec.h defines struct timeval.
7801         * lib/settime.c: Likewise.
7802         * lib/utimens.c: Likewise.
7803         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
7804         since we now assume the gettimeofday module.
7805         * lib/tempname.c (__gen_tempname): Likewise.
7806         * lib/gettimeofday.h: Remove.
7807         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
7808         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
7809         Include <time.h>, for 'time()'.
7810         (localtime_buffer_addr): Also use this workaround if
7811         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
7812         to simplify the uses.  All uses changed.
7813         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
7814         that #undef is inside {}, and 'const' follows type name consistently.
7815         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
7816         (gettimeofday): Do not use the maximum possible value for
7817         tv->tv_usec, since that might break usages other than ls.c.
7818         Instead, we'll leave ls.c alone.  This undoes today's patch
7819         by Bruno.  Add a compile-time warning for 1s-clock resolution;
7820         we've never observed the problem but might as well keep the
7821         canary.
7822         * lib/nanosleep.c: Include timespec.h first, for interface check.
7823         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
7824         now assume the sys_time module.
7825         * lib/tempname.c: Likewise.
7826         * lib/timespec.h: Likewise.
7827         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
7828         needed.
7829         * lib/strftime.c: Likewise.
7830         * lib/timespec.h: Likewise.
7831         * lib/posixtm.c: Include posixtm.h first, for interface check.
7832         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
7833         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
7834         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
7835         * lib/sys_time_.h: New file.
7836         * lib/timespec.h (struct timespec): Use long int, not long.
7837         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
7838         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
7839         Remove obsolescent call to AC_HEADER_TIME.
7840         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
7841         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
7842         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
7843         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
7844         Likewise.
7845         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
7846         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
7847         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
7848         into the sys_time module.  Check for gettimeofday just once.
7849         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
7850         for gettimeofday signature to just check the signature.  Merely
7851         compile it, since linking doesn't test signature.  Improve test for
7852         whether gettimeofday.o is actually needed.
7853         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
7854         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
7855         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
7856         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7857         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
7858         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
7859         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
7860         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
7861         than worrying about sys/time.h.
7862         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
7863         Don't bother worrying about TIME_WITH_SYS_TIME.
7864         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
7865         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
7866         * m4/sys_time_h.m4: New file.
7867         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
7868         Don't include sys/time.h.  Return from main rather than exiting.
7869         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
7870         all uses changed.
7871         * modules/gethrxtime (Depends-on): Add sys_time.
7872         * modules/gettime (Depends-on): Likewise.
7873         * modules/gettimeofday (Depends-on): Likewise.
7874         * modules/nanosleep (Depends-on): Likewise.
7875         * modules/settime (Depends-on): Likewise.
7876         * modules/tempname (Depends-on): Likewise.
7877         * modules/utimens (Depends-on): Likewise.
7878         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
7879         (Include:) Change back to <sys/time.h>.
7880         (Maintainer:) Add self.
7881         * modules/sys_time: New file.
7882         * modules/tempname (Depends-on): Add gettimeofday.
7883         * tests/test-gettimeofday.c: Include <sys/time.h>
7884         rather than gettimeofday.h.
7885
7886 2007-01-17  Bruno Haible  <bruno@clisp.org>
7887
7888         * gnulib-tool (func_get_license): Revert last patch. Instead, let
7889         the license default to GPL.
7890         (func_create_testdir): Don't complain if a module is LGPL and its
7891         tests module depends on GPLed modules.
7892
7893 2007-01-17  Bruno Haible  <bruno@clisp.org>
7894
7895         * lib/gettimeofday.c (gettimeofday): Add code for the case
7896         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
7897         maximum possible value for tv->tv_usec, rather than the minimum one.
7898
7899 2005-10-08  Martin Lambers  <marlam@marlam.de>
7900 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
7901 2007-01-16  Bruno Haible  <bruno@clisp.org>
7902
7903         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
7904         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
7905         gl_FUNC_GETTIMEOFDAY.
7906         (Include): Add gettimeofday.h.
7907         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
7908         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
7909         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
7910         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
7911         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
7912         * lib/gettimeofday.h: New file.
7913         * lib/gettimeofday.c: Include <sys/timeb.h>.
7914         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
7915         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7916         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
7917         fall back on time().
7918
7919         * tests/test-gettimeofday.c: New file.
7920         * modules/gettimeofday-tests: New file.
7921
7922 2007-01-16  Eric Blake  <ebb9@byu.net>
7923
7924         * modules/fnmatch (Depends-on): Depend on wchar.
7925         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
7926         * m4/fnmatch.m4: Likewise.
7927         * modules/mbchar (Makefile.am): Assume <wchar.h>.
7928         * m4/mbchar.m4: Likewise.
7929         * modules/mbswidth (Depends-on): Depend on wchar.
7930         * lib/mbswidth.c: Assume <wchar.h>.
7931         * m4/mbswidth.m4: Likewise.
7932         * modules/quotearg (Depends-on): Depend on wchar.
7933         * lib/quotearg.c: Assume <wchar.h>.
7934         * m4/quotearg.m4: Likewise.
7935         * modules/regex (Depends-on): Depend on wchar.
7936         * lib/regex_internal.h: Assume <wchar.h>.
7937         * m4/regex.m4: Likewise.
7938         * modules/stdint (Depends-on): Depend on wchar.
7939         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
7940         * m4/stdint.m4: Likewise.
7941         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
7942         * modules/strftime (Depends-on): Depend on wchar.
7943         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
7944         * modules/strtol (Depends-on): Depend on wchar.
7945         * lib/strtol.c: Assume <wchar.h>.
7946         * modules/wcwidth (Depends-on): Depend on wchar.
7947         * lib/wcwidth.h: Assume <wchar.h>.
7948         * m4/wcwidth.m4: Likewise.
7949
7950 2007-01-16  Bruno Haible  <bruno@clisp.org>
7951
7952         * modules/csharpexec-script: New, created from...
7953         * modules/csharpexec: ... this.
7954
7955 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
7956
7957         * modules/javaexec-script: New, created from...
7958         * modules/javaexec: ... this.
7959
7960 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7961
7962         * modules/poll (Dependencies): Add sys_select.
7963
7964 2007-01-15  Jim Meyering  <jim@meyering.net>
7965
7966         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
7967         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
7968         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
7969         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
7970
7971 2007-01-15  Bruno Haible  <bruno@clisp.org>
7972
7973         * modules/striconveh: New file.
7974         * lib/striconveh.h: New file.
7975         * lib/striconveh.c: New file.
7976         * MODULES.html.sh (Internationalization functions): Add striconveh.
7977
7978         * modules/striconveh-tests: New file.
7979         * tests/test-striconveh.c: New file.
7980
7981 2007-01-15  Bruno Haible  <bruno@clisp.org>
7982
7983         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
7984         not from GNU libiconv or GNU libc.
7985
7986 2007-01-15  Bruno Haible  <bruno@clisp.org>
7987
7988         * doc/gnulib-intro.texi (Copyright): Explain the different license
7989         terms for module descriptions, autoconf macros, tests, documentation.
7990
7991 2007-01-14  Bruno Haible  <bruno@clisp.org>
7992
7993         * modules/striconv-tests: New file.
7994         * tests/test-striconv.c: New file.
7995
7996 2007-01-14  Bruno Haible  <bruno@clisp.org>
7997
7998         * modules/iconv-tests: New file.
7999         * tests/test-iconv.c: New file.
8000
8001 2007-01-14  Bruno Haible  <bruno@clisp.org>
8002
8003         * gnulib-tool (func_get_license): For test modules, use the license of
8004         the main module.
8005
8006 2007-01-14  Bruno Haible  <bruno@clisp.org>
8007
8008         * modules/iconv (Include): Clarify that <iconv.h> can only be included
8009         if iconv is found to exist.
8010
8011 2007-01-14  Bruno Haible  <bruno@clisp.org>
8012
8013         * modules/c-ctype-tests: New file.
8014         * tests/test-c-ctype.c: New file.
8015
8016 2007-01-14  Bruno Haible  <bruno@clisp.org>
8017
8018         * modules/binary-io-tests: New file.
8019         * tests/test-binary-io.sh: New file.
8020         * tests/test-binary-io.c: New file.
8021
8022 2007-01-14  Bruno Haible  <bruno@clisp.org>
8023
8024         * modules/array-oset-tests: New file.
8025         * tests/test-array_oset.c: New file.
8026
8027 2007-01-14  Bruno Haible  <bruno@clisp.org>
8028
8029         * modules/array-list-tests: New file.
8030         * tests/test-array_list.c: New file.
8031
8032 2007-01-14  Bruno Haible  <bruno@clisp.org>
8033
8034         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
8035         and make.
8036         Reported by Simon Josefsson in
8037         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
8038
8039 2007-01-14  Bruno Haible  <bruno@clisp.org>
8040
8041         * modules/allocsa-tests: New file.
8042         * tests/test-allocsa.c: New file.
8043
8044 2007-01-14  Bruno Haible  <bruno@clisp.org>
8045
8046         * modules/fchdir (Depends-on): Add absolute-header.
8047         * modules/unistd (Depends-on): Likewise.
8048
8049 2006-12-30  Bruno Haible  <bruno@clisp.org>
8050
8051         * modules/fchdir: New file.
8052         * modules/unistd (Files): Add lib/unistd_.h.
8053         (Makefile.am): Generate unistd.h from unistd_.h.
8054         * lib/fchdir.c: New file.
8055         * lib/dirent_.h: New file.
8056         * lib/unistd_.h: New file.
8057         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
8058         * m4/fchdir.m4: New file.
8059         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
8060         (gl_HEADER_UNISTD): Invoke it.
8061         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
8062         function.
8063         * lib/backupfile.c (opendir, closedir): Undefine.
8064         * lib/chown.c (open, close): Undefine.
8065         * lib/clean-temp.c (open, close): Undefine.
8066         * lib/copy-file.c (open, close): Undefine.
8067         * lib/execute.c (open, close): Undefine.
8068         * lib/fsusage.c (open, close): Undefine.
8069         * lib/gc-gnulib.c (open, close): Undefine.
8070         * lib/getcwd.c (opendir, closedir): Undefine.
8071         * lib/glob.c (opendir, closedir): Undefine.
8072         * lib/javacomp.c (open, close): Undefine.
8073         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
8074         * lib/openat-proc.c (open, close): Undefine.
8075         * lib/pagealign_alloc.c (open, close): Undefine.
8076         * lib/pipe.c (open, close): Undefine.
8077         * lib/progreloc.c (open, close): Undefine.
8078         * lib/savedir.c (opendir, closedir): Undefine.
8079         * lib/utime.c (open, close): Undefine.
8080         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
8081
8082 2007-01-10  Bruno Haible  <bruno@clisp.org>
8083
8084         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
8085
8086 2007-01-12  Eric Blake  <ebb9@byu.net>
8087
8088         Provide a robust <wchar.h>.  Further simplifications are now
8089         possible in other modules, but not included here.
8090         * modules/wchar: New module.
8091         * m4/wchar.m4: New file.
8092         * lib/wchar_.h: Likewise.
8093         * modules/mbchar (Depends-on): Depend on wchar, as the first use
8094         of the new module.
8095         * MODULES.html.sh (Extended multibyte and wide character utilities):
8096         New section.
8097
8098 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
8099
8100         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
8101         to a reasonable default for memory allocation.
8102         (xreadlink): Don't allocate a huge buffer, to work around a buggy
8103         file system that reports garbage st_size values for symlinks.
8104         Problem reported by Liyang Hu.
8105
8106 2007-01-11  Simon Josefsson  <simon@josefsson.org>
8107
8108         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
8109         Emacs .#* auto-save files).
8110
8111 2007-01-11  Bruno Haible  <bruno@clisp.org>
8112
8113         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
8114         directory.
8115
8116 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
8117
8118         Use @...@ consistently in lib/wctype_.h.
8119         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
8120         on it being set to 1 or 0.
8121         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
8122         go back to AC_SUBSTing it.
8123         * modules/wctype (Makefile.am): Undo previous change.
8124
8125 2007-01-10  Eric Blake  <ebb9@byu.net>
8126
8127         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
8128         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
8129         * modules/wctype (Makefile.am): Likewise.
8130         Reported by Chris McGuire.
8131
8132 2007-01-10  Jim Meyering  <jim@meyering.net>
8133
8134         fts.c: a small readability/maintainability improvement
8135         * lib/fts.c (fts_read): Make this code slightly more readable and
8136         maintainable by hoisting the "sp->fts_cur = p" assignments to
8137         immediately follow the statements that set P.  Derived from
8138         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
8139
8140 2007-01-10  Eric Blake  <ebb9@byu.net>
8141
8142         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
8143         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
8144         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
8145         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
8146         Reported by Chris McGuire.
8147
8148 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8149
8150         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
8151         in sed script.
8152
8153 2007-01-09  Bruno Haible  <bruno@clisp.org>
8154
8155         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
8156         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
8157         variables.
8158         (func_module): Use them.
8159
8160 2007-01-09  Bruno Haible  <bruno@clisp.org>
8161
8162         * modules/unistr/base: New file.
8163         * lib/unistr.h: New file.
8164
8165         * modules/unistr/u8-to-u16: New file.
8166         * lib/unistr/u8-to-u16.c: New file.
8167
8168         * modules/unistr/u8-to-u32: New file.
8169         * lib/unistr/u8-to-u32.c: New file.
8170
8171         * modules/unistr/u16-to-u8: New file.
8172         * lib/unistr/u16-to-u8.c: New file.
8173
8174         * modules/unistr/u16-to-u32: New file.
8175         * lib/unistr/u16-to-u32.c: New file.
8176
8177         * modules/unistr/u32-to-u8: New file.
8178         * lib/unistr/u32-to-u8.c: New file.
8179
8180         * modules/unistr/u32-to-u16: New file.
8181         * lib/unistr/u32-to-u16.c: New file.
8182
8183         * modules/unistr/u8-check: New file.
8184         * modules/unistr/u16-check: New file.
8185         * modules/unistr/u32-check: New file.
8186         * lib/unistr/u8-check.c: New file.
8187         * lib/unistr/u16-check.c: New file.
8188         * lib/unistr/u32-check.c: New file.
8189
8190         * modules/unistr/u8-chr: New file.
8191         * modules/unistr/u16-chr: New file.
8192         * modules/unistr/u32-chr: New file.
8193         * lib/unistr/u8-chr.c: New file.
8194         * lib/unistr/u16-chr.c: New file.
8195         * lib/unistr/u32-chr.c: New file.
8196
8197         * modules/unistr/u8-cmp: New file.
8198         * modules/unistr/u16-cmp: New file.
8199         * modules/unistr/u32-cmp: New file.
8200         * lib/unistr/u8-cmp.c: New file.
8201         * lib/unistr/u16-cmp.c: New file.
8202         * lib/unistr/u32-cmp.c: New file.
8203
8204         * modules/unistr/u8-cpy: New file.
8205         * modules/unistr/u16-cpy: New file.
8206         * modules/unistr/u32-cpy: New file.
8207         * lib/unistr/u8-cpy.c: New file.
8208         * lib/unistr/u16-cpy.c: New file.
8209         * lib/unistr/u32-cpy.c: New file.
8210         * lib/unistr/u-cpy.h: New file.
8211
8212         * modules/unistr/u8-cpy-alloc: New file.
8213         * modules/unistr/u16-cpy-alloc: New file.
8214         * modules/unistr/u32-cpy-alloc: New file.
8215         * lib/unistr/u8-cpy-alloc.c: New file.
8216         * lib/unistr/u16-cpy-alloc.c: New file.
8217         * lib/unistr/u32-cpy-alloc.c: New file.
8218         * lib/unistr/u-cpy-alloc.h: New file.
8219
8220         * modules/unistr/u8-endswith: New file.
8221         * modules/unistr/u16-endswith: New file.
8222         * modules/unistr/u32-endswith: New file.
8223         * lib/unistr/u8-endswith.c: New file.
8224         * lib/unistr/u16-endswith.c: New file.
8225         * lib/unistr/u32-endswith.c: New file.
8226         * lib/unistr/u-endswith.h: New file.
8227
8228         * modules/unistr/u8-mblen: New file.
8229         * modules/unistr/u16-mblen: New file.
8230         * modules/unistr/u32-mblen: New file.
8231         * lib/unistr/u8-mblen.c: New file.
8232         * lib/unistr/u16-mblen.c: New file.
8233         * lib/unistr/u32-mblen.c: New file.
8234
8235         * modules/unistr/u8-mbtouc: New file.
8236         * modules/unistr/u16-mbtouc: New file.
8237         * modules/unistr/u32-mbtouc: New file.
8238         * lib/unistr/u8-mbtouc.c: New file.
8239         * lib/unistr/u16-mbtouc.c: New file.
8240         * lib/unistr/u32-mbtouc.c: New file.
8241
8242         * modules/unistr/u8-mbtouc-safe: New file.
8243         * modules/unistr/u16-mbtouc-safe: New file.
8244         * modules/unistr/u32-mbtouc-safe: New file.
8245         * lib/unistr/u8-mbtouc-safe.c: New file.
8246         * lib/unistr/u16-mbtouc-safe.c: New file.
8247         * lib/unistr/u32-mbtouc-safe.c: New file.
8248
8249         * modules/unistr/u8-move: New file.
8250         * modules/unistr/u16-move: New file.
8251         * modules/unistr/u32-move: New file.
8252         * lib/unistr/u8-move.c: New file.
8253         * lib/unistr/u16-move.c: New file.
8254         * lib/unistr/u32-move.c: New file.
8255         * lib/unistr/u-move.h: New file.
8256
8257         * modules/unistr/u8-next: New file.
8258         * modules/unistr/u16-next: New file.
8259         * modules/unistr/u32-next: New file.
8260         * lib/unistr/u8-next.c: New file.
8261         * lib/unistr/u16-next.c: New file.
8262         * lib/unistr/u32-next.c: New file.
8263
8264         * modules/unistr/u8-prev: New file.
8265         * modules/unistr/u16-prev: New file.
8266         * modules/unistr/u32-prev: New file.
8267         * lib/unistr/u8-prev.c: New file.
8268         * lib/unistr/u16-prev.c: New file.
8269         * lib/unistr/u32-prev.c: New file.
8270
8271         * modules/unistr/u8-set: New file.
8272         * modules/unistr/u16-set: New file.
8273         * modules/unistr/u32-set: New file.
8274         * lib/unistr/u8-set.c: New file.
8275         * lib/unistr/u16-set.c: New file.
8276         * lib/unistr/u32-set.c: New file.
8277         * lib/unistr/u-set.h: New file.
8278
8279         * modules/unistr/u8-startswith: New file.
8280         * modules/unistr/u16-startswith: New file.
8281         * modules/unistr/u32-startswith: New file.
8282         * lib/unistr/u8-startswith.c: New file.
8283         * lib/unistr/u16-startswith.c: New file.
8284         * lib/unistr/u32-startswith.c: New file.
8285         * lib/unistr/u-startswith.h: New file.
8286
8287         * modules/unistr/u8-stpcpy: New file.
8288         * modules/unistr/u16-stpcpy: New file.
8289         * modules/unistr/u32-stpcpy: New file.
8290         * lib/unistr/u8-stpcpy.c: New file.
8291         * lib/unistr/u16-stpcpy.c: New file.
8292         * lib/unistr/u32-stpcpy.c: New file.
8293         * lib/unistr/u-stpcpy.h: New file.
8294
8295         * modules/unistr/u8-stpncpy: New file.
8296         * modules/unistr/u16-stpncpy: New file.
8297         * modules/unistr/u32-stpncpy: New file.
8298         * lib/unistr/u8-stpncpy.c: New file.
8299         * lib/unistr/u16-stpncpy.c: New file.
8300         * lib/unistr/u32-stpncpy.c: New file.
8301         * lib/unistr/u-stpncpy.h: New file.
8302
8303         * modules/unistr/u8-strcat: New file.
8304         * modules/unistr/u16-strcat: New file.
8305         * modules/unistr/u32-strcat: New file.
8306         * lib/unistr/u8-strcat.c: New file.
8307         * lib/unistr/u16-strcat.c: New file.
8308         * lib/unistr/u32-strcat.c: New file.
8309         * lib/unistr/u-strcat.h: New file.
8310
8311         * modules/unistr/u8-strchr: New file.
8312         * modules/unistr/u16-strchr: New file.
8313         * modules/unistr/u32-strchr: New file.
8314         * lib/unistr/u8-strchr.c: New file.
8315         * lib/unistr/u16-strchr.c: New file.
8316         * lib/unistr/u32-strchr.c: New file.
8317
8318         * modules/unistr/u8-strcmp: New file.
8319         * modules/unistr/u16-strcmp: New file.
8320         * modules/unistr/u32-strcmp: New file.
8321         * lib/unistr/u8-strcmp.c: New file.
8322         * lib/unistr/u16-strcmp.c: New file.
8323         * lib/unistr/u32-strcmp.c: New file.
8324
8325         * modules/unistr/u8-strcpy: New file.
8326         * modules/unistr/u16-strcpy: New file.
8327         * modules/unistr/u32-strcpy: New file.
8328         * lib/unistr/u8-strcpy.c: New file.
8329         * lib/unistr/u16-strcpy.c: New file.
8330         * lib/unistr/u32-strcpy.c: New file.
8331         * lib/unistr/u-strcpy.h: New file.
8332
8333         * modules/unistr/u8-strcspn: New file.
8334         * modules/unistr/u16-strcspn: New file.
8335         * modules/unistr/u32-strcspn: New file.
8336         * lib/unistr/u8-strcspn.c: New file.
8337         * lib/unistr/u16-strcspn.c: New file.
8338         * lib/unistr/u32-strcspn.c: New file.
8339         * lib/unistr/u-strcspn.h: New file.
8340
8341         * modules/unistr/u8-strdup: New file.
8342         * modules/unistr/u16-strdup: New file.
8343         * modules/unistr/u32-strdup: New file.
8344         * lib/unistr/u8-strdup.c: New file.
8345         * lib/unistr/u16-strdup.c: New file.
8346         * lib/unistr/u32-strdup.c: New file.
8347         * lib/unistr/u-strdup.h: New file.
8348
8349         * modules/unistr/u8-strlen: New file.
8350         * modules/unistr/u16-strlen: New file.
8351         * modules/unistr/u32-strlen: New file.
8352         * lib/unistr/u8-strlen.c: New file.
8353         * lib/unistr/u16-strlen.c: New file.
8354         * lib/unistr/u32-strlen.c: New file.
8355         * lib/unistr/u-strlen.h: New file.
8356
8357         * modules/unistr/u8-strmblen: New file.
8358         * modules/unistr/u16-strmblen: New file.
8359         * modules/unistr/u32-strmblen: New file.
8360         * lib/unistr/u8-strmblen.c: New file.
8361         * lib/unistr/u16-strmblen.c: New file.
8362         * lib/unistr/u32-strmblen.c: New file.
8363
8364         * modules/unistr/u8-strmbtouc: New file.
8365         * modules/unistr/u16-strmbtouc: New file.
8366         * modules/unistr/u32-strmbtouc: New file.
8367         * lib/unistr/u8-strmbtouc.c: New file.
8368         * lib/unistr/u16-strmbtouc.c: New file.
8369         * lib/unistr/u32-strmbtouc.c: New file.
8370
8371         * modules/unistr/u8-strncat: New file.
8372         * modules/unistr/u16-strncat: New file.
8373         * modules/unistr/u32-strncat: New file.
8374         * lib/unistr/u8-strncat.c: New file.
8375         * lib/unistr/u16-strncat.c: New file.
8376         * lib/unistr/u32-strncat.c: New file.
8377         * lib/unistr/u-strncat.h: New file.
8378
8379         * modules/unistr/u8-strncmp: New file.
8380         * modules/unistr/u16-strncmp: New file.
8381         * modules/unistr/u32-strncmp: New file.
8382         * lib/unistr/u8-strncmp.c: New file.
8383         * lib/unistr/u16-strncmp.c: New file.
8384         * lib/unistr/u32-strncmp.c: New file.
8385
8386         * modules/unistr/u8-strncpy: New file.
8387         * modules/unistr/u16-strncpy: New file.
8388         * modules/unistr/u32-strncpy: New file.
8389         * lib/unistr/u8-strncpy.c: New file.
8390         * lib/unistr/u16-strncpy.c: New file.
8391         * lib/unistr/u32-strncpy.c: New file.
8392         * lib/unistr/u-strncpy.h: New file.
8393
8394         * modules/unistr/u8-strnlen: New file.
8395         * modules/unistr/u16-strnlen: New file.
8396         * modules/unistr/u32-strnlen: New file.
8397         * lib/unistr/u8-strnlen.c: New file.
8398         * lib/unistr/u16-strnlen.c: New file.
8399         * lib/unistr/u32-strnlen.c: New file.
8400         * lib/unistr/u-strnlen.h: New file.
8401
8402         * modules/unistr/u8-strpbrk: New file.
8403         * modules/unistr/u16-strpbrk: New file.
8404         * modules/unistr/u32-strpbrk: New file.
8405         * lib/unistr/u8-strpbrk.c: New file.
8406         * lib/unistr/u16-strpbrk.c: New file.
8407         * lib/unistr/u32-strpbrk.c: New file.
8408         * lib/unistr/u-strpbrk.h: New file.
8409
8410         * modules/unistr/u8-strrchr: New file.
8411         * modules/unistr/u16-strrchr: New file.
8412         * modules/unistr/u32-strrchr: New file.
8413         * lib/unistr/u8-strrchr.c: New file.
8414         * lib/unistr/u16-strrchr.c: New file.
8415         * lib/unistr/u32-strrchr.c: New file.
8416
8417         * modules/unistr/u8-strspn: New file.
8418         * modules/unistr/u16-strspn: New file.
8419         * modules/unistr/u32-strspn: New file.
8420         * lib/unistr/u8-strspn.c: New file.
8421         * lib/unistr/u16-strspn.c: New file.
8422         * lib/unistr/u32-strspn.c: New file.
8423         * lib/unistr/u-strspn.h: New file.
8424
8425         * modules/unistr/u8-strstr: New file.
8426         * modules/unistr/u16-strstr: New file.
8427         * modules/unistr/u32-strstr: New file.
8428         * lib/unistr/u8-strstr.c: New file.
8429         * lib/unistr/u16-strstr.c: New file.
8430         * lib/unistr/u32-strstr.c: New file.
8431         * lib/unistr/u-strstr.h: New file.
8432
8433         * modules/unistr/u8-strtok: New file.
8434         * modules/unistr/u16-strtok: New file.
8435         * modules/unistr/u32-strtok: New file.
8436         * lib/unistr/u8-strtok.c: New file.
8437         * lib/unistr/u16-strtok.c: New file.
8438         * lib/unistr/u32-strtok.c: New file.
8439         * lib/unistr/u-strtok.h: New file.
8440
8441         * modules/unistr/u8-uctomb: New file.
8442         * modules/unistr/u16-uctomb: New file.
8443         * modules/unistr/u32-uctomb: New file.
8444         * lib/unistr/u8-uctomb.c: New file.
8445         * lib/unistr/u16-uctomb.c: New file.
8446         * lib/unistr/u32-uctomb.c: New file.
8447
8448         * MODULES.html.sh (Unicode string functions): Add the new modules.
8449
8450 2007-01-08  Bruno Haible  <bruno@clisp.org>
8451
8452         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
8453         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
8454         subdirectories.
8455
8456 2007-01-08  Karl Berry  <karl@gnu.org>
8457
8458         * doc/error.texi: mention that main() fns must set program_name
8459         when progname is used.
8460
8461 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
8462
8463         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
8464         WCTYPE_H is empty, for the benefit of builds from non-distclean
8465         directories.  Problem reported by Eric Blake in
8466         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
8467
8468 2007-01-08  Bruno Haible  <bruno@clisp.org>
8469
8470         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
8471         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
8472         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
8473         PROVIDE_CANONICALIZE_FILENAME_MODE.
8474         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
8475
8476 2007-01-08  Bruno Haible  <bruno@clisp.org>
8477
8478         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
8479         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
8480         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
8481         * lib/fts.c: Likewise.
8482         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
8483
8484 2006-12-25  Bruno Haible  <bruno@clisp.org>
8485
8486         * modules/utf8-ucs4-safe: New file.
8487         * lib/utf8-ucs4-safe.h: New file.
8488         * lib/unistr/utf8-ucs4-safe.c: New file.
8489
8490         * modules/utf16-ucs4-safe: New file.
8491         * lib/utf16-ucs4-safe.h: New file.
8492         * lib/unistr/utf16-ucs4-safe.c: New file.
8493
8494         * MODULES.html.sh (Unicode string functions): Add the new modules.
8495
8496 2007-01-08  Bruno Haible  <bruno@clisp.org>
8497
8498         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
8499         (Depends-on): Add unitypes.
8500         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
8501         (u8_mbtouc_aux): Move out to separate file.
8502         (u8_mbtouc): Use ucs4_t, uint8_t types.
8503         * lib/unistr/utf8-ucs4.c: New file.
8504
8505         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
8506         (Depends-on): Add unitypes.
8507         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
8508         (u16_mbtouc_aux): Move out to separate file.
8509         (u16_mbtouc): Use ucs4_t, uint16_t types.
8510         * lib/unistr/utf16-ucs4.c: New file.
8511
8512         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
8513         (Depends-on): Add unitypes.
8514         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
8515         (u8_uctomb_aux): Move out to separate file.
8516         (u8_uctomb): Use ucs4_t, uint8_t types.
8517         * lib/unistr/ucs4-utf8.c: New file.
8518
8519         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
8520         (Depends-on): Add unitypes.
8521         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
8522         (u16_uctomb_aux): Move out to separate file.
8523         (u16_uctomb): Use ucs4_t, uint16_t types.
8524         * lib/unistr/ucs4-utf16.c: New file.
8525
8526 2006-12-25  Bruno Haible  <bruno@clisp.org>
8527
8528         * modules/unitypes: New file.
8529         * lib/unitypes.h: New file.
8530         * MODULES.html.sh (func_all_modules): New section "Unicode string
8531         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
8532         this section. Add unitypes.
8533
8534 2007-01-08  Bruno Haible  <bruno@clisp.org>
8535
8536         Avoid variable names that conflict with those from libtool.
8537         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
8538         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
8539         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
8540         library_names_spec to acl_library_names_spec, hardcode_* to
8541         acl_hardcode_*.
8542         Reported by Ralf Wildenhues.
8543
8544 2007-01-08  Bruno Haible  <bruno@clisp.org>
8545
8546         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
8547         definition.
8548         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
8549         definition.
8550         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
8551         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
8552         definition.
8553         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
8554         definition.
8555         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
8556         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
8557         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
8558         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
8559         definition.
8560         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
8561         definition.
8562         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
8563         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
8564         GC_USE_<algorithm>.
8565         * lib/gc-libgcrypt.c: Likewise.
8566         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
8567         * modules/gc-arctwo (configure.ac): Likewise.
8568         * modules/gc-des (configure.ac): Likewise.
8569         * modules/gc-hmac-md5 (configure.ac): Likewise.
8570         * modules/gc-hmac-sha1 (configure.ac): Likewise.
8571         * modules/gc-md2 (configure.ac): Likewise.
8572         * modules/gc-md4 (configure.ac): Likewise.
8573         * modules/gc-md5 (configure.ac): Likewise.
8574         * modules/gc-random (configure.ac): Likewise.
8575         * modules/gc-rijndael (configure.ac): Likewise.
8576         * modules/gc-sha1 (configure.ac): Likewise.
8577
8578 2007-01-08  Bruno Haible  <bruno@clisp.org>
8579
8580         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
8581         macro definition.
8582         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
8583         definition.
8584         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
8585         definition.
8586         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
8587         * modules/fcntl-safer (configure.ac): Likewise.
8588         * modules/fopen-safer (configure.ac): Likewise.
8589         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
8590         GNULIB_FWRITEERROR macro definition.
8591
8592 2007-01-08  Bruno Haible  <bruno@clisp.org>
8593
8594         * m4/gnulib-common.m4: New file.
8595         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
8596         (func_get_filelist): Add m4/gnulib-common.m4.
8597
8598 2007-01-08  Bruno Haible  <bruno@clisp.org>
8599
8600         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
8601         command.
8602
8603 2007-01-08  Jim Meyering  <jim@meyering.net>
8604
8605         Use a more robust test for a "can't happen" condition.
8606         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
8607         narrowed the st_size value.  Presuming the "can't happen" condition
8608         is true, that narrowing could conceivably convert an invalid st_size
8609         value into a valid one.  Instead, use a change based on Matthew
8610         Woehlke's original patch.
8611
8612         Slight readability improvement: use an assert-like macro
8613         in place of literal "abort ()" uses.
8614         * lib/fts.c (fts_assert): Define.
8615         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
8616         Use this macro instead of a bare 'abort'.
8617
8618 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
8619
8620         Don't worry about using IRIX 5.3's wctype.h broken definitions;
8621         simply work around them.
8622         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
8623         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
8624         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before
8625         declaring.
8626         Don't bother to define as macros, since the standard doesn't require it.
8627         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
8628         longer worry about IRIX 5.3.
8629         (HAVE_WCTYPE_CTMP_BUG): Remove.
8630
8631 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
8632
8633         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
8634         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
8635         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
8636         Problems reported by Georg Schwarz for IRIX 5.3.
8637
8638         * gnulib-tool (autoconf_minversion): Take the maximum version number
8639         found, not the minimum.  Problem reported by James Youngman.
8640
8641 2007-01-03  Karl Berry  <karl@gnu.org>
8642
8643         * doc/error.texi: new file, explaining interaction with progname.
8644         * doc/gnulib.texi: include it.  Update copyright.
8645
8646 2007-01-03  Simon Josefsson  <simon@josefsson.org>
8647
8648         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
8649         AC_CANONICAL_HOST, to improve autobuild outputs.
8650
8651 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
8652             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
8653
8654         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
8655         sockets, server sockets, and other file descriptors.  Count errors
8656         to compute the return value.  Reorder the code a bit to be easier
8657         to follow.  Don't set event bits that were not requested (except
8658         POLLERR and POLLHUP).
8659
8660 2007-01-01  Bruno Haible  <bruno@clisp.org>
8661
8662         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
8663
8664 2007-01-03  Jim Meyering  <jim@meyering.net>
8665
8666         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
8667
8668 2007-01-02  Bruno Haible  <bruno@clisp.org>
8669
8670         * modules/settime (Include): Require timespec.h.
8671         * modules/nanosleep (Include): Likewise.
8672
8673 2007-01-01  Bruno Haible  <bruno@clisp.org>
8674
8675         * gnulib-tool (func_emit_copyright_notice): Bump year.
8676         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
8677
8678 2007-01-01  Bruno Haible  <bruno@clisp.org>
8679
8680         Improve support for OpenBSD.
8681         * build-aux/config.rpath (libname_spec): Export.
8682         (library_names_spec): New variable. Export.
8683         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
8684         library_names_spec from the config.rpath output. Locate shared library
8685         through the name pattern in library_names_spec.
8686
8687 2007-01-01  Eric Blake  <ebb9@byu.net>
8688
8689         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
8690
8691 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
8692
8693         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
8694         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
8695         assume the C locale, and avoid an "eval" that could cause trouble.
8696         Problem with SORT reported by Bob Proulx.
8697
8698         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
8699         Define.  Trivial patch from Henning Nielsen Lund, originally
8700         sent to bug-grep@gnu.org today.
8701
8702 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
8703
8704         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
8705         struct stat.  Problem reported by Henning Nielsen Lund.
8706         * lib/acl.c: Include acl.h first, to check interface.  Don't
8707         bother to include sys/types.h and sys/stat.h again.
8708
8709 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
8710
8711         Import the following change from libc; problem reported by
8712         Sven Verdoolaege.
8713
8714         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
8715
8716         [BZ #1373]
8717         * lib/argp.h: Remove __NTH for __argp_usage inline function.
8718
8719 2006-12-28  Jim Meyering  <jim@meyering.net>
8720
8721         * build-aux/announce-gen: Do not assume that the package
8722         builds any of tar.gz, tar.bz2, and .xdelta files.
8723         Suggestion from Simon Josefsson.
8724
8725 2006-12-28  Simon Josefsson  <simon@josefsson.org>
8726
8727         * modules/announce-gen: New file.
8728
8729 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
8730
8731         * lib/mbchar.h: Just include <wctype.h>; the wctype module
8732         handles its gotchas now.
8733         * lib/mbswidth.c: Likewise.
8734         * lib/wcwidth.h: Likewise.
8735         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
8736         and iswcntrl; the wctype module does this stuff now.
8737         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
8738         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
8739         * modules/mbchar (Depends-on): Add wctype.
8740         * modules/mbswidth (Depends-on): Likewise.
8741         * modules/wcwidth (Depends-on): Likewise.
8742
8743 2006-12-27  Eric Blake  <ebb9@byu.net>
8744
8745         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
8746         module uses more than what <wctype.h> is required to provide.
8747
8748 2006-12-26  Eric Blake  <ebb9@byu.net>
8749
8750         * gnulib-tool (sed_extract_prog): Avoid space-tab.
8751
8752 2006-12-26  Eric Blake  <ebb9@byu.net>
8753
8754         * modules/absolute-header: New module.
8755         * modules/fcntl (Depends-on): Depend on it.
8756         * modules/inttypes (Depends-on): Likewise.
8757         * modules/stdint (Depends-on): Likewise.
8758         * modules/sys_stat (Depends-on): Likewise.
8759         * modules/wctype (Depends-on): Likewise.
8760         * MODULES.html.sh (Support for building libraries and
8761         executables): Document it.
8762
8763 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
8764
8765         * gnulib-tool (SED): Remove, undoing previous change.
8766         The problem was that it broke coreutils on Solaris, because
8767         "sed --posix" leaked into a makefile.
8768         (sed): New alias, if 'alias' and GNU sed.
8769
8770 2006-12-24  Jim Meyering  <jim@meyering.net>
8771
8772         Work around an fchownat bug in glibc-2.4:
8773         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
8774         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
8775         in spite of the -P option.
8776         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
8777         New macros.
8778         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
8779         * modules/openat (Files): Add lib/fchownat.c.
8780         * lib/openat.c (fchownat): Don't define here.  Move to...
8781         * lib/fchownat.c: ...this new file.
8782
8783 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
8784
8785         Fix bug reported by Bruno Haible in
8786         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
8787         where quotearg.c didn't compile on Mac OS X 10.2 because it
8788         lacks <wchar.h> and wint_t.
8789         * lib/wctype_.h (__wctype_wint_t): New type.
8790         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
8791         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
8792         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
8793         Arg is now of type __wctype_wint_t, not wint_t.
8794         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
8795         substitute HAVE_WINT_T.
8796         * modules/wctype (Files): Add m4/wint_t.m4.
8797         (wctype.h): Substitute HAVE_WINT_T.
8798
8799 2006-12-23  Bruno Haible  <bruno@clisp.org>
8800
8801         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
8802
8803 2006-12-23  Bruno Haible  <bruno@clisp.org>
8804
8805         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
8806         S_ISLNK.
8807         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
8808         mingw.
8809
8810 2006-12-22  Bruno Haible  <bruno@clisp.org>
8811
8812         * lib/copy-file.c: Include acl.h.
8813         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
8814         Close the file descriptors only after being done with copy_acl.
8815         * modules/copy-file (Depends-on): Add acl.
8816
8817 2006-12-22  Bruno Haible  <bruno@clisp.org>
8818
8819         * gnulib-tool (SED): New variable.
8820         Use $SED instead of sed everywhere.
8821
8822 2006-12-22  Bruno Haible  <bruno@clisp.org>
8823
8824         * modules/no-c++: New file.
8825         * m4/no-c++.m4: New file.
8826         * MODULES.html.sh (Support for building libraries and executables):
8827         Add no-c++.
8828
8829 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
8830
8831         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
8832         Include <limits.h>, and use its INT_MAX to rewrite the
8833         j loop so that it does not overflow 'int'.  Problem reported by
8834         Ralf Wildenhues in
8835         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
8836         Play it safe by shifting left by 1 rather than multiplying by 2,
8837         as GCC is less likely to optimize this away when the value
8838         is signed (when it assumes overflow leads to undefined behavior).
8839         Also, don't assume time_t uses two's complement.
8840
8841 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
8842
8843         * MODULES.html.sh: New module wctype.
8844         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
8845         * lib/fnmatch.c: Don't bother to include <wchar.h> before
8846         <wctype.h>, since the new wctype module should fix this.
8847         * lib/quotearg.c: Include <wctype.h> unconditionally, since
8848         the wctype module should arrange for it.
8849         * lib/regex_internal.h: Likewise.
8850         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
8851         since the wctype module should handle this now.
8852         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
8853         * modules/fnmatch (Depends-on): Add wctype.
8854         * modules/quotearg (Depends-on): Likewise.
8855         * modules/regex (Depends-on): Likewise.
8856
8857 2006-12-19  Bruno Haible  <bruno@clisp.org>
8858
8859         * lib/strdup.h [C++]: Wrap definitions in extern "C".
8860         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
8861
8862 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8863
8864         * modules/savewd (Depends-on): Fix dependency on fcntl.
8865
8866 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
8867
8868         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
8869         conforms to C99, rather than relying on the user's environment
8870         setting of STDINT_H.
8871
8872 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
8873         and Eric Blake  <ebb9@byu.net>
8874
8875         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
8876         This is more consistent with the other defines here.
8877         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
8878         Port to z/OS.  Problem reported by Paul Gilmartin.
8879         Change local vars to use gl_ prefix rather than ac_.
8880         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
8881         with other defines.
8882         * modules/double-slash-root: New module.
8883         * modules/dirname (Files): Remove m4/double-slash-root.m4.
8884         (Depends-on): Add double-slash-root.
8885         * MODULES.html.sh (File system functions): Mention new module.
8886
8887 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
8888
8889         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
8890         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
8891         This is for the benefit of gzip, which doesn't do i18n.
8892
8893 2006-12-12  Jim Meyering  <jim@meyering.net>
8894
8895         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
8896         Reported by Andreas Schwab <schwab@suse.de>.
8897
8898 2006-12-12  Bruno Haible  <bruno@clisp.org>
8899
8900         Merge these changes.
8901         2006-09-05  Bruno Haible  <bruno@clisp.org>
8902         * lib/iconvme.c (iconv_string): No need to save and restore errno when
8903         iconv_alloc succeeded.
8904         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
8905         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
8906         test for " && dest " at the end - dest is always != NULL there. Call
8907         iconv with 4xNULL arguments initially, to reset the state. Call iconv
8908         with 2xNULL arguments, also to flush the state storage. Handle the
8909         IRIX iconv behaviour. Realloc the final result, to throw away unused
8910         memory.
8911
8912 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
8913
8914         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
8915         and fchmodat unconditionally, since glibc 2.4 has them.
8916         Problem reported by Arkadiusz Miskiewicz.
8917
8918 2006-12-10  Bruno Haible  <bruno@clisp.org>
8919
8920         * gnulib-tool (func_import): Show the include files only for those
8921         modules that are copied and specified.
8922         Reported by Karl Berry.
8923
8924 2006-12-08  Jim Meyering  <jim@meyering.net>
8925
8926         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
8927         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
8928
8929         * build-aux/announce-gen: Add two new options, both optional:
8930         --bootstrap-tools=TOOL_LIST
8931               a comma-separated list of tools, e.g.,
8932               autoconf,automake,bison,gnulib
8933         --gnulib-snapshot-date=DATE
8934               if gnulib is in the bootstrap tool list,
8935               then report this as the snapshot date.
8936               If not specified, use the current date/time.
8937               If you specify a date here, be sure it's UTC.
8938
8939 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8940
8941         * tests/test-argp-2.sh: Fix test to match actual output.
8942         (func_compare): Fix sed script to be portable.
8943
8944 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
8945
8946         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
8947         workaround for this case.  It is not autoconfigured now; offhand
8948         it's hard to see how to autoconfigure it.
8949
8950 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
8951
8952         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
8953         a directory that is about to be chowned.  Such a directory's
8954         initial file permissions should permit the owner only and this
8955         should not be changed until after the chown, since the group and
8956         other bits would be incorrect if they granted permission before
8957         the chown.
8958
8959         Fix porting problem for iswctype reported by Georg Schwarz in:
8960         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
8961         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
8962         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
8963         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
8964         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
8965
8966 2006-12-03  Jim Meyering  <jim@meyering.net>
8967
8968         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
8969         p->fts_statp may not yet be defined.
8970         (fts_read): Instead, set it in the caller, once p->fts_statp is
8971         sure to be defined, and corresponds to a top-level directory.
8972         This bug made du -x fail.  Here's the coreutils test case:
8973         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
8974         Reported by Mike Frysinger.
8975
8976 2006-12-01  Jim Meyering  <jim@meyering.net>
8977
8978         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
8979         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
8980         Reported by Simon Josefsson.
8981
8982 2006-11-30  Jim Meyering  <jim@meyering.net>
8983
8984         * m4/warning.m4: Use the all-permissive copyright notice
8985         recommended by RMS (rather than LGPL).
8986         * m4/vararrays.m4: Likewise.
8987         * m4/flexmember.m4: Likewise.
8988
8989 2006-11-29  Bruno Haible  <bruno@clisp.org>
8990
8991         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
8992         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
8993         using +=.
8994         Reported by Simon Josefsson <simon@josefsson.org>.
8995
8996 2006-11-28  James Youngman <jay@gnu.org>
8997
8998         * README: Advise users that they might find the bug-gnulib@gnu.org
8999         and autotools-announce@gnu.org mailing lists useful.
9000
9001 2006-11-28  Bruno Haible  <bruno@clisp.org>
9002
9003         * m4/ptrdiff_max.m4: Remove file.
9004
9005 2006-11-21  Bruno Haible  <bruno@clisp.org>
9006
9007         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
9008         _AC_COMPUTE_INT.
9009         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
9010         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
9011         _AC_COMPUTE_INT.
9012         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
9013         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
9014         _AC_COMPUTE_INT.
9015         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
9016
9017 2006-11-28  Jim Meyering  <jim@meyering.net>
9018
9019         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
9020         warning from "gcc -Wshadow" about shadowing the builtin.
9021
9022 2006-11-27  Bruno Haible  <bruno@clisp.org>
9023
9024         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
9025         _AC_COMPUTE_INT.
9026         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
9027
9028 2006-11-27  Bruno Haible  <bruno@clisp.org>
9029             Paul Eggert  <eggert@cs.ucla.edu>
9030
9031         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
9032
9033 2006-11-26  Bruno Haible  <bruno@clisp.org>
9034
9035         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
9036         noinst_LTLIBRARIES.
9037
9038 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
9039             Bruno Haible  <bruno@clisp.org>
9040
9041         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
9042         if compiling with "gcc -ansi".
9043
9044 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
9045
9046         Fix some incompatibilities with gcc -ansi -pedantic.
9047         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
9048         if compiling pedantically with GCC, unless it's C99 or later.
9049         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
9050         it mishandles gcc -ansi -pedantic as well.
9051         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
9052         if gcc -pedantic.
9053         * lib/regexec.c (check_node_accept_bytes): Don't use auto
9054         initializers for struct if -pedantic, unless it's C99 or later.
9055
9056 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
9057
9058         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
9059         Don't close an fd more than once. Identical atimes indicate
9060         success, not failure.
9061
9062 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
9063
9064         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
9065
9066 2006-11-23  Jim Meyering  <jim@meyering.net>
9067
9068         * build-aux/announce-gen: New file.  From coreutils.
9069
9070 2006-11-22  Jim Meyering  <jim@meyering.net>
9071
9072         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
9073         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
9074         (fts_read): Use a temporary to narrow the overused st_size member
9075         before using it in a switch statement.  Reported by Matthew Woehlke.
9076
9077         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
9078         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
9079
9080 2006-11-20  Bruno Haible  <bruno@clisp.org>
9081
9082         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
9083         changequote instead of pairs of brackets.
9084         Reported by Andreas Schwab <schwab@suse.de>.
9085
9086 2006-11-21  Jim Meyering  <jim@meyering.net>
9087
9088         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
9089         so as to remain compatible with older compilers.
9090         Patch from Michael Deutschmann.
9091
9092 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
9093
9094         * MODULES.html.sh (File system functions): Add openat.
9095
9096         * lib/openat.h (rpl_fstatat): New macro, if
9097         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
9098         (fstatat): Define to rpl_fstatat under the same conditions,
9099         unless COMPILING_FSTATAT.
9100         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
9101         seems to have the bug.
9102         * lib/fstatat.c: New file.
9103         * modules/openat (Files): Add it.
9104
9105 2006-11-20  Bruno Haible  <bruno@clisp.org>
9106
9107         * Makefile: New file.
9108
9109 2006-11-20  Jim Meyering  <jim@meyering.net>
9110
9111         The beginnings of syntax-related checks for gnulib.
9112         * lib/Makefile: New file.
9113         * lib/t-idcache: New script.  Ensure that the two halves of
9114         idcache.c stay in sync.
9115
9116         * lib/idcache.c: Adjust comments in user- and group- portions to
9117         be more accurate, and to be consistent with one another.
9118
9119 2006-11-20  Jim Meyering  <jim@meyering.net>
9120
9121         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
9122         continue using the flexible array member (thus, this module performs
9123         half as many malloc calls), with the addition that...
9124         (getgroup, getuser): Consistently record a non-match via an empty
9125         "name" string, and map an empty string match to a NULL return value.
9126         * modules/idcache (Depends-on): Re-add flexmember.
9127
9128         * lib/idcache.c (getuser): Remove all uses of the register keyword.
9129         (getuidbyname, getgroup, getgidbyname): Likewise.
9130
9131         Use cleaner syntax: NULL rather than 0.
9132         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
9133
9134 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
9135
9136         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
9137         It mishandled the case where the group was missing.
9138         Problem reported by Greg Schafer.
9139         * modules/idcache: Likewise.
9140
9141 2006-11-18  Jim Meyering  <jim@meyering.net>
9142
9143         * check-module (%exempt_header): Add exception for some
9144         conditionally-included headers.
9145
9146         * modules/i-ring (Depends-on): Add verify.
9147         (License): Change to LGPL.
9148
9149 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
9150
9151         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
9152         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
9153         and inttostr.h.  Use snprintf rather than uinttostr, so that
9154         LGPLed code doesn't depend on GPLed.
9155
9156 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
9157
9158         * modules/inline (License): Change from GPL to LGPL.
9159
9160 2006-11-17  Jim Meyering  <jim@meyering.net>
9161
9162         * modules/d-type (License): Switch to LGPL.
9163
9164 2006-11-15  Bruno Haible  <bruno@clisp.org>
9165
9166         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
9167
9168 2006-11-15  Eric Blake  <ebb9@byu.net>
9169
9170         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
9171         the module dependency.
9172
9173 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
9174             Bruno Haible  <bruno@clisp.org>
9175
9176         * gnulib-tool (func_create_testdir): Add license consistency check.
9177
9178 2006-11-15  Eric Blake  <ebb9@byu.net>
9179
9180         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
9181         random "(cached)" in configure output.
9182
9183 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9184
9185         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
9186         test for conforming inttypes.h is both announced and cached.
9187
9188         * MODULES.html.sh (seen_modules, seen_files): New variables.
9189         (func_module): Rewrite to use a few less gnulib-tool and sed
9190         invocations.  Avoid a couple of quadratic algorithms for ...
9191         (missed_modules, missed_files): ... these, with ...
9192         (func_append, func_tmpdir): ... these new functions, from
9193         gnulib-tool.  Analogously, install traps for cleanup.
9194
9195         * tests/test-gc.c (main): Remove unused variables.
9196         * tests/test-read-file.c: Include stdlib.h, for 'free'.
9197
9198 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
9199
9200         * modules/inttostr (License): Change to LGPL.
9201
9202 2006-11-14  Eric Blake  <ebb9@byu.net>
9203
9204         * modules/tempname (License): Change to LGPL.
9205
9206 2006-11-14  Eric Blake  <ebb9@byu.net>
9207
9208         * doc/functions.texi (Function Portability): *printf functions on
9209         Cygwin now understand all POSIX size specifiers.
9210
9211 2006-11-14  Bruno Haible  <bruno@clisp.org>
9212
9213         * modules/c-ctype (License): Change to LGPL.
9214
9215 2006-11-12  Bruno Haible  <bruno@clisp.org>
9216
9217         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
9218         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
9219         for GNOME libraries, for which the include files are installed in
9220         subdirectories of $prefix/include.
9221
9222 2006-11-12  Bruno Haible  <bruno@clisp.org>
9223
9224         * m4/lib-link.m4: Require at least autoconf-2.54.
9225         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
9226         name to underscores for the --with option.
9227
9228 2006-11-13  Bruno Haible  <bruno@clisp.org>
9229
9230         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
9231         the tests directory.
9232         Reported by Ralf Wildenhues.
9233
9234 2006-11-13  Bruno Haible  <bruno@clisp.org>
9235
9236         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
9237         (func_emit_initmacro_end): Undo the override here.
9238         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
9239         Works around the famous automake error in coreutils.
9240
9241 2006-11-13  Eric Blake  <ebb9@byu.net>
9242
9243         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
9244         element, not its node.
9245
9246 2006-11-12  Bruno Haible  <bruno@clisp.org>
9247
9248         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
9249         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
9250
9251 2006-11-12  Bruno Haible  <bruno@clisp.org>
9252
9253         * gnulib-tool: New option --local-symlink.
9254         (func_usage): Document it.
9255         (lsymbolic): New variable.
9256         (func_import, func_create_testdir): If --symlink was not specified,
9257         test whether --local-symlink was specified and the file comes from
9258         the local_gnulib_dir.
9259
9260 2006-11-12  Bruno Haible  <bruno@clisp.org>
9261
9262         * gnulib-tool (func_ln): New function.
9263         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
9264
9265 2006-11-12  Bruno Haible  <bruno@clisp.org>
9266
9267         Finish support for source files in subdirectories.
9268         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
9269         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
9270         AUTOMAKE_OPTIONS.
9271         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
9272
9273 2006-11-12  Bruno Haible  <bruno@clisp.org>
9274
9275         * gnulib-tool (func_get_automake_snippet): Synthesize also an
9276         EXTRA_lib_SOURCES augmentation.
9277         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
9278
9279 2006-11-12  Jim Meyering  <jim@meyering.net>
9280
9281         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
9282         file descriptors.  This also averts a failure on systems with
9283         native openat support when a traversed directory lacks "x" access.
9284         * lib/fts_.h: Include "i-ring.h"
9285         (struct FTS) [fts_fd_ring]: New member.
9286         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
9287         (FCHDIR): Add parentheses.
9288         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
9289         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
9290         When descending, rather than simply closing the previous
9291         fts_cwd_fd value, push that file descriptor onto the ring.
9292         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
9293         (fts_open): Initialize the new fd_ring member.
9294         (fts_close): Clear the ring.
9295         (fts_safe_changedir): When possible, use our new fd_ring to skip
9296         the diropen and fstat and dev/ino comparison that would normally
9297         accompany a virtual `chdir ("..")'.
9298
9299         * modules/fts (Depends-on): Add i-ring.
9300         * modules/i-ring: New module.
9301         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
9302         * m4/i-ring.m4: New file.
9303
9304 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9305
9306         * gnulib-tool (func_create_testdir): Fix replacement of
9307         `build-aux' in configure.ac.  Run autotools in gltests
9308         subdirectory.
9309         (func_create_testdir, func_create_megatestdir, test): There is
9310         no need for '--force' in most autotool invocations in a new
9311         tree.  Actually fail the whole test if any of the tools, or the
9312         configure or make stages fail.
9313
9314         Sync from Automake.
9315         * build-aux/gnupload: Revert last change.  Add pointer to upload
9316         instructions of the GNU Maintenance Instructions.
9317         Suggestion by Karl Berry.
9318
9319 2006-11-10  Jim Meyering  <jim@meyering.net>
9320
9321         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
9322
9323 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
9324
9325         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
9326         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
9327         (bind_textdomain_codeset) [! ENABLE_NLS]:
9328         Evaluate all the arguments.  That way, callers get compatible behavior
9329         if the arguments have side effects.  Also, it avoids some GCC
9330         diagnostics in some cases; Joel E. Denny reported problems when Bison
9331         was configured with --enable-gcc-warnigs.
9332
9333 2006-11-10  Jim Meyering  <jim@meyering.net>
9334
9335         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
9336         relevant options in CFLAGS (like -O, -fno-inline) are taken into
9337         account.
9338
9339 2006-11-10  Jim Meyering  <jim@meyering.net>
9340
9341         * modules/inline: New file/module.
9342         * modules/xalloc (Files): Remove m4/inline.m4.
9343         (Depends-on): Add inline, instead.
9344         * modules/oset: Likewise.
9345         * modules/list: Likewise.
9346
9347 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
9348
9349         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
9350         Problem reported by Matthew Woehlke.
9351
9352 2006-11-09  Bruno Haible  <bruno@clisp.org>
9353
9354         * lib/tempname.c (gen_tempname): Remove variant that invokes
9355         __gen_tempname.
9356         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
9357         __gen_tempname.
9358
9359 2006-11-08  Bruno Haible  <bruno@clisp.org>
9360
9361         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
9362         to 'yes' instead of 'cross-compiling'.
9363
9364 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
9365
9366         * lib/quotearg.h (quotearg_free): New decl.
9367         * lib/quotearg.c (quotearg_free): New function.
9368         (slot0, nslots, slotvec0, slotvec):
9369         Now file-scope so that quotearg_free can get at them.
9370
9371 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9372
9373         Sync from Automake.
9374         * build-aux/gnupload: Add missing 'gnu' to example URL.
9375         Report by Karl Berry.
9376
9377 2006-11-08  Bruno Haible  <bruno@clisp.org>
9378
9379         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
9380         Suggested by Paul Eggert.
9381
9382 2006-11-08  Jim Meyering  <jim@meyering.net>
9383
9384         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
9385         It's already included if !_LIBC.
9386         (fts_safe_changedir): Add a comment.
9387
9388 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
9389
9390         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
9391         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
9392         Matthew Woehlke.
9393
9394         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
9395         definitions up, to avoid colliding with change below.
9396         (static_inline) [HAVE_INLINE]: New macro.
9397         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
9398         Provide extern decls when !HAVE_INLINE.  Do not define unless
9399         static_inline is defined, either by us or by xmalloc.c.  Use
9400         static_inline rather than static inline.
9401         (XCALLOC): Optimize sizeof(T) = 1 case.
9402         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
9403
9404 2006-11-07  Bruno Haible  <bruno@clisp.org>
9405
9406         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
9407         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
9408         AC_C_INLINE.
9409         * modules/xalloc (Files): Add m4/inline.m4.
9410
9411 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9412
9413         * README: Fix typo.
9414         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
9415         (Miscellanous Notes): ...from this.
9416
9417 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
9418
9419         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
9420         Mention that offsetof should be used instead of sizeof.
9421         From Bruno Haible.
9422
9423 2006-11-07  Bruno Haible  <bruno@clisp.org>
9424
9425         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
9426
9427 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
9428
9429         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
9430         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
9431         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
9432         (gl_tree_add_before, gl_tree_add_after):
9433         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
9434         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
9435         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
9436         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
9437         (gl_linked_add_after, gl_linked_add_at): Likewise.
9438         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
9439         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
9440         (gl_tree_add_before, gl_tree_add_after): Likewise.
9441         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
9442         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
9443         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
9444
9445 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9446
9447         * lib/gl_oset.h: Use C comment style, not C++ comment style.
9448
9449 2006-11-06  Bruno Haible  <bruno@clisp.org>
9450
9451         * m4/inline.m4: New file.
9452         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
9453         * modules/list (Files): Add m4/inline.m4.
9454         * modules/oset (Files): Likewise.
9455
9456 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
9457
9458         * lib/idcache.c: Include <stddef.h>, for offsetof.
9459         (struct userid.name): Change from char * to a flexible array member.
9460         All uses changed.
9461         * modules/idcache (Depends-on): Add flexmember.
9462
9463         * MODULES.html.sh (Core language properties): New module flexmember.
9464         * modules/flexmember, m4/flexmember.m4: New files.
9465
9466         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
9467         inline functions that are identical with the old xnmalloc_inline,
9468         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
9469         that we can avoid some unnecessary integer multiplications and
9470         divisions in the common case where the element size is known at
9471         compile time.
9472         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
9473         needed.
9474         (xnboundedmalloc): Remove.
9475         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
9476         arguments, for consistency with rest of this header.
9477         (xcharalloc): Rewrite using XNMALLOC.
9478         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
9479         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
9480         versions have been moved to lib/xalloc.h and renamed to be the
9481         non-*_inline versions.
9482         (xmalloc, xrealloc): Implement without reference to the xnmalloc
9483         and xnrealloc functions, since those functions are now inline and
9484         now call us.
9485         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
9486         renaming described above.
9487         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
9488         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
9489         captures the dependency in AC_C_INLINE.
9490
9491         New module canonicalize-lgpl, proposed by Charles Wilson in
9492         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
9493         with a few small changes afterwards.
9494         * MODULES.html.sh (File system functions): New module
9495         canonicalize-lgpl.
9496         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
9497         and canonicalize_file_name.
9498         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
9499         * modules/canonicalize-lgpl: New files.
9500
9501 2006-11-05  Bruno Haible  <bruno@clisp.org>
9502
9503         * gnulib-tool (func_import, func_create_testdir): Create directories
9504         also for files in subdirectories of lib/.
9505
9506 2006-11-05  Bruno Haible  <bruno@clisp.org>
9507
9508         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
9509         ANSI C compliant.
9510
9511 2006-11-03  Bruno Haible  <bruno@clisp.org>
9512
9513         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
9514         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
9515         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
9516         (xnboundedmalloc): New inline function.
9517         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
9518         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
9519         xmalloc.
9520         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
9521         xmalloc.
9522         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
9523         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
9524         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
9525         xmalloc.
9526         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
9527         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
9528         xmalloc.
9529         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
9530         gl_tree_add_after): Use XMALLOC instead of xmalloc.
9531         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
9532         xmalloc.
9533         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
9534         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
9535         gl_tree_add_after): Use XMALLOC instead of xmalloc.
9536         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
9537         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
9538         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
9539         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
9540
9541 2006-11-03  Bruno Haible  <bruno@clisp.org>
9542
9543         * lib/c-ctype.h [C++]: Define functions without name mangling.
9544         * lib/fwriteerror.h [C++]: Likewise.
9545         * lib/gcd.h [C++]: Likewise.
9546         * lib/linebreak.h [C++]: Likewise.
9547
9548 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
9549
9550         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
9551         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
9552         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
9553         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
9554         Check for functions and headers just once.
9555         Check for declaration of canonicalize_file_name.
9556         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
9557
9558 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
9559
9560         * gnulib-tool (func_import): Fix typo in actioncmd.
9561
9562 2006-11-02  Bruno Haible  <bruno@clisp.org>
9563
9564         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
9565         newline sequence in the Makefile.am snippet as a space, like "make"
9566         does.
9567         Reported by Roger Persson <perrog@gmail.com>.
9568
9569 2006-11-01  Bruno Haible  <bruno@clisp.org>
9570
9571         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
9572         already declared in <string.h>.
9573         * lib/strcase.h (strncasecmp): Don't declare it if yes.
9574
9575 2006-11-01  Bruno Haible  <bruno@clisp.org>
9576
9577         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
9578         * lib/strcase.h: Include <string.h>.
9579         (strcasecmp): Define to rpl_strcasecmp here.
9580
9581 2006-11-01  Bruno Haible  <bruno@clisp.org>
9582
9583         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
9584
9585 2006-11-01  Eric Blake  <ebb9@byu.net>
9586
9587         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
9588
9589         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
9590
9591 2006-10-29  Bruno Haible  <bruno@clisp.org>
9592
9593         Make it compile in C++ mode.
9594         * lib/full-write.c (full_rw): Add a cast.
9595
9596 2006-11-01  Bruno Haible  <bruno@clisp.org>
9597
9598         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
9599         be POSIX compliant.
9600         Reported by Roger Persson <perrog@gmail.com>.
9601
9602 2006-11-01  Eric Blake  <ebb9@byu.net>
9603
9604         * lib/getopt_.h: Fix comments.
9605
9606 2006-10-31  Eric Blake  <ebb9@byu.net>
9607
9608         * modules/tmpdir (Depends-on): Add sys_stat.
9609         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
9610         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
9611         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
9612         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
9613         tempname.
9614
9615 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
9616
9617         Avoid some C++ diagnostics reported by Bruno Haible.
9618         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
9619         xmalloc.
9620         (quotearg_alloc): Use xcharalloc rather than xmalloc.
9621         (struct slotvec): Move to top level.
9622         (quotearg_n_options): Rewrite to avoid xmalloc.
9623         * lib/xalloc.h (xcharalloc): New function.
9624         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
9625         [defined __cplusplus]: Add function template that provides result
9626         type propagation.  This part of the change is from Bruno Haible.
9627
9628 2006-10-29  Bruno Haible  <bruno@clisp.org>
9629
9630         Make it compile in C++ mode.
9631         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
9632         * lib/strnlen1.c (strnlen1): Cast memchr result.
9633         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
9634         * lib/clean-temp.c (string_equals, string_hash): Add casts.
9635         (create_temp_dir): Rename local variable 'template'.
9636         (compile_csharp_using_sscli): Add cast.
9637         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
9638         * lib/findprog.c (find_in_path): Likewise.
9639         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
9640         * lib/wait-process.c (register_slave_subprocess): Likewise.
9641
9642 2006-10-22  Bruno Haible  <bruno@clisp.org>
9643
9644         * modules/tsearch: New file.
9645         * lib/tsearch.h: New file.
9646         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
9647         * m4/tsearch.m4: New file.
9648         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
9649
9650 2006-10-29  Eric Blake  <ebb9@byu.net>
9651
9652         * lib/arcfour.c: Assume config.h.
9653         * lib/arctwo.c: Likewise.
9654         * lib/base64.c: Likewise.
9655         * lib/check-version.c: Likewise.
9656         * lib/crc.c: Likewise.
9657         * lib/des.c: Likewise.
9658         * lib/gc-gnulib.c: Likewise.
9659         * lib/gc-libgcrypt.c: Likewise.
9660         * lib/gc-pbkdf2-sha1.c: Likewise.
9661         * lib/getaddrinfo.c: Likewise.
9662         * lib/getdelim.c: Likewise.
9663         * lib/getline.c: Likewise.
9664         * lib/hmac-md5.c: Likewise.
9665         * lib/hmac-sha1.c: Likewise.
9666         * lib/iconvme.c: Likewise.
9667         * lib/md2.c: Likewise.
9668         * lib/md4.c: Likewise.
9669         * lib/memxor.c: Likewise.
9670         * lib/read-file.c: Likewise.
9671         * lib/readline.c: Likewise.
9672         * lib/rijndael-alg-fst.c: Likewise.
9673         * lib/rijndael-api-fst.c: Likewise.
9674         * lib/xgetdomainname.c: Likewise.
9675
9676 2006-10-28  Eric Blake  <ebb9@byu.net>
9677
9678         * lib/xstrndup.c: Assume config.h.
9679
9680 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
9681
9682         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
9683         stat-macros.h is now for our own macros, whereas stat_h is for
9684         macros in the <sys/stat.h> name space.
9685         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
9686         (STAT_MACROS_H): Remove.
9687         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
9688         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
9689         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
9690         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
9691         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
9692         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
9693         Move these macros to ...
9694         * lib/stat_.h: here.  Don't include stat-macros.h.
9695         * lib/canonicalize.c: Don't include stat-macros.h.
9696         * lib/chown.c: Likewise.
9697         * lib/euidaccess.c: Likewise.
9698         * lib/file-type.c: Likewise.
9699         * lib/filemode.c: Likewise.
9700         * lib/glob.c: Likewise.
9701         * lib/isapipe.c: Likewise.
9702         * lib/lchown.c: Likewise.
9703         * lib/lstat.c: Likewise.
9704         * lib/mkdir-p.c: Likewise.
9705         * lib/rmdir.c: Likewise.
9706         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
9707         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
9708         unless mkdir isn't declared, to speed up 'configure'.
9709         Always create sys/stat.h, since it's unlikely any real sys/stat.h
9710         would define all the S_* symbols.
9711         * modules/canonicalize (Depends-on):
9712         Depend on sys_stat, not stat-macros.
9713         * modules/chown: Likewise.
9714         * modules/euidaccess: Likewise.
9715         * modules/filemode: Likewise.
9716         * modules/file-type: Likewise.
9717         * modules/glob: Likewise.
9718         * modules/isapipe: Likewise.
9719         * modules/lchown: Likewise.
9720         * modules/lstat: Likewise.
9721         * modules/mkancesdirs: Likewise.
9722         * modules/rmdir: Likewise.
9723         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
9724         * modules/modechange: Likewise.
9725         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
9726         (configure.ac): Remove gl_STAT_MACROS.
9727         * modules/sys_stat (Depends-on): Remove stat-macros.
9728
9729 2006-10-27  Bruno Haible  <bruno@clisp.org>
9730
9731         * m4/signed.m4: Remove file.
9732         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
9733         invocation.
9734         * modules/vasnprintf (Files): Remove m4/signed.m4.
9735
9736 2006-10-27  Bruno Haible  <bruno@clisp.org>
9737
9738         Update to GNU gettext 0.16.
9739         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
9740         m4/inttypes-h.m4, m4/signed.m4.
9741         * m4/gettext.m4: Update to GNU gettext 0.16.
9742         * m4/intl.m4: New file, from GNU gettext.
9743         * m4/intldir.m4: New file, from GNU gettext.
9744         * config/srclist.txt: Update
9745
9746 2006-10-27  Eric Blake  <ebb9@byu.net>
9747
9748         * MODULES.html.sh: Document tempname.
9749         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
9750         dependencies.
9751         (Files): Move lib/tempname.c...
9752         * modules/tempname: ...to this new module.
9753         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
9754         (gl_PREREQ_TEMPNAME): Move...
9755         * m4/tempname.m4: ...to this new file.
9756         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
9757         * modules/sys_stat (Depends-on): Add stat-macros.
9758         * lib/stat_.h (includes): Pick up stat macros.
9759         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
9760         if stat macros are broken.
9761         * lib/tempname.c (includes): No need to include "stat-macros.h".
9762         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
9763         (direxists, __path_search) [!_LIBC]: Don't compile these in
9764         gnulib; the tmpdir module covers that.
9765         * lib/tempname.h: New file.
9766
9767 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
9768
9769         * COPYING: Explain how gnulib-tool converts licence headers.
9770         Almost all wording by Eric Blake.
9771
9772 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
9773
9774         * lib/mbchar.h (is_basic_table): Make read-only.
9775         * lib/mbchar.c (is_basic_table): Likewise.
9776         Reported by John Darrington.
9777
9778 2006-10-25  Bruno Haible  <bruno@clisp.org>
9779
9780         * lib/progname.h (set_program_name): Undefine before defining.
9781
9782 2006-10-25  Bruno Haible  <bruno@clisp.org>
9783
9784         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
9785         false for non-gcc C++ compilers.
9786         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
9787
9788 2006-10-24  Bruno Haible  <bruno@clisp.org>
9789
9790         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
9791         iconv implementations like Irix iconv.
9792
9793 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
9794
9795         * modules/vararrays: New file.
9796         * m4/vararrays.m4: New file, taken from diffutils.
9797         * MODULES.html.sh: New module vararrays.
9798
9799 2006-10-24  Karl Berry  <karl@gnu.org>
9800
9801         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
9802         Don't call GNU Unix.
9803
9804 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9805
9806         * users.txt: Add Libtool.
9807
9808         Sync from Libtool:
9809
9810         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
9811
9812         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
9813         to gnulib's policy of including config.h unconditionally.
9814
9815 2006-10-24  Bruno Haible  <bruno@clisp.org>
9816
9817         * modules/wcwidth (Files): Add m4/wint_t.m4.
9818         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
9819         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
9820
9821 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
9822
9823         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
9824         to pacify GCC with some -W flags enabled.  Problem reported by
9825         Bruno Haible.
9826
9827 2006-10-24  Jim Meyering  <jim@meyering.net>
9828
9829         * MODULES.html.sh: Remove uinttostr.  It's not a module.
9830         Reported by Karl Berry.
9831
9832 2006-10-23  Bruno Haible  <bruno@clisp.org>
9833
9834         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
9835
9836 2006-10-24  Bruno Haible  <bruno@clisp.org>
9837
9838         * lib/gl_list.h: Use C comment style, not C++ comment style.
9839
9840 2006-10-23  Eric Blake  <ebb9@byu.net>
9841
9842         * lib/getaddrinfo.c (includes): Add missing include.
9843
9844 2006-10-23  Bruno Haible  <bruno@clisp.org>
9845             Paul Eggert  <eggert@cs.ucla.edu>
9846
9847         Ability to rename obstack_free.
9848         * lib/obstack.h (__obstack_free): New macro. Declare instead of
9849         obstack_free.
9850         (obstack_free): Invoke the __obstack_free macro.
9851         * lib/obstack.c (obstack_free): Use __obstack_free macro.
9852
9853 2006-10-23  Bruno Haible  <bruno@clisp.org>
9854             Paul Eggert  <eggert@cs.ucla.edu>
9855
9856         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
9857         __argc, __argv from the declaration. (They are defined as macros on
9858         mingw.)
9859
9860 2006-10-22  Bruno Haible  <bruno@clisp.org>
9861
9862         * doc/gnulib-intro.texi: New file.
9863         * doc/gnulib.texi: Include it.
9864
9865 2006-10-21  Bruno Haible  <bruno@clisp.org>
9866
9867         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
9868         "Introduction", "Miscellanous Notes", "Particular Modules".
9869
9870 2006-10-21  Bruno Haible  <bruno@clisp.org>
9871
9872         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9873         Change mostlyclean-local rule to avoid sh syntax error from bash
9874         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
9875
9876 2006-10-23  Jim Meyering  <jim@meyering.net>
9877
9878         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
9879         in place of snprintf.
9880
9881         * modules/inttostr (Files): Add lib/uinttostr.c.
9882         * lib/uinttostr.c (inttostr): New file/function.
9883         * lib/inttostr.h (uinttostr): Declare.
9884         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
9885         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
9886         Add uinttostr.
9887         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
9888
9889 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
9890
9891         * lib/canonicalize.c (ELOOP): Define if not already defined.
9892         Problem reported by Bruno Haible in
9893         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
9894
9895 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
9896
9897         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
9898         Problem reported by Perry Smith and Ville Laurikari.
9899
9900         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
9901         uses.
9902
9903 2006-10-19  Bruno Haible  <bruno@clisp.org>
9904
9905         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
9906         for mingw.
9907
9908 2006-10-19  Bruno Haible  <bruno@clisp.org>
9909
9910         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
9911         Needed for mingw.
9912
9913 2006-10-19  Bruno Haible  <bruno@clisp.org>
9914
9915         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
9916
9917 2006-10-19  Bruno Haible  <bruno@clisp.org>
9918
9919         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
9920         it.
9921
9922 2006-10-19  Bruno Haible  <bruno@clisp.org>
9923
9924         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
9925         invocation.
9926
9927 2006-10-19  Bruno Haible  <bruno@clisp.org>
9928
9929         * gnulib-tool (func_create_testdir): Don't include ftruncate and
9930         mountlist by default.
9931
9932 2006-10-16  Bruno Haible  <bruno@clisp.org>
9933
9934         * lib/c-strstr.c: Include c-strstr.h.
9935
9936 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
9937
9938         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
9939         in a slash.
9940
9941 2006-10-18  Bruno Haible  <bruno@clisp.org>
9942
9943         * lib/lock.h [C++]: Wrap definitions in extern "C".
9944
9945 2006-10-18  Bruno Haible  <bruno@clisp.org>
9946
9947         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
9948         gl_LIBOBJS list.
9949
9950 2006-10-18  Bruno Haible  <bruno@clisp.org>
9951
9952         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
9953
9954 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
9955
9956         * lib/xstrtol.h: Include gettext.h.
9957         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
9958         Problem reported by Eric Blake.
9959         * modules/xstrtol (Depends-on): Add gettext-h.
9960
9961 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
9962
9963         * lib/strftime.c (advance): New macro.
9964         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
9965         incomplete type, so you can't add 0 to it.  Problem and patch
9966         reported by Eelco Dolstra for dietlibc.
9967
9968 2006-10-18  Jim Meyering  <jim@meyering.net>
9969
9970         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
9971         type for a local, and rename it: s/up/user_proc/.
9972
9973 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
9974
9975         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
9976         READ_UTMP_USER_PROCESS.
9977         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
9978
9979 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
9980
9981         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
9982         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
9983
9984 2006-10-17  Eric Blake  <ebb9@byu.net>
9985
9986         * lib/sigprocmask.c (sigprocmask): Fix typo.
9987
9988         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
9989
9990         * modules/clean-temp (Makefile.am): Don't add to make output...
9991         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
9992         config.h.
9993
9994 2006-10-17  Bruno Haible  <bruno@clisp.org>
9995
9996         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
9997         differently if DEFAULT_TEXT_DOMAIN is set.
9998
9999 2006-10-16  Bruno Haible  <bruno@clisp.org>
10000
10001         * lib/clean-temp.c: Include fwriteerror.h.
10002
10003 2006-10-16  Bruno Haible  <bruno@clisp.org>
10004
10005         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
10006
10007 2006-10-16  Bruno Haible  <bruno@clisp.org>
10008
10009         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
10010         * lib/sigprocmask.h: Include <sys/types.h>.
10011         (sigset_t): Use the system's definition if present.
10012
10013 2006-10-17  Eric Blake  <ebb9@byu.net>
10014
10015         * lib/xvasprintf.c (includes): Assume config.h.
10016         * lib/xasprintf.c (includes): Likewise.
10017
10018 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
10019
10020         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
10021         at least as wide as intmax_t.
10022
10023 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
10024
10025         (Imported from Automake.)
10026         * build-aux/gnupload: Update to version 1.1 of directive file.
10027
10028 2006-10-16  Eric Blake  <ebb9@byu.net>
10029
10030         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
10031         match Automake 1.10a.
10032
10033 2006-10-14  Bruno Haible  <bruno@clisp.org>
10034
10035         * modules/sigprocmask: New file.
10036         * lib/sigprocmask.h: New file.
10037         * lib/sigprocmask.c: New file.
10038         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
10039         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
10040         request sigprocmask.o.
10041         (gl_PREREQ_SIGPROCMASK): New macro.
10042         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
10043         (Depends-on): Add sigprocmask.
10044         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
10045         gt_SIGNALBLOCKING. Test for 'raise' only once.
10046         * lib/fatal-signal.c: Include sigprocmask.h.
10047         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
10048         unblock_fatal_signals): Define always.
10049         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
10050         sigprocmask.
10051
10052 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
10053
10054         Sync from Automake.
10055         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
10056         which incorrectly sets the mode of an existing destination
10057         directory.  In some cases the unpatched install-sh could do the
10058         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
10059         system.  We hope this is rare in practice, but it's clearly worth
10060         fixing.  Problem reported by Alex Unleashed in
10061         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
10062         Also, don't bother to check for -m bugs unless we're using -m;
10063         suggested by Stepan Kasal.
10064
10065 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10066
10067         Sync from Automake.
10068         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
10069         `-c' flag, so they appear at the same position as in %FASTDEP%
10070         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
10071         which ignores unknown options only after the first non-option.
10072         Bug report against M4 by Nelson H. F. Beebe.
10073
10074 2006-10-13  Jim Meyering  <jim@meyering.net>
10075
10076         Fix a bug in yesterday's change.
10077         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
10078         p->fts_statp->st_dev would be used uninitialized.
10079         Ensures that we always call fts_stat on the very first entry.
10080         Miklos Szeredi reported that find -xdev stopped working.
10081
10082 2006-10-12  Bruno Haible  <bruno@clisp.org>
10083
10084         * gnulib-tool (func_get_automake_snippet): Append an automatically
10085         computed EXTRA_DIST augmentation.
10086         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
10087         * modules/alloca-opt (Makefile.am): Likewise.
10088         * modules/allocsa (Makefile.am): Likewise.
10089         * modules/arcfour (Makefile.am): Likewise.
10090         * modules/arctwo (Makefile.am): Likewise.
10091         * modules/argmatch (Makefile.am): Likewise.
10092         * modules/argz (Makefile.am): Likewise.
10093         * modules/atexit (Makefile.am): Likewise.
10094         * modules/backupfile (Makefile.am): Likewise.
10095         * modules/byteswap (Makefile.am): Likewise.
10096         * modules/c-strtod (Makefile.am): Likewise.
10097         * modules/c-strtold (Makefile.am): Likewise.
10098         * modules/calloc (Makefile.am): Likewise.
10099         * modules/canon-host (Makefile.am): Likewise.
10100         * modules/canonicalize (Makefile.am): Likewise.
10101         * modules/chdir-long (Makefile.am): Likewise.
10102         * modules/chdir-safer (Makefile.am): Likewise.
10103         * modules/check-version (Makefile.am): Likewise.
10104         * modules/chown (Makefile.am): Likewise.
10105         * modules/cloexec (Makefile.am): Likewise.
10106         * modules/close-stream (Makefile.am): Likewise.
10107         * modules/closeout (Makefile.am): Likewise.
10108         * modules/crc (Makefile.am): Likewise.
10109         * modules/csharpexec (Makefile.am): Likewise.
10110         * modules/cycle-check (Makefile.am): Likewise.
10111         * modules/des (Makefile.am): Likewise.
10112         * modules/dev-ino (Makefile.am): Likewise.
10113         * modules/dirfd (Makefile.am): Likewise.
10114         * modules/dirname (Makefile.am): Likewise.
10115         * modules/dup2 (Makefile.am): Likewise.
10116         * modules/eealloc (Makefile.am): Likewise.
10117         * modules/error (Makefile.am): Likewise.
10118         * modules/euidaccess (Makefile.am): Likewise.
10119         * modules/exclude (Makefile.am): Likewise.
10120         * modules/exitfail (Makefile.am): Likewise.
10121         * modules/fcntl-safer (Makefile.am): Likewise.
10122         * modules/fcntl (Makefile.am): Likewise.
10123         * modules/file-type (Makefile.am): Likewise.
10124         * modules/fileblocks (Makefile.am): Likewise.
10125         * modules/filemode (Makefile.am): Likewise.
10126         * modules/filenamecat (Makefile.am): Likewise.
10127         * modules/fnmatch (Makefile.am): Likewise.
10128         * modules/fopen-safer (Makefile.am): Likewise.
10129         * modules/fpending (Makefile.am): Likewise.
10130         * modules/fprintftime (Makefile.am): Likewise.
10131         * modules/free (Makefile.am): Likewise.
10132         * modules/fsusage (Makefile.am): Likewise.
10133         * modules/ftruncate (Makefile.am): Likewise.
10134         * modules/fts (Makefile.am): Likewise.
10135         * modules/gc-arcfour (Makefile.am): Likewise.
10136         * modules/gc-des (Makefile.am): Likewise.
10137         * modules/gc-hmac-md5 (Makefile.am): Likewise.
10138         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
10139         * modules/gc-md4 (Makefile.am): Likewise.
10140         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
10141         * modules/gc-sha1 (Makefile.am): Likewise.
10142         * modules/gc (Makefile.am): Likewise.
10143         * modules/getaddrinfo (Makefile.am): Likewise.
10144         * modules/getcwd (Makefile.am): Likewise.
10145         * modules/getdelim (Makefile.am): Likewise.
10146         * modules/getdomainname (Makefile.am): Likewise.
10147         * modules/getgroups (Makefile.am): Likewise.
10148         * modules/gethostname (Makefile.am): Likewise.
10149         * modules/gethrxtime (Makefile.am): Likewise.
10150         * modules/getline (Makefile.am): Likewise.
10151         * modules/getloadavg (Makefile.am): Likewise.
10152         * modules/getlogin_r (Makefile.am): Likewise.
10153         * modules/getndelim2 (Makefile.am): Likewise.
10154         * modules/getopt (Makefile.am): Likewise.
10155         * modules/getpagesize (Makefile.am): Likewise.
10156         * modules/getpass-gnu (Makefile.am): Likewise.
10157         * modules/getpass (Makefile.am): Likewise.
10158         * modules/getsubopt (Makefile.am): Likewise.
10159         * modules/gettime (Makefile.am): Likewise.
10160         * modules/gettimeofday (Makefile.am): Likewise.
10161         * modules/getugroups (Makefile.am): Likewise.
10162         * modules/getusershell (Makefile.am): Likewise.
10163         * modules/glob (Makefile.am): Likewise.
10164         * modules/group-member (Makefile.am): Likewise.
10165         * modules/hard-locale (Makefile.am): Likewise.
10166         * modules/hash (Makefile.am): Likewise.
10167         * modules/hmac-md5 (Makefile.am): Likewise.
10168         * modules/hmac-sha1 (Makefile.am): Likewise.
10169         * modules/human (Makefile.am): Likewise.
10170         * modules/idcache (Makefile.am): Likewise.
10171         * modules/imaxabs (Makefile.am): Likewise.
10172         * modules/imaxdiv (Makefile.am): Likewise.
10173         * modules/inet_ntop (Makefile.am): Likewise.
10174         * modules/inet_pton (Makefile.am): Likewise.
10175         * modules/intprops (Makefile.am): Likewise.
10176         * modules/inttostr (Makefile.am): Likewise.
10177         * modules/inttypes (Makefile.am): Likewise.
10178         * modules/isapipe (Makefile.am): Likewise.
10179         * modules/javaversion (Makefile.am): Likewise.
10180         * modules/lchmod (Makefile.am): Likewise.
10181         * modules/lchown (Makefile.am): Likewise.
10182         * modules/localcharset (Makefile.am): Likewise.
10183         * modules/long-options (Makefile.am): Likewise.
10184         * modules/lstat (Makefile.am): Likewise.
10185         * modules/malloc (Makefile.am): Likewise.
10186         * modules/mathl (Makefile.am): Likewise.
10187         * modules/mbchar (Makefile.am): Likewise.
10188         * modules/md2 (Makefile.am): Likewise.
10189         * modules/md4 (Makefile.am): Likewise.
10190         * modules/md5 (Makefile.am): Likewise.
10191         * modules/memcasecmp (Makefile.am): Likewise.
10192         * modules/memchr (Makefile.am): Likewise.
10193         * modules/memcmp (Makefile.am): Likewise.
10194         * modules/memcoll (Makefile.am): Likewise.
10195         * modules/memcpy (Makefile.am): Likewise.
10196         * modules/memmem (Makefile.am): Likewise.
10197         * modules/memmove (Makefile.am): Likewise.
10198         * modules/mempcpy (Makefile.am): Likewise.
10199         * modules/memrchr (Makefile.am): Likewise.
10200         * modules/memset (Makefile.am): Likewise.
10201         * modules/memxor (Makefile.am): Likewise.
10202         * modules/mkancesdirs (Makefile.am): Likewise.
10203         * modules/mkdir-p (Makefile.am): Likewise.
10204         * modules/mkdir (Makefile.am): Likewise.
10205         * modules/mkdtemp (Makefile.am): Likewise.
10206         * modules/mkstemp (Makefile.am): Likewise.
10207         * modules/mktime (Makefile.am): Likewise.
10208         * modules/modechange (Makefile.am): Likewise.
10209         * modules/mountlist (Makefile.am): Likewise.
10210         * modules/nanosleep (Makefile.am): Likewise.
10211         * modules/obstack (Makefile.am): Likewise.
10212         * modules/openat (Makefile.am): Likewise.
10213         * modules/pagealign_alloc (Makefile.am): Likewise.
10214         * modules/pathmax (Makefile.am): Likewise.
10215         * modules/physmem (Makefile.am): Likewise.
10216         * modules/poll (Makefile.am): Likewise.
10217         * modules/posixtm (Makefile.am): Likewise.
10218         * modules/posixver (Makefile.am): Likewise.
10219         * modules/putenv (Makefile.am): Likewise.
10220         * modules/quote (Makefile.am): Likewise.
10221         * modules/quotearg (Makefile.am): Likewise.
10222         * modules/raise (Makefile.am): Likewise.
10223         * modules/read-file (Makefile.am): Likewise.
10224         * modules/readline (Makefile.am): Likewise.
10225         * modules/readlink (Makefile.am): Likewise.
10226         * modules/readtokens (Makefile.am): Likewise.
10227         * modules/readutmp (Makefile.am): Likewise.
10228         * modules/realloc (Makefile.am): Likewise.
10229         * modules/regex (Makefile.am): Likewise.
10230         * modules/rename-dest-slash (Makefile.am): Likewise.
10231         * modules/rename (Makefile.am): Likewise.
10232         * modules/rijndael (Makefile.am): Likewise.
10233         * modules/rmdir (Makefile.am): Likewise.
10234         * modules/rpmatch (Makefile.am): Likewise.
10235         * modules/safe-read (Makefile.am): Likewise.
10236         * modules/safe-write (Makefile.am): Likewise.
10237         * modules/same-inode (Makefile.am): Likewise.
10238         * modules/same (Makefile.am): Likewise.
10239         * modules/save-cwd (Makefile.am): Likewise.
10240         * modules/savedir (Makefile.am): Likewise.
10241         * modules/setenv (Makefile.am): Likewise.
10242         * modules/settime (Makefile.am): Likewise.
10243         * modules/sha1 (Makefile.am): Likewise.
10244         * modules/sig2str (Makefile.am): Likewise.
10245         * modules/snprintf (Makefile.am): Likewise.
10246         * modules/stat-macros (Makefile.am): Likewise.
10247         * modules/stat-time (Makefile.am): Likewise.
10248         * modules/stdbool (Makefile.am): Likewise.
10249         * modules/stdint (Makefile.am): Likewise.
10250         * modules/stdlib-safer (Makefile.am): Likewise.
10251         * modules/stpcpy (Makefile.am): Likewise.
10252         * modules/stpncpy (Makefile.am): Likewise.
10253         * modules/strcase (Makefile.am): Likewise.
10254         * modules/strcasestr (Makefile.am): Likewise.
10255         * modules/strchrnul (Makefile.am): Likewise.
10256         * modules/strcspn (Makefile.am): Likewise.
10257         * modules/strdup (Makefile.am): Likewise.
10258         * modules/strerror (Makefile.am): Likewise.
10259         * modules/strftime (Makefile.am): Likewise.
10260         * modules/strndup (Makefile.am): Likewise.
10261         * modules/strnlen (Makefile.am): Likewise.
10262         * modules/strpbrk (Makefile.am): Likewise.
10263         * modules/strsep (Makefile.am): Likewise.
10264         * modules/strstr (Makefile.am): Likewise.
10265         * modules/strtod (Makefile.am): Likewise.
10266         * modules/strtoimax (Makefile.am): Likewise.
10267         * modules/strtok_r (Makefile.am): Likewise.
10268         * modules/strtol (Makefile.am): Likewise.
10269         * modules/strtoll (Makefile.am): Likewise.
10270         * modules/strtoul (Makefile.am): Likewise.
10271         * modules/strtoull (Makefile.am): Likewise.
10272         * modules/strtoumax (Makefile.am): Likewise.
10273         * modules/strverscmp (Makefile.am): Likewise.
10274         * modules/sys_socket (Makefile.am): Likewise.
10275         * modules/sys_stat (Makefile.am): Likewise.
10276         * modules/sysexits (Makefile.am): Likewise.
10277         * modules/time_r (Makefile.am): Likewise.
10278         * modules/timegm (Makefile.am): Likewise.
10279         * modules/timespec (Makefile.am): Likewise.
10280         * modules/tmpfile-safer (Makefile.am): Likewise.
10281         * modules/trim (Makefile.am): Likewise.
10282         * modules/unistd-safer (Makefile.am): Likewise.
10283         * modules/unlinkdir (Makefile.am): Likewise.
10284         * modules/unlocked-io (Makefile.am): Likewise.
10285         * modules/userspec (Makefile.am): Likewise.
10286         * modules/utime (Makefile.am): Likewise.
10287         * modules/utimecmp (Makefile.am): Likewise.
10288         * modules/utimens (Makefile.am): Likewise.
10289         * modules/vasnprintf (Makefile.am): Likewise.
10290         * modules/vasprintf (Makefile.am): Likewise.
10291         * modules/vsnprintf (Makefile.am): Likewise.
10292         * modules/xalloc (Makefile.am): Likewise.
10293         * modules/xgetcwd (Makefile.am): Likewise.
10294         * modules/xnanosleep (Makefile.am): Likewise.
10295         * modules/xreadlink (Makefile.am): Likewise.
10296         * modules/xstrtod (Makefile.am): Likewise.
10297         * modules/xstrtol (Makefile.am): Likewise.
10298         * modules/xstrtold (Makefile.am): Likewise.
10299         * modules/yesno (Makefile.am): Likewise.
10300         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
10301
10302 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
10303
10304         * modules/error (Makefile.am): Distribute files through
10305         EXTRA_DIST, not lib_SOURCES.
10306
10307 2006-10-12  Eric Blake  <ebb9@byu.net>
10308
10309         * modules/error (Makefile.am): Distribute files in /lib.
10310         * modules/obstack (Makefile.am): Likewise.
10311
10312 2006-10-12  Bruno Haible  <bruno@clisp.org>
10313
10314         * modules/acl (Makefile.am): Distribute all files in lib/ through
10315         EXTRA_DIST.
10316         * modules/arcfour (Makefile.am): Likewise.
10317         * modules/arctwo (Makefile.am): Likewise.
10318         * modules/argmatch (Makefile.am): Likewise.
10319         * modules/argz (Makefile.am): Likewise.
10320         * modules/atexit (Makefile.am): Likewise.
10321         * modules/backupfile (Makefile.am): Likewise.
10322         * modules/c-strtod (Makefile.am): Likewise.
10323         * modules/c-strtold (Makefile.am): Likewise.
10324         * modules/calloc (Makefile.am): Likewise.
10325         * modules/canon-host (Makefile.am): Likewise.
10326         * modules/canonicalize (Makefile.am): Likewise.
10327         * modules/chdir-long (Makefile.am): Likewise.
10328         * modules/chdir-safer (Makefile.am): Likewise.
10329         * modules/check-version (Makefile.am): Likewise.
10330         * modules/chown (Makefile.am): Likewise.
10331         * modules/cloexec (Makefile.am): Likewise.
10332         * modules/close-stream (Makefile.am): Likewise.
10333         * modules/closeout (Makefile.am): Likewise.
10334         * modules/crc (Makefile.am): Likewise.
10335         * modules/cycle-check (Makefile.am): Likewise.
10336         * modules/des (Makefile.am): Likewise.
10337         * modules/dirfd (Makefile.am): Likewise.
10338         * modules/dirname (Makefile.am): Likewise.
10339         * modules/dup2 (Makefile.am): Likewise.
10340         * modules/euidaccess (Makefile.am): Likewise.
10341         * modules/exclude (Makefile.am): Likewise.
10342         * modules/exitfail (Makefile.am): Likewise.
10343         * modules/fcntl-safer (Makefile.am): Likewise.
10344         * modules/file-type (Makefile.am): Likewise.
10345         * modules/fileblocks (Makefile.am): Likewise.
10346         * modules/filemode (Makefile.am): Likewise.
10347         * modules/filenamecat (Makefile.am): Likewise.
10348         * modules/fnmatch (Makefile.am): Likewise.
10349         * modules/fopen-safer (Makefile.am): Likewise.
10350         * modules/fpending (Makefile.am): Likewise.
10351         * modules/fprintftime (Makefile.am): Likewise.
10352         * modules/free (Makefile.am): Likewise.
10353         * modules/fsusage (Makefile.am): Likewise.
10354         * modules/ftruncate (Makefile.am): Likewise.
10355         * modules/fts (Makefile.am): Likewise.
10356         * modules/gc (Makefile.am): Likewise.
10357         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
10358         * modules/getaddrinfo (Makefile.am): Likewise.
10359         * modules/getcwd (Makefile.am): Likewise.
10360         * modules/getdelim (Makefile.am): Likewise.
10361         * modules/getdomainname (Makefile.am): Likewise.
10362         * modules/getgroups (Makefile.am): Likewise.
10363         * modules/gethostname (Makefile.am): Likewise.
10364         * modules/gethrxtime (Makefile.am): Likewise.
10365         * modules/getline (Makefile.am): Likewise.
10366         * modules/getloadavg (Makefile.am): Likewise.
10367         * modules/getlogin_r (Makefile.am): Likewise.
10368         * modules/getopt (Makefile.am): Likewise.
10369         * modules/getpass (Makefile.am): Likewise.
10370         * modules/getpass-gnu (Makefile.am): Likewise.
10371         * modules/getsubopt (Makefile.am): Likewise.
10372         * modules/gettime (Makefile.am): Likewise.
10373         * modules/gettimeofday (Makefile.am): Likewise.
10374         * modules/getugroups (Makefile.am): Likewise.
10375         * modules/getusershell (Makefile.am): Likewise.
10376         * modules/glob (Makefile.am): Likewise.
10377         * modules/group-member (Makefile.am): Likewise.
10378         * modules/hard-locale (Makefile.am): Likewise.
10379         * modules/hash (Makefile.am): Likewise.
10380         * modules/hmac-md5 (Makefile.am): Likewise.
10381         * modules/hmac-sha1 (Makefile.am): Likewise.
10382         * modules/human (Makefile.am): Likewise.
10383         * modules/idcache (Makefile.am): Likewise.
10384         * modules/imaxabs (Makefile.am): Likewise.
10385         * modules/imaxdiv (Makefile.am): Likewise.
10386         * modules/inet_ntop (Makefile.am): Likewise.
10387         * modules/inet_pton (Makefile.am): Likewise.
10388         * modules/inttostr (Makefile.am): Likewise.
10389         * modules/isapipe (Makefile.am): Likewise.
10390         * modules/lchown (Makefile.am): Likewise.
10391         * modules/long-options (Makefile.am): Likewise.
10392         * modules/lstat (Makefile.am): Likewise.
10393         * modules/malloc (Makefile.am): Likewise.
10394         * modules/mathl (Makefile.am): Likewise.
10395         * modules/mbchar (Makefile.am): Likewise.
10396         * modules/md2 (Makefile.am): Likewise.
10397         * modules/md4 (Makefile.am): Likewise.
10398         * modules/md5 (Makefile.am): Likewise.
10399         * modules/memcasecmp (Makefile.am): Likewise.
10400         * modules/memchr (Makefile.am): Likewise.
10401         * modules/memcmp (Makefile.am): Likewise.
10402         * modules/memcoll (Makefile.am): Likewise.
10403         * modules/memcpy (Makefile.am): Likewise.
10404         * modules/memmem (Makefile.am): Likewise.
10405         * modules/memmove (Makefile.am): Likewise.
10406         * modules/mempcpy (Makefile.am): Likewise.
10407         * modules/memrchr (Makefile.am): Likewise.
10408         * modules/memset (Makefile.am): Likewise.
10409         * modules/memxor (Makefile.am): Likewise.
10410         * modules/mkancesdirs (Makefile.am): Likewise.
10411         * modules/mkdir (Makefile.am): Likewise.
10412         * modules/mkdir-p (Makefile.am): Likewise.
10413         * modules/mkdtemp (Makefile.am): Likewise.
10414         * modules/mkstemp (Makefile.am): Likewise.
10415         * modules/mktime (Makefile.am): Likewise.
10416         * modules/modechange (Makefile.am): Likewise.
10417         * modules/mountlist (Makefile.am): Likewise.
10418         * modules/nanosleep (Makefile.am): Likewise.
10419         * modules/openat (Makefile.am): Likewise.
10420         * modules/pagealign_alloc (Makefile.am): Likewise.
10421         * modules/physmem (Makefile.am): Likewise.
10422         * modules/poll (Makefile.am): Likewise.
10423         * modules/posixtm (Makefile.am): Likewise.
10424         * modules/posixver (Makefile.am): Likewise.
10425         * modules/putenv (Makefile.am): Likewise.
10426         * modules/quote (Makefile.am): Likewise.
10427         * modules/quotearg (Makefile.am): Likewise.
10428         * modules/raise (Makefile.am): Likewise.
10429         * modules/read-file (Makefile.am): Likewise.
10430         * modules/readline (Makefile.am): Likewise.
10431         * modules/readlink (Makefile.am): Likewise.
10432         * modules/readtokens (Makefile.am): Likewise.
10433         * modules/readutmp (Makefile.am): Likewise.
10434         * modules/realloc (Makefile.am): Likewise.
10435         * modules/regex (Makefile.am): Likewise.
10436         * modules/rename (Makefile.am): Likewise.
10437         * modules/rename-dest-slash (Makefile.am): Likewise.
10438         * modules/rijndael (Makefile.am): Likewise.
10439         * modules/rmdir (Makefile.am): Likewise.
10440         * modules/rpmatch (Makefile.am): Likewise.
10441         * modules/safe-read (Makefile.am): Likewise.
10442         * modules/safe-write (Makefile.am): Likewise.
10443         * modules/same (Makefile.am): Likewise.
10444         * modules/save-cwd (Makefile.am): Likewise.
10445         * modules/savedir (Makefile.am): Likewise.
10446         * modules/setenv (Makefile.am): Likewise.
10447         * modules/settime (Makefile.am): Likewise.
10448         * modules/sha1 (Makefile.am): Likewise.
10449         * modules/sig2str (Makefile.am): Likewise.
10450         * modules/snprintf (Makefile.am): Likewise.
10451         * modules/stdlib-safer (Makefile.am): Likewise.
10452         * modules/stpcpy (Makefile.am): Likewise.
10453         * modules/stpncpy (Makefile.am): Likewise.
10454         * modules/strcase (Makefile.am): Likewise.
10455         * modules/strcasestr (Makefile.am): Likewise.
10456         * modules/strchrnul (Makefile.am): Likewise.
10457         * modules/strcspn (Makefile.am): Likewise.
10458         * modules/strdup (Makefile.am): Likewise.
10459         * modules/strerror (Makefile.am): Likewise.
10460         * modules/strftime (Makefile.am): Likewise.
10461         * modules/strndup (Makefile.am): Likewise.
10462         * modules/strnlen (Makefile.am): Likewise.
10463         * modules/strpbrk (Makefile.am): Likewise.
10464         * modules/strsep (Makefile.am): Likewise.
10465         * modules/strstr (Makefile.am): Likewise.
10466         * modules/strtod (Makefile.am): Likewise.
10467         * modules/strtoimax (Makefile.am): Likewise.
10468         * modules/strtok_r (Makefile.am): Likewise.
10469         * modules/strtol (Makefile.am): Likewise.
10470         * modules/strtoll (Makefile.am): Likewise.
10471         * modules/strtoul (Makefile.am): Likewise.
10472         * modules/strtoull (Makefile.am): Likewise.
10473         * modules/strtoumax (Makefile.am): Likewise.
10474         * modules/strverscmp (Makefile.am): Likewise.
10475         * modules/time_r (Makefile.am): Likewise.
10476         * modules/timegm (Makefile.am): Likewise.
10477         * modules/tmpfile-safer (Makefile.am): Likewise.
10478         * modules/unistd-safer (Makefile.am): Likewise.
10479         * modules/unlinkdir (Makefile.am): Likewise.
10480         * modules/userspec (Makefile.am): Likewise.
10481         * modules/utime (Makefile.am): Likewise.
10482         * modules/utimecmp (Makefile.am): Likewise.
10483         * modules/utimens (Makefile.am): Likewise.
10484         * modules/vasnprintf (Makefile.am): Likewise.
10485         * modules/vasprintf (Makefile.am): Likewise.
10486         * modules/vsnprintf (Makefile.am): Likewise.
10487         * modules/xalloc (Makefile.am): Likewise.
10488         * modules/xgetcwd (Makefile.am): Likewise.
10489         * modules/xnanosleep (Makefile.am): Likewise.
10490         * modules/xreadlink (Makefile.am): Likewise.
10491         * modules/xstrtod (Makefile.am): Likewise.
10492         * modules/xstrtol (Makefile.am): Likewise.
10493         * modules/xstrtold (Makefile.am): Likewise.
10494         * modules/yesno (Makefile.am): Likewise.
10495
10496 2006-10-12  Jim Meyering  <jim@meyering.net>
10497
10498         * m4/getloadavg.m4: Revert the change below.
10499
10500         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
10501         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
10502         fail with a symlink, which is what coreutils' ./bootstrap now
10503         creates by default.
10504
10505 2006-10-12  Bruno Haible  <bruno@clisp.org>
10506
10507         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
10508         mingw.
10509         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
10510         MSVC and mingw explicitly.
10511
10512 2006-10-11  Simon Josefsson  <jas@extundo.com>
10513             Bruno Haible  <bruno@clisp.org>
10514
10515         Add support for multiple gnulib-tool invocations in the scope of a
10516         single configure.ac file.
10517         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
10518         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
10519         with the same contents as the _LIBADD variable.
10520         (func_emit_initmacro_start, func_emit_initmacro_end,
10521         func_emit_initmacro_done): New functions.
10522         (func_import, func_create_testdir): Invoke them. Allow the identifiers
10523         gl_LIBOBJS and gl_LTLIBOBJS.
10524
10525 2006-10-11  Bruno Haible  <bruno@clisp.org>
10526
10527         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
10528         (func_create_testdir): Don't create po/Makefile.am, don't invoke
10529         autoreconf. Instead, invoke autopoint explicitly but move back the
10530         *.m4 files from gnulib.
10531
10532 2006-10-11  Bruno Haible  <bruno@clisp.org>
10533
10534         * gnulib-tool (func_usage): Make module names after --create-testdir
10535         optional.
10536         (func_create_testdir): If no module was specified, use nearly all
10537         modules.
10538
10539 2006-10-12  Jim Meyering  <jim@meyering.net>
10540
10541         Big performance improvement for fts-based tools that use FTS_NOSTAT.
10542         Avoid spurious inode-mismatch problems on non-POSIX file systems.
10543         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
10544         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
10545         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
10546         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
10547         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
10548         (fts_set_stat_required): New function.
10549         (fts_open): Defer the calls to fts_stat, if possible or requested.
10550         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
10551         into fts_stat itself.
10552         (fts_read): Perform any required (deferred) fts_stat call.
10553         (fts_build): Likewise, for the directory we're about to open and read.
10554         In the readdir loop, carefully decide whether each entry will require
10555         an eventual call to fts_stat, using dirent.d_type info if available.
10556         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
10557         a command line argument into this function.  Update all callers.
10558         Map a return value of FTS_DOT to FTS_D for a command line argument.
10559         * modules/fts (Depends-on): Add d-type.  Alphabetize.
10560         Thanks to Miklos Szeredi for his tenacity and for the initial
10561         bug report about "find" failing on a FUSE-based file system.
10562
10563         * lib/fts.c (fts_open): Use consistent indentation.
10564
10565 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
10566
10567         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
10568         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
10569         reported by Jim Meyering.  All uses of cache variables renamed
10570         to match Autoconf's.
10571         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
10572         the other one.
10573
10574         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
10575         Fix misspelling in diagnostic.
10576
10577 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
10578
10579         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
10580         defined.  Problem reported by Matthew Woehlke.
10581
10582         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
10583         Add support for Tandem NonStop R series.
10584         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
10585         Use new macro.
10586
10587         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
10588         (has_trailing_slash): Omit size arg; all callers changed.
10589         Omit 'inline', since it doesn't help performance and we'd
10590         need to configure it.
10591         Don't count //, ///, etc. as having a trailing slash.
10592         As a side effect, this removes a C99ism reported by Matthew Woehlke.
10593         (rpl_rename_dest_slash): On failure, use rename's errno rather
10594         than (in some cases) an incorrect or junk errno.
10595         Simplify code by removing need to compute length; this does
10596         cause it to make two passes instead of one over the file name,
10597         but it's worth it.
10598
10599         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
10600         change, since Autoconf's version may no longer be appropriate now
10601         that we are using CVS Autoconf's version.  Add support for Tandem.
10602
10603 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
10604             Bruno Haible  <bruno@clisp.org>
10605
10606         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
10607         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
10608         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
10609         gl_AC_TYPE_LONG_LONG.
10610
10611         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
10612         instead of HAVE_LONG_LONG.
10613         * lib/printf-args.c (printf_fetchargs): Likewise.
10614         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
10615         * lib/vasnprintf.c (VASNPRINTF): Likewise.
10616         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
10617         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
10618         gl_AC_TYPE_LONG_LONG.
10619
10620 2006-10-11  Bruno Haible  <bruno@clisp.org>
10621
10622         * m4/longlong.m4: Add comments.
10623         * m4/ulonglong.m4: Likewise.
10624
10625 2006-10-10  Bruno Haible  <bruno@clisp.org>
10626
10627         Make it possible to #define stpcpy, strdup to aliases.
10628         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
10629         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
10630
10631 2006-10-10  Bruno Haible  <bruno@clisp.org>
10632
10633         Make it possible to #define gcd to an alias.
10634         * lib/gcd.c: Include config.h.
10635
10636 2006-10-10  Bruno Haible  <bruno@clisp.org>
10637
10638         Make it possible to #define c_isascii to an alias.
10639         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
10640         defined. Undefine the macros before defining them, to avoid gcc
10641         warnings.
10642         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
10643         define NO_C_CTYPE_MACROS early.
10644
10645 2006-10-10  Bruno Haible  <bruno@clisp.org>
10646
10647         Make it possible to #define set_program_name to an alias.
10648         * lib/progname.c: Don't undefine set_program_name; instead, undefine
10649         ENABLE_RELOCATABLE early.
10650
10651 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
10652
10653         Port to Tandem NSK OSS, which has 64-bit signed int but at most
10654         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
10655         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
10656         More generally, don't assume that 64-bit signed int is available
10657         if unsigned int is, and vice versa.
10658         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
10659         unsigned symbols, not on their signed counterparts.
10660         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
10661         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
10662         (UINT64_C, UINTMAX_C):
10663         Likewise.
10664         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
10665         unsigned counterparts.
10666         (Have_long_long, Unsigned): New macros.
10667         (Int): Renamed from INT.
10668         (strtoimax): Use the new macros.
10669         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
10670         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
10671         * modules/inttypes (inttypes.h): Substitute
10672         HAVE_UNSIGNED_LONG_LONG_INT.
10673         * modules/stdint (stdint.h): Likewise.
10674         (Files): Add m4/ulonglong.m4.
10675
10676 2006-10-10  Bruno Haible  <bruno@clisp.org>
10677
10678         Fix a gcc -Wshadow warning.
10679         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
10680         to 'bucket'.
10681         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
10682         gl_linked_indexof_from_to): Likewise.
10683         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
10684         Likewise.
10685         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
10686         Likewise.
10687         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
10688         Reported by Eric Blake.
10689
10690 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
10691
10692         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
10693         for NetBSD.  Problem reported by Bruno Haible.
10694
10695 2006-10-09  Jim Meyering  <jim@meyering.net>
10696
10697         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
10698         Patch from Bruno Haible.
10699
10700 2006-10-09  Jim Meyering  <jim@meyering.net>
10701
10702         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
10703         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
10704         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
10705
10706 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
10707
10708         Don't include <config.h> twice; this doesn't work in some cases,
10709         e.g., when config.h has "#define intmax_t long long int" and
10710         we include <config.h>, <inttypes.h>, <config.h> in that order.
10711         Problem reported by Matthew Woehlke in:
10712         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
10713         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
10714         * lib/fts-cycle.c: Don't include config.h.
10715         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
10716         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
10717         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
10718         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
10719         inttypes.h.
10720         * lib/xstrtoumax.c: Likewise.
10721         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
10722         __strtol and the like, so that this module is more like its siblings.
10723         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
10724         Remove; no longer needed now that we assume gnulib inttypes.h.
10725
10726 2006-10-08  Bruno Haible  <bruno@clisp.org>
10727
10728         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
10729         option.
10730
10731 2006-10-07  Jim Meyering  <jim@meyering.net>
10732
10733         * modules/inttypes (inttypes.h): Revert what seems to have been
10734         an inadvertent part of today's change: use "|", not "/" in the
10735         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
10736
10737 2006-10-07  Bruno Haible  <bruno@clisp.org>
10738
10739         * modules/sublist: New file.
10740
10741 2006-10-07  Bruno Haible  <bruno@clisp.org>
10742
10743         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
10744         * modules/argz (argz.h): Likewise.
10745         * modules/arpa_inet (arpa/inet.h): Likewise.
10746         * modules/byteswap (byteswap.h): Likewise.
10747         * modules/configmake (configmake.h): Likewise.
10748         * modules/fcntl (fcntl.h): Likewise.
10749         * modules/fnmatch (fnmatch.h): Likewise.
10750         * modules/getopt (getopt.h): Likewise.
10751         * modules/glob (glob.h): Likewise.
10752         * modules/inttypes (inttypes.h): Likewise.
10753         * modules/netinet_in (netinet/in.h): Likewise.
10754         * modules/poll (poll.h): Likewise.
10755         * modules/stdbool (stdbool.h): Likewise.
10756         * modules/stdint (stdint.h): Likewise.
10757         * modules/sys_select (sys/select.h): Likewise.
10758         * modules/sys_socket (sys/socket.h): Likewise.
10759         * modules/sys_stat (sys/stat.h): Likewise.
10760         * modules/sysexits (sysexits.h): Likewise.
10761         * modules/unistd (unistd.h): Likewise.
10762         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
10763         Add a "DO NOT EDIT" comment to the generated file.
10764         (func_import): Likewise for gnulib-comp.m4.
10765
10766 2006-10-07  Bruno Haible  <bruno@clisp.org>
10767
10768         * lib/gl_sublist.h: New file.
10769         * lib/gl_sublist.c: New file.
10770
10771 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
10772
10773         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
10774         name (relative to the original working directory) and the file
10775         name component (relative to the temporary working directory).  All
10776         callers changed.
10777         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
10778         * lib/mkdir-p.c (make_dir_parents): Likewise.
10779         * lib/mkdir-p.h (make_dir_parents): Likewise.
10780
10781 2006-10-06  Eric Blake  <ebb9@byu.net>
10782
10783         Define several macros for use by the clean-temp module.
10784         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
10785         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
10786         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
10787
10788         * lib/clean-temp.h (close_stream_temp): New declaration.
10789         * lib/clean-temp.c (includes): Pull in headers according to what
10790         other modules are in use.
10791         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
10792
10793 2006-10-06  Bruno Haible  <bruno@clisp.org>
10794
10795         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
10796         instead of fopen, fwriteerror.
10797
10798 2006-10-06  Bruno Haible  <bruno@clisp.org>
10799
10800         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
10801         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
10802         int.
10803         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
10804         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
10805         Return an error indicator.
10806         Suggested by Eric Blake.
10807
10808 2006-10-06  Bruno Haible  <bruno@clisp.org>
10809
10810         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
10811         Reported by Eric Blake.
10812
10813 2006-10-06  Bruno Haible  <bruno@clisp.org>
10814
10815         * modules/closeout (Description): Mention stderr too.
10816
10817 2006-10-06  Bruno Haible  <bruno@clisp.org>
10818         and Paul Eggert  <eggert@cs.ucla.edu>
10819
10820         * lib/closeout.c (close_stdout): Also close stderr.
10821         * lib/closeout.h: Update comment.
10822
10823 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
10824
10825         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
10826         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
10827         * lib/dirchownmod.c: Include lchown.h.
10828         * lib/lchown.c: Don't include files that lchown.h now includes.
10829         Don't declare chown, since lchown.h now does that.
10830         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
10831         (lchown): Define to rpl_chown if lchown is declared but
10832         does not exist.  Declare using a prototype if lchown is not
10833         declared.  Add a copyright notice.
10834         * lib/mkstemp.h: Include <unistd.h>.
10835         * lib/openat.c: Include lchown.h.
10836
10837         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
10838         we now test for that separately.
10839         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
10840         rather than O_NOFOLLOW, when testing whether it's possible to
10841         avoid a race condition reliably.
10842         * lib/savewd.c (savewd_chdir): Likewise.
10843
10844         Remove macros that are no longer needed now that stdint.h is
10845         reliable.
10846         * lib/fsusage.c (UINTMAX_MAX): Remove.
10847         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
10848         * lib/utimecmp.c (SIZE_MAX): Remove.
10849
10850         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
10851
10852         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
10853         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
10854         O_NOATIME works.
10855
10856 2006-10-05  Bruno Haible  <bruno@clisp.org>
10857
10858         * lib/gl_list.h (gl_sortedlist_search_from_to,
10859         gl_sortedlist_indexof_from_to): New declarations.
10860         (gl_list_implementation): New fields sortedlist_search_from_to,
10861         sortedlist_indexof_from_to.
10862         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
10863         inline functions.
10864         * lib/gl_list.c (gl_sortedlist_search_from_to,
10865         gl_sortedlist_indexof_from_to): New functions.
10866         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
10867         function.
10868         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
10869         (gl_array_sortedlist_search_from_to): New function.
10870         (gl_array_list_implementation): Update.
10871         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
10872         function.
10873         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
10874         (gl_carray_sortedlist_search_from_to): New function.
10875         (gl_carray_list_implementation): Update.
10876         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
10877         gl_linked_sortedlist_indexof_from_to): New functions.
10878         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
10879         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
10880         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
10881         gl_tree_sortedlist_indexof_from_to): New functions.
10882         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
10883         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
10884         Update.
10885         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
10886         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
10887         Update.
10888
10889 2006-10-05  Bruno Haible  <bruno@clisp.org>
10890
10891         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
10892         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
10893         (struct gl_list_implementation): Add fields search_from_to,
10894         indexof_from_to. Remove fields search, indexof.
10895         (gl_list_search): Use the search_from_to method.
10896         (gl_list_search_from, gl_list_search_from_to): New functions.
10897         (gl_list_indexof): Use the indexof_from_to method.
10898         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
10899         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
10900         (gl_list_search_from, gl_list_search_from_to): New functions.
10901         (gl_list_indexof): Use the indexof_from_to method.
10902         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
10903         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
10904         gl_array_indexof. Add start_index, end_index arguments.
10905         (gl_array_search_from_to): Renamed from gl_array_search. Add
10906         start_index, end_index arguments.
10907         (gl_array_remove, gl_array_list_implementation): Update.
10908         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
10909         gl_carray_indexof. Add start_index, end_index arguments.
10910         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
10911         start_index, end_index arguments.
10912         (gl_carray_remove, gl_carray_list_implementation): Update.
10913         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
10914         gl_linked_search. Add start_index, end_index arguments.
10915         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
10916         start_index, end_index arguments.
10917         (gl_linked_remove): Update.
10918         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
10919         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
10920         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
10921         field to 'size_t'.
10922         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
10923         gl_tree_search. Add start_index, end_index arguments.
10924         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
10925         start_index, end_index arguments.
10926         (gl_tree_remove): Update.
10927         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
10928         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
10929         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
10930         function.
10931         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
10932         gl_tree_search. Add start_index, end_index arguments.
10933         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
10934         start_index, end_index arguments.
10935         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
10936         Update.
10937         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
10938
10939 2006-10-05  Bruno Haible  <bruno@clisp.org>
10940
10941         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
10942
10943         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
10944         fwriteerror_temp): New declarations.
10945         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
10946         (descriptors): New variable.
10947         (cleanup): First, close the descriptors.
10948         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
10949         fclose_temp, fwriteerror_temp): New functions.
10950
10951 2006-10-04  Jim Meyering  <jim@meyering.net>
10952
10953         * lib/fts.c (fts_open): Tiny comment change.
10954
10955 2006-10-04  Bruno Haible  <bruno@clisp.org>
10956
10957         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
10958         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
10959         gl_LOCK_BODY.
10960         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
10961         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
10962         gl_LOCK_EARLY_BODY.
10963         (gl_LOCK): Require gl_LOCK_BODY.
10964
10965 2006-10-04  Bruno Haible  <bruno@clisp.org>
10966
10967         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
10968         (gl_oset_search_atleast): New declaration.
10969         (struct gl_oset_implementation): Add field 'search_atleast'.
10970         (gl_oset_search_atleast): New inline function.
10971         * lib/gl_oset.c (gl_oset_search_atleast): New function.
10972         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
10973         (gl_array_oset_implementation): Update.
10974         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
10975         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
10976         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
10977
10978 2006-10-04  Bruno Haible  <bruno@clisp.org>
10979
10980         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
10981
10982 2006-10-03  Bruno Haible  <bruno@clisp.org>
10983
10984         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
10985         from gl_avltreehash_list_implementation.
10986
10987 2006-10-03  Bruno Haible  <bruno@clisp.org>
10988
10989         * lib/gl_oset.c (gl_oset_add): Fix return type.
10990
10991 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
10992
10993         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
10994
10995 2006-10-02  Eric Blake  <ebb9@byu.net>
10996
10997         * modules/strnlen (Depends-on): Add extensions.
10998
10999 2006-10-02  Eric Blake  <ebb9@byu.net>
11000
11001         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
11002         definition in 2.60+.
11003
11004 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
11005
11006         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
11007         checks.
11008
11009 2006-10-02  Bruno Haible  <bruno@clisp.org>
11010
11011         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
11012         to the AUTOMAKE_OPTIONS.
11013         Reported by Jim Meyering.
11014
11015 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
11016
11017         Work around bug in Solaris 10 /proc file system:
11018         /proc/self/fd/NNN/.. isn't the parent directory of
11019         the directory whose file descriptor is NNN.  This needs to
11020         be worked around at run time, not compile time, since a
11021         program might be built on Solaris 8, where things work, and
11022         run on Solaris 10.
11023         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
11024         to use the following interface instead:
11025         (OPENAT_BUFFER_SIZE): New macro.
11026         (openat_proc_name): New function.
11027         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
11028         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
11029         Likewise.
11030         * lib/openat-proc.c: New file.
11031         * modules/openat (Files): Add lib/openat-proc.c.
11032         (Depends-on): Add same-inode, stdbool.
11033         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
11034
11035 2006-09-29  Bruno Haible  <bruno@clisp.org>
11036
11037         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
11038         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
11039         argument. Set stdout_closed before testing for ferror, not after.
11040         (fwriteerror, fwriteerror_no_ebadf): New functions.
11041
11042 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11043
11044         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
11045
11046 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
11047
11048         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
11049         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
11050
11051 2006-09-28  Jim Meyering  <jim@meyering.net>
11052
11053         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
11054         Include <unistd.h>.
11055
11056 2006-09-28  Bruno Haible  <bruno@clisp.org>
11057
11058         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
11059         * modules/linkedhash-list (Depends-on): Likewise.
11060         * modules/rbtreehash-list (Depends-on): Likewise.
11061
11062 2006-09-28  Bruno Haible  <bruno@clisp.org>
11063
11064         * lib/strndup.h: Simplify the redefinition of strndup.
11065         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
11066         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
11067
11068 2006-09-28  Bruno Haible  <bruno@clisp.org>
11069
11070         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
11071         * lib/gl_linkedhash_list.c: Likewise.
11072         * lib/gl_rbtreehash_list.c: Likewise.
11073
11074 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
11075
11076         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
11077         getaddrinfo.
11078
11079         * lib/__fpending.h: Don't include <stdio_ext.h> unless
11080         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
11081         it causes <stdio_ext.h> to cause a compile-time error.
11082         Problem reported by Nelson H. F. Beebe.
11083         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
11084         of HAVE_DECL___PENDING.
11085
11086         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
11087         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
11088         declaration.
11089
11090 2006-09-27  Jim Meyering  <jim@meyering.net>
11091
11092         This file could end up with a definition for a function
11093         named __strndup, rather than rpl_strndup on a system with
11094         incomplete weak_alias support.
11095         * lib/strndup.c (strndup): Rename from __strndup.
11096         Remove #defines that used to map __strndup to strndup.
11097         Don't use K&R prototypes.
11098         Remove LIBC-related code, since this file is not sync'd with glibc.
11099         * lib/strndup.h: Revamp, accordingly.
11100         * m4/strndup.m4: Modernize.
11101
11102 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
11103
11104         * modules/savewd (Depends-on): Add 'raise'.
11105         * lib/savewd.c: Include <signal.h>, for 'raise'.
11106
11107 2006-09-26  Jim Meyering  <jim@meyering.net>
11108
11109         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
11110         when we detect Darwin 8.7.0's acl_get_file bug.
11111         Rearrange to perform the new (below) run-test while $LIBS
11112         contains any acl-related library.  Set USE_ACL at the end.
11113         (gl_ACL_GET_FILE): New function.
11114
11115 2006-09-26  Eric Blake  <ebb9@byu.net>
11116
11117         * lib/verror.c: Include <config.h> unconditionally.
11118
11119 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
11120
11121         * modules/clock-time (Maintainer): Add self.
11122         * modules/getlogin_r (Depends-on): Add extensions.
11123
11124 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11125
11126         * modules/clock-time: New module.
11127         * modules/nanosleep (Depends-on): Add clock-time.
11128         * modules/gethrxtime (Depends-on): Likewise.
11129         * modules/gettime (Depends-on): Likewise.
11130         * modules/settime (Depends-on): Likewise.
11131
11132         * modules/fts-lgpl: Depend on openat.
11133         * modules/mkancesdirs: Depend on savewd.
11134         * modules/mkdir-p: Likewise.
11135
11136 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11137
11138         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
11139
11140         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
11141         `gl_have_arbitrary_file_name_length_limit' to
11142         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
11143         actually works between configure runs.
11144
11145 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11146             Bruno Haible  <bruno@clisp.org>
11147
11148         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
11149
11150 2006-09-25  Jim Meyering  <jim@meyering.net>
11151
11152         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
11153         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
11154
11155 2006-09-25  Eric Blake  <ebb9@byu.net>
11156
11157         * gnulib-tool (func_import, func_create_testdir): Fix typos in
11158         exec's in 2006-09-18 patch when shuffling fds.
11159
11160 2006-09-25  Bruno Haible  <bruno@clisp.org>
11161
11162         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
11163         Reported by Jim Meyering.
11164
11165 2006-09-24  Jim Meyering  <jim@meyering.net>
11166
11167         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
11168         compare a pointer against a literal "0".  That caused failures with
11169         at least HP-UX's hpcc.
11170
11171 2006-09-22  Simon Josefsson  <jas@extundo.com>
11172
11173         * modules/gc-sha1:
11174         * modules/gc-md4:
11175         * modules/gc-hmac-sha1:
11176         * modules/gc-hmac-md5:
11177         * modules/gc-des:
11178         * modules/gc-arcfour: Distribute more files.
11179
11180 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11181
11182         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
11183         (gl_linked_iterator_from_to): Initialize struct completely.
11184         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
11185         (gl_tree_iterator_from_to): Likewise
11186         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
11187         * lib/gl_array_list.c [lint] (gl_array_iterator)
11188         (gl_array_iterator_from_to): Likewise.
11189         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
11190         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
11191         (gl_carray_iterator_from_to): Likewise.
11192
11193         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
11194         * lib/md4.c (md4_process_block): Remove unused variable.
11195         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
11196         parentheses for clarity.
11197
11198 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11199
11200         * modules/bison-i18n (Depends-on): Add gettext.
11201
11202 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11203
11204         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
11205         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
11206         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
11207         also add missing comma that caused broken test.
11208         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
11209         stdlib.h, for `abort'.
11210         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
11211         variables.
11212         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
11213         include unistd.h if present, for `rmdir'.
11214         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
11215         variables.
11216         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
11217         in the process include standard headers for prototypes.
11218         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
11219         gets declared on GNU/Linux.
11220         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
11221         unistd.h, for `rmdir'.
11222         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
11223
11224         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
11225         always true.
11226         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
11227
11228         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
11229
11230 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11231
11232         * gnulib-tool (func_version): Create output all at once.  This
11233         may help avoid triggering unnecessary SIGPIPEs, and at any
11234         rate it doesn't hurt.
11235
11236 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11237             Bruno Haible  <bruno@clisp.org>
11238
11239         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
11240         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
11241         * m4/signed.m4 (bh_C_SIGNED): Likewise.
11242
11243         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
11244         (gl_FUNC_VASPRINTF): Invoke it.
11245
11246 2006-09-22  Bruno Haible  <bruno@clisp.org>
11247
11248         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
11249         getloadavg.c as first argument.
11250
11251 2006-09-22  Bruno Haible  <bruno@clisp.org>
11252
11253         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
11254         at the beginning of the gl_INIT macro.
11255         * modules/getloadavg (configure.ac): Pass $gl_source_base to
11256         gl_GETLOADAVG.
11257
11258 2006-09-22  Bruno Haible  <bruno@clisp.org>
11259
11260         * gnulib-tool (func_create_megatestdir): Don't include the config-h
11261         module.
11262         Suggested by Ralf Wildenhues.
11263
11264 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
11265
11266         Import this patch from libc:
11267
11268         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
11269
11270         * lib/regex_internal.c (re_string_reconstruct): Handle
11271         offset < pstr->valid_raw_len && pstr->offsets_needed case.
11272         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
11273         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
11274         re_string_context_at.
11275
11276         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
11277         now requires it.
11278         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
11279         gl_REGEX now does it for us.
11280         (gl_REGEX): Add test taken from
11281         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
11282
11283         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
11284         Check that large offsets work.  Modernize Autoconf usages.
11285         Prefer "yes" to mean a good thing rather than a bad.
11286         Don't put "#define mkstemp" in config.h, as this might interfere
11287         with standard system headers that "#define mkstemp mkstemp64".
11288
11289         * modules/mkstemp (Depends-on): Add extensions, so that
11290         mkstemp is visible on some platforms.
11291         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
11292         (Include): Change to "mkstemp.h" from <stdlib.h>.
11293         (Files): Add mkstemp.h.
11294
11295         * lib/mkstemp.h: New file, since some standard headers
11296         #define mkstemp.
11297         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
11298         Include "mkstemp.h".
11299         Make the _LIBC code resemble glibc original more,
11300         e.g., use K&R style.
11301         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
11302         (mkstemp): Remove, since mkstemp.h does this for us.
11303         * lib/stdlib--.h: Include mkstemp.h.
11304
11305         Import this patch from libc:
11306
11307         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
11308
11309         * lib/tempname.c (__gen_tempname): Change attempts_min
11310         into a macro.  Use preprocessor to decide how to initialize
11311         attempts [Coverity CID 67].
11312
11313 2006-09-20  Bruno Haible  <bruno@clisp.org>
11314
11315         * lib/mkdtemp.c: Import from libc.
11316         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
11317                 * sysdeps/posix/tempname.c (__gen_tempname): Change
11318                 attempts_min into a macro.  Use preprocessor to decide how to
11319                 initialize attempts [Coverity CID 67].
11320         2001-11-27  Paul Eggert  <eggert@twinsun.com>
11321                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
11322                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
11323
11324 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11325
11326         * gnulib-tool (func_exit): New function, to allow to pass the
11327         exit status portably through the trap.  Use everywhere.
11328         (--help, --version): Signal a write error.
11329         (trap): catch SIGPIPE, for write errors.
11330         Exit at the end of the trap, with the correct exit status.
11331
11332 2006-09-19  Karl Berry  <karl@gnu.org>
11333
11334         * doc/gnulib.texi: note about the license texinfo files.
11335
11336 2006-09-19  Eric Blake  <ebb9@byu.net>
11337
11338         * gnulib-tool: Avoid space-tab.
11339
11340 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
11341
11342         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
11343         that prevented coreutils 6.1 from building.  Problem reported
11344         by Petter Reinholdtsen.
11345
11346 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
11347
11348         * gnulib-tool (avoidlist): Fix typo that broke options like
11349         --avoid=lock that are used by coreutils bootstrap.
11350
11351 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
11352
11353         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
11354         more systematically.
11355
11356 2006-09-18  Jim Meyering  <jim@meyering.net>
11357
11358         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
11359
11360 2006-09-18  Bruno Haible  <bruno@clisp.org>
11361
11362         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
11363
11364 2006-09-18  Bruno Haible  <bruno@clisp.org>
11365
11366         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
11367         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
11368         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
11369         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
11370         * m4/gettext.m4: Require autoconf >= 2.52.
11371         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
11372         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
11373         of gl_cv_header_inttypes_h.
11374
11375 2006-09-18  Bruno Haible  <bruno@clisp.org>
11376
11377         * lib/javaversion.c: Include configmake.h.
11378
11379 2006-09-18  Bruno Haible  <bruno@clisp.org>
11380
11381         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
11382         avoid that the while loops be executed in a subshell.
11383
11384 2006-09-18  Bruno Haible  <bruno@clisp.org>
11385
11386         * MODULES.html.sh (func_module): Break long lines.
11387         Suggested by Bruce Korb <bkorb@gnu.org>.
11388
11389 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11390
11391         Speed up by a factor of 1.12.
11392         * gnulib-tool (nl): New variable.
11393         (func_import): Rewrite include directive extraction to only read each
11394         directive once.
11395
11396 2006-09-17  Bruno Haible  <bruno@clisp.org>
11397
11398         * modules/javaversion (Makefile.am): Remove DEFS setting.
11399         (Depends-on): Add configmake, for PKGDATADIR definition.
11400
11401 2006-09-17  Bruno Haible  <bruno@clisp.org>
11402
11403         * gnulib-tool (func_create_testdir): Rewrite all files at once.
11404
11405 2006-09-17  Bruno Haible  <bruno@clisp.org>
11406
11407         * gnulib-tool (func_append): New function, stolen from libtool.m4.
11408         (func_modules_transitive_closure, func_modules_add_dummy,
11409         func_modules_to_filelist, func_import, func_create_testdir,
11410         func_create_megatestdir, ...): Use it wherever possible.
11411         Suggested by Ralf Wildenhues.
11412
11413 2006-09-16  Karl Berry  <karl@gnu.org>
11414
11415         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
11416         to avoid sectioning errors.
11417         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
11418         [ifinfo]: blank line after @center-ed titles.
11419         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
11420         Spell FSF address consistently with others.
11421         (These changes approved by rms.)
11422
11423 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11424
11425         Speed up by a factor of 1.61.
11426         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
11427         already checked module names again.
11428
11429 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11430
11431         Speed up by a factor of 1.13.
11432         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
11433         for new_files, and the input to func_add_or_update.
11434
11435 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11436
11437         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
11438         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
11439
11440 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
11441
11442         * modules/mkancesdirs (Depends-on): Add fcntl.
11443         * modules/savewd: New file.
11444         * MODULES.html.sh (File system functions): Add savewd.
11445
11446         * modules/configmake (Makefile.am): Add support for the
11447         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
11448
11449 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
11450
11451         * m4/savewd.m4: New file.
11452
11453 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
11454
11455         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
11456         (dirchownmod): New arg FD.  All callers changed.
11457         Use FD rather than opening the directory ourself, as opening is
11458         now the caller's responsibility.
11459         * lib/dirchownmod.h: Likewise.
11460         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
11461         hosts that require <sys/types.h> before <sys/stat.h>.  Include
11462         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
11463         (test_dir): Remove.
11464         (mkancesdirs): Return length of prefix of FILE that has already
11465         been made, or -2 if there is a child doing the work.  Redo
11466         algorithm so that it is O(N) rather than O(N**2).  Optimize away
11467         ".", and treat ".." specially since it might stray back into
11468         already-created areas.  Use a subprocess if necessary.  New arg
11469         WD; all users changed.  MAKE_DIR function should now return 1
11470         if it creates a directory that is not readable.  Return -2 if
11471         a child process is spun off.
11472         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
11473         Adjust signature to match code.
11474         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
11475         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
11476         all users changed.
11477         * lib/savewd.c, lib/savewd.h: New files.
11478
11479 2006-09-15  Jim Meyering  <jim@meyering.net>
11480
11481         * modules/rename-dest-slash: New module.
11482         * MODULES.html.sh (posix_compat): Add it here.
11483
11484         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
11485
11486 2006-09-15  Jim Meyering  <jim@meyering.net>
11487
11488         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
11489         file.
11490
11491         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
11492
11493 2006-09-15  Jim Meyering  <jim@meyering.net>
11494
11495         * lib/rename-dest-slash.c (has_trailing_slash): Use
11496         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
11497         (rpl_rename_dest_slash): Perform the cheaper trailing slash
11498         test before testing whether SRC is a directory.
11499         Suggestions from Bruno Haible.
11500
11501         Avoid a warning about an unused variable.
11502         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
11503         into the #ifdef block where it's used.
11504
11505         * lib/rename-dest-slash.c: New file.
11506
11507 2006-09-14  Bruno Haible  <bruno@clisp.org>
11508
11509         * lib/allocsa.c: Include <config.h> unconditionally.
11510         * lib/asnprintf.c: Likewise.
11511         * lib/asprintf.c: Likewise.
11512         * lib/c-strcasecmp.c: Likewise.
11513         * lib/c-strcasestr.c: Likewise.
11514         * lib/c-strncasecmp.c: Likewise.
11515         * lib/c-strstr.c: Likewise.
11516         * lib/classpath.c: Likewise.
11517         * lib/clean-temp.c: Likewise.
11518         * lib/concatpath.c: Likewise.
11519         * lib/copy-file.c: Likewise.
11520         * lib/csharpcomp.c: Likewise.
11521         * lib/csharpexec.c: Likewise.
11522         * lib/execute.c: Likewise.
11523         * lib/fatal-signal.c: Likewise.
11524         * lib/findprog.c: Likewise.
11525         * lib/fwriteerror.c: Likewise.
11526         * lib/gl_array_list.c: Likewise.
11527         * lib/gl_array_oset.c: Likewise.
11528         * lib/gl_avltree_list.c: Likewise.
11529         * lib/gl_avltree_oset.c: Likewise.
11530         * lib/gl_avltreehash_list.c: Likewise.
11531         * lib/gl_carray_list.c: Likewise.
11532         * lib/gl_linked_list.c: Likewise.
11533         * lib/gl_linkedhash_list.c: Likewise.
11534         * lib/gl_list.c: Likewise.
11535         * lib/gl_oset.c: Likewise.
11536         * lib/gl_rbtree_list.c: Likewise.
11537         * lib/gl_rbtree_oset.c: Likewise.
11538         * lib/gl_rbtreehash_list.c: Likewise.
11539         * lib/imaxabs.c: Likewise.
11540         * lib/imaxdiv.c: Likewise.
11541         * lib/javacomp.c: Likewise.
11542         * lib/javaexec.c: Likewise.
11543         * lib/javaversion.c: Likewise.
11544         * lib/linebreak.c: Likewise.
11545         * lib/localcharset.c: Likewise.
11546         * lib/lock.c: Likewise.
11547         * lib/mbchar.c: Likewise.
11548         * lib/mbswidth.c: Likewise.
11549         * lib/mkdtemp.c: Likewise.
11550         * lib/pipe.c: Likewise.
11551         * lib/printf-args.c: Likewise.
11552         * lib/printf-parse.c: Likewise.
11553         * lib/progname.c: Likewise.
11554         * lib/progreloc.c: Likewise.
11555         * lib/readlink.c: Likewise.
11556         * lib/sh-quote.c: Likewise.
11557         * lib/stpcpy.c: Likewise.
11558         * lib/stpncpy.c: Likewise.
11559         * lib/strcasecmp.c: Likewise.
11560         * lib/strcasestr.c: Likewise.
11561         * lib/strcspn.c: Likewise.
11562         * lib/striconv.c: Likewise.
11563         * lib/strncasecmp.c: Likewise.
11564         * lib/strnlen1.c: Likewise.
11565         * lib/strstr.c: Likewise.
11566         * lib/strtok_r.c: Likewise.
11567         * lib/tls.c: Likewise.
11568         * lib/tmpdir.c: Likewise.
11569         * lib/unicodeio.c: Likewise.
11570         * lib/unsetenv.c: Likewise.
11571         * lib/vasnprintf.c: Likewise.
11572         * lib/vasprintf.c: Likewise.
11573         * lib/wait-process.c: Likewise.
11574         * lib/xallocsa.c: Likewise.
11575         * lib/xsetenv.c: Likewise.
11576         * lib/xstriconv.c: Likewise.
11577
11578 2006-09-13  Simon Josefsson  <jas@extundo.com>
11579
11580         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
11581         that internally, suggested by Ralf Wildenhues
11582         <Ralf.Wildenhues@gmx.de>.
11583
11584 2006-09-13  Simon Josefsson  <jas@extundo.com>
11585
11586         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
11587         @LIBOBJS@.
11588         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
11589
11590 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
11591
11592         * lib/_fpending.c: Include <config.h> unconditionally, since we no
11593         longer worry about uses that don't define HAVE_CONFIG_H.
11594         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
11595         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
11596         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
11597         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
11598         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
11599         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
11600         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
11601         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
11602         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
11603         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
11604         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
11605         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
11606         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
11607         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
11608         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
11609         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
11610         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
11611         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
11612         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
11613         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
11614         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
11615         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
11616         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
11617         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
11618         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
11619         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
11620         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
11621         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
11622         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
11623         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
11624         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
11625         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
11626         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
11627         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
11628         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
11629         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
11630         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
11631         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
11632         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
11633         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
11634         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
11635         Likewise.
11636
11637 2006-09-13  Eric Blake  <ebb9@byu.net>
11638
11639         * lib/getopt.c: Fix typo in last commit.
11640
11641 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
11642
11643         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
11644         dgettext.
11645
11646 2006-09-12  Jim Meyering  <jim@meyering.net>
11647
11648         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
11649         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
11650         Reported by Nelson H. F. Beebe.
11651
11652 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
11653
11654         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
11655         program_invocation_name and program_invocation_short_name are
11656         initialized.
11657         * lib/argp-namefrob.h: Move declarations of program_invocation_name
11658         and program_invocation_short_name to argp.h, so they are visible
11659         to user programs.
11660         * lib/argp.h: Likewise
11661
11662 2006-09-10  Bruno Haible  <bruno@clisp.org>
11663
11664         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
11665         m4/inttypes_h.m4, m4/uintmax_t.m4.
11666
11667 2006-09-10  Bruno Haible  <bruno@clisp.org>
11668
11669         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
11670         gl_AC_TYPE_UINTMAX_T.
11671
11672 2006-09-10  Bruno Haible  <bruno@clisp.org>
11673
11674         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
11675
11676 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
11677
11678         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
11679         convention.  Text proposed by Bruno Haible.
11680         (struct argp_option): Document the use of N_() wrappers.
11681
11682         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
11683         '\v', and translate the two parts separately, instead of feeding
11684         the whole string to gettext.  This allows to exclude
11685         '\v' from the strings visible to the translator by writing doc
11686         strings as N_("..") "\v" N_("..").
11687
11688 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
11689
11690         * config/srclist.txt: Undo latest change; the bug was fixed.
11691
11692 2006-09-09  Bruno Haible  <bruno@clisp.org>
11693
11694         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
11695         assignments if building a library without libtool.
11696         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
11697         in func_emit_lib_Makefile_am.
11698         (func_import): When building a static library libfoo.a, arrange to
11699         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
11700         (func_create_testdir): Likewise.
11701         * modules/gc (configure.ac, Makefile.am): If building statically,
11702         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
11703         * modules/iconvme (configure.ac, Makefile.am): Likewise.
11704         * modules/striconv (configure.ac, Makefile.am): Likewise.
11705         Based on a suggestion by Ralf Wildenhues.
11706
11707 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11708
11709         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
11710         Check for unistd.h too, since Autoconf doesn't assume POSIX.
11711         Also:
11712
11713         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11714         Add year_2050_test to catch glibc bug 2821
11715         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
11716
11717         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
11718         Prefer #ifdef to #if.
11719
11720         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
11721         Return from 'main' instead of calling 'exit'.
11722
11723 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11724
11725         * lib/mktime.c (guess_time_tm): Fix bug where mktime
11726         returned the maximum time_t value rather than (time_t) -1.
11727         Problem originally reported by William Bardwell
11728         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
11729
11730         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
11731         Moved to here ...
11732         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
11733         ... from here.
11734
11735 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11736
11737         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
11738         2821 is fixed.
11739
11740 2006-09-08  Jim Meyering  <jim@meyering.net>
11741
11742         Don't make generated files read-only.  That would bother too many
11743         people.  However, do retain the ability to work when targets are
11744         read-only: remove the destination and temporary files before writing
11745         them (when generated via sed or echo), or by using the -f option for
11746         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
11747         * modules/alloca-opt, modules/argz, modules/arpa_inet:
11748         * modules/byteswap, modules/configmake, modules/fcntl:
11749         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
11750         * modules/localcharset, modules/netinet_in, modules/poll:
11751         * modules/stdbool, modules/stdint, modules/sys_select:
11752         * modules/sys_socket, modules/sys_stat, modules/sysexits:
11753
11754 2006-09-08  Jim Meyering  <jim@meyering.net>
11755
11756         Avoid new build failure on FreeBSD 6.0.
11757         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
11758         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
11759         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
11760
11761 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11762
11763         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
11764
11765 2006-09-07  Jim Meyering  <jim@meyering.net>
11766
11767         Fix global typo in last change: use chmod u-w, not chmod u-x.
11768         Spotted by Paul Eggert and Bruce Korb.
11769         * modules/alloca-opt, modules/argz, modules/arpa_inet:
11770         * modules/byteswap, modules/configmake, modules/fcntl:
11771         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
11772         * modules/localcharset, modules/netinet_in, modules/poll:
11773         * modules/stdbool, modules/stdint, modules/sys_select:
11774         * modules/sys_socket, modules/sys_stat, modules/sysexits:
11775
11776 2006-09-06  Jim Meyering  <jim@meyering.net>
11777
11778         Make generated files be read-only.
11779         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
11780         Ensure that each generated file is now read-only.
11781         * modules/argz: Likewise.
11782         * modules/arpa_inet: Likewise.
11783         * modules/byteswap: Likewise.
11784         * modules/configmake: Likewise.
11785         * modules/fcntl: Likewise.
11786         * modules/fnmatch: Likewise.
11787         * modules/getopt: Likewise.
11788         * modules/glob: Likewise.
11789         * modules/inttypes: Likewise.
11790         * modules/netinet_in: Likewise.
11791         * modules/poll: Likewise.
11792         * modules/stdbool: Likewise.
11793         * modules/stdint: Likewise.
11794         * modules/sys_select: Likewise.
11795         * modules/sys_socket: Likewise.
11796         * modules/sys_stat: Likewise.
11797         * modules/sysexits: Likewise.
11798         * modules/localcharset: Same as above, but continue using temporary
11799         file named "t-$@" (why different?) rather than the "$@-t" used
11800         everywhere else.
11801
11802         * modules/sysexits (Makefile.am): Replace literal occurrences
11803         of "sysexit.h" more readable, and more consistent, "$@".
11804
11805 2006-09-06  Bruno Haible  <bruno@clisp.org>
11806
11807         * modules/striconv: New file.
11808         * modules/xstriconv: New file.
11809         * MODULES.html.sh (Internationalization functions): Add striconv,
11810         xstriconv.
11811
11812 2006-09-06  Bruno Haible  <bruno@clisp.org>
11813
11814         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
11815         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
11816         not using libtool correctly.
11817
11818 2006-09-06  Bruno Haible  <bruno@clisp.org>
11819
11820         * lib/striconv.h: New file.
11821         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
11822         iconvstring.c.
11823         * lib/xstriconv.h: New file.
11824         * lib/xstriconv.c: New file.
11825
11826 2006-09-06  Bruno Haible  <bruno@clisp.org>
11827
11828         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
11829         lib_..._LDFLAGS.
11830
11831 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11832
11833         * lib/argz_.h: Sync from Libtool.
11834
11835         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
11836                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11837
11838         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
11839
11840 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
11841
11842         * modules/trim: New file.
11843
11844 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
11845
11846         * lib/trim.h: New file.
11847         * lib/trim.c: New file.
11848
11849 2006-09-05  Bruno Haible  <bruno@clisp.org>
11850
11851         * MODULES.html.sh (String handling): Add trim.
11852
11853 2006-09-04  Karl Berry  <karl@gnu.org>
11854
11855         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
11856         until next release.
11857
11858 2006-09-03  Bruno Haible  <bruno@clisp.org>
11859
11860         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
11861         correctly.
11862
11863 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
11864
11865         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
11866         not gl_GETLOADAVG.  Omit unneeded semicolons.
11867         Problems reported by Ralf Wildenhues in
11868         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
11869         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
11870         at the end, which is the usual gnulib style.
11871
11872         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
11873         of doing all the work ourselves.
11874         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
11875         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
11876
11877 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
11878
11879         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
11880         Problem reported by Ralf Wildenhues in
11881         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
11882
11883         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
11884         HAVE_STRUCT_STATFS_F_FSTYPENAME.
11885
11886 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
11887
11888         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
11889         yesterday's patch by changing test -n to test -z.
11890
11891 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11892
11893         * modules/getloadavg (Files): Add m4/getloadavg.m4.
11894         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
11895         the former is now obsolescent.
11896
11897         * modules/chdir-long (Depends-on): Add fcntl.
11898
11899 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11900
11901         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
11902         obsolescent, and programs should use gnulib instead.
11903         * m4/getloadavg.m4: New file, with contents taken from Autoconf
11904         but with prefixes changed.
11905
11906 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11907
11908         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
11909         or stdbool.h, because they might not exist while configuring.
11910
11911         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
11912         Don't include unistd.h or limits.h; not needed, since chdir-long.h
11913         does that for us.
11914         (O_DIRECTORY): Remove.
11915
11916 2006-08-31  Eric Blake  <ebb9@byu.net>
11917
11918         * gnulib-tool: Don't let emacs change spaces to TAB.
11919
11920 2006-08-31  Bruno Haible  <bruno@clisp.org>
11921
11922         * gnulib-tool: When calling func_import more than once, do it in a
11923         subshell.
11924         Reported by Eric Blake <ebb9@byu.net>.
11925
11926 2006-08-31  Bruno Haible  <bruno@clisp.org>
11927
11928         * gnulib-tool (nl): Remove variable.
11929         (sed_transform_lib_file): Use more robust test for config-h module.
11930         (func_import): Fix typo in 2006-08-25 patch.
11931
11932 2006-08-31  Bruno Haible  <bruno@clisp.org>
11933
11934         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
11935         specified, augment Makefile.am variables instead of assigning them.
11936
11937 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
11938
11939         Work around a bug in both the Linux and SunOS 64-bit kernels:
11940         nanosleep mishandles sleeps for longer than 2**31 seconds.
11941         Problem reported by Frank v Waveren in
11942         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
11943         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
11944         Check for nanosleep bug.
11945         (LIB_NANOSLEEP): Append clock_gettime library if needed.
11946
11947 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
11948
11949         Work around a bug in both the Linux and SunOS 64-bit kernels:
11950         nanosleep mishandles sleeps for longer than 2**31 seconds.
11951         Problem reported by Frank v Waveren in
11952         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
11953         * lib/nanosleep.c (BILLION): New constant.
11954         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
11955         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
11956         implementation.
11957
11958 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
11959
11960         * modules/nanosleep (Depends-on): Add gettime.
11961
11962 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
11963         and Simon Josefsson  <jas@extundo.com>
11964         and Oskar Liljeblad  <oskar@osk.mine.nu>
11965
11966         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
11967         * gnulib-tool (func_import): New license type 'unmodifiable license
11968         text'.
11969         * modules/fdl: Use it.  Longer description.
11970         * module/gpl, module/lgpl: New files.
11971
11972 2006-08-30  Jim Meyering  <jim@meyering.net>
11973
11974         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
11975         shadowing the parameter.
11976
11977 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11978
11979         Sync from Libtool:
11980
11981         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11982
11983         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
11984         sharing with gnulib.  Report by Eric Blake.
11985
11986 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
11987
11988         * modules/isapipe: New file.
11989         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
11990
11991 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
11992
11993         * modules/configmake (Makefile.am): Add a comment, and omit
11994         the CONFIGMAKE_ prefix from generated macro names.  Suggested
11995         by Bruno Haible.
11996
11997 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
11998
11999         * m4/isapipe.m4: New file.
12000
12001 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
12002
12003         * lib/isapipe.c, lib/isapipe.h: New files.
12004
12005 2006-08-29  Jim Meyering  <jim@meyering.net>
12006
12007         * modules/configmake (Makefile.am): Make configmake.h depend on
12008         Makefile.  Otherwise, a stale configmake.h could hang around.
12009
12010 2006-08-29  Eric Blake  <ebb9@byu.net>
12011
12012         * lib/error.c (error_at_line, print_errno_message): Match libc, after
12013         resolution of upstream bug 3044.
12014
12015 2006-08-29  Bruno Haible  <bruno@clisp.org>
12016
12017         * modules/localcharset (Depends-on): Add configmake.
12018         (Makefile.am): Remove setting of LIBDIR through DEFS.
12019
12020 2006-08-29  Bruno Haible  <bruno@clisp.org>
12021
12022         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
12023         defined.
12024
12025 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
12026
12027         * modules/fcntl: New file.
12028         * modules/chdir-safer (Depends-on): Add fcntl.
12029         * modules/fts: Likewise.
12030         * modules/mkdir-p: Likewise.
12031
12032         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
12033         This undoes the most recent change, since we're now addressing the
12034         problem in a different way.
12035
12036         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
12037         into output, since the output might be called Makefile.am even
12038         if $makefile_name is something different.
12039         (func_import): Use $makefile_am rather than
12040         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
12041         empty.
12042
12043         * modules/inttypes (Files): Add m4/inttypes-h.m4.
12044
12045 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
12046
12047         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
12048         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
12049         recent change to stdint.m4, since we're now addressing the problem in a
12050         different way.
12051
12052 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
12053
12054         * m4/fcntl_h.m4: New file.
12055
12056 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
12057
12058         * lib/fcntl_.h: New file.
12059         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
12060         the fcntl module.
12061         * lib/dirchownmod.c: Likewise.
12062         * lib/fts.c: Likewise.
12063
12064         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
12065         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
12066         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
12067         just before including <inttypes.h>, to avoid circular inclusion.
12068
12069 2006-08-28  Jim Meyering  <jim@meyering.net>
12070
12071         * doc/visibility.texi: Actually read and correct the grammar of the
12072         sentence affected by yesterday's change.
12073
12074 2006-08-28  Eric Blake  <ebb9@byu.net>
12075
12076         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
12077         needs wrapper.
12078
12079 2006-08-28  Eric Blake  <ebb9@byu.net>
12080
12081         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
12082
12083 2006-08-28  Eric Blake  <ebb9@byu.net>
12084
12085         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
12086
12087 2006-08-28  Bruno Haible  <bruno@clisp.org>
12088
12089         * modules/c-strstr: New file, from GNU gettext.
12090         * MODULES.html.sh (String handling): Add c-strstr.
12091
12092 2006-08-28  Bruno Haible  <bruno@clisp.org>
12093
12094         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
12095         macros.
12096         Reported by Eric Blake.
12097
12098 2006-08-28  Bruno Haible  <bruno@clisp.org>
12099
12100         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
12101         (VASNPRINTF): Return a string of length > INT_MAX without failing.
12102         * lib/vasprintf.c: Include errno.h, limits.h.
12103         (EOVERFLOW): New fallback definition.
12104         (vasprintf): Test here whether the string length is > INT_MAX.
12105         * lib/vsnprintf.c: Include errno.h, limits.h.
12106         (EOVERFLOW): New fallback definition.
12107         (vsnprintf): Fix bug when generated string was too long for the buffer.
12108         Test here whether the string length is > INT_MAX.
12109
12110 2006-08-28  Bruno Haible  <bruno@clisp.org>
12111
12112         * lib/inttypes_.h (SCNX*): Remove definitions.
12113         Reported by Eric Blake.
12114
12115 2006-08-28  Bruno Haible  <bruno@clisp.org>
12116
12117         * lib/c-strstr.h: New file, from GNU gettext.
12118         * lib/c-strstr.c: New file, from GNU gettext.
12119
12120 2006-08-28  Bruno Haible  <bruno@clisp.org>
12121
12122         * gnulib-tool: Reorder some statements.
12123
12124 2006-08-28  Bruno Haible  <bruno@clisp.org>
12125
12126         * gnulib-tool: New option --makefile-name.
12127         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
12128         $makefile_name.
12129         (func_import): Write $makefile_name to the cache file, and read it from
12130         there unless explicitly specified. Use $makefile_name as file name
12131         instead of Makefile.am. Adjust the recommendations accordingly.
12132
12133 2006-08-28  Bruno Haible  <bruno@clisp.org>
12134
12135         * gnulib-tool (func_verify_module): Check against misapplying patch.
12136
12137 2006-08-28  Bruno Haible  <bruno@clisp.org>
12138
12139         * gnulib-tool (func_relativize, func_relconcat): New functions.
12140         Give an error if --local-dir is given with --update.
12141         Remove trailing slashes from $local_gnulib_dir.
12142         (func_import): Store the relativized $local_gnulib_dir in
12143         gnulib-cache.m4, and read it from there if not specified explicitly.
12144
12145 2006-08-28  Bruno Haible  <bruno@clisp.org>
12146
12147         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
12148         is the current directory. Respect also $local_gnulib_dir.
12149
12150 2006-08-28  Bruno Haible  <bruno@clisp.org>
12151             Simon Josefsson  <jas@extundo.com>
12152
12153         BeOS portability.
12154         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
12155
12156 2006-08-27  Jim Meyering  <jim@meyering.net>
12157
12158         * doc/visibility.texi: Remove duplicate word: "pointer".
12159
12160 2006-08-26  Bruno Haible  <bruno@clisp.org>
12161
12162         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
12163         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
12164         (Makefile.am): Create inttypes.h from inttypes_.h.
12165         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
12166
12167         * modules/imaxabs: New file.
12168
12169         * modules/imaxdiv: New file.
12170
12171 2006-08-26  Bruno Haible  <bruno@clisp.org>
12172
12173         * m4/inttypes.m4: New file.
12174         * m4/_inttypes_h.m4: Remove file.
12175         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
12176         PRI_MACROS_BROKEN.
12177         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
12178
12179         * m4/imaxabs.m4: New file.
12180
12181         * m4/imaxdiv.m4: New file.
12182
12183 2006-08-26  Bruno Haible  <bruno@clisp.org>
12184
12185         * lib/inttypes_.h: New file.
12186         * lib/inttypes.h: Remove file.
12187         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
12188
12189         * lib/imaxabs.c: New file.
12190
12191         * lib/imaxdiv.c: New file.
12192
12193 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12194
12195         New config-h module, so that "make" output needn't be cluttered
12196         by -DHAVE_CONFIG_H.
12197         * MODULES.html.sh (Support for building libraries and executables):
12198         Add config-h.
12199         * modules/config-h: New file.
12200         * gnulib-tool (nl, sed_transform_lib_file): New vars.
12201         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
12202         the config-h module is used.
12203
12204         New configmake module, so that "make" output needn't be cluttered
12205         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
12206         * MODULES.html.sh (Support for building libraries and executables):
12207         Add configmake.
12208         * modules/configmake: New file.
12209
12210 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12211
12212         * m4/config-h.m4: New file.
12213
12214 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12215
12216         * config/srclist.txt: Add elisp-comp.
12217
12218 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12219
12220         * MODULES.html.sh (Support for building libraries and executables):
12221         Add elisp-comp.
12222         * build-aux/elisp-comp: New file.
12223         * modules/elisp-comp: New file.
12224
12225 2006-08-24  Bruno Haible  <bruno@clisp.org>
12226
12227         * gnulib-tool (func_create_testdir): Use non-default values of
12228         sourcebase and m4base.
12229
12230 2006-08-24  Bruno Haible  <bruno@clisp.org>
12231
12232         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
12233         HTML structure.
12234
12235 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
12236
12237         * modules/openat (Depends-on): Add lchown.
12238
12239 2006-08-23  Bruno Haible  <bruno@clisp.org>
12240
12241         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
12242         of gl_LOCK_EARLY instead of gl_LOCK.
12243
12244 2006-08-23  Bruno Haible  <bruno@clisp.org>
12245
12246         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
12247         on OSF/1 to no.
12248         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
12249
12250 2006-08-23  Bruno Haible  <bruno@clisp.org>
12251
12252         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
12253         as unusable.
12254
12255         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
12256         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
12257         (gl_LOCK): New macro.
12258
12259 2006-08-22  Simon Josefsson  <jas@extundo.com>
12260
12261         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
12262         to md5 module.
12263
12264 2006-08-22  Simon Josefsson  <jas@extundo.com>
12265
12266         * MODULES.html.sh: Add "Support for maintaining and release
12267         projects".
12268
12269         * build-aux/gnupload: New file, from coreutils.
12270
12271 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
12272
12273         Avoid the need for AC_LIBSOURCES in m4 macros.
12274         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
12275         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
12276         * modules/check-version (EXTRA_DIST): Add check-version.h.
12277         * modules/crc (EXTRA_DIST): Add crc.h.
12278         * modules/des (EXTRA_DIST): Add des.h.
12279         * modules/gc (EXTRA_DIST): Add gc.h.
12280         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
12281         * modules/getline (EXTRA_DIST): Add getline.h.
12282         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
12283         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
12284         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
12285         * modules/md2 (EXTRA_DIST): Add md2.h.
12286         * modules/md4 (EXTRA_DIST): Add md4.h.
12287         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
12288         * modules/read-file (EXTRA_DIST): Add read-file.h.
12289         * modules/readline (EXTRA_DIST): Add readline.h.
12290         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
12291         rijndael-api-fst.h.
12292
12293 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
12294
12295         * m4/rijndael.m4 (gl_ARCFOUR):
12296         * m4/arctwo.m4 (gl_ARCTWO):
12297         * m4/check-version.m4 (gl_CHECK_VERSION):
12298         * m4/crc.m4 (gl_CRC):
12299         * m4/des.m4 (gl_DES):
12300         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
12301         * m4/gc.m4 (gl_GC):
12302         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
12303         * m4/getline.m4 (gl_FUNC_GETLINE):
12304         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
12305         * m4/hmac-md5.m4 (gl_HMAC_MD5):
12306         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
12307         * m4/md2.m4 (gl_MD2):
12308         * m4/md4.m4 (gl_MD4):
12309         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
12310         * m4/read-file.m4 (gl_FUNC_READ_FILE):
12311         * m4/readline.m4 (gl_FUNC_READLINE):
12312         * m4/rijndael.m4 (gl_RIJNDAEL):
12313         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
12314         to get the necessary .h files and whatnot.
12315
12316 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
12317
12318         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
12319         gnulib rather than the other way around.
12320         * config/srclistvars.sh (COREUTILS): Remove.
12321
12322 2006-08-22  Jim Meyering  <jim@meyering.net>
12323
12324         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
12325
12326         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
12327
12328 2006-08-22  Eric Blake  <ebb9@byu.net>
12329
12330         * modules/regexprops-generic: New file.
12331         * MODULES.html.sh (Support for building documentation): List it.
12332
12333 2006-08-22  Eric Blake  <ebb9@byu.net>
12334
12335         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
12336         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
12337         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
12338         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
12339
12340 2006-08-22  Bruno Haible  <bruno@clisp.org>
12341
12342         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
12343         and lib_LTLIBRARIES like the other lib_* variables.
12344
12345 2006-08-22  Bruno Haible  <bruno@clisp.org>
12346
12347         * build-aux/x-to-1.in: New file, from GNU gettext.
12348
12349 2006-08-22  Bruno Haible  <bruno@clisp.org>
12350
12351         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
12352         <utmpx.h> exists.
12353
12354 2006-08-22  Bruno Haible  <bruno@clisp.org>
12355
12356         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
12357         <utmpx.h> exists.
12358
12359 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
12360
12361         BeOS portability.
12362         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
12363         exist.
12364         Problem reported by Bruno Haible.
12365
12366 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
12367
12368         Avoid the need for AC_LIBSOURCES in m4 macros.
12369         * modules/acl (EXTRA_DIST): Add acl.h.
12370         * modules/argmatch (Files): Add m4/argmatch.m4.
12371         (configure.ac): Add gl_ARGMATCH.
12372         (EXTRA_DIST): Renamed from lib_SOURCES, for
12373         consistency with the other modules.  Remove argmatch.c.
12374         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
12375         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
12376         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
12377         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
12378         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
12379         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
12380         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
12381         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
12382         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
12383         * modules/closeout (EXTRA_DIST): Add closeout.h.
12384         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
12385         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
12386         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
12387         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
12388         dirname.h; remove basename.c and stripslash.c.
12389         * modules/exclude (EXTRA_DIST): Add exclude.h.
12390         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
12391         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
12392         * modules/file-type (EXTRA_DIST): Add file-type.h.
12393         * modules/filemode (EXTRA_DIST): Add filemode.h.
12394         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
12395         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
12396         * modules/fpending (EXTRA_DIST): Add __fpending.h.
12397         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
12398         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
12399         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
12400         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
12401         * modules/getdate (EXTRA_DIST): Add getdate.c.
12402         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
12403         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
12404         * modules/getpass (EXTRA_DIST): Add getpass.h.
12405         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
12406         * modules/group-member (EXTRA_DIST): Add group-member.h.
12407         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
12408         * modules/hash (EXTRA_DIST): Add hash.h.
12409         * modules/human (EXTRA_DIST): Add human.h.
12410         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
12411         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
12412         * modules/lchown (EXTRA_DIST): Add lchown.h.
12413         * modules/long-options (EXTRA_DIST): Add long-options.h.
12414         * modules/lstat (EXTRA_DIST): Add lstat.h.
12415         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
12416         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
12417         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
12418         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
12419         * modules/memxor (EXTRA_DIST): Add memxor.h.
12420         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
12421         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
12422         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
12423         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
12424         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
12425         * modules/physmem (EXTRA_DIST): Add physmem.h.
12426         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
12427         * modules/posixver (EXTRA_DIST): Add posixver.h.
12428         * modules/quote (EXTRA_DIST): Add quote.h.
12429         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
12430         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
12431         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
12432         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
12433         regex_internal.h regexec.c.
12434         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
12435         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
12436         * modules/same (EXTRA_DIST): Add same.h.
12437         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
12438         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
12439         * modules/savedir (EXTRA_DIST): Add savedir.h.
12440         * modules/sha1 (EXTRA_DIST): Add sha1.h.
12441         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
12442         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
12443         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
12444         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
12445         * modules/strdup (EXTRA_DIST): Add strdup.h.
12446         * modules/strftime (EXTRA_DIST): Add strftime.h.
12447         * modules/strndup (EXTRA_DIST): Add strndup.h.
12448         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
12449         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
12450         * modules/time_r (EXTRA_DIST): Add time_r.h.
12451         * modules/timespec (EXTRA_DIST): Add timespec.h.
12452         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
12453         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
12454         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
12455         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
12456         * modules/userspec (EXTRA_DIST): Add userspec.h.
12457         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
12458         * modules/utimens (EXTRA_DIST): Add utimens.h.
12459         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
12460         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
12461         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
12462         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
12463         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
12464         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
12465         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
12466         * modules/yesno (EXTRA_DIST): Add yesno.h.
12467
12468 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
12469
12470         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
12471
12472         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
12473         * m4/dev-ino.m4, same-inode.m4: Remove.
12474
12475         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
12476         * m4/acl.m4 (AC_FUNC_ACL):
12477         * m4/backupfile.m4 (gl_BACKUPFILE):
12478         * m4/c-strtod.m4 (gl_C99_STRTOLD):
12479         * m4/canon-host.m4 (gl_CANON_HOST):
12480         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
12481         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
12482         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
12483         * m4/cloexec.m4 (gl_CLOEXEC):
12484         * m4/close-stream.m4 (gl_CLOSE_STREAM):
12485         * m4/closeout.m4 (gl_CLOSEOUT):
12486         * m4/dirfd.m4 (gl_FUNC_DIRFD):
12487         * m4/dirname.m4 (gl_DIRNAME):
12488         * m4/exclude.m4 (gl_EXCLUDE):
12489         * m4/exitfail.m4 (gl_EXITFAIL):
12490         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
12491         * m4/file-type.m4 (gl_FILE_TYPE):
12492         * m4/filemode.m4 (gl_FILEMODE):
12493         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
12494         * m4/fpending.m4 (gl_FUNC_FPENDING):
12495         * m4/fprintftime.m4 (gl_FPRINTFTIME):
12496         * m4/fts.m4 (gl_FUNC_FTS):
12497         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
12498         * m4/getdate.m4 (gl_GETDATE):
12499         * m4/gethrxtime.m4 (gl_GETHRXTIME):
12500         * m4/getpagesize.m4 (gl_GETPAGESIZE):
12501         * m4/getpass.m4 (gl_FUNC_GETPASS):
12502         * m4/gettime.m4 (gl_GETTIME):
12503         * m4/getugroups.m4 (gl_GETUGROUPS):
12504         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
12505         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
12506         * m4/hard-locale.m4 (gl_HARD_LOCALE):
12507         * m4/hash.m4 (gl_HASH):
12508         * m4/idcache.m4 (gl_IDCACHE):
12509         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
12510         * m4/lchown.m4 (gl_FUNC_LCHOWN):
12511         * m4/long-options.m4 (gl_LONG_OPTIONS):
12512         * m4/lstat.m4 (gl_FUNC_LSTAT):
12513         * m4/md5.m4 (gl_MD5):
12514         * m4/memcasecmp.m4 (gl_MEMCASECMP):
12515         * m4/memcoll.m4 (gl_MEMCOLL):
12516         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
12517         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
12518         * m4/memxor.m4 (gl_MEMXOR):
12519         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
12520         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
12521         * m4/modechange.m4 (gl_MODECHANGE):
12522         * m4/mountlist.m4 (gl_MOUNTLIST):
12523         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
12524         * m4/openat.m4 (gl_FUNC_OPENAT):
12525         * m4/pathmax.m4 (gl_PATHMAX):
12526         * m4/physmem.m4 (gl_PHYSMEM):
12527         * m4/posixtm.m4 (gl_POSIXTM):
12528         * m4/posixver.m4 (gl_POSIXVER):
12529         * m4/quote.m4 (gl_QUOTE):
12530         * m4/quotearg.m4 (gl_QUOTEARG):
12531         * m4/readtokens.m4 (gl_READTOKENS):
12532         * m4/readutmp.m4 (gl_READUTMP):
12533         * m4/regex.m4 (gl_REGEX):
12534         * m4/safe-read.m4 (gl_SAFE_READ):
12535         * m4/safe-write.m4 (gl_SAFE_WRITE):
12536         * m4/same.m4 (gl_SAME):
12537         * m4/save-cwd.m4 (gl_SAVE_CWD):
12538         * m4/savedir.m4 (gl_SAVEDIR):
12539         * m4/settime.m4 (gl_SETTIME):
12540         * m4/sha1.m4 (gl_SHA1):
12541         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
12542         * m4/stat-macros.m4 (gl_STAT_MACROS):
12543         * m4/stat-time.m4 (gl_STAT_TIME):
12544         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
12545         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
12546         * m4/strdup.m4 (gl_FUNC_STRDUP):
12547         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
12548         * m4/strndup.m4 (gl_FUNC_STRNDUP):
12549         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
12550         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
12551         * m4/time_r.m4 (gl_TIME_R):
12552         * m4/timespec.m4 (gl_TIMESPEC):
12553         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
12554         * m4/unlinkdir.m4 (gl_UNLINKDIR):
12555         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
12556         * m4/userspec.m4 (gl_USERSPEC):
12557         * m4/utimecmp.m4 (gl_UTIMECMP):
12558         * m4/utimens.m4 (gl_UTIMENS):
12559         * m4/xalloc.m4 (gl_XALLOC):
12560         * m4/xgetcwd.m4 (gl_XGETCWD):
12561         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
12562         * m4/xreadlink.m4 (gl_XREADLINK):
12563         * m4/xstrtod.m4 (gl_XSTRTOD):
12564         * m4/yesno.m4 (gl_YESNO):
12565         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
12566         to get the necessary .h files and whatnot.
12567
12568 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
12569             Bruno Haible  <bruno@clisp.org>
12570
12571         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
12572         /bin/sh understanding of '!' conditional negation.
12573
12574 2006-08-21  Jim Meyering  <jim@meyering.net>
12575
12576         * modules/openat (Depends-on): Really alphabetize.
12577
12578         * modules/acl (Depends-on): Add error and quote.
12579
12580         * check-module (find_included_lib_files): Add at-func.c to the
12581         ok-to-include-more-than-once white list.
12582
12583         * modules/openat (Depends-on): Add lstat.  Alphabetize.
12584
12585 2006-08-21  Bruno Haible  <bruno@clisp.org>
12586
12587         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
12588         Emit a pkgdata_DATA variable only if some snippets add contents to it.
12589         Reported by Martin Lambers <marlam@marlam.de>.
12590
12591 2006-08-21  Bruno Haible  <bruno@clisp.org>
12592
12593         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
12594         specify an installation location, don't emit a noinst_LIBRARIES or
12595         noinst_LTLIBRARIES assignment.
12596
12597 2006-08-21  Bruno Haible  <bruno@clisp.org>
12598
12599         BeOS portability.
12600         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
12601         BeOS has mbrtowc() but no <wctype.h>.
12602
12603 2006-08-21  Bruno Haible  <bruno@clisp.org>
12604
12605         BeOS portability.
12606         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
12607         exist.
12608
12609 2006-08-21  Bruno Haible  <bruno@clisp.org>
12610
12611         BeOS portability.
12612         * lib/mbchar.h: Include <wctype.h> only if it exists.
12613
12614 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12615
12616         Remove files that are no longer needed by their respective modules.
12617         * m4/obstack.m4: Remove.
12618         * m4/strerror_r.m4: Remove.
12619         * m4/uint32_t.m4: Remove.
12620         * m4/uintptr_t.m4: Remove.
12621         * m4/ullong_max.m4: Remove.
12622         * m4/xstrtoimax.m4: Remove.
12623         * m4/xstrtoumax.m4: Remove.
12624
12625         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
12626         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
12627         dependencies now capture this.
12628
12629         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
12630         Do not use AC_LIBSOURCES, since gnulib modules now do this.
12631         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
12632         * m4/human.m4 (gl_HUMAN): Likewise.
12633         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
12634         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
12635
12636         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
12637
12638         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
12639         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
12640         stdint.
12641         * m4/human.m4 (gl_HUMAN): Likewise.
12642         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
12643         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
12644         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
12645         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
12646         * m4/xstrtol (gl_XSTRTOL): Likewise.
12647
12648         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
12649         AC_TYPE_LONG_LONG_INT.
12650         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
12651         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
12652         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
12653         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
12654
12655         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
12656         on stdbool.
12657
12658         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
12659         (gl_PREREQ_XSTRTOUL): Remove.
12660
12661         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
12662
12663         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
12664         mode.
12665
12666 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12667
12668         Add and change modules to make it easier for coreutils to use
12669         gnulib-tool.
12670         * modules/backupfile (Files): Remove m4/d-ino.m4.
12671         (Depends-on): Add d-ino.
12672         * modules/cycle-check (Depends-on): Add stdint.
12673         (lib_SOURCES): Add cycle-check.h.
12674         * modules/d-ino: New module.
12675         * modules/d-type: New module.
12676         * modules/error (Files): Remove m4/strerror_r.m4.
12677         * modules/filemode (Files): Add m4/st_dm_mode.m4.
12678         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
12679         m4/inttypes_h.m4, m4/uintmax_t.m4.
12680         (Depends-on): Add stdint.
12681         (lib_SOURCES): Add fsusage.h.
12682         * modules/getcwd (Files): Remove d-ino.m4.
12683         (Depends-on): Add d-ino.
12684         * modules/getndelim2 (Depends-on): Add stdint.
12685         * modules/glob (Files): Remove m4/d-type.m4.
12686         (Depends-on): Add d-type.
12687         * modules/host-os: New module.
12688         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
12689         m4/inttypes_h.m4, m4/uintmax_t.m4.
12690         * Depends-on: Add stdint.
12691         (lib_SOURCES): Add human.h.
12692         * modules/inttostr (Files): Remove m4/intmax_t.m4,
12693         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
12694         m4/uintmax_t.m4, m4/ulonglong.m4.
12695         (Depends-on): Add stdint.
12696         (EXTRA_DIST): Add inttostr.h.
12697         * modules/lchmod: New module.
12698         * modules/link-follow: New module.
12699         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
12700         (Depends-on): Add lchmod.
12701         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
12702         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
12703         (Depends-on): Add stdint.
12704         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
12705         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
12706         (Depends-on): Add stdint.
12707         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
12708         * modules/perl: New module.
12709         * modules/regex (Depends-on): Add stdint.
12710         * modules/rmdir-errno: New module.
12711         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
12712         m4/intmax_t.m4.
12713         (Depends-on): Add stdint.
12714         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
12715         m4/uintmax_t.m4.
12716         (Depends-on): Add stdint.
12717         * modules/unlink-busy: New module.
12718         * modules/utimecmp (Depends-on): Add stdint.
12719         * modules/uptime: New module.
12720         * modules/winsz-ioctl: New module.
12721         * modules/winsz-termios: New module.
12722         * modules/xnanosleep (Depends-on): Add nanosleep.
12723         * modules/ullong_max: Remove.
12724         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
12725         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
12726         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
12727         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
12728         (Depends-on): Add inttypes.
12729         (lib_SOURCES): Add xstrtol.h.
12730         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
12731         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
12732         * MODULES.html.sh: Move 'assert' into the assert section.
12733         Move 'dummy' into the linking section.
12734         Remove ullong_max.
12735         Add section for compatibility checks for POSIX:2001 functions,
12736         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
12737         winsz-ioctl, and winsz-termios into it.
12738         Add lchmod.
12739         Add top-level Misc section and put host-os, perl, and uptime
12740         into it.
12741
12742 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12743
12744         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
12745         now assume the stdint module.  Do not include inttypes.h.
12746         * lib/fsusage.h: Likewise.
12747         * lib/getndelim2.c: Likewise.
12748         * lib/human.h: Likewise.
12749         * lib/inttostr.h: Likewise.
12750         * lib/obstack.c: Likewise.
12751         * lib/regex_internal.h: Likewise.
12752         * lib/tempname.c: Likewise.
12753         * lib/utimecmp.c: Likewise.
12754         * lib/xstrtol.h: Likewise.
12755
12756         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
12757
12758         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
12759         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
12760         * lib/xtime.h: Likewise.
12761
12762 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12763
12764         * modules/openat (Files): Add lib/fchmodat.c.
12765         Fixes problem reported by Jay Youngman.
12766
12767 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12768
12769         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
12770         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
12771
12772 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
12773             Bruno Haible  <bruno@clisp.org>
12774
12775         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
12776         and is a script that invokes bison. Tighten the code. Add comments.
12777
12778 2006-08-18  Jim Meyering  <jim@meyering.net>
12779
12780         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
12781         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
12782         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
12783         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
12784
12785 2006-08-18  Bruno Haible  <bruno@clisp.org>
12786
12787         * modules/bison-i18n: New file.
12788         * MODULES.html.sh (Internationalization functions): Add it.
12789
12790 2006-08-18  Bruno Haible  <bruno@clisp.org>
12791
12792         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
12793         sys/statvfs.h. When getmntinfo was found, check its declaration and
12794         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
12795
12796 2006-08-18  Bruno Haible  <bruno@clisp.org>
12797
12798         * m4/bison-i18n.m4: New file, from bison.
12799
12800 2006-08-18  Bruno Haible  <bruno@clisp.org>
12801
12802         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
12803         (ME_DUMMY): Treat "kernfs" as a dummy.
12804         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
12805
12806 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
12807
12808         Update from coreutils.
12809
12810         2006-08-15  Jim Meyering  <jim@meyering.net>
12811
12812         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
12813
12814         2006-01-17  Jim Meyering  <jim@meyering.net>
12815
12816         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
12817
12818         2006-01-11  Jim Meyering  <jim@meyering.net>
12819
12820         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
12821         Check for the lchmod function.
12822
12823 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
12824
12825         Update from coreutils.
12826
12827         * lib/__fpending.h: Add copyright notice.
12828         * lib/fprintftime.h: Likewise.
12829         * lib/savedir.c: Use (C) in copyright notice.
12830         * lib/savedir.h: Likewise.
12831
12832         2006-08-15  Jim Meyering  <jim@meyering.net>
12833
12834         * lib/at-func.c: New file, with the logic of all emulated at-functions.
12835         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
12836         in support of the EXPECTED_ERRNO macro.
12837         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
12838         definitions.  Instead, define the appropriate symbols and include
12839         "at-func.c".
12840         * lib/mkdirat.c (mkdirat): Likewise.
12841         * lib/fchmodat.c (fchmodat): Likewise.
12842         (ENOSYS): Remove definition.
12843         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
12844         it.  Don't include "unistd--.h" -- it wasn't ever used.
12845
12846         2006-01-17  Jim Meyering  <jim@meyering.net>
12847
12848         Rewrite fts.c not to change the current working directory,
12849         by using openat, fstatat, fdopendir, etc..
12850
12851         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
12852         (HAVE_OPENAT_SUPPORT): Define.
12853         [_LIBC] (fchdir): Don't undef or define; no longer used.
12854         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
12855         Now, this `function' always succeeds, and consumes its file descriptor
12856         parameter -- so callers must not close such FDs.  Update callers.
12857         (diropen_fd, opendirat, cwd_advance_fd): New functions.
12858         (diropen): Add parameter, SP.  Adjust all callers.
12859         Implement using diropen_fd, rather than open.
12860         (fts_open): Initialize new member, fts_cwd_fd.
12861         Remove fts_rft-setting code.
12862         (fts_close): Close fts_cwd_fd, if necessary.
12863         (__opendir2): Define in terms of opendir or opendirat,
12864         depending on whether the FST_NOCHDIR flag is set.
12865         (fts_build): Since fts_safe_changedir consumes its FD, and since
12866         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
12867         and close the dup'd file descriptor upon failure.
12868         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
12869         (fts_safe_changedir): Tweak semantics to reflect that this function
12870         now calls cwd_advance_fd and hence consumes its FD argument.
12871         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
12872         [struct FTS] (fts_rft): Remove now-unused member.
12873         [struct FTS] (fts_cycle.state): Improve comment.
12874
12875         * lib/openat.c (openat_needs_fchdir): New function.
12876         * lib/openat.h (openat_needs_fchdir): Declare it.
12877
12878 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
12879
12880         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
12881         Problem and fix reported by Pádraig Brady in
12882         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
12883
12884 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
12885
12886         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
12887
12888 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
12889
12890         * lib/memcoll.c (memcoll): Optimize for the common case where the
12891         arguments are bytewise equal.
12892
12893 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
12894
12895         * doc/regexprops-generic.texi: Add a copyright notice.
12896
12897 2006-08-15  Bruno Haible  <bruno@clisp.org>
12898
12899         * modules/tmpdir (License): Change to LGPL.
12900
12901 2006-08-15  Bruno Haible  <bruno@clisp.org>
12902
12903         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
12904         module.
12905
12906 2006-08-14  Simon Josefsson  <jas@extundo.com>
12907
12908         * config/srclist.txt: Add gnupload.
12909
12910 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
12911
12912         Change copyright notice from LGPL 2 to GPL 2, since that's the
12913         standard form used in the gnulib repository.
12914         * tests/test-lock.c: Likewise.
12915         * tests/test-stdint.c: Likewise.
12916         * tests/test-tls.c: Likewise.
12917
12918         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
12919         prelude-manager.  User shorter URLs for GNU projects, without '?'.
12920         Add copyright notice.
12921
12922         * check-module: Add copyright notice.  Output a copyright
12923         notice if "--version" is specified.
12924         * modules/COPYING: New file.
12925         * tests/test-getaddrinfo.c: Add copyright notice.
12926         * tests/test-verify.c: Likewise.
12927
12928 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
12929
12930         Change copyright notice from LGPL 2 to GPL 2, since that's the
12931         standard form used in the gnulib repository.
12932         * lib/lock.c: LGPL -> GPL.
12933         * lib/lock.h: Likewise.
12934         * lib/strnlen1.c: Likewise.
12935         * lib/strnlen1.h: Likewise.
12936         * lib/tls.c: Likewise.
12937         * lib/tls.h: Likewise.
12938         * lib/tmpdir.c: Likewise.
12939
12940         * lib/TODO: Remove; this belongs only in coreutils.
12941
12942 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
12943
12944         Add copyright notices to long-enough files that lack them, since
12945         otherwise the files aren't clearly free.  Use the same notice that
12946         getdate.texi already uses.
12947         * doc/alloca-opt.texi: Add copyright notice.
12948         * doc/alloca.texi: Likewise.
12949         * doc/ctime.texi: Likewise.
12950         * doc/functions.texi: Likewise.
12951         * doc/gcd.texi: Likewise.
12952         * doc/gnulib-tool.texi: Likewise.
12953         * doc/inet_ntoa.texi: Likewise.
12954         * doc/visibility.texi: Likewise.
12955
12956         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
12957         * doc/quote.texi: Add copyright notice.
12958
12959         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
12960         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
12961         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
12962         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
12963         is now obsolete, and give a pointer to the Sun list.
12964         Add copyright notice.
12965
12966 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
12967
12968         * config/srclistvars.sh: Add copyright notice.
12969
12970 2006-08-14  Eric Blake  <ebb9@byu.net>
12971
12972         Import the following change from libc:
12973
12974         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
12975
12976         Upstream bug 2997.
12977         * lib/misc/error.c: Add space between program name and message if file
12978         name is missing.
12979
12980 2006-08-12  Karl Berry  <karl@gnu.org>
12981
12982         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
12983         remove, these originate in gnulib now.
12984
12985 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12986
12987         * doc/Makefile (standards.info standards.html standards.dvi):
12988         Also depend on make-stds.texi.
12989
12990 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
12991
12992         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
12993         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
12994
12995         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
12996         in wchar_t.  Problem reported by Eric Blake.
12997
12998         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
12999         LEN is smaller than SIZE.  Suggested by Bruno Haible.
13000         Also, help the compiler to keep LEN in a register.
13001
13002 2006-08-11  Eric Blake  <ebb9@byu.net>
13003
13004         * users.txt: Sort.  Add tar.
13005
13006 2006-08-11  Bruno Haible  <bruno@clisp.org>
13007
13008         * users.txt: New file.
13009
13010 2006-08-11  Bruno Haible  <bruno@clisp.org>
13011
13012         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
13013         before <wchar.h>. Needed for OSF/1 and BSD/OS.
13014
13015 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
13016
13017         * modules/snprintf (Depends-on): Remove minmax.
13018         (Maintainer): Add self and Bruno.
13019
13020 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
13021
13022         * lib/.cppi-disable: Add snprintf.h, socket_.h.
13023         * lib/snprintf.c: Include <errno.h> and <limits.h>.
13024         (EOVERFLOW): Define if the system does not.
13025         Do not include "minmax.h"; it wasn't used.
13026         (snprintf): Don't assume size_t promotes to an unsigned type.
13027         Fix bug when generated string was too long for the buffer: the
13028         buffer's contents are supposed to be the initial prefix of the
13029         output.  Don't assume vasnprintf returns EOVERFLOW if the size
13030         exceeds INT_MAX; do the check ourselves.
13031
13032         Import the following changes from libc:
13033
13034         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
13035
13036         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
13037         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
13038         set wc to the byte which couldn't be converted.
13039         (re_string_reconstruct): Don't clear valid_raw_len before calling
13040         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
13041         tip_context using re_string_context_at.
13042
13043         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
13044
13045         * lib/posix/regex.h: g++ still cannot handled [restrict].
13046
13047         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
13048
13049         * lib/posix/regex.h: Remove special handling for VMS.
13050
13051 2006-08-10  Jim Meyering  <jim@meyering.net>
13052
13053         * modules/same-inode: New module.
13054         * modules/dev-ino: New module.
13055         * modules/cycle-check: Depend on these modules, rather than simply
13056         including their .h files.
13057         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
13058         required via m4/cycle-check.m4.
13059         * modules/same: Depend on new same-inode module, rather than
13060         including same-inode.h.
13061         * modules/chdir-safer: New file.
13062
13063         * modules/chown (Depends-on): Add stat-macros.
13064
13065 2006-08-10  Jim Meyering  <jim@meyering.net>
13066
13067         * m4/cycle-check.m4: New file.
13068         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
13069         * m4/dev-ino.m4, m4/same-inode.m4: New files.
13070
13071 2006-08-10  Eric Blake  <ebb9@byu.net>
13072
13073         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
13074         in from original proposal.
13075
13076 2006-08-10  Eric Blake  <ebb9@byu.net>
13077         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13078
13079         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
13080         namespace.
13081
13082 2006-08-10  Bruno Haible  <bruno@clisp.org>
13083
13084         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
13085         as well.
13086
13087 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
13088
13089         Sync from coreutils.
13090
13091         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
13092
13093         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
13094         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
13095
13096 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
13097
13098         * modules/restrict: Remove; no longer needed now that we assume
13099         Autoconf 2.59 or later.
13100         * MODULES.html.sh: Remove 'restrict'.
13101         * modules/argp (Depends-on): Remove 'restrict'.
13102         * modules/base64 (Depends-on): Likewise.
13103         * modules/gc (Depends-on): Likewise.
13104         * modules/getaddrinfo (Depends-on): Likewise.
13105         * modules/glob (Depends-on): Likewise.
13106         * modules/inet_ntop (Depends-on): Likewise.
13107         * modules/inet_pton (Depends-on): Likewise.
13108         * modules/memxor (Depends-on): Likewise.
13109         * modules/regex (Depends-on): Likewise.
13110         * modules/strtok_r (Depends-on): Likewise.
13111         * modules/time_r (Depends-on): Likewise.
13112
13113 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
13114
13115         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
13116         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
13117         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
13118         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
13119         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
13120         * m4/memxor.m4 (gl_MEMXOR): Likewise.
13121         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
13122         gl_C_RESTRICT replaced by AC_C_RESTRICT.
13123
13124         Merge from coreutils.
13125         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
13126         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
13127         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
13128         * m4/time_r.m4 (gl_TIME_R): Likewise.
13129
13130 2006-08-09  Karl Berry  <karl@gnu.org>
13131
13132         * config/srclist.txt: no more gettext-tools, per Bruno.
13133
13134 2006-08-08  Eric Blake  <ebb9@byu.net>
13135
13136         * modules/verror: New module.
13137         * MODULES.html.sh: Document it.
13138
13139 2006-08-08  Eric Blake  <ebb9@byu.net>
13140
13141         * lib/verror.h, lib/verror.c: New files.
13142
13143 2006-08-08  Eric Blake  <ebb9@byu.net>
13144
13145         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
13146         verror_at_line output complies with GNU Coding Standards even when
13147         file is NULL.
13148
13149 2006-08-07  Bruno Haible  <bruno@clisp.org>
13150
13151         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
13152         versions of AIX.
13153         Reported by Ralf Wildenhues.
13154
13155 2006-08-07  Bruno Haible  <bruno@clisp.org>
13156
13157         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
13158         in an AC_DEFUN. Needed so that the autoconf snippets can use
13159         AC_REQUIRE.
13160
13161 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13162
13163         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
13164         Initialize pkgdata_DATA.
13165         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
13166         overriding it.
13167
13168 2006-08-06  Eric Blake  <ebb9@byu.net>
13169
13170         * lib/error.h: Fold in some upstream changes from glibc.
13171         * lib/error.c: Likewise.
13172
13173 2006-08-04  Bruno Haible  <bruno@clisp.org>
13174
13175         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
13176         Make the mostlyclean-local rule depend on mostlyclean-generic.
13177         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
13178
13179 2006-07-31  Bruno Haible  <bruno@clisp.org>
13180
13181         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
13182         <stdlib.h>, <string.h>.
13183
13184 2006-07-30  Bruno Haible  <bruno@clisp.org>
13185
13186         * modules/readlink (License): Change to LGPL.
13187
13188 2006-07-30  Bruno Haible  <bruno@clisp.org>
13189
13190         * modules/javaversion (Makefile.am): Distribute javaversion.java and
13191         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
13192         set PKGDATADIR to point to it.
13193
13194 2006-07-30  Bruno Haible  <bruno@clisp.org>
13195
13196         * modules/csharpexec (configure.ac): Comment out macro invocation.
13197         * modules/javaexec (configure.ac): Likewise.
13198         * modules/javacomp-script (configure.ac): Likewise.
13199
13200         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
13201
13202 2006-07-30  Bruno Haible  <bruno@clisp.org>
13203
13204         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
13205         linked-list.
13206
13207 2006-07-30  Bruno Haible  <bruno@clisp.org>
13208
13209         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
13210
13211 2006-07-30  Bruno Haible  <bruno@clisp.org>
13212
13213         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
13214         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
13215         get removed.
13216
13217 2006-07-29  Bruno Haible  <bruno@clisp.org>
13218
13219         Make it possible for gnulib-tool to work with locally modified or
13220         augmented gnulib repositories.
13221         * gnulib-tool (func_usage): Document --local-dir option.
13222         (local_gnulib_dir): New variable.
13223         Handle --local-dir option.
13224         (func_lookup_file): New function.
13225         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
13226         (func_get_description, func_get_filelist, func_get_description,
13227         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
13228         func_get_automake_snippet, func_get_include_directive,
13229         func_get_license, func_get_maintainer): Use func_lookup_file.
13230         (func_import, func_create_testdir): Use func_lookup_file.
13231
13232 2006-07-29  Bruno Haible  <bruno@clisp.org>
13233
13234         * modules/setenv (Depends-on): Add unistd.
13235
13236 2006-07-29  Bruno Haible  <bruno@clisp.org>
13237
13238         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
13239
13240 2006-07-29  Bruno Haible  <bruno@clisp.org>
13241
13242         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
13243
13244 2006-07-29  Bruno Haible  <bruno@clisp.org>
13245
13246         * gnulib-tool (import, update): If there is no Makefile.am, look at
13247         aclocal.m4, instead of bailing out.
13248
13249 2006-07-29  Bruno Haible  <bruno@clisp.org>
13250
13251         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
13252         Categorize the options by when they are useful.
13253
13254 2006-07-29  Bruno Haible  <bruno@clisp.org>
13255
13256         * gnulib-tool (func_usage): Document option --no-libtool.
13257         Handle option --no-libtool.
13258         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
13259         for changed semantics of $libtool variable.
13260         (func_import): Likewise. If libtool is not used, show this through
13261         an option --no-libtool.
13262         (func_create_testdir): Update.
13263
13264 2006-07-29  Bruno Haible  <bruno@clisp.org>
13265
13266         * gnulib-tool (func_import): Extend error message about missing
13267         --doc-base.
13268
13269 2006-07-29  Bruno Haible  <bruno@clisp.org>
13270
13271         * gnulib-tool (func_import): Don't create the $docbase directory if
13272         there is no file to store there.
13273
13274 2006-07-29  Bruno Haible  <bruno@clisp.org>
13275
13276         * gnulib-tool (autoconf_minversion): If a --dir option is given and
13277         relevant, look for configure.ac there, not in the current directory.
13278         Also use a simple search for AC_PREREQ, not "autoconf --trace".
13279
13280 2006-07-29  Bruno Haible  <bruno@clisp.org>
13281
13282         * gnulib-tool (SORT): New variable.
13283         (func_usage): Undocument --assume-autoconf option.
13284         Remove --assume-autoconf option handling.
13285         (autoconf_minversion): Determine from the contents of configure.ac.
13286         (func_import): Remove autoconf_minversion handling.
13287         Suggested by Eric Blake.
13288
13289 2006-07-29  Bruno Haible  <bruno@clisp.org>
13290
13291         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
13292
13293 2006-07-29  Bruno Haible  <bruno@clisp.org>
13294
13295         * config/srclist.txt (*setenv.[ch]): Remove rules.
13296
13297 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13298
13299         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
13300
13301 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13302
13303         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
13304         arpa/inet.h.
13305
13306 2006-07-28  Simon Josefsson  <jas@extundo.com>
13307
13308         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
13309         * modules/inet_pton (Depends-on): Likewise.
13310
13311 2006-07-28  Simon Josefsson  <jas@extundo.com>
13312
13313         * m4/netinet_in_h.m4: New file.
13314
13315 2006-07-28  Simon Josefsson  <jas@extundo.com>
13316
13317         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
13318         #include's.
13319
13320 2006-07-28  Simon Josefsson  <jas@extundo.com>
13321
13322         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
13323         #include's.
13324
13325 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
13326
13327         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
13328         setgid on directories only if they set these bits.
13329         * lib/modechange.h: Remove obsolete comment about masks.
13330
13331 2006-07-28  Eric Blake  <ebb9@byu.net>
13332
13333         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
13334         macro expansion.
13335
13336 2006-07-28  Bruno Haible  <bruno@clisp.org>
13337
13338         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
13339
13340 2006-07-28  Bruno Haible  <bruno@clisp.org>
13341
13342         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
13343
13344 2006-07-28  Bruno Haible  <bruno@clisp.org>
13345
13346         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
13347         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
13348         Define fallbacks.
13349         Avoids link error on FreeBSD 4.x.
13350         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
13351
13352         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
13353         encoding.
13354         * lib/mbswidth.c (iswcntrl): Likewise.
13355
13356 2006-07-27  Bruno Haible  <bruno@clisp.org>
13357
13358         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
13359         test.
13360
13361 2006-07-27  Bruno Haible  <bruno@clisp.org>
13362
13363         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
13364         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
13365         defined.
13366
13367 2006-07-26  Eric Blake  <ebb9@byu.net>
13368
13369         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
13370
13371 2006-07-26  Eric Blake  <ebb9@byu.net>
13372
13373         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
13374         like mingw that lack mkstemp.
13375         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
13376         avoid compilation warning on mingw.
13377
13378 2006-07-26  Bruno Haible  <bruno@clisp.org>
13379
13380         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
13381         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
13382         INT_FAST*_MIN, INTPTR_MIN.
13383
13384 2006-07-25  Bruno Haible  <bruno@clisp.org>
13385
13386         * modules/version-etc (Depends-on): Add stdarg.
13387
13388 2006-07-25  Bruno Haible  <bruno@clisp.org>
13389
13390         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
13391         complex commands.
13392
13393 2006-07-25  Bruno Haible  <bruno@clisp.org>
13394
13395         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
13396         defined in <stdarg.h> or config.h.
13397
13398 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
13399
13400         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
13401         (gl_STDIO_SAFER): Remove.
13402
13403 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
13404
13405         * MODULES.html.sh (File stream based Input/Output):
13406         Add fopen-safer, tmpfile-safer; remove stdio-safer.
13407         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
13408         * modules/fopen-safer, modules/tmpfile-safer: New files.
13409         * modules/stdio-safer: Remove.
13410
13411 2006-07-24  Bruno Haible  <bruno@clisp.org>
13412
13413         * modules/tmpdir: New file.
13414         * MODULES.html.sh (File system functions): Add it.
13415
13416 2006-07-24  Bruno Haible  <bruno@clisp.org>
13417
13418         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
13419         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
13420
13421 2006-07-24  Bruno Haible  <bruno@clisp.org>
13422
13423         * modules/clean-temp: New file.
13424
13425 2006-07-24  Bruno Haible  <bruno@clisp.org>
13426
13427         * m4/tmpdir.m4: New file, from GNU gettext.
13428
13429 2006-07-24  Bruno Haible  <bruno@clisp.org>
13430
13431         * lib/tmpdir.h: New file, from GNU gettext.
13432         * lib/tmpdir.c: New file, from GNU gettext.
13433
13434 2006-07-24  Bruno Haible  <bruno@clisp.org>
13435
13436         * lib/clean-temp.h: New file, from GNU gettext.
13437         * lib/clean-temp.c: New file, from GNU gettext.
13438
13439 2006-07-23  Eric Blake  <ebb9@byu.net>
13440
13441         * modules/stdio-safer (Files): Add tmpfile-safer.c.
13442         (Depends-on): Add binary-io.
13443
13444 2006-07-23  Eric Blake  <ebb9@byu.net>
13445
13446         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
13447
13448 2006-07-23  Eric Blake  <ebb9@byu.net>
13449
13450         * lib/tmpfile-safer.c: New file.
13451         * lib/stdio-safer.h (fopen_safer): Add prototype.
13452         * lib/stdio--.h (tmpfile): Make safer.
13453
13454 2006-07-23  Bruno Haible  <bruno@clisp.org>
13455
13456         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
13457         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
13458         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
13459         gl_linked_remove_at): Use it.
13460
13461 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13462         and Simon Josefsson <jas@extundo.com>
13463
13464         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
13465
13466         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
13467
13468 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
13469
13470         * modules/close-stream: New file.
13471         * modules/closeout (Description): Make it clear that it exits
13472         with a diagnostic on error.
13473         (Depends-on): Add close-stream.  Remove fpending, stdbool.
13474         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
13475
13476 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
13477
13478         * m4/close-stream.m4: New file.
13479
13480 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
13481
13482         * lib/close-stream.c, lib/close-stream.h: New files.
13483
13484 2006-07-22  Bruno Haible  <bruno@clisp.org>
13485
13486         Merge from GNU gettext 0.15.
13487
13488         2006-05-01  Bruno Haible  <bruno@clisp.org>
13489
13490                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
13491
13492         2006-07-22  Bruno Haible  <bruno@clisp.org>
13493
13494                 * modules/javaversion: New file.
13495                 * MODULES.html.sh (Java): Add javaversion.
13496
13497         2006-03-12  Bruno Haible  <bruno@clisp.org>
13498
13499                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
13500
13501         2005-12-04  Bruno Haible  <bruno@clisp.org>
13502
13503                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
13504                 (untested).
13505
13506         2006-06-21  Bruno Haible  <bruno@clisp.org>
13507
13508                 Avoid warnings from recent versions of mcs.
13509                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
13510                 -o, -L, -r any more. Use options documented since mcs-1.0
13511                 instead. Similarly for -g.
13512
13513         2005-12-04  Bruno Haible  <bruno@clisp.org>
13514
13515                 * build-aux/csharpcomp.sh.in: Suffix for resources is
13516                 .resources, not .resource.
13517
13518         2005-07-09  Bruno Haible  <bruno@clisp.org>
13519
13520                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
13521                 add a .dll suffix.
13522                 Reported by Mark Junker <mjscod@gmx.de>.
13523
13524         2006-07-22  Bruno Haible  <bruno@clisp.org>
13525
13526                 * modules/gettext: Upgrade to gettext-0.15.
13527                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
13528                 m4/visibility.m4.
13529                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
13530
13531 2006-07-22  Bruno Haible  <bruno@clisp.org>
13532
13533         Merge from GNU gettext 0.15.
13534
13535         2006-03-25  Bruno Haible  <bruno@clisp.org>
13536
13537                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
13538
13539         2006-07-21  Bruno Haible  <bruno@clisp.org>
13540
13541                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
13542                 "1.1".
13543
13544         2006-05-09  Bruno Haible  <bruno@clisp.org>
13545
13546                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
13547                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
13548                 for the conftestver execution.
13549
13550         2006-05-01  Bruno Haible  <bruno@clisp.org>
13551
13552                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
13553                 optional target-version argument. Verify that the compiler
13554                 groks source of the specified source-version, or add -source
13555                 option as necessary. Verify that the compiler produces
13556                 bytecode in the specified target-version, or add -target and
13557                 -source options as necessary. Make the result of the test
13558                 available as variable CONF_JAVAC. Also log error output in
13559                 config.log.
13560
13561         2006-03-11  Bruno Haible  <bruno@clisp.org>
13562
13563                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
13564
13565         2006-05-09  Bruno Haible  <bruno@clisp.org>
13566
13567                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
13568                 CLASSPATH_SEPARATOR to a semicolon.
13569
13570         2006-03-12  Bruno Haible  <bruno@clisp.org>
13571
13572                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
13573                 available as variable CONF_JAVA, for subsequent autoconf
13574                 tests. Also log error output in config.log.
13575
13576         2006-07-19  Bruno Haible  <bruno@clisp.org>
13577
13578                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
13579                 that getline works on glibc2 systems. Needed to avoid trouble
13580                 in relocatable.c.
13581                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
13582
13583         2005-12-04  Bruno Haible  <bruno@clisp.org>
13584
13585                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
13586                 launcher (untested).
13587
13588         2005-12-04  Bruno Haible  <bruno@clisp.org>
13589
13590                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
13591
13592         2006-07-22  Bruno Haible  <bruno@clisp.org>
13593
13594                 * gettext.m4: Update from GNU gettext-0.15.
13595                 * nls.m4: Likewise.
13596                 * po.m4: Likewise.
13597                 * inttypes-pri.m4: Likewise.
13598                 * inttypes-h.m4: Renamed from inttypes.m4.
13599                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
13600
13601 2006-07-22  Bruno Haible  <bruno@clisp.org>
13602
13603         Merge from GNU gettext 0.15.
13604
13605         2005-07-05  Bruno Haible  <bruno@clisp.org>
13606
13607                 * printf-args.c (printf_fetchargs): Work around broken
13608                 definition of wint_t on mingw.
13609
13610         2005-02-12  Bruno Haible  <bruno@clisp.org>
13611
13612                 * xallocsa.h: Add extern "C" for C++.
13613
13614         2006-05-17  Bruno Haible  <bruno@clisp.org>
13615
13616                 Cygwin portability.
13617                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
13618
13619         2006-04-30  Bruno Haible  <bruno@clisp.org>
13620
13621                 * progreloc.c: Include <mach-o/dyld.h> if available.
13622                 (find_executable): Use _NSGetExecutablePath when possible.
13623
13624         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
13625
13626                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
13627                 function.
13628
13629         2005-12-29  Bruno Haible  <bruno@clisp.org>
13630
13631                 * progreloc.c (set_program_name_and_installdir): Fix
13632                 compilation error.
13633
13634         2005-12-04  Bruno Haible  <bruno@clisp.org>
13635
13636                 Cygwin portability.
13637                 * progreloc.c: Include <windows.h> also on Cygwin.
13638                 (find_executable): Add support for Cygwin.
13639                 (set_program_name_and_installdir): Handle also platforms with
13640                 nonempty EXEEXT.
13641
13642         2006-07-11  Bruno Haible  <bruno@clisp.org>
13643
13644                 * javacomp.c: Fix a comment.
13645                 Reported by Jim Meyering.
13646
13647         2006-04-30  Bruno Haible  <bruno@clisp.org>
13648
13649                 * javacomp.h (compile_java_class): Add source_version,
13650                 target_version arguments.
13651                 * javacomp.c: Rewritten to choose only a compiler that
13652                 respects the specified source_version and target_version.
13653
13654         2006-06-27  Bruno Haible  <bruno@clisp.org>
13655
13656                 Assume correct S_ISDIR macro.
13657                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
13658
13659         2006-07-22  Bruno Haible  <bruno@clisp.org>
13660
13661                 * javaversion.h: New file, from GNU gettext.
13662                 * javaversion.c: New file, from GNU gettext.
13663                 * javaversion.java: New file, from GNU gettext.
13664                 * javaversion.class: New file, from GNU gettext.
13665
13666         2006-05-17  Bruno Haible  <bruno@clisp.org>
13667
13668                 Cygwin portability.
13669                 * javaexec.c (execute_java_class): Test for jview program
13670                 also on Cygwin.
13671
13672         2006-04-09  Bruno Haible  <bruno@clisp.org>
13673
13674                 * fatal-signal.c: Don't include string.h.
13675                 (at_fatal_signal): Use a copying loop instead of memcpy.
13676
13677         2005-12-04  Bruno Haible  <bruno@clisp.org>
13678
13679                 * csharpexec.c: Add support for 'clix' launcher (untested).
13680                 (execute_csharp_using_sscli): New function.
13681                 (execute_csharp_program): Call it.
13682
13683         2006-06-21  Bruno Haible  <bruno@clisp.org>
13684
13685                 Avoid warnings from recent versions of mcs.
13686                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
13687                 -o, -L, -r any more. Use options documented since mcs-1.0
13688                 instead. Similarly for -g.
13689
13690         2005-07-09  Bruno Haible  <bruno@clisp.org>
13691
13692                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
13693                 add a .dll suffix.
13694                 Reported by Mark Junker <mjscod@gmx.de>.
13695
13696         2006-06-17  Bruno Haible  <bruno@clisp.org>
13697
13698                 * config.charset: Update for NetBSD 3.0.
13699
13700         2006-05-17  Bruno Haible  <bruno@clisp.org>
13701
13702                 Cygwin portability.
13703                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
13704
13705         2006-05-16  Bruno Haible  <bruno@clisp.org>
13706
13707                 * localcharset.c [CYGWIN]: Include <windows.h>.
13708                 (get_charset_aliases): For Cygwin, return the same CPxxx
13709                 aliases list as under WIN32.
13710                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
13711                 the environment variables. Fall back to GetACP().
13712
13713         2006-04-05  Bruno Haible  <bruno@clisp.org>
13714
13715                 * config.charset: Update Juan Manuel Guerrero's address.
13716
13717         2005-02-12  Bruno Haible  <bruno@clisp.org>
13718
13719                 * allocsa.h: Add extern "C" for C++.
13720
13721         2005-02-10  Bruno Haible  <bruno@clisp.org>
13722
13723                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
13724                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
13725
13726         2006-07-22  Bruno Haible  <bruno@clisp.org>
13727
13728                 * gettext.h: Update to GNU gettext-0.15.
13729
13730 2006-07-22  Bruno Haible  <bruno@clisp.org>
13731
13732         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
13733         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
13734         lib-prefix.m4, longdouble.m4, ssize_t.m4.
13735
13736 2006-07-21  Eric Blake  <ebb9@byu.net>
13737
13738         * modules/stdlib-safer: New file.
13739         * MODULES.html.sh (File stream based Input/Output): Add
13740         stdlib-safer.
13741
13742 2006-07-21  Eric Blake  <ebb9@byu.net>
13743
13744         * lib/stdlib-safer.h: New file from coreutils, required by
13745         stdlib--.h.
13746
13747 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
13748
13749         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
13750
13751 2006-07-20  Bruno Haible  <bruno@clisp.org>
13752
13753         * gnulib-tool: Recognize new option --assume-autoconf.
13754         (autoconf_minversion): New variable.
13755         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
13756
13757 2006-07-20  Bruno Haible  <bruno@clisp.org>
13758
13759         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
13760
13761 2006-07-19  Derek R. Price  <derek@ximbiot.com>
13762
13763         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
13764         Reindent and repaginate.
13765
13766 2006-07-19  Derek Price  <derek@ximbiot.com>
13767
13768         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
13769         Correct grammar.
13770
13771 2006-07-17  Bruno Haible  <bruno@clisp.org>
13772
13773         * modules/list: New file.
13774         * modules/array-list: New file.
13775         * modules/carray-list, modules/carray-list-tests: New files.
13776         * modules/linked-list, modules/linked-list-tests: New files.
13777         * modules/avltree-list, modules/avltree-list-tests: New files.
13778         * modules/rbtree-list, modules/rbtree-list-tests: New files.
13779         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
13780         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
13781         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
13782         * modules/oset: New file.
13783         * modules/array-oset: New file.
13784         * modules/avltree-oset, modules/avltree-oset-tests: New files.
13785         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
13786         * tests/test-carray_list.c: New file.
13787         * tests/test-linked_list.c: New file.
13788         * tests/test-avltree_list.c: New file.
13789         * tests/test-rbtree_list.c: New file.
13790         * tests/test-linkedhash_list.c: New file.
13791         * tests/test-avltreehash_list.c: New file.
13792         * tests/test-rbtreehash_list.c: New file.
13793         * tests/test-avltree_oset.c: New file.
13794         * tests/test-rbtree_oset.c: New file.
13795         * MODULES.html.sh (Container data structures): New section.
13796
13797 2006-07-17  Bruno Haible  <bruno@clisp.org>
13798
13799         * m4/gl_list.m4: New file.
13800
13801 2006-07-17  Bruno Haible  <bruno@clisp.org>
13802
13803         * lib/gl_list.h: New file.
13804         * lib/gl_list.c: New file.
13805         * lib/gl_array_list.h: New file.
13806         * lib/gl_array_list.c: New file.
13807         * lib/gl_carray_list.h: New file.
13808         * lib/gl_carray_list.c: New file.
13809         * lib/gl_linked_list.h: New file.
13810         * lib/gl_linked_list.c: New file.
13811         * lib/gl_anylinked_list1.h: New file.
13812         * lib/gl_anylinked_list2.h: New file.
13813         * lib/gl_avltree_list.h: New file.
13814         * lib/gl_avltree_list.c: New file.
13815         * lib/gl_anyavltree_list1.h: New file.
13816         * lib/gl_anyavltree_list2.h: New file.
13817         * lib/gl_rbtree_list.h: New file.
13818         * lib/gl_rbtree_list.c: New file.
13819         * lib/gl_anyrbtree_list1.h: New file.
13820         * lib/gl_anyrbtree_list2.h: New file.
13821         * lib/gl_anytree_list1.h: New file.
13822         * lib/gl_anytree_list2.h: New file.
13823         * lib/gl_linkedhash_list.h: New file.
13824         * lib/gl_linkedhash_list.c: New file.
13825         * lib/gl_anyhash_list1.h: New file.
13826         * lib/gl_anyhash_list2.h: New file.
13827         * lib/gl_avltreehash_list.h: New file.
13828         * lib/gl_avltreehash_list.c: New file.
13829         * lib/gl_rbtreehash_list.h: New file.
13830         * lib/gl_rbtreehash_list.c: New file.
13831         * lib/gl_anytreehash_list1.h: New file.
13832         * lib/gl_anytreehash_list2.h: New file.
13833
13834         * lib/gl_oset.h: New file.
13835         * lib/gl_oset.c: New file.
13836         * lib/gl_array_oset.h: New file.
13837         * lib/gl_array_oset.c: New file.
13838         * lib/gl_avltree_oset.h: New file.
13839         * lib/gl_avltree_oset.c: New file.
13840         * lib/gl_rbtree_oset.h: New file.
13841         * lib/gl_rbtree_oset.c: New file.
13842         * lib/gl_anytree_oset.h: New file.
13843
13844 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
13845
13846         * m4/mkancesdirs.m4: New file.
13847         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
13848         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
13849         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
13850         it.
13851
13852 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
13853
13854         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
13855         * lib/mkancesdirs.h: New files.
13856         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
13857         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
13858         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
13859         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
13860         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
13861         callers changed.  Revamp internals significantly, by not
13862         attempting to create directories that are temporarily more
13863         permissive than the final results.  Do not attempt to use
13864         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
13865         This removes some race conditions, fixes some bugs, and simplifies
13866         things.  Use new dirchownmod function to do owner and mode changes.
13867         * lib/mkdir-p.h: Likewise.
13868         * lib/modechange.c (octal_to_mode): New function.
13869         (struct mode_change): New member mentioned.
13870         (make_node_op_equals): New arg mentioned.  All callers changed.
13871         (mode_compile): Keep track of which mode bits the user has explicitly
13872         mentioned.
13873         (mode_adjust): New arg DIR, so that we implement the X op correctly.
13874         New arg PMODE_BITS, to keep track of which mode bits the user
13875         mentioned; it treats S_ISUID and S_ISGID speciall.
13876         All callers changed.
13877         * lib/modechange.h: Likewise.
13878
13879 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
13880
13881         * MODULES.html.sh: Add mkancestors.
13882         * modules/mkancesdirs: New module.
13883         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
13884         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
13885         The chdir-safer and afs files are now orphans; I'll remove them
13886         unless someone speaks up.
13887         Add lib/dirchownmod.c, lib/dirchownmod.h.
13888         (Depends-on): Remove alloca, chown, save-cwd, dirname.
13889         Add lchown, mkancesdirs.
13890         (Maintainer): Add self.
13891
13892 2006-07-15  Karl Berry  <karl@gnu.org>
13893
13894         * gnulib-tool: help message wording/arrangement.
13895
13896 2006-07-14  Simon Josefsson  <jas@extundo.com>
13897
13898         * doc/gnulib.texi (Libtool and Windows): New section.
13899
13900 2006-07-12  Simon Josefsson  <jas@extundo.com>
13901
13902         * modules/gendocs (License): Fix license, approved by Karl.
13903
13904 2006-07-12  Eric Blake  <ebb9@byu.net>
13905
13906         * MODULES.html.sh: Add gendocs.
13907
13908 2006-07-11  Eric Blake  <ebb9@byu.net>
13909
13910         * modules/fdl: New module, to install doc/fdl.texi.
13911         * MODULES.html.sh: Add new section for documentation modules.
13912         * gnulib-tool: Avoid space-tab.
13913         (--doc-base): New option, to manage files from doc.
13914
13915 2006-07-11  Eric Blake  <ebb9@byu.net>
13916
13917         * m4/absolute-header.m4: Fix comments to match recent change.
13918
13919 2006-07-11  Eric Blake  <ebb9@byu.net>
13920
13921         * gnulib-tool: List --doc-base before --tests-base.
13922
13923 2006-07-11  Derek R. Price  <derek@ximbiot.com>
13924
13925         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
13926
13927 2006-07-11  Bruno Haible  <bruno@clisp.org>
13928
13929         * README: Mention where to put documentation.
13930
13931 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13932
13933         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
13934
13935 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
13936
13937         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
13938         to stdint.m4.
13939
13940 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
13941
13942         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
13943         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
13944         "no/such/file/stdint.h" when there is no such file, so that
13945         the resulting C code can be parsed by dodgy compilers.
13946         Problems reported by Bob Proulx.
13947
13948 2006-07-10  Derek R. Price  <derek@ximbiot.com>
13949
13950         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
13951         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
13952         macros into the GNU _D_EXACT_NAMLEN.
13953         * lib/savedir.c:  Likewise.
13954         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
13955
13956 2006-07-10  Derek R. Price  <derek@ximbiot.com>
13957         and Paul Eggert  <eggert@cs.ucla.edu>
13958
13959         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
13960         * m4/savedir.m4:
13961         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
13962         macros into the GNU _D_EXACT_NAMLEN.
13963
13964 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
13965
13966         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
13967         around the absolute name, to work around a problem with the HP-UX
13968         11.23 native C compiler, reported by Bob Proulx.
13969
13970 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
13971
13972         * doc/maintain.texi, make-stds.texi: Sync from
13973         <http://savannah.gnu.org/projects/gnustandards>.
13974
13975 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
13976
13977         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
13978
13979 2006-07-09  Jim Meyering  <jim@meyering.net>
13980
13981         * m4/glob.m4: Remove a doubled word in a comment.
13982
13983 2006-07-09  Jim Meyering  <jim@meyering.net>
13984
13985         * lib/argp-pv.c: Remove a doubled word in a comment.
13986         * lib/check-version.c (check_version): Likewise.
13987         * lib/javacomp.c (compile_java_class): Likewise.
13988
13989 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
13990
13991         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
13992         for the benefit of people using Autoconf 2.60.  If you want to
13993         support older Autoconf versions you can copy m4/onceonly_2_57.m4
13994         (or m4/onceonly.m4, if pre-2.57) manually.
13995
13996 2006-07-08  Jim Meyering  <jim@meyering.net>
13997
13998         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
13999         comment.
14000         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
14001         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
14002         comment.
14003
14004 2006-07-08  Jim Meyering  <jim@meyering.net>
14005
14006         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
14007
14008 2006-07-07  Simon Josefsson  <jas@extundo.com>
14009
14010         * tests/test-crc.c: Change expected crc value, the test vector
14011         were probably computed using the old broken crc.c?
14012
14013 2006-07-06  Simon Josefsson  <jas@extundo.com>
14014
14015         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
14016         now the canonical place for the M4 file).
14017
14018         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
14019         from the sys_socket dependency now.
14020
14021         * modules/inet_pton (Files): Ditto.
14022
14023         * modules/inet_ntop (Files): Ditto.
14024
14025 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
14026
14027         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
14028         not gl_PREREQ_GETUSERSHELL.
14029
14030 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14031
14032         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
14033         with only one argument, for Autoconf 2.60.
14034         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
14035         expand to nothing, so add a shell command to avoid syntax error.
14036         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
14037
14038 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14039
14040         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
14041
14042 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
14043
14044         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
14045         no longer needed.  Check for isblank decl.
14046         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
14047         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
14048         of existence.
14049
14050 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
14051
14052         * lib/getloadavg.c: Use __VMS, not VMS.
14053         * lib/getopt.c: Likewise.
14054         * lib/getpagesize.h: Likewise.
14055         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
14056         and probably does not work.
14057
14058 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
14059
14060         * lib/.cppi-disable: Add wcwidth.
14061         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
14062         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
14063         (ISGRAPH): Remove.  All uses changed to isgraph.
14064         (FOLD) [!defined _LIBC]: Remove special case.
14065         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
14066         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
14067         HAVE_ISBLANK.
14068         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
14069         case.
14070
14071 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
14072
14073         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
14074         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
14075         brackets.  Other minor changes to suppress some compiler
14076         warnings.
14077
14078 2006-07-06  Derek R. Price  <derek@ximbiot.com>
14079         and Paul Eggert  <eggert@cs.ucla.edu>
14080
14081         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
14082         of invoking obsolescent AC_HEADER_DIRENT macro.
14083         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
14084         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
14085         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
14086         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
14087         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
14088         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
14089         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
14090         * m4/readdir.m4: Remove; no longer needed.
14091
14092 2006-07-06  Derek R. Price  <derek@ximbiot.com>
14093         and Paul Eggert  <eggert@cs.ucla.edu>
14094
14095         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
14096         Don't worry about this obsolete case any more.
14097         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
14098         directories.
14099         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
14100         worry about this obsolete case any more.
14101         * lib/fts.c: Likewise.
14102         * lib/getcwd.c: Likewise.
14103         * lib/glob.h: Likewise.
14104         * lib/savedir.c: Likewise.
14105
14106 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
14107
14108         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
14109         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
14110         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
14111         needed.
14112         All uses removed.
14113         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
14114         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
14115         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
14116         needed.
14117         * m4/getdate.m4 (gl_GETDATE): Likewise.
14118         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
14119         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
14120         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
14121         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
14122         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
14123         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
14124         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
14125         needed.
14126
14127 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
14128
14129         * lib/memcasecmp.c: Include <limits.h>.
14130         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
14131         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
14132         Don't assume isdigit succeeds only on '0' through '9'.
14133
14134 2006-07-05  Eric Blake  <ebb9@byu.net>
14135
14136         * modules/getaddrinfo (Depends-on): Add snprintf.
14137
14138 2006-07-05  Eric Blake  <ebb9@byu.net>
14139
14140         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
14141         to avoid 'header present but could not be compiled' on cygwin.
14142
14143 2006-07-05  Eric Blake  <ebb9@byu.net>
14144
14145         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
14146         missing from netdb.h.
14147         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
14148
14149 2006-07-05  Derek R. Price  <derek@ximbiot.com>
14150
14151         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
14152         no longer needed.
14153         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
14154         * m4/getdate.m4 (gl_GETDATE): Likewise.
14155         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
14156         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
14157         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
14158         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
14159         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
14160
14161 2006-07-05  Derek R. Price  <derek@ximbiot.com>
14162
14163         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
14164         All uses of is_space replaced by isspace.
14165         * lib/exit.h: Don't talk about STDC_HEADERS.
14166         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
14167         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
14168         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
14169         replaced by isprint etc.
14170         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
14171         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
14172         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
14173         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
14174         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
14175         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
14176
14177 2006-07-05  Bruno Haible  <bruno@clisp.org>
14178
14179         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
14180         the function exists, before testing against AIX.
14181         Reported by Martin Lambers <marlam@marlam.de>.
14182
14183 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
14184
14185         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
14186         From Mark D. Baushke.
14187
14188 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
14189
14190         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
14191         to the absolute name, not just one, to bypass Sun C 5.8's
14192         "warning: #include of /usr/include/... may be non-portable".
14193
14194 2006-07-04  Eric Blake  <ebb9@byu.net>
14195
14196         * modules/dirname-tests: New test module.
14197         * tests/test-dirname.c: New file, replacing dirname.c
14198         TEST_DIRNAME section that was recently deleted.
14199
14200 2006-07-04  Bruno Haible  <bruno@clisp.org>
14201
14202         Assume ANSI C header files and <ctype.h> functions.
14203         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
14204         (mbsnwidth): Use isprint, iscntrl instead.
14205
14206 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
14207
14208         Merge from coreutils.
14209         * MODULES.html.sh: Add xstrtold.
14210         * modules/xstrtold: New file.
14211         * modules/cycle-check (Files): Add lib/same-inode.h.
14212         * modules/dirname (Files): Add m4/double-slash-root.m4.
14213         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
14214         * modules/mkdir-p (Files): Add lib/same-inode.h.
14215         * modules/same (Files): Add lib/same-inode.h.
14216
14217 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
14218
14219         * m4/absolute-header.m4: Renamed from full-header-path.m4.
14220         This is to keep the terminology clean; POSIX talks about
14221         "absolute pathnames", not "full pathnames", but the GNU
14222         Coding Standards say to use "path" for something else;
14223         so use "absolute" to keep both sides happy.
14224         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
14225         Set gl_absolute_header, not gl_full_header_path.
14226         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
14227         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
14228         All uses changed.
14229
14230         Merge from coreutils.
14231
14232         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
14233
14234         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
14235         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
14236         want to require the building of c-strtod.o.
14237         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
14238         needs -lm directly.
14239         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
14240
14241         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
14242
14243         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
14244         --as-needed option if available.  Problem reported by Albert Chin in
14245         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
14246         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
14247         cc merely issues a bunch of annoying warnings for --as-needed
14248         (this problem was reported by Bob Proulx).  Also, try linking with
14249         -lm to detect a bug in binutils 2.16 (this problem was reported
14250         by Ralf Wildenhues).
14251
14252         2006-06-18  Jim Meyering  <jim@meyering.net>
14253
14254         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
14255         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
14256         macro.
14257         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
14258         also check for glibc-2.4's abort-inducing bug.
14259
14260         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
14261         Low-probability clean-up should be to use rmdir to get rid of
14262         the just-created directory, not unlink.
14263
14264         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
14265         configure fail, and request a bug report to inform us about it.
14266         Add a comment that, barring reports to the contrary, in 2007 we'll
14267         assume ftruncate is universally available.
14268
14269         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
14270
14271         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
14272
14273         2006-03-12  Jim Meyering  <jim@meyering.net>
14274
14275         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
14276         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
14277         * m4/same.m4 (gl_SAME): Likewise.
14278         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
14279
14280         2006-03-11  Eric Blake  <ebb9@byu.net>
14281
14282         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
14283         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
14284         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
14285         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
14286
14287 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
14288
14289         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
14290         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
14291         reported by Mark D. Baushke, one in
14292         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
14293
14294         Merge from coreutils.
14295
14296         * lib/.cppi-disable: Add stdint_.h.
14297         * lib/.cvsignore: Add stdint.h.
14298
14299         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
14300
14301         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
14302         both double and long double versions.
14303         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
14304         * lib/xstrtold.c: New file.
14305         * lib/xstrtod.h (xstrtold): New decl.
14306
14307         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
14308
14309         * lib/filemode.c (setst): Remove.
14310         (strmode): Rewrite to avoid setst.  This makes the code shorter,
14311         (arguably) clearer, and the generated code is a bit smaller on my
14312         Debian GNU/Linux stable x86 host.
14313
14314         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
14315
14316         * lib/filemode.c: Include "filemode.h" first, to test the interface.
14317         Assume that filemode.h includes sys/types.h and sys/stat.h.
14318         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
14319         (ftypelet): Reorder to put common cases first, for efficiency.
14320         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
14321         to do 'M'.
14322         (strmode): Renamed from mode_string, and now stores 12 bytes instead
14323         of 10, for compatibility with FreeBSD.  All callers changed.
14324         (filemodestring): Now stores 12 bytes instead of 10, and sets file
14325         types that can't be deduced solely from st_mode.  First arg is now a
14326         const pointer.
14327         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
14328         (strmode): Renamed from mode_string.
14329         (filemodestring): New decl.
14330         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
14331         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
14332         needed.
14333         (S_ISPORT, S_ISWHT): New macros, if not already defined.
14334
14335         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
14336
14337         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
14338         fsusage.h now does that.  Include fsusage.h first, to test interface.
14339         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
14340         at most one method (the old code could have generated decls that
14341         didn't conform to C89, not that this was ever exercised).
14342         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
14343
14344         2006-03-19  Jim Meyering  <jim@meyering.net>
14345
14346         Work even in a chroot where d_ino values for entries in "/"
14347         don't match the stat.st_ino values for the same names.
14348         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
14349         number, iterate through all entries again, using lstat instead.
14350         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
14351         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
14352
14353         * lib/getcwd.c (__getcwd): Clarify a comment.
14354         Use memcpy in place of a call to strcpy.
14355
14356         2006-03-12  Jim Meyering  <jim@meyering.net>
14357
14358         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
14359         matches that of the current directory (which we're about to chdir ".."
14360         out of), then save the dev-ino of the parent, instead.
14361
14362         * lib/same-inode.h (SAME_INODE): New file/macro.
14363         * lib/chdir-safer.c (SAME_INODE): Remove definition.
14364         Include "same-inode.h", instead.
14365         * lib/same.c: Likewise.
14366         * lib/cycle-check.h: Include "same-inode.h".
14367         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
14368         * lib/cycle-check.c (SAME_INODE): Remove definition.
14369         * lib/root-dev-ino.h: Include "same-inode.h".
14370
14371         2006-03-11  Eric Blake  <ebb9@byu.net>
14372
14373         * lib/same.c (same_name): s/base_name/last_component/
14374         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
14375         * lib/filenamecat.c (file_name_concat): Likewise.
14376
14377         2006-03-11  Eric Blake  <ebb9@byu.net>,
14378                     Paul Eggert  <eggert@cs.ucla.edu>
14379
14380         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
14381         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
14382         drive prefix.
14383         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
14384         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
14385         (last_component): New method.
14386         * lib/dirname.c (dir_len): Determine when drive letters need a
14387         subsequent slash.  Preserve // when it is special.
14388         (dir_name): Don't append dot when drive letter is absolute.
14389         [TEST_DIRNAME]: Move into a full-blown gnulib test.
14390         * lib/basename.c (base_name): New semantics - malloc the result.
14391         Preserve // when it is special.  Preserve relative files that look
14392         like drive letters.
14393         (base_len): Preserve // when it is special.
14394         (last_component): New method, similar to old base_name semantics.
14395         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
14396         base_name.  Strip redundant slashes from ///.
14397
14398 2006-07-03  Jim Meyering  <jim@meyering.net>
14399
14400         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
14401         macro is used before the first cycle_check call.
14402
14403 2006-07-03  Eric Blake  <ebb9@byu.net>
14404
14405         * modules/dirname (Depends-on): Add xstrndup.
14406
14407 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
14408
14409         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
14410         test cases, so that config.log is a bit easier to follow.
14411
14412 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
14413
14414         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
14415         both are 64 bits, since this seems to be the tradition, and this
14416         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
14417         we ever run into a host that prefers long long to long in this
14418         case, we'll need another configure-time test.  Problem reported by
14419         Jim Meyering.
14420
14421 2006-07-02  Eric Blake  <ebb9@byu.net>
14422
14423         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
14424
14425 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
14426
14427         * modules/inttypes (Depends-on): No longer depends on stdint.
14428         * modules/stdint (Description): Say more about assumptions.
14429         Say that the fast types might differ.  Say macros are used.
14430         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
14431         (Makefile.am): Revise list of substituted symbols to match
14432         new stdint.m4.
14433         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
14434         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
14435         * tests/test-stdint.c (verify_same_types)
14436         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
14437         the code conforms to C99/C89.
14438         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
14439         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
14440
14441 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
14442
14443         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
14444         but fix a bug, by requiring at least 64 bits.
14445         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
14446         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
14447         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
14448         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
14449
14450         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
14451         changes.  Make 2.59 a prerequisite.  Check and substitute for
14452         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
14453         inttypes.h.  Do not use special include files; just use the
14454         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
14455         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
14456         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
14457         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
14458         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
14459         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
14460         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
14461         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
14462         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
14463         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
14464         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
14465         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
14466         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
14467         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
14468         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
14469         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
14470         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
14471         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
14472         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
14473         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
14474         WINT_MAX.  Check for C99 conformance more strictly, by detecting
14475         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
14476         not check for things that C99 does not require, e.g., int8_t.  If
14477         a test isn't needed unless <stdint.h> isn't working, and is
14478         unlikely to be needed for any other reason, then don't do it
14479         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
14480         size_t, since we assume C89 freestanding at least.  Do not check
14481         for sig_atomic_t, wchar_t, or wint_t, since the code now does
14482         the right thing even if the types are not defined.  Instead use:
14483         (gl_STDINT_TYPE_PROPERTIES): New macro.
14484         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
14485         testing whether <sys/types.h> clashes, as Autoconf does this for
14486         us now.  All uses removed.
14487         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
14488         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
14489         (gl_CHECK_TYPE_SAME):
14490         Remove; no longer needed.
14491         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
14492         exists, since we'll return 0 anyway in that case.
14493         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
14494
14495 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
14496
14497         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
14498         possible collision with system files.
14499         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
14500         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
14501         WCHAR_MIN and WCHAR_MAX in this case.
14502         (<stddef.h>): Do not include; no longer needed.
14503         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
14504         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
14505         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
14506         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
14507         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
14508         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
14509         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
14510         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
14511         !defined(__c99))]: Include in this case too, since it's harmless
14512         now.
14513         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
14514         dangerous to do so.
14515         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
14516         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
14517         (_STDINT_MIN, _STDINT_MAX): New macros.
14518         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
14519         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
14520         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
14521         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
14522         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
14523         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
14524         macros, not typedefs; this simplifies things quite a bit.
14525         Use long int for all types narrower than int64_t.
14526         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
14527         Define in terms of long long int or int64_t or long int,
14528         not int64_t or int32_t.  This saves some compile-time testing.
14529         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
14530         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
14531         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
14532         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
14533         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
14534         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
14535         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
14536         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
14537         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
14538         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
14539         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
14540         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
14541         undef any previous version and define our own version, for
14542         simplicity and consistency with the new macros for types.
14543         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
14544         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
14545         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
14546         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
14547         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
14548         @WINT_T_SUFFIX@ to keep things simple here.
14549         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
14550         Simplify by assuming typical 8/16/32/64 host, since we're
14551         already doing that elsewhere anyway.
14552         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
14553         and assume long long int is 64 bits if available.  This
14554         speeds up 'configure'.
14555
14556 2006-07-01  Eric Blake  <ebb9@byu.net>
14557
14558         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
14559         Reported by Andreas Buening.
14560
14561 2006-07-01  Eric Blake  <ebb9@byu.net>
14562
14563         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
14564
14565 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
14566
14567         * lib/getaddrinfo.c: fixed typo
14568
14569 2006-06-29  Jim Meyering  <jim@meyering.net>
14570
14571         * modules/strftime (Maintainer): Add my name, since with the
14572         FPRINTFTIME changes strftime.c has forked from glibc.
14573
14574 2006-06-29  Eric Blake  <ebb9@byu.net>
14575
14576         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
14577
14578 2006-06-29  Eric Blake  <ebb9@byu.net>
14579
14580         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
14581
14582 2006-06-29  Eric Blake  <ebb9@byu.net>
14583
14584         * lib/stat_.h: New file.
14585
14586 2006-06-29  Eric Blake  <ebb9@byu.net>
14587
14588         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
14589         unused static function.
14590
14591 2006-06-29  Eric Blake  <ebb9@byu.net>
14592
14593         * doc/functions.texi (Function Portability): Document missing lstat
14594         on mingw.
14595
14596 2006-06-29  Eric Blake  <ebb9@byu.net>
14597
14598         * MODULES.html.sh: Add sys_stat.
14599         * modules/sys_stat: New module.
14600         * modules/mkstemp (Depends-on): Add sys_stat.
14601
14602 2006-06-29  Derek R. Price  <derek@ximbiot.com>
14603
14604         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
14605
14606 2006-06-29  Derek R. Price  <derek@ximbiot.com>
14607
14608         * m4/c-bs-a.m4: Removed.
14609
14610 2006-06-29  Derek R. Price  <derek@ximbiot.com>
14611
14612         * lib/strftime.c: Assume strftime() exists.
14613
14614 2006-06-29  Derek Price  <derek@ximbiot.com>
14615
14616         * modules/c-bs-a: Removed - \a is C89.
14617         * MODULES.html.sh: Remove c-bs-a.
14618
14619 2006-06-29  Bruno Haible  <bruno@clisp.org>
14620
14621         * modules/wcwidth (License): Change to LGPL.
14622
14623 2006-06-28  Simon Josefsson  <jas@extundo.com>
14624
14625         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
14626         on _WIN32.
14627
14628         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
14629         getnameinfo.
14630
14631 2006-06-28  Simon Josefsson  <jas@extundo.com>
14632
14633         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
14634
14635 2006-06-28  Simon Josefsson  <jas@extundo.com>
14636
14637         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
14638         functions there.  It will succeed on Windows XP, but on Windows
14639         2000 and (presumably) earlier, it will fail, and use the internal
14640         re-implementation.
14641         (use_win32_p): New function.
14642         (getaddrinfo): Use strtoul on servname, to support numeric ports.
14643         Support AI_NUMERICSERV to disable getservbyname.
14644         (getnameinfo): New function, only supports
14645         NI_NUMERICHOST|NI_NUMERICSERV for now.
14646
14647         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
14648         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
14649         getnameinfo.
14650
14651 2006-06-28  Eric Blake  <ebb9@byu.net>
14652
14653         * modules/wcwidth: New file.
14654         * modules/mbchar (Depends-on): Add wcwidth.
14655         * modules/mbswidth (Depends-on): Add wcwidth.
14656         * MODULES.html.sh: Add wcwidth.
14657
14658 2006-06-28  Eric Blake  <ebb9@byu.net>
14659
14660         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
14661         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
14662
14663 2006-06-28  Eric Blake  <ebb9@byu.net>
14664
14665         * lib/xvasprintf.h: Fix comments.
14666
14667 2006-06-28  Eric Blake  <ebb9@byu.net>
14668
14669         * lib/mbchar.h (wcwidth): Include wcwidth.h.
14670         * lib/mbswidth.c (wcwidth): Move from here...
14671         * lib/wcwidth.h: ...to this new file.
14672
14673 2006-06-28  Derek R. Price  <derek@ximbiot.com>
14674
14675         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
14676
14677         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
14678         it's obsolete.
14679         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
14680
14681 2006-06-28  Derek R. Price  <derek@ximbiot.com>
14682
14683         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
14684         Autoconf 2.60 says this stuff was obsolete.
14685
14686 2006-06-28  Bruno Haible  <bruno@clisp.org>
14687
14688         * modules/wcwidth (Files): Add m4/wchar_t.m4.
14689
14690 2006-06-28  Bruno Haible  <bruno@clisp.org>
14691
14692         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
14693         gt_TYPE_WCHAR_T.
14694
14695 2006-06-28  Bruno Haible  <bruno@clisp.org>
14696
14697         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
14698         declaration for wcwidth.
14699         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
14700
14701 2006-06-28  Bruno Haible  <bruno@clisp.org>
14702
14703         * lib/mkdtemp.c [MINGW]: Include <io.h>.
14704         (mkdir): Define using _mkdir.
14705
14706 2006-06-28  Bruno Haible  <bruno@clisp.org>
14707
14708         * lib/getaddrinfo.h: Fix POSIX URL.
14709         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
14710         _WIN32.
14711         (use_win32_p): Make static.
14712         (getaddrinfo): Reject service name if it is empty or does not consist
14713         solely of decimal digits, or if its value is > 65535.
14714         (getnameinfo): Remove useless casts.
14715
14716 2006-06-27  Simon Josefsson  <jas@extundo.com>
14717
14718         * modules/sys_select: New file, suggested by Bruno Haible, Paul
14719         Eggert and Martin Lambers.
14720
14721 2006-06-27  Simon Josefsson  <jas@extundo.com>
14722
14723         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
14724         Eggert and Martin Lambers.
14725
14726 2006-06-27  Bruno Haible  <bruno@clisp.org>
14727
14728         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
14729         result to 0, not to empty.
14730         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
14731
14732 2006-06-27  Bruno Haible  <bruno@clisp.org>
14733
14734         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
14735
14736 2006-06-26  Simon Josefsson  <jas@extundo.com>
14737
14738         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
14739         present.
14740
14741 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
14742
14743         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
14744         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
14745         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
14746
14747 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
14748
14749         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
14750
14751 2006-06-26  Bruno Haible  <bruno@clisp.org>
14752
14753         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
14754
14755 2006-06-26  Bruno Haible  <bruno@clisp.org>
14756
14757         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
14758
14759 2006-06-26  Bruno Haible  <bruno@clisp.org>
14760
14761         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
14762         SGI C compiler in pre-C99 mode.
14763         Suggested by Mark D. Baushke and Larry Jones.
14764
14765 2006-06-26  Bruno Haible  <bruno@clisp.org>
14766
14767         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
14768         WCHAR_MAX.
14769         Reported by Mark D. Baushke and Larry Jones.
14770
14771 2006-06-26  Bruno Haible  <bruno@clisp.org>
14772
14773         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
14774         in pre-C99 mode.
14775         Suggested by Mark D. Baushke and Larry Jones.
14776
14777 2006-06-23  Simon Josefsson  <jas@extundo.com>
14778             Bruno Haible  <bruno@clisp.org>
14779
14780         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
14781         Emit mostlyclean-local rule.
14782         (func_emit_tests_Makefile_am): Likewise.
14783         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
14784
14785 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
14786
14787         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
14788
14789 2006-06-23  Bruno Haible  <bruno@clisp.org>
14790
14791         * tests/test-stdint.c: Update to match ISO C 99 Technical
14792         Corrigendum 1.
14793
14794 2006-06-23  Bruno Haible  <bruno@clisp.org>
14795
14796         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
14797
14798 2006-06-23  Bruno Haible  <bruno@clisp.org>
14799
14800         * lib/stdint_.h: Treat IRIX like OpenBSD.
14801
14802 2006-06-23  Bruno Haible  <bruno@clisp.org>
14803
14804         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
14805         ISO C 99 Technical Corrigendum 1.
14806
14807 2006-06-22  Simon Josefsson  <jas@extundo.com>
14808
14809         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
14810         MinGW.
14811
14812 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
14813
14814         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
14815         needed.  Some compiler complained about some of them.  Problem reported
14816         by Larry Jones in
14817         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
14818
14819 2006-06-21  Simon Josefsson  <jas@extundo.com>
14820
14821         * tests/test-getaddrinfo.c: New file.
14822
14823         * modules/getaddrinfo-tests: New file.
14824
14825         * MODULES.html.sh: Add inet_pton.
14826
14827         * modules/inet_pton: New file.
14828
14829 2006-06-21  Simon Josefsson  <jas@extundo.com>
14830
14831         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
14832         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
14833         of using the (limited) gnulib implementation on Windows XP.
14834
14835         * m4/inet_pton.m4: New file.
14836
14837 2006-06-21  Simon Josefsson  <jas@extundo.com>
14838
14839         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
14840         variable.
14841
14842         * lib/socket_.h: Don't define WINVER.
14843
14844         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
14845         slightly modified to work in gnulib.
14846
14847 2006-06-21  Simon Josefsson  <jas@extundo.com>
14848
14849         * doc/gnulib.texi (Windows sockets): Add.
14850
14851 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
14852
14853         * lib/read-file.c (fread_file): Start with buffer allocation of
14854         0 bytes rather than 1 byte; this simplifies the code.
14855         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
14856         code to free buffer and save/restore errno.
14857         (internal_read_file): Remove unused local.
14858
14859 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
14860
14861         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
14862         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
14863         Problem reported by Denis Excoffier in
14864         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
14865
14866 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14867
14868         * modules/sys_socket, modules/socklen: Include sys/types since
14869         FreeBSD 4.x's sys/socket.h needs it.
14870
14871 2006-06-19  Simon Josefsson  <jas@extundo.com>
14872
14873         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
14874
14875 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
14876
14877         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
14878
14879 2006-06-19  Bruno Haible  <bruno@clisp.org>
14880
14881         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
14882         and FULL_PATH_INTTYPES_H in angle brackets.
14883         Reported by Mark D. Baushke <mdb@gnu.org>.
14884
14885 2006-06-17  Eric Blake  <ebb9@byu.net>
14886
14887         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
14888         errno.
14889
14890 2006-06-17  Bruno Haible  <bruno@clisp.org>
14891
14892         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
14893         <sys/inttypes.h>.
14894
14895 2006-06-17  Bruno Haible  <bruno@clisp.org>
14896
14897         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
14898         whether errno is declared. Assume <errno.h> declares errno.
14899
14900 2006-06-17  Bruno Haible  <bruno@clisp.org>
14901
14902         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
14903
14904 2006-06-17  Bruno Haible  <bruno@clisp.org>
14905
14906         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
14907         problem on Solaris 2.5.1.
14908
14909 2006-06-16  Eric Blake  <ebb9@byu.net>
14910
14911         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
14912         * lib/unicodeio.c [!defined errno]: Likewise.
14913         * lib/strtol.c [!defined errno]: Likewise.
14914         * lib/strtod.c [!defined errno]: Likewise.
14915
14916 2006-06-15  Eric Blake  <ebb9@byu.net>
14917
14918         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
14919
14920 2006-06-15  Eric Blake  <ebb9@byu.net>
14921
14922         * config/srclist.txt (ssize_t.m4): Lose sync.
14923
14924 2006-06-15  Bruno Haible  <bruno@clisp.org>
14925
14926         * modules/stdint (Files): Include m4/full-header-path.m4,
14927         m4/size_max.m4, m4/wchar_t.m4.
14928         (Makefile.am): Many more substitutions.
14929         * modules/stdint-tests: New file.
14930         * tests/test-stdint.c: New file.
14931
14932 2006-06-15  Bruno Haible  <bruno@clisp.org>
14933
14934         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
14935         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
14936         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
14937         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
14938         gl_CHECK_TYPE_SAME): New macros.
14939
14940 2006-06-15  Bruno Haible  <bruno@clisp.org>
14941
14942         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
14943
14944 2006-06-15  Bruno Haible  <bruno@clisp.org>
14945
14946         * lib/stdint_.h: Rewritten to be fully auto-configured.
14947         Fixes bug on HP-UX/IA64.
14948
14949 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
14950
14951         * lib/getdate.y (__attribute__): Don't define if already defined.
14952         Problem reported by Larry Jones.
14953         * lib/utimens.c (__attribute__): Likewise.
14954
14955 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
14956
14957         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
14958         reported by Andreas Schwab.
14959
14960 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14961             Bruno Haible  <bruno@clisp.org>
14962
14963         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
14964         check for the declaration of strnlen and a run test that exposes the
14965         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
14966         rpl_strndup.
14967
14968 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14969             Bruno Haible  <bruno@clisp.org>
14970
14971         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
14972
14973 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14974
14975         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
14976         compile test, for Tru64 4.0D.
14977
14978 2006-05-28  Karl Berry  <karl@gnu.org>
14979
14980         * config/srclist.txt (printf-args.c): lose sync.
14981
14982 2006-05-26  Martin Lambers  <marlam@marlam.de>
14983
14984         * lib/getpass.c: Updates the test for the native W32 API, and adds
14985         missing includes, thus fixing compilation warnings.
14986
14987 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
14988
14989         * lib/exclude.c (exclude_fnmatch): New function.
14990         (excluded_file_name): Call exclude_fnmatch.
14991         * lib/exclude.h (excluded_file_name): New prototype
14992
14993 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
14994
14995         * lib/tempname.c (small_open, large_open): New macros.
14996         (__open, __open64) [!_LIBC]: Remove.
14997         (__gen_tempname): Use small_open and large_open instead of __open
14998         and __open64.  This fixes a portability bug on HP-UX 11.11i
14999         reported by Simon Wing-Tang in
15000         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
15001
15002 2006-05-24  Bruno Haible  <bruno@clisp.org>
15003
15004         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
15005         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
15006         Reported by Thorsten Maerz <torte@netztorte.de> via
15007         Aaron Stone <aaron@serendipity.cx>.
15008
15009 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
15010
15011         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
15012         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
15013         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
15014         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
15015         not really conditional on the cache.
15016         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
15017
15018 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
15019
15020         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
15021         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
15022         (my_usleep): Don't mishandle maximum value.
15023
15024 2006-05-19  Jim Meyering  <jim@meyering.net>
15025
15026         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
15027
15028 2006-05-17  Bruno Haible  <bruno@clisp.org>
15029
15030         Cygwin portability.
15031         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
15032
15033 2006-05-17  Bruno Haible  <bruno@clisp.org>
15034
15035         * lib/stdint_.h: Fix recognition of Cygwin.
15036
15037 2006-05-15  Bruno Haible  <bruno@clisp.org>
15038
15039         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
15040         on libtool patch by Ralf Wildenhues.
15041
15042 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
15043
15044         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
15045         test for C99 conformance; (bool) 0.5 is an integer constant
15046         expression, but (bool) -0.5 is not.  Problem reported by Fedor
15047         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
15048
15049 2006-05-11  Simon Josefsson  <jas@extundo.com>
15050
15051         * m4/xvasprintf.m4: Fix obvious typo.
15052
15053 2006-05-11  Jim Meyering  <jim@meyering.net>
15054
15055         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
15056         James Lemley.
15057
15058 2006-05-10  Simon Josefsson  <jas@extundo.com>
15059
15060         * lib/md4.c: Typo fix, update copyright years.
15061         (K1, K2): Don't use L because it turn computations into 64-bit on
15062         64-bit platforms.
15063
15064 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
15065
15066         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
15067         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
15068         unwanted sign propagation, e.g., on hosts with 64-bit int.
15069         There still are some problems with reeelly weird theoretical hosts
15070         (e.g., 33-bit int) but it's not worth worrying about now.
15071         * lib/sha1.c (rol): Likewise.
15072         (K1, K2, K3, K4): Remove unnecessary L suffix.
15073
15074 2006-05-10  Bruno Haible  <bruno@clisp.org>
15075
15076         * lib/des.c: Cast to avoid warnings.
15077
15078 2006-05-09  Bruno Haible  <bruno@clisp.org>
15079
15080         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
15081         (Depends-on): Depend also on xsize, stdarg.
15082         (configure.ac): Add gl_XVASPRINTF.
15083
15084 2006-05-09  Bruno Haible  <bruno@clisp.org>
15085
15086         * m4/xvasprintf.m4: New file.
15087
15088 2006-05-09  Bruno Haible  <bruno@clisp.org>
15089
15090         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
15091         (EOVERFLOW): Define fallback value.
15092         (xstrcat): New function.
15093         (xvasprintf): Recognize the special case of a string concatenation.
15094
15095 2006-05-08  Eric Blake  <ebb9@byu.net>
15096
15097         * gnulib-tool (func_version): Base copyright year on CVS date.
15098         (func_emit_copyright_notice): New function.
15099         (func_emit_lib_Makefile_am): Use it.
15100         (func_emit_tests_Makefile_am): Likewise.
15101         (func_import): Likewise.
15102
15103 2006-05-08  Bruno Haible  <bruno@clisp.org>
15104
15105         * modules/stdarg: New file.
15106         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
15107
15108 2006-05-08  Bruno Haible  <bruno@clisp.org>
15109
15110         * m4/stdarg.m4: New file, from GNU gettext.
15111
15112 2006-05-08  Bruno Haible  <bruno@clisp.org>
15113
15114         * config/srclist.txt (build-aux/config.rpath): different from latest
15115         release.
15116
15117 2006-05-08  Bruno Haible  <bruno@clisp.org>
15118
15119         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
15120
15121 2006-05-05  Jim Meyering  <jim@meyering.net>
15122
15123         * m4/warning.m4: New file, derived from bison's file by the same name.
15124
15125 2006-05-03  Bruno Haible  <bruno@clisp.org>
15126
15127         * lib/stdint_.h: Shorter URL.
15128         * lib/inttypes.h: Likewise.
15129
15130 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
15131
15132         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
15133
15134 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
15135
15136         * lib/verify.h: Document the internals better.  Most of this change
15137         was written by Bruno Haible.
15138
15139 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
15140
15141         * doc/verify.texi: New file, partly based on a proposal by
15142         Bruno Haible.
15143
15144 2006-05-02  Bruno Haible  <bruno@clisp.org>
15145
15146         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
15147         test from here...
15148         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
15149
15150 2006-04-29  Bruno Haible  <bruno@clisp.org>
15151
15152         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
15153         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
15154
15155 2006-04-29  Bruno Haible  <bruno@clisp.org>
15156
15157         * gnulib-tool: Make --update option actually work.
15158
15159 2006-04-29  Bruno Haible  <bruno@clisp.org>
15160
15161         * doc/gcd.texi: New file.
15162         * doc/gnulib.texi: Include it.
15163
15164 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
15165
15166         * lib/getdate.y (get_date): When adding relative date, start with the
15167         initial time, not with the result of the first mktime call.
15168
15169 2006-04-25  Bruno Haible  <bruno@clisp.org>
15170
15171         * gnulib-tool (func_import): Output the include directives in three
15172         blocks, sorted separately.
15173         Reported by Ben Pfaff <blp@cs.stanford.edu>.
15174
15175 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
15176
15177         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
15178         to define main with arguments, for C++.  Reported by Eric Blake.
15179         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
15180         Prefer 'int main ()' to 'int main (void)', for C++.
15181         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
15182         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
15183         for 'main', for C99 and C++.
15184
15185 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
15186
15187         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
15188         Don't assume that exit status -1 is valid.
15189         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
15190         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
15191         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
15192         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
15193         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
15194         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
15195         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
15196         functions can be used without declaring them, or that you can
15197         exit with status -1.
15198         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
15199
15200 2006-04-24  Karl Berry  <karl@gnu.org>
15201
15202         * config/srclist.txt (longdouble.m4): sync lost.
15203
15204 2006-04-24  Eric Blake  <ebb9@byu.net>
15205
15206         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
15207
15208 2006-04-24  Bruno Haible  <bruno@clisp.org>
15209
15210         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
15211         poll() implementation in AIX.
15212         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
15213
15214 2006-04-24  Bruno Haible  <bruno@clisp.org>
15215
15216         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
15217         assigned exactly once.
15218
15219 2006-04-23  Claudio Fontana  <claudio@gnu.org>
15220             Bruno Haible  <bruno@clisp.org>
15221
15222         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
15223         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
15224         for AM_CPPFLAGS.
15225
15226 2006-04-23  Bruno Haible  <bruno@clisp.org>
15227
15228         * modules/copy-file: Depend on unistd.
15229         * modules/execute: Likewise.
15230         * modules/fatal-signal: Likewise.
15231         * modules/findprog: Likewise.
15232         * modules/mkdtemp : Likewise.
15233         * modules/pipe: Likewise.
15234         * modules/wait-process: Likewise.
15235
15236 2006-04-23  Bruno Haible  <bruno@clisp.org>
15237
15238         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
15239         condition was already detected.
15240         Reported by Ben Pfaff <blp@cs.stanford.edu>.
15241
15242 2006-04-23  Bruno Haible  <bruno@clisp.org>
15243
15244         * lib/copy-file.c: Include <unistd.h> unconditionally.
15245         * lib/execute.c: Likewise.
15246         * lib/fatal-signal.c: Likewise.
15247         * lib/findprog.c: Likewise.
15248         * lib/mkdtemp.c: Likewise.
15249         * lib/pipe.h: Likewise.
15250         * lib/pipe.c: Likewise.
15251         * lib/wait-process.h: Likewise.
15252
15253 2006-04-23  Bruno Haible  <bruno@clisp.org>
15254
15255         * gnulib-tool (func_usage): Fix --import description. Document
15256         --update.
15257         (func_import): Create temporary file in a temporary directory, if
15258         --dry-run is specified. Silence errors from 'grep' when there are no
15259         m4 files in $m4dir.
15260         (func_create_testdir): Silence errors from 'grep' when there are no
15261         m4 files in $m4dir.
15262         Reported by Karl Berry <karl@freefriends.org>.
15263
15264 2006-04-20  Bruno Haible  <bruno@clisp.org>
15265
15266         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
15267         one argument, so that the code will be portable to Autoconf 2.60.
15268         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
15269         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
15270         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
15271
15272 2006-04-19  Derek Price  <derek@ximbiot.com>
15273             Eric Blake  <ebb9@byu.net>
15274
15275         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
15276         rather than "/full/path.h".  Update comment to match.  Shorten &
15277         generalize m4_translit call via AS_TR_CPP.
15278
15279 2006-04-19  Derek Price  <derek@ximbiot.com>
15280             Eric Blake  <ebb9@byu.net>
15281
15282         * lib/inttypes.h: Correct grammar in comment.
15283
15284 2006-04-18  Derek Price  <derek@ximbiot.com>
15285             Paul Eggert  <eggert@cs.ucla.edu>
15286
15287         * modules/inttypes: New file.
15288         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
15289
15290 2006-04-18  Derek Price  <derek@ximbiot.com>
15291             Paul Eggert  <eggert@cs.ucla.edu>
15292
15293         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
15294         New files.
15295
15296 2006-04-18  Derek Price  <derek@ximbiot.com>
15297             Paul Eggert  <eggert@cs.ucla.edu>
15298
15299         * lib/inttypes.h: New file.
15300         * lib/strtoimax.c: Assume <inttypes.h>.
15301
15302 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
15303
15304         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
15305         isn't mounted.  Problem reported by Kir Kolyshkin.
15306
15307 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
15308
15309         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
15310         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
15311         Derek R. Price.
15312         * lib/regex.h (RE_DUP_MAX): Update comment to match current
15313         implementation.
15314
15315 2006-04-12  Eric Blake  <ebb9@byu.net>
15316
15317         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
15318         is now done automatically by the corresponding Autoconf macro.
15319
15320 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
15321
15322         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
15323         time_r.h.
15324
15325 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
15326
15327         Merge regex changes from libc, removing some of our
15328         POSIX-conformance changes that were rejected and redoing them in a
15329         less-intrusive way.
15330
15331         * lib/regcomp.c (re_compile_internal, init_dfa):
15332         Length arg is now size_t, not Idx.  All uses changed.
15333         (peek_token): Forward decl now says internal_function.
15334         (__re_error_msgid, __re_error_msgid_idx):
15335         Now static rather than extern with attribute_hidden.
15336         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
15337         For some reason libc prefers K&R style defns for external functions.
15338         (regerror) [!defined _LIBC]: Likewise.
15339         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
15340         (seek_collating_symbol_entry, lookup_collation_sequence_value):
15341         (build_range_exp, build_collating_symbol):
15342         Use K&R-style defn.
15343         (re_compile_fastmap): Use '\0' to memset, not 0.
15344         (utf8_sb_map): Make the calculations more obvious.
15345         (init_dfa, parse_bracket_exp, build_charclass_op):
15346         Call calloc and cast result, as glibc does.
15347         (init_word_char, fetch_token, peek_token, peek_token_bracket):
15348         (build_range_exp, build_collating_symbol):
15349         Now internal functions.
15350
15351         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
15352
15353         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
15354         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
15355         Don't depend on VMS; depend on __VMS instead, for POSIX
15356         namespace cleanness.
15357         (regoff_t): Define to ssize_t, not long int.
15358
15359         Remove the REG_ macros named below.  Instead, make the old names
15360         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
15361         __USE_GNU_REGEX.
15362         (REG_BACKSLASH_ESCAPE_IN_LISTS):
15363         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
15364         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
15365         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
15366         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
15367         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
15368         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
15369         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
15370         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
15371         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
15372         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
15373         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
15374         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
15375         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
15376         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
15377         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
15378         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
15379         (REG_NREGS):
15380         Remove.  All uses replaced by the old RE_* names.
15381         (RE_BACKSLASH_ESCAPE_IN_LISTS):
15382         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
15383         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
15384         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
15385         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
15386         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
15387         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
15388         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
15389         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
15390         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
15391         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
15392         Don't bother having these macros be independent of each others'
15393         values, since they no longer exist in the POSIX name space.
15394
15395         Rename the following member names back to their old names,
15396         unless !__USE_GNU_REGEX.  All uses changed back.
15397         (buffer): Renamed from re_buffer.
15398         (allocated): Renamed from re_allocated.
15399         (used): Renamed from re_used.
15400         (syntax): Renamed from re_syntax.
15401         (fastmap): Renamed from re_fastmap.
15402         (translate): Renamed from re_translate.
15403         (can_be_null): Renamed from re_can_be_null.
15404         (regs_allocated): Renamed from re_regs_allocated.
15405         (fastmap_accurate): Renamed from re_fastmap_accurate.
15406         (no_sub): Renamed from re_no_sub.
15407         (not_bol): Renamed from re_not_bol.
15408         (not_eol): Renamed from re_not_eol.
15409         (newline_anchor): Renamed from re_newline_anchor.
15410         (num_regs): Renamed from rm_num_regs.
15411         (start): Renamed from rm_start.
15412         (end): Renamed from rm_end.
15413
15414         (free_state): Move up a bit.
15415
15416         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
15417         #define to be empty.
15418         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
15419         when that is what is intended.
15420         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
15421         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
15422         (MAX): New macro.
15423         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
15424         All uses changed back to re_malloc, etc.  It's now the caller's
15425         responsibility to check for overflow; all callers changed.
15426         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
15427         (re_x2nrealloc): Remove.
15428         (free_state): Remove decl.
15429
15430         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
15431         (re_set_registers, re_exec):
15432         Use K&R-style defn.
15433
15434         2006-01-31  Roland McGrath  <roland@redhat.com>
15435
15436         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
15437         Reported by Mike Frysinger <vapier@gentoo.org>.
15438
15439         2006-01-15  Andreas Jaeger  <aj@suse.de>
15440
15441         [BZ #1950]
15442         * lib/regex_internal.c (re_string_reconstruct): Adjust for
15443         build_wcs_upper_buffer change.
15444         (build_wcs_upper_buffer): Change return type.
15445
15446         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
15447
15448         * lib/regex_internal.h: Include <stdint.h> if available.
15449
15450         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
15451
15452         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
15453
15454         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
15455
15456         * lib/regcomp.c: Adjust for changed secondary hash function.
15457
15458         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
15459
15460         * lib/regex.h: Pretty printing.
15461         Clean up namespace a bit.
15462
15463         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
15464
15465         * lib/regexec.c (update_cur_sifted_state, check_arrival,
15466         check_arrival_add_next_nodes): Avoid using uninitialized variable.
15467
15468         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
15469                     Ulrich Drepper  <drepper@redhat.com>
15470
15471         [BZ #1302]
15472         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
15473         changed.
15474         (bitset_word_t): Renamed from bitset_word.  All uses changed.
15475
15476         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
15477
15478         [BZ #281]
15479         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
15480         * lib/regcomp.c: Remove unnecessary uses of
15481         unsigned RE_TRANSLATE_TYPE.
15482         * lib/regex_internal.h: Likewise.
15483         * lib/regex_internal.c: Likewise.
15484         * lib/regexec.c: Likewise.
15485         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
15486
15487         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
15488
15489         * lib/regexec.c (find_recover_state): Remove unnecessary
15490         initialization.
15491         (transit_state_bkref): Make DFA a const pointer.
15492         (get_subexp): Likewise.
15493         (check_arrival): Likewise.
15494         (update_cur_sifted_state): Likewise.
15495         (re_search_internal): Likewise.
15496         (prune_impossible_nodes): Likewise.
15497         (acquire_init_state_context): Likewise.
15498         (proceed_next_node): Likewise.
15499         (set_regs): Likewise.
15500         (free_fail_stack_return): Likewise.
15501         (check_arrival_expand_ecl): Mark DFA parameter as const.
15502         (check_arrival_expand_ecl_sub): Likewise.
15503         (check_subexp_limits): Likewise.
15504         (sub_epsilon_src_nodes):  Likewise.
15505         (add_epsilon_src_nodes):  Likewise.
15506         (merge_state_array): Likewise.
15507         (update_regs): Likewise.
15508         (build_trtable): Likewise.
15509         (sift_states_backward): Mark MCTX parameter as const.
15510         (build_sifted_states): Likewise.
15511         (update_cur_sifted_state): Likewise.
15512         (sift_states_mkref): Likewise.
15513         (check_arrival_expand_ecl): Mark eclosure as const.
15514         (check_dst_limits_calc_pos_1): Likewise.
15515         * lib/regex_internal.h (re_match_context_t): Make dfa a const
15516         pointer.
15517
15518         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
15519
15520         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
15521         (transit_state_sb): Likewise.
15522         (transit_state_mb): Likewise.
15523         (sift_states_iter_mb): Likewise.
15524         (check_arrival_add_next_nodes): Likewise.
15525         (check_node_accept_bytes): Change first parameter to pointer-to-const.
15526         [_LIBC] (re_search_2_stub): Use mempcpy.
15527
15528         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
15529         mbrtowc for very simple UTF-8 case.
15530
15531         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
15532         a pointer-to-const.
15533         (re_acquire_state_context): Likewise.
15534         * lib/regex_internal.h: Adjust prototypes.
15535
15536         * lib/regex.c: Prevent using C++ compilers.
15537
15538         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
15539         (re_acquire_state_context): Likewise.
15540
15541 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
15542
15543         * modules/regex (Depends-on): Add ssize_t.
15544
15545 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
15546
15547         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
15548         translation table.
15549
15550 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
15551
15552         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
15553
15554 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
15555             Bruno Haible  <bruno@clisp.org>
15556
15557         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
15558         <sys/types.h> and <inttypes.h>.
15559
15560 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
15561
15562         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
15563         `__error_t_defined', so argp.h will not typedef the former.
15564
15565 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
15566
15567         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
15568         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
15569         glibc names.  Even if glibc is changed to conform to POSIX, the
15570         traditional names will be available anyway, since regex depends on
15571         the extensions module.  Also, fix a longstanding typo in the
15572         implementation of Spencer ERE test #75 from grep 2.3.  Problems
15573         reported by Emanuele Giaquinta.  Also, change sense of cached
15574         variable, so that the message makes sense.
15575
15576 2006-03-24  Simon Josefsson  <jas@extundo.com>
15577
15578         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
15579         including some doc fixes.
15580         (base64_encode_alloc): Fix +1 bug on allocation failures.
15581
15582 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
15583
15584         * lib/base64.c (base64_encode): Do not read past end of array with
15585         unsanitized input on systems with CHAR_BIT > 8.
15586
15587 2006-03-24  Eric Blake  <ebb9@byu.net>
15588
15589         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
15590
15591 2006-03-22  Karl Berry  <karl@gnu.org>
15592
15593         * config/srclist.txt (*setenv.[ch]): get from coreutils.
15594         * config/srclistvars.sh (COREUTILS): new var.
15595
15596 2006-03-17  Jim Meyering  <jim@meyering.net>
15597
15598         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
15599         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
15600
15601 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
15602
15603         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
15604         no longer needs it.  Instead, check that regoff_t is as least
15605         as wide as ptrdiff_t.
15606
15607         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
15608         so that our regex.h stays compatible with the installed regex.
15609         This is helpful for installers who configure --without-included-regex.
15610         Problem reported by Emanuele Giaquinta.
15611
15612 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
15613
15614         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
15615         Typedef to long int, not to off_, as POSIX will likely change
15616         in that direction.
15617
15618 2006-03-15  Eric Blake  <ebb9@byu.net>
15619
15620         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
15621
15622 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
15623
15624         * lib/argp-help.c (validate_uparams): Fix typo
15625         * lib/argp-parse.c (argp_default_options): Consistently begin help
15626         messages with a lowercase letter.
15627
15628 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
15629
15630         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
15631         overrun buffers and shouldn't be used (much as gets shouldn't be
15632         used).
15633         * lib/time_r.c (asctime_r, ctime_r): Likewise.
15634
15635 2006-03-08  Simon Josefsson  <jas@extundo.com>
15636
15637         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
15638         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
15639
15640 2006-03-08  Simon Josefsson  <jas@extundo.com>
15641
15642         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
15643         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
15644
15645 2006-03-08  Simon Josefsson  <jas@extundo.com>
15646
15647         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
15648         signal that configure disabled the device.
15649
15650 2006-03-08  Simon Josefsson  <jas@extundo.com>
15651
15652         * build-aux/maint.mk: Fix refresh-po, to handle no translated
15653         languages.
15654
15655 2006-03-07  Simon Josefsson  <jas@extundo.com>
15656
15657         * modules/getopt (Depends-on): Add unistd.
15658
15659         * modules/unistd: New file.
15660
15661 2006-03-07  Simon Josefsson  <jas@extundo.com>
15662
15663         * modules/gc-random: New file.
15664
15665 2006-03-07  Simon Josefsson  <jas@extundo.com>
15666
15667         * m4/unistd_h.m4: New file.
15668
15669 2006-03-07  Simon Josefsson  <jas@extundo.com>
15670
15671         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
15672         test to be side-effect free by storing the result in the cache
15673         variable gl_cv_lib_readline, and moving the assignment of
15674         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
15675         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
15676
15677 2006-03-07  Simon Josefsson  <jas@extundo.com>
15678
15679         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
15680         error on missing devices (the functions will return an error).
15681
15682         * m4/gc.m4: Move random stuff to gc-random.m4
15683
15684 2006-03-07  Simon Josefsson  <jas@extundo.com>
15685
15686         * lib/unistd_.h: New file.
15687
15688 2006-03-07  Simon Josefsson  <jas@extundo.com>
15689
15690         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
15691
15692 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
15693
15694         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
15695         Problem reported by Juan Manuel Guerrero.
15696
15697 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
15698
15699         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
15700         the unistd module.
15701         * lib/getlogin_r.c: Likewise.
15702         * lib/getlogin_r.h: Likewise.
15703         * lib/glob.c: Likewise.
15704         * lib/pagealign_alloc.c: Likewise.
15705         * lib/unistd_.h: Remove; no longer needed.
15706
15707 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
15708
15709         * MODULES.html.sh (Support for systems lacking POSIX:2001):
15710         Add unistd.
15711         * modules/c-stack (Depends-on): Add unistd.
15712         * modules/getlogin_r: Likewise.
15713         * modules/glob: Likewise.
15714         * modules/pagealign_alloc: Likewise.
15715         * modules/unistd (Files): Remove lib/unistd_.h.
15716         (EXTRA_DIST): Remove.
15717         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
15718         need unistd_.h.
15719         (MOSTLYCLEANFILES): Remove unistd.h-t.
15720
15721 2006-03-03  Simon Josefsson  <jas@extundo.com>
15722
15723         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
15724
15725 2006-03-03  Simon Josefsson  <jas@extundo.com>
15726
15727         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
15728         libidn and bison.
15729
15730 2006-03-03  Simon Josefsson  <jas@extundo.com>
15731
15732         * build-aux/maint.mk: Add indent target.
15733
15734 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
15735
15736         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
15737         our replacement poll.h in any case, to avoid a differing
15738         declaration from a system header.  Seen on AIX.
15739
15740 2006-03-01  Simon Josefsson  <jas@extundo.com>
15741
15742         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
15743         <kasal@ucw.cz>.
15744
15745 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15746
15747         * modules/gettime (Depends-on): Add extensions module.
15748         * modules/nanosleep (Depends-on): Likewise.
15749         * modules/settime (Depends-on): Likewise.
15750
15751 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15752
15753         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
15754         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
15755         pedantically.
15756         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
15757         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
15758
15759         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
15760         not "==".  Reported by Ralf Wildenhues.
15761
15762 2006-03-01  Karl Berry  <karl@gnu.org>
15763
15764         * doc/Copyright/request-*: new files, synced from gnuorg.
15765
15766 2006-03-01  Karl Berry  <karl@gnu.org>
15767
15768         * config/srclist.txt (Copyright/*): new entries.
15769
15770 2006-02-28  Simon Josefsson  <jas@extundo.com>
15771
15772         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
15773
15774 2006-02-27  Simon Josefsson  <jas@extundo.com>
15775
15776         * lib/base64.h: Indent #define's.  From Jim Meyering
15777         <jim@meyering.net>.
15778
15779 2006-02-27  Jim Meyering  <jim@meyering.net>
15780
15781         Revert the change of 2006-02-24, so these files can continue
15782         to be sync'd from gettext.
15783         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
15784         of `config.h'.
15785
15786 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
15787
15788         * modules/intprops: New file.
15789         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
15790         Add intprops.
15791         * modules/getloadavg (Files): Remove lib/intprops.h.
15792         (Depends-on): Add intprops.
15793         * modules/human: Likewise.
15794         * modules/inttostr: Likewise.
15795         * modules/openat: Likewise.
15796         * modules/sig2str: Likewise.
15797         * modules/userspec: Likewise.
15798         * modules/utimecmp: Likewise.
15799         * modules/xnanosleep: Likewise.
15800         * modules/xstrtol: Likewise.
15801
15802 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
15803
15804         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
15805         * modules/lock-tests (TESTS): Use $(EXEEXT).
15806         * modules/tls-tests: Likewise.
15807         * modules/argp-tests: Likewise.
15808         (check_PROGRAMS): New var, replacing...
15809         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
15810
15811 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
15812
15813         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
15814         `config.h'.
15815
15816 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
15817
15818         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
15819
15820 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
15821
15822         Sync from coreutils.
15823         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
15824         gl_CHDIR_SAFER.
15825
15826 2006-02-22  Jim Meyering  <jim@meyering.net>
15827
15828         Sync from coreutils.
15829         * m4/chdir-safer.m4: New file.
15830
15831 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
15832
15833         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
15834         AT_FDCWD exceeds INT_MAX.
15835         * lib/openat.h (AT_FDCWD): Likewise.
15836
15837 2006-02-17  Eric Blake  <address@hidden>
15838
15839         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
15840
15841 2006-02-16  Simon Josefsson  <jas@extundo.com>
15842
15843         * modules/getaddrinfo (Depends-on): Add sys_socket.
15844
15845 2006-02-15  Simon Josefsson  <jas@extundo.com>
15846
15847         * build-aux/maint.mk: Add dsyntax-check rule.
15848
15849 2006-02-15  Eric Blake  <ebb9@byu.net>
15850
15851         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
15852         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
15853         'present but cannot compile' warnings on cygwin.
15854         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
15855         use ws2tcpip.h if sys/socket.h works.
15856         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
15857         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
15858
15859 2006-02-14  Simon Josefsson  <jas@extundo.com>
15860
15861         * modules/maintainer-makefile (Files): Rename.
15862
15863         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
15864         and (the local) Makefile.cfg to maint-cfg.mk.
15865
15866         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
15867         to the latter.
15868
15869         * modules/maintainer-makefile: New module.
15870
15871         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
15872         severaly stripped to make it possible to build it up from scratch
15873         with reliable tests.
15874
15875         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
15876         fixes to permit overriding the default actions when configure and
15877         makefile are not available.
15878
15879 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
15880
15881         Sync from coreutils.
15882         * modules/lstat (Depends-on): Don't depend on xalloc.
15883         (License): Change from GPL to LGPL, since this is now simply a
15884         replacement for a libc function.
15885
15886 2006-02-14  Jim Meyering  <jim@meyering.net>
15887
15888         Sync from coreutils.
15889
15890         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
15891         failure on deficient systems, and simplify gnulib lgpl dependencies.
15892         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
15893         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
15894
15895         * lib/xalloc-die.c: Remove unused definition of N_.
15896
15897 2006-02-14  Jim Meyering  <jim@meyering.net>
15898
15899         Sync from coreutils.
15900         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
15901         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
15902         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
15903         double-quote uses of that variable, to accommodate the rare case in
15904         which getmntent is available in none of the libraries checked.  This
15905         happens at least on FreeBSD 5.0.
15906
15907 2006-02-13  Simon Josefsson  <jas@extundo.com>
15908
15909         * gnulib-tool (Usage): Fix --import, from
15910         karl@freefriends.org (Karl Berry).
15911
15912 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
15913
15914         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
15915
15916 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
15917
15918         * lib/argp-namefrob.h: Restore changes accidentally lost during the
15919         "autoupdate" on 2005-12-12.
15920
15921 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
15922
15923         * modules/closeout (Depends-on): Remove atexit.
15924
15925 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
15926
15927         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
15928         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
15929
15930 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
15931
15932         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
15933         __EXTENSIONS__ if this causes compilation to fail.  Problem
15934         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
15935         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
15936
15937 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
15938
15939         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
15940         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
15941         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
15942         All uses changed.
15943
15944 2006-01-26  Simon Josefsson  <jas@extundo.com>
15945
15946         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
15947         prototype is visible on mingw32.
15948
15949         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
15950         for mingw32.
15951
15952         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
15953         mingw32).
15954
15955 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
15956
15957         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
15958         attempt to open for write; this always fails, at least on POSIX
15959         hosts.  This reinstates the 2006-01-09 change, which was
15960         inadvertently removed.
15961
15962 2006-01-26  Bruno Haible  <bruno@clisp.org>
15963
15964         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
15965         Reported by Paul Eggert.
15966
15967 2006-01-26  Bruno Haible  <bruno@clisp.org>
15968             Paul Eggert  <eggert@cs.ucla.edu>
15969
15970         * lib/stdbool_.h (_Bool)
15971         [(! (defined __cplusplus || defined __BEOS__)
15972           && !defined __GNUC__
15973           && !(defined __HP_cc || defined __xlc__
15974                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
15975                || defined __sgi))]:
15976         #define to signed char in these cases too; this simplifies
15977         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
15978         etc., separately) and makes it more conservative.
15979
15980 2006-01-25  Simon Josefsson  <jas@extundo.com>
15981
15982         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
15983         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
15984         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
15985
15986 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
15987
15988         * lib/argp-namefrob.h: Bugfix. Remove stray #
15989
15990 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
15991
15992         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
15993         so that we test the test.
15994         Check for yet another HP-UX cc bug involving *bool |= bool.
15995
15996 2006-01-25  Karl Berry  <karl@gnu.org>
15997
15998         * config/srclist.txt (vasnprintf.c): sync lost.
15999
16000 2006-01-25  Jim Meyering  <jim@meyering.net>
16001
16002         Sync from the stable (b5) branch of coreutils:
16003
16004         * lib/fts.c (fts_children): Don't let close() clobber errno from
16005         failed fchdir().
16006
16007         * lib/fts.c (fts_stat): When following a symlink-to-directory,
16008         don't necessarily interpret stat-fails+lstat-succeeds as indicating
16009         a dangling symlink.  That can also happen at least for ELOOP.
16010         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
16011         FYI, this bug predates the inclusion of fts.c in coreutils.
16012
16013         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
16014         in their own block, so pre-c99 compilers don't object.
16015
16016         Avoid the double-free (first in fts_read, second in fts_close) that
16017         would occur when an `active' directory is made inaccessible (e.g.,
16018         via chmod a-x) during a traversal.
16019         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
16020         before returning.  Reproduce this failure by
16021         mkdir -p a/b; cd a; chmod a-x . b
16022         Reported by Stavros Passas.
16023
16024 2006-01-25  Jim Meyering  <jim@meyering.net>
16025
16026         * lib/fileblocks.c: Remove more useless parentheses.
16027         * lib/readutmp.h: Likewise.
16028
16029 2006-01-25  Bruno Haible  <bruno@clisp.org>
16030
16031         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
16032         warnings.
16033         Reported by Paul Eggert.
16034
16035 2006-01-25  Bruno Haible  <bruno@clisp.org>
16036
16037         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
16038         rid of a trap command. For Solaris sh.
16039         Reported by Mark D. Baushke <mdb@gnu.org>.
16040
16041 2006-01-24  Simon Josefsson  <jas@extundo.com>
16042
16043         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
16044         Bruno.
16045
16046 2006-01-24  Karl Berry  <karl@gnu.org>
16047
16048         * config/srclist.txt (argp-namefrob.h): sync lost.
16049
16050 2006-01-24  Jim Meyering  <jim@meyering.net>
16051
16052         * modules/openat (Files): Add lib/intprops.h.
16053         From Mark D. Baushke.
16054
16055 2006-01-24  Jim Meyering  <jim@meyering.net>
16056
16057         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
16058         Reported by Mark D. Baushke.
16059
16060 2006-01-24  Jim Meyering  <jim@meyering.net>
16061
16062         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
16063
16064 2006-01-24  Bruno Haible  <bruno@clisp.org>
16065
16066         * modules/strnlen (Maintainer): Change from glibc to all.
16067
16068 2006-01-24  Bruno Haible  <bruno@clisp.org>
16069
16070         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
16071         Patch by Paul Eggert.
16072
16073 2006-01-24  Bruno Haible  <bruno@clisp.org>
16074
16075         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
16076         already has it.
16077         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
16078         2005-11-26.
16079
16080         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
16081         'signed char' to avoid problems with the built-in _Bool type.
16082         Reported by Paul Eggert on 2005-11-26.
16083
16084 2006-01-24  Bruno Haible  <bruno@clisp.org>
16085
16086         * gnulib-tool (func_import): Avoid constructing complicated sed
16087         expressions inside backquote.
16088         Report and solution by Mark D. Baushke <mdb@gnu.org>.
16089
16090 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
16091
16092         These changes imported from libc.
16093         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
16094         test and two separate function calls.
16095         * lib/strndup.c (__strndup): Add libc_hidden_def.
16096
16097 2006-01-23  Simon Josefsson  <jas@extundo.com>
16098
16099         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
16100         Remove the test_*_SOURCES variable: automake infers it by default.
16101         * modules/tls-tests: Likewise.
16102
16103 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
16104
16105         Work around porting bugs reported by Dieter in
16106         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
16107         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
16108         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
16109         Include "getopt.h" first, to check interface.
16110         (getenv): Declare only if defined HAVE_DECL_GETENV &&
16111         !HAVE_DECL_GETENV.
16112         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
16113         (__strndup): Revert to K&R-style function dfns, the glibc style.
16114         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
16115         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
16116         Include strnlen.h first, to get prototype properly.
16117         (strnlen): Renamed from __strnlen.
16118         Remove weak alias.
16119
16120 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
16121
16122         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
16123
16124 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
16125
16126         * config/srclist.txt: Adjust to reflect glibc reorganization.
16127         This affects only comments.
16128
16129 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
16130
16131          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
16132          Reported by Bruce Korb <bkorb@gnu.org>.
16133
16134 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
16135
16136         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
16137         to pacify gcc -Wswitch-default.
16138
16139 2006-01-22  Bruno Haible  <bruno@clisp.org>
16140
16141         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
16142         temporary buffer for sprintf, take into account the precision also
16143         for 'd', 'i', 'u', 'o', 'x', 'X'.
16144
16145 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
16146
16147         * modules/argp-tests: New module
16148         * tests/test-argp.c: New file
16149         * tests/test-argp-2.sh: New file
16150
16151 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
16152
16153         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
16154         (__argp_base_name): Removed
16155         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
16156         typo.
16157         (__argp_base_name): Provide macro definition or extern declaration
16158         depending on the configuration
16159
16160 2006-01-20  Simon Josefsson  <jas@extundo.com>
16161
16162         * modules/inet_ntop (Depends-on): Depend on sys_socket.
16163
16164 2006-01-20  Simon Josefsson  <jas@extundo.com>
16165
16166         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
16167
16168 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
16169
16170         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
16171         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
16172         Suggested by Bruno Haible.
16173
16174 2006-01-20  Karl Berry  <karl@gnu.org>
16175
16176         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
16177         until changes propagate, I guess.
16178
16179 2006-01-19  Simon Josefsson  <jas@extundo.com>
16180
16181         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
16182
16183 2006-01-19  Simon Josefsson  <jas@extundo.com>
16184
16185         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
16186
16187 2006-01-19  Simon Josefsson  <jas@extundo.com>
16188
16189         * gnulib-tool: Set check_PROGRAMS.
16190
16191         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
16192         modules/des-tests, modules/gc-arcfour-tests,
16193         modules/gc-arctwo-tests, modules/gc-des-tests,
16194         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
16195         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
16196         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
16197         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
16198         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
16199         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
16200         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
16201         test_*_SOURCES.
16202
16203 2006-01-18  Simon Josefsson  <jas@extundo.com>
16204
16205         * modules/socklen (Depends-on): Depend on sys_socket.
16206
16207 2006-01-18  Simon Josefsson  <jas@extundo.com>
16208
16209         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
16210         modules/des-tests, modules/gc-arcfour-tests,
16211         modules/gc-arctwo-tests, modules/gc-des-tests,
16212         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
16213         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
16214         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
16215         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
16216         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
16217         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
16218         $(EXEEXT) to automake TESTS variable, for mingw32.
16219
16220 2006-01-17  Simon Josefsson  <jas@extundo.com>
16221
16222         * modules/socklen (Include): Need sys/socket.h.
16223
16224 2006-01-17  Bruno Haible  <bruno@clisp.org>
16225
16226         * modules/ssize_t (Include): Add <sys/types.h>.
16227
16228 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
16229
16230         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
16231         it's not portable and it doesn't work with cross-compiles.
16232         Problem reported by Bruno Haible.  Fix missing-$ typo in
16233         'test "gl_cv_ignore_unused_libraries" ...' that prevented
16234         -zignore from being used with Sun's C compiler.
16235
16236 2006-01-12  Simon Josefsson  <jas@extundo.com>
16237
16238         * lib/base64.c: Fix warning, reported by Bruno Haible
16239         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
16240
16241 2006-01-12  Bruno Haible  <bruno@clisp.org>
16242
16243         * modules/ldd: New file.
16244         * build-aux/ldd.sh.in: New file.
16245         * MODULES.html.sh (Support for building libraries and executables): Add
16246         ldd.
16247
16248 2006-01-12  Bruno Haible  <bruno@clisp.org>
16249
16250         * m4/ldd.m4: New file.
16251
16252 2006-01-12  Bruno Haible  <bruno@clisp.org>
16253
16254         * gnulib-tool (func_import, func_create_testdir): Don't go into an
16255         endless loop while replacing $auxdir with build-aux.
16256
16257 2006-01-11  Simon Josefsson  <jas@extundo.com>
16258
16259         * lib/stdint_.h (SIZE_MAX): Add missing (.
16260
16261 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
16262
16263         Sync from coreutils.
16264         * lib/md5.c: Fix commentary typos.
16265         (alignof, UNALIGNED_P): No need for a GCC-specific version.
16266         * lib/md5.h (__attribute__): Remove; unused.
16267         * lib/sha1.c: Fix commentary to match md5 better.
16268         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
16269         so that we don't need to worry about alignment.  All uses changed.
16270         This merges the 2005-10-28 md5 change into sha1.
16271
16272 2006-01-11  Jim Meyering  <jim@meyering.net>
16273
16274         Sync from coreutils.
16275         * lib/md5.c (OP): Fix spacing.
16276
16277 2006-01-11  Bruno Haible  <bruno@clisp.org>
16278
16279         Ensure automatic ordering between gl_LOCK and gl_ARGP.
16280         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
16281         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
16282
16283 2006-01-11  Bruno Haible  <bruno@clisp.org>
16284
16285         Ensure automatic ordering between gl_LOCK and gl_ARGP.
16286         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
16287         the "early" section as well.
16288
16289 2006-01-11  Bruno Haible  <bruno@clisp.org>
16290
16291         Avoid "ar: no archive members specified" error on MacOS X.
16292         * gnulib-tool (func_modules_add_dummy): New function.
16293         (func_import, func_create_testdir): Invoke it.
16294
16295 2006-01-11  Bruno Haible  <bruno@clisp.org>
16296
16297         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
16298         with $auxdir in AC_CONFIG_FILES statements.
16299
16300 2006-01-11  Bruno Haible  <bruno@clisp.org>
16301
16302         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
16303         Initialize also noinst_HEADERS to empty.
16304
16305 2006-01-11  Bruno Haible  <bruno@clisp.org>
16306
16307         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
16308         variables.
16309         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
16310         autoreconf.
16311
16312 2006-01-11  Bruno Haible  <bruno@clisp.org>
16313
16314         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
16315         overridable by the user.
16316         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
16317
16318 2006-01-10  Simon Josefsson  <jas@extundo.com>
16319
16320         * modules/sys_socket: New file.
16321
16322 2006-01-10  Simon Josefsson  <jas@extundo.com>
16323
16324         * m4/sys_socket_h.m4: New file.
16325
16326 2006-01-10  Simon Josefsson  <jas@extundo.com>
16327
16328         * lib/socket_.h: New file.
16329
16330 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
16331
16332         * modules/readutmp (Maintainer): Add myself.
16333
16334 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
16335
16336         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
16337         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
16338         People who are still concerned with buggy memcmp implementations
16339         can invoke gl_FUNC_MEMCMP themselves.
16340
16341 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
16342
16343         * lib/regex_internal.h (BITSET_WORD_BITS):
16344         Work around a bug in 64-bit PGC (before version 6.1-2), where the
16345         preprocessor mishandles large unsigned values as if they were signed.
16346         Problem reported by Claudio Fontana in
16347         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
16348
16349 2006-01-10  Jim Meyering  <jim@meyering.net>
16350
16351         Avoid the double-free (first in fts_read, second in fts_close) that
16352         would occur when an `active' directory is made inaccessible (e.g.,
16353         via chmod a-x) during a traversal.
16354         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
16355         before returning.  Reproduce this failure by
16356         mkdir -p a/b; cd a; chmod a-x . b
16357         Reported by Stavros Passas.
16358
16359         Sync from coreutils.
16360         * lib/sha1.c: Tweak grammar in a comment.
16361
16362 2006-01-10  Jim Meyering  <jim@meyering.net>
16363
16364         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
16365         Patch by Joerg Sonnenberger.
16366
16367 2006-01-10  Bruno Haible  <bruno@clisp.org>
16368
16369         * modules/readutmp: Depend on module free.
16370         * modules/strtok_r: Depend on module restrict.
16371
16372 2006-01-10  Bruno Haible  <bruno@clisp.org>
16373
16374         * modules/gettext (configure.ac): Add an invocation of
16375         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
16376
16377 2006-01-10  Bruno Haible  <bruno@clisp.org>
16378
16379         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
16380         Reported by Werner Lemberg <wl@gnu.org>.
16381
16382 2006-01-10  Bruno Haible  <bruno@clisp.org>
16383
16384         * lib/localcharset.c: Update from GNU gettext.
16385
16386 2006-01-10  Bruno Haible  <bruno@clisp.org>
16387
16388         * lib/argp.h (__const): Remove macro. Use const instead.
16389         * lib/argp-fmtstream.h (__const): Likewise.
16390         * lib/glob_.h (__const): Remove macro.
16391         * lib/glob-libc.h: Use const instead of __const.
16392
16393 2006-01-10  Bruno Haible  <bruno@clisp.org>
16394
16395         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
16396         variable.
16397         Needed to avoid an automake error regarding the 'gettext' module.
16398
16399 2006-01-09  Simon Josefsson  <jas@extundo.com>
16400
16401         * modules/inet_ntop (Depends-on): Add restrict.
16402
16403 2006-01-09  Simon Josefsson  <jas@extundo.com>
16404
16405         * modules/gc-rijndael-tests (License): Put under LGPL.
16406
16407         * modules/gc-des-tests (License): Likewise.
16408
16409         * modules/gc-arcfour-tests (License): Likewise.
16410
16411         * modules/gc-arctwo-tests (License): Likewise.
16412
16413         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
16414
16415         * modules/gc-hmac-sha1-tests (Files): Likewise.
16416
16417         * modules/gc-hmac-md5-tests (License): Likewise.
16418
16419         * modules/gc-sha1-tests (License): Likewise.
16420
16421         * modules/gc-md5-tests (License): Likewise.
16422
16423         * modules/gc-md4-tests (License): Likewise.
16424
16425         * modules/gc-md2-tests (License): Likewise.
16426
16427         * modules/gc-tests (License): Likewise.
16428
16429         * modules/des-tests (License): Likewise.
16430
16431         * modules/md4-tests (License): Likewise.
16432
16433         * modules/md2-tests (License): Likewise.
16434
16435 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
16436
16437         Sync from coreutils:
16438
16439         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
16440         * modules/lib-ignore: New file.
16441         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
16442         chdir-safer.m4, lchmod.m4.
16443         * modules/openat: Add mkdirat.c, openat-priv.h.
16444
16445 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
16446
16447         Sync from coreutils.
16448         * m4/lib-ignore.m4: New file.
16449         * m4/lchmod.m4: New file.
16450
16451 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
16452
16453         Sync from coreutils.
16454         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
16455         for write access: POSIX says that must fail.
16456         * lib/fts.c (diropen): Likewise.
16457         * lib/save-cwd.c (save_cwd): Likewise.
16458         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
16459         well, for minor improvements on hosts that lack O_DIRECTORY.
16460         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
16461         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
16462         Fall back on chown if open failed with EACCES.
16463
16464         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
16465         Report an error at compile-time if only a 1-second nominal clock
16466         resolution is found.
16467
16468         * lib/lchmod.h: New file.
16469         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
16470         (make_dir_parents): Use lchown rather than chown, and
16471         lchmod rather than chmod.
16472
16473         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
16474         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
16475         "proc" reported by n0dalus.
16476
16477         * lib/mountlist.c: Include <limits.h>.
16478         (dev_from_mount_options)
16479         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
16480         New function.  It no longer assumes "dev=" has the System V meaning
16481         on Linux (since it doesn't).  It also parses "dev=" more carefully.
16482         (read_file_system_list)
16483         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
16484         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
16485         dev= in that case.
16486
16487         * lib/posixtm.h (PDS_PRE_2000): New macro.
16488         * lib/posixtm.c (year): Arg is now syntax_bits rather than
16489         allow_century.  All usages changed.  Reject dates outside the range
16490         1969-1999 if PDS_PRE_2000 is used.
16491
16492 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
16493
16494         Sync from coreutils.
16495         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
16496         (Time of day items): Mention the possibility of leap seconds.
16497         Problem reported by Dr. David Alan Gilbert.
16498
16499 2006-01-09  Jim Meyering  <jim@meyering.net>
16500
16501         Sync from coreutils.
16502
16503         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
16504
16505         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
16506
16507         * lib/modechange.c (mode_compile): Reject an invalid mode string
16508         that starts with an octal digit.  From Andreas Gruenbacher.
16509
16510         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
16511         and dup to open_safer and dup_safer, respectively.
16512         (openat_permissive): Fix typo in comment.
16513
16514         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
16515         "gettext.h"; either no longer needed or are guaranteed by openat.h.
16516         (_): Remove; no longer needed.
16517         (openat): Renamed from rpl_openat; no need for rpl_openat
16518         since openat.h renames openat for us.
16519         Replace most of the body with a call to openat_permissive,
16520         to avoid duplicate code.
16521         Port to (probably hypothetical) environments were mode_t is
16522         wider than int.
16523         (openat_permissive): Require mode arg, so that we can check
16524         types better.  Put it just after flags.  Change cwd failure
16525         indicator from pointer-to-bool to pointer-to-errno-value.
16526         All callers changed.
16527         Invoke openat_save_fail and/or openat_restore_fail if
16528         cwd_errno is null, so that openat can call us.
16529         (openat_permissive, fdopendir, fstatat, unlinkat):
16530         Simplify errno handling to avoid some duplicate code,
16531         as it's OK to set errno on success.
16532         * lib/openat.h: Revamp code so that function macros depend on
16533         __OPENAT_PREFIX only, not also on AT_FDCWD.
16534         (openat_ro): Remove.  Caller changed to use openat_permissive.
16535         (openat_permissive): Now a macro, if not a function.
16536         (openat_restore_fail, openat_save_fail): Now always functions,
16537         since mkdirat needs them even if __OPENAT_PREFIX is defined.
16538
16539         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
16540         and openat.c.
16541         * lib/mkdirat.c: Include openat-priv.h.
16542         Remove definitions of macros defined therein.
16543         * lib/openat.c: Likewise.
16544
16545         * lib/mkdirat.c (mkdirat): New file and function.
16546         * lib/openat.h (mkdirat): Declare.
16547
16548         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
16549
16550         * lib/openat.h (openat_permissive): Declare.
16551         (openat_ro): Define.
16552
16553         * lib/openat.c (EXPECTED_ERRNO): New macro.
16554         (openat_permissive): New function -- used in remove.c rewrite.
16555         (all functions): Set errno just before returning, only if there
16556         was an actual failure.
16557         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
16558
16559         Emulate openat-family functions using Linux's procfs, if possible.
16560         Idea and some code based on Ulrich Drepper's glibc changes.
16561
16562         * lib/openat.c: (BUILD_PROC_NAME): New macro.
16563         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
16564         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
16565         before falling back on save_cwd and restore_cwd.
16566         (fdopendir, fstatat, unlinkat): Likewise.
16567
16568         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
16569         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
16570
16571         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
16572         as second argument to va_arg.  Otherwise, some versions of gcc
16573         warn that `if this code is reached, the program will abort'.
16574
16575 2006-01-09  Jim Meyering  <jim@meyering.net>
16576
16577         Sync from coreutils.
16578         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
16579         Require openat-priv.h.
16580
16581 2006-01-09  Bruno Haible  <bruno@clisp.org>
16582
16583         * modules/strnlen (Include): Use strnlen.h.
16584
16585 2006-01-09  Bruno Haible  <bruno@clisp.org>
16586
16587         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
16588
16589 2006-01-09  Bruno Haible  <bruno@clisp.org>
16590
16591         * lib/sysexit_.h (EX_OK): New macro.
16592         Suggested by Martin Lambers <marlam@marlam.de>.
16593
16594 2006-01-09  Bruno Haible  <bruno@clisp.org>
16595
16596         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
16597         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
16598
16599 2006-01-09  Bruno Haible  <bruno@clisp.org>
16600
16601         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
16602         numbers.
16603
16604 2006-01-09  Bruno Haible  <bruno@clisp.org>
16605
16606         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
16607         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
16608         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
16609         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
16610
16611 2006-01-09  Bruno Haible  <bruno@clisp.org>
16612
16613         * build-aux/javacomp.sh.in: New file, moved from lib/.
16614         * modules/javacomp-script (Files): Update.
16615         (configure.ac): Add AC_CONFIG_FILES invocation.
16616         (EXTRA_DIST): Remove variable.
16617
16618         * build-aux/javaexec.sh.in: New file, moved from lib/.
16619         * modules/javaexec (Files): Update.
16620         (configure.ac): Add AC_CONFIG_FILES invocation.
16621         (EXTRA_DIST): Remove javaexec.sh.in.
16622
16623         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
16624         * modules/csharpcomp-script (Files): Update.
16625         (configure.ac): Add AC_CONFIG_FILES invocation.
16626         (EXTRA_DIST): Remove variable.
16627
16628         * build-aux/csharpexec.sh.in: New file, moved from lib/.
16629         * modules/csharpexec (Files): Update.
16630         (configure.ac): Add AC_CONFIG_FILES invocation.
16631         (EXTRA_DIST): Remove csharpexec.sh.in.
16632
16633 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
16634
16635         Sync from coreutils.
16636
16637         Add POSIX ACL support
16638         * lib/acl.h (copy_acl, set_acl): Add declarations.
16639         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
16640         systems other than Linux.
16641         (chmod_or_fchmod): New function: use fchmod when possible,
16642         and chmod otherwise.
16643         (file_has_acl): Add a POSIX ACL implementation, with a
16644         Linux-specific subcase.
16645         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
16646         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
16647         acls are unsupported.
16648         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
16649         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
16650         are unsupported.
16651
16652 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
16653
16654         Sync from coreutils.
16655         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
16656
16657 2006-01-07  Bruno Haible  <bruno@clisp.org>
16658
16659         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
16660         gl_EARLY.
16661
16662 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
16663
16664         * lib/strftime.c (tzname): Don't declare if it is already #defined.
16665         Problem reported for Mingw by Mark Junker.
16666
16667 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
16668
16669         * README: Gnulib normally doesn't generate a tarball.
16670
16671 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
16672
16673         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
16674         long int, not int, for nanosecond counts, so that people who are
16675         used to POSIX struct timespec won't be surprised.  Reported by Jim
16676         Meyering.
16677
16678 2005-12-28  Bruno Haible  <bruno@clisp.org>
16679
16680         * build-aux/config.rpath: Update from GNU gettext.
16681
16682 2005-12-16  Jim Meyering  <jim@meyering.net>
16683
16684         * modules/fprintftime: New module.
16685         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
16686
16687 2005-12-16  Jim Meyering  <jim@meyering.net>
16688
16689         * m4/fprintftime.m4: New file.
16690
16691 2005-12-16  Jim Meyering  <jim@meyering.net>
16692
16693         * lib/fprintftime.c, lib/fprintftime.h: New files.
16694
16695 2005-12-15  Simon Josefsson  <jas@extundo.com>
16696
16697         * modules/socklen (configure.ac): Fix M4 macro name, to align with
16698         new m4/socklen.m4.
16699
16700 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
16701
16702         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
16703         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
16704
16705 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
16706
16707         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
16708         * lib/argp-help.c (fill_in_uparams): Check if the constructed
16709         struct uparams is valid. Fall back to the default values if it is
16710         not.
16711
16712 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
16713
16714         * modules/argp (Files): Add argp-pin.c
16715         (Depends-on): dirname
16716         (lib_SOURCES): Add argp-pin.c
16717
16718 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
16719
16720         * m4/argp.m4:  Check if program_invocation_name and
16721         program_invocation_short_name are declared and define appropriate
16722         macros if they are not.
16723
16724 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
16725
16726         * lib/argp-help.c (__argp_base_name): New function
16727         (__argp_short_program_name): Rewrite using __argp_base_name
16728         * lib/argp-namefrob.h: Define program_invocation_name and
16729         program_invocation_short_name if requested
16730         (__argp_base_name): Add prototype
16731         * lib/argp-parse.c (argp_def): Use gettext wrappers
16732         (argp_default_parser): Use __argp_base_name
16733         * lib/argp-pin.c: New file. Defines program_invocation_name and
16734         program_invocation_short_name on systems that lack them.
16735
16736 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
16737
16738         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
16739         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
16740         porting problem reported by Georg Schwarz in
16741         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
16742
16743 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
16744
16745         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
16746         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
16747         porting problem reported by Georg Schwarz in
16748         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
16749
16750 2005-12-05  Bruno Haible  <bruno@clisp.org>
16751
16752         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
16753         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
16754         Reported by Mark Junker <mjscod@gmx.de>.
16755
16756 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
16757
16758         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
16759         Use implementation from Albert Chin, with some
16760         comments/corrections by Stepan Kasal and myself.
16761
16762 2005-12-02  Bruno Haible  <bruno@clisp.org>
16763
16764         * gnulib-tool (func_import): Accept GPLed build tool modules when
16765         --lgpl is given.
16766         * modules/csharpcomp-script: New file.
16767         * modules/csharpcomp: Depend on it.
16768         * modules/javacomp-script: New file.
16769         * modules/javacomp: Depend on it.
16770         Suggested by Simon Josefsson.
16771
16772 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
16773
16774         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
16775         statement, to work around an HP-UX 10.20 compiler bug reported by
16776         Peter O'Gorman.
16777
16778 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
16779
16780         * modules/savedir (Depends-on): Add openat.
16781
16782 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
16783
16784         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
16785         (uintmax_t) [defined uintmax_t]: Do not declare.
16786         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
16787         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
16788         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
16789         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
16790         sake of portability to weird hosts that C allows (though we don't
16791         know of any practical examples).
16792
16793         * lib/savedir.h (fdsavedir): New decl.
16794         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
16795         contains most of the former guts of savedir.
16796         (savedir): Use savedirstream.
16797         Include "openat.h".
16798
16799 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
16800
16801         * modules/obstack (Files): Add m4/ulonglong.m4.
16802         Problem reported by Davide Angelocola.
16803
16804 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
16805
16806         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
16807         coreutils no longer futzes with rounding modes.
16808
16809 2005-11-14  Jim Meyering  <jim@meyering.net>
16810
16811         * lib/mkstemp-safer.c: Include <config.h>, required for possible
16812         replacement of mkstemp.
16813
16814 2005-11-10  Simon Josefsson  <jas@extundo.com>
16815
16816         * lib/readline.c: Remove EOL.
16817
16818 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16819
16820         * modules/gethrxtime (Depends-on): Add gettime.
16821
16822 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16823
16824         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
16825         or gettimeofday; no longer needed.
16826
16827 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16828
16829         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
16830         time business.
16831         (gethrxtime) [! (HAVE_NANOUPTIME
16832         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
16833         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
16834         our own approximation.
16835
16836 2005-11-08  Eric Blake  <ebb9@byu.net>
16837
16838         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
16839
16840 2005-11-08  Eric Blake  <ebb9@byu.net>
16841
16842         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
16843
16844 2005-11-04  Bruno Haible  <bruno@clisp.org>
16845
16846         * gnulib-tool: Implement --update mode.
16847
16848 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
16849
16850         Fix porting problem reported by Theodoros V. Kalamatianos.
16851         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
16852         Don't assume that futimes failing means we must fail.
16853
16854 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
16855
16856         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
16857         variables to suggest the intended function of the PATH_MAX check.
16858
16859 2005-10-30  Kean Johnston  <jkj@sco.com>
16860
16861         Trivial changes to support SCO systems.
16862         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
16863         as PATH_MAX.
16864         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
16865         where __ptr is null when no I/O is pending.
16866
16867 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
16868
16869         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
16870         leave errno alone.  Problem reported by Dmitry V. Levin.
16871
16872 2005-10-28  Simon Josefsson  <jas@extundo.com>
16873
16874         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
16875         Test more.
16876
16877         * tests/test-gc-md2.c, tests/test-md2.c: New files.
16878
16879         * modules/md2, modules/md2-tests: New files.
16880
16881 2005-10-28  Simon Josefsson  <jas@extundo.com>
16882
16883         * m4/inet_ntop.m4: More tests.
16884
16885         * m4/gc-md2.m4, md2.m4: New file.
16886
16887 2005-10-28  Simon Josefsson  <jas@extundo.com>
16888
16889         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
16890         "restrict" keywords, as per POSIX.  Protect the function
16891         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
16892         Don't use K&R prototypes.  Check the sprintf return values.
16893         Re-define EAFNOSUPPORT if not present.  Indent.
16894
16895         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
16896         suggested by Bruno Haible <bruno@clisp.org>.
16897
16898         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
16899
16900         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
16901
16902         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
16903         libgcrypt).
16904
16905         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
16906
16907         * lib/md2.h, lib/md2.c: New files.
16908
16909 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
16910
16911         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
16912         errno alone.  Problem reported by Frederic Jolliton.
16913
16914 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
16915
16916         * modules/verify (License): Change from GPL to LGPL.  This is a
16917         tiny module and there are apparently near-equivalents that are
16918         under the BSD license.
16919
16920 2005-10-24  Simon Josefsson  <jas@extundo.com>
16921
16922         * modules/sha1: Relicense to LGPL.
16923
16924 2005-10-24  Simon Josefsson  <jas@extundo.com>
16925
16926         * lib/md4.h: Shrink buffer size, now that we changed the type.
16927
16928 2005-10-23  Simon Josefsson  <jas@extundo.com>
16929
16930         * gnulib-tool (func_import): Fix --tests-base.
16931
16932 2005-10-22  Simon Josefsson  <jas@extundo.com>
16933
16934         * modules/arcfour (Depends-on): Need stdint.
16935
16936 2005-10-22  Simon Josefsson  <jas@extundo.com>
16937
16938         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
16939         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
16940
16941 2005-10-22  Simon Josefsson  <jas@extundo.com>
16942
16943         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
16944         suggested by Bruno Haible <bruno@clisp.org>.
16945
16946 2005-10-22  Simon Josefsson  <jas@extundo.com>
16947
16948         * lib/crc.h: Include stddef.h, for size_t.
16949
16950 2005-10-22  Simon Josefsson  <jas@extundo.com>
16951
16952         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
16953         arcfour_context struct (simplify test vector testing in GNU
16954         Shishi).
16955
16956 2005-10-21  Simon Josefsson  <jas@extundo.com>
16957
16958         * modules/des, modules/des-tests: New files.
16959
16960         * modules/gc-des, modules/gc-des-tests: New files.
16961
16962         * tests/test-des.c, tests/test-gc-des.c: New file.
16963
16964 2005-10-21  Simon Josefsson  <jas@extundo.com>
16965
16966         * modules/arctwo, modules/arctwo-tests: New files.
16967
16968         * tests/test-arctwo.c: New file.
16969
16970         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
16971
16972         * tests/test-gc-arctwo.c: New file.
16973
16974 2005-10-21  Simon Josefsson  <jas@extundo.com>
16975
16976         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
16977         Bruno Haible <bruno@clisp.org>.
16978
16979         * m4/gc-des.m4: New file.
16980
16981 2005-10-21  Simon Josefsson  <jas@extundo.com>
16982
16983         * m4/arctwo.m4: New file.
16984
16985         * m4/gc-arctwo.m4: New file.
16986
16987 2005-10-21  Simon Josefsson  <jas@extundo.com>
16988
16989         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
16990         block.
16991
16992 2005-10-21  Simon Josefsson  <jas@extundo.com>
16993
16994         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
16995         <bruno@clisp.org>.
16996
16997         * lib/hmac-sha1.c (hmac_sha1): Likewise.
16998
16999         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
17000         Bruno Haible <bruno@clisp.org>.
17001
17002         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
17003         <bruno@clisp.org>.
17004
17005 2005-10-21  Simon Josefsson  <jas@extundo.com>
17006
17007         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
17008
17009 2005-10-21  Simon Josefsson  <jas@extundo.com>
17010
17011         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
17012
17013 2005-10-21  Simon Josefsson  <jas@extundo.com>
17014
17015         * lib/des.h, lib/des.c: New files.
17016
17017         * lib/gc-gnulib.c: Support DES.c
17018
17019 2005-10-21  Simon Josefsson  <jas@extundo.com>
17020
17021         * lib/arctwo.h, lib/arctwo.c: New files.
17022
17023         * lib/gc-gnulib.c: Support ARCTWO.
17024
17025 2005-10-21  Simon Josefsson  <jas@extundo.com>
17026
17027         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
17028         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
17029
17030 2005-10-21  Simon Josefsson  <jas@extundo.com>
17031
17032         * gnulib-tool (func_import, func_create_testdir): Define automake
17033         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
17034         Makefile.am snippet),
17035         suggested by Bruno Haible <bruno@clisp.org>.
17036
17037         * modules/gc (Makefile.am): Use it.
17038
17039 2005-10-21  Bruno Haible  <bruno@clisp.org>
17040
17041         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
17042         patch.
17043
17044 2005-10-19  Simon Josefsson  <jas@extundo.com>
17045
17046         * tests/test-gc-rijndael.c: New file.
17047
17048         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
17049
17050 2005-10-19  Simon Josefsson  <jas@extundo.com>
17051
17052         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
17053         interface too.
17054
17055 2005-10-19  Simon Josefsson  <jas@extundo.com>
17056
17057         * tests/test-gc-arcfour.c: New file.
17058
17059         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
17060
17061 2005-10-19  Simon Josefsson  <jas@extundo.com>
17062
17063         * modules/gc-md4, modules/gc-md4-tests: New file.
17064
17065         * tests/test-gc-md4.c: New file.
17066
17067 2005-10-19  Simon Josefsson  <jas@extundo.com>
17068
17069         * m4/gc-md4.m4: New file.
17070
17071 2005-10-19  Simon Josefsson  <jas@extundo.com>
17072
17073         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
17074         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
17075         <kasal@ucw.cz>.
17076
17077 2005-10-19  Simon Josefsson  <jas@extundo.com>
17078
17079         * m4/gc-arcfour.m4: New file.
17080
17081         * m4/gc-rijndael.m4: New file.
17082
17083 2005-10-19  Simon Josefsson  <jas@extundo.com>
17084
17085         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
17086
17087 2005-10-19  Simon Josefsson  <jas@extundo.com>
17088
17089         * lib/gc-gnulib.c: Support ARCFOUR.
17090
17091 2005-10-19  Simon Josefsson  <jas@extundo.com>
17092
17093         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
17094         support.
17095
17096         * lib/gc.h: Add ECB enum type.
17097
17098         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
17099
17100 2005-10-18  Simon Josefsson  <jas@extundo.com>
17101
17102         * tests/test-md5.c: New file.
17103
17104         * modules/md5-tests: New file.
17105
17106 2005-10-18  Simon Josefsson  <jas@extundo.com>
17107
17108         * tests/test-md4.c: New file.
17109
17110         * modules/md4, modules/md4-tests: New files.
17111
17112 2005-10-18  Simon Josefsson  <jas@extundo.com>
17113
17114         * m4/md4.m4: New file.
17115
17116 2005-10-18  Simon Josefsson  <jas@extundo.com>
17117
17118         * lib/md4.h, lib/md4.c: New files, based on md5.?.
17119
17120 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
17121
17122         * gnulib-tool (func_create_testdir): Omit the second check whether
17123         BUILT_SOURCES in nonempty.
17124
17125 2005-10-17  Simon Josefsson  <jas@extundo.com>
17126
17127         * tests/test-rijndael.c: New file.
17128
17129 2005-10-17  Simon Josefsson  <jas@extundo.com>
17130
17131         * modules/sha1: Depend on stdint instead of md5.
17132
17133         * modules/md5: Depend on stdint, remove uint32_t.
17134
17135 2005-10-17  Simon Josefsson  <jas@extundo.com>
17136
17137         * modules/gc-sha1-tests: New file.
17138
17139         * tests/test-gc-sha1.c: New file.
17140
17141 2005-10-17  Simon Josefsson  <jas@extundo.com>
17142
17143         * m4/md5.m4: Remove call to uint32_t.m4.
17144
17145 2005-10-17  Simon Josefsson  <jas@extundo.com>
17146
17147         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
17148
17149         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
17150         md5.h.
17151
17152         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
17153
17154         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
17155
17156 2005-10-17  Simon Josefsson  <jas@extundo.com>
17157
17158         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
17159
17160 2005-10-17  Simon Josefsson  <jas@extundo.com>
17161
17162         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
17163
17164 2005-10-17  Simon Josefsson  <jas@extundo.com>
17165
17166         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
17167
17168         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
17169
17170 2005-10-17  Bruno Haible  <bruno@clisp.org>
17171
17172         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
17173         that it can also be used in a test.
17174
17175 2005-10-16  Bruno Haible  <bruno@clisp.org>
17176
17177         * gnulib-tool (func_emit_tests_Makefile_am): Also define
17178         TESTS_ENVIRONMENT, so that individual tests can augment it.
17179
17180         * gnulib-tool (func_create_testdir): Use an intermediate target for
17181         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
17182         macros, like $(ALLOCA_H), which cannot be passed through the command
17183         line.
17184
17185 2005-10-15  Simon Josefsson  <jas@extundo.com>
17186
17187         * modules/rijndael-tests: New file.
17188
17189         * modules/rijndael: New file.
17190
17191 2005-10-15  Simon Josefsson  <jas@extundo.com>
17192
17193         * m4/rijndael.m4: New file.
17194
17195 2005-10-15  Simon Josefsson  <jas@extundo.com>
17196
17197         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
17198
17199         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
17200
17201 2005-10-14  Simon Josefsson  <jas@extundo.com>
17202
17203         * tests/test-arcfour.c: New file.
17204
17205         * modules/arcfour, modules/arcfour-tests: New files.
17206
17207 2005-10-14  Simon Josefsson  <jas@extundo.com>
17208
17209         * m4/arcfour.m4: New file.
17210
17211 2005-10-14  Simon Josefsson  <jas@extundo.com>
17212
17213         * lib/arcfour.h, lib/arcfour.c: New files.
17214
17215 2005-10-14  Roland McGrath  <roland@redhat.com>
17216
17217         Import from libc.  [BZ #1331]
17218         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
17219         macro argument.
17220         Reported by Matej Vela <vela@debian.org>.
17221
17222 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
17223
17224         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
17225         include <wchar.h>; no longer needed.
17226
17227 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
17228
17229         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
17230
17231 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
17232         and  Ulrich Drepper  <drepper@redhat.com>
17233
17234         Import from libc.
17235         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
17236         instead of inline stream orientation test and two separate
17237         function calls.  Pay no attention to USE_IN_LIBIO.
17238
17239 2005-10-13  Simon Josefsson  <jas@extundo.com>
17240
17241         * modules/gc-hmac-md5-tests: New file.
17242
17243         * tests/test-gc-hmac-sha1.c: New file.
17244
17245         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
17246
17247         * modules/gc-hmac-md5-tests: New file.
17248
17249         * tests/test-gc-md5.c: New file.
17250
17251         * modules/gc-md5-tests: New file.
17252
17253 2005-10-13  Simon Josefsson  <jas@extundo.com>
17254
17255         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
17256         Move memory allocation outside of loop.
17257
17258 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
17259
17260         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
17261         intermediate directory is in a read-only file system.  Problem
17262         reported by Eric Blake.
17263
17264 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
17265
17266         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
17267
17268 2005-10-12  Simon Josefsson  <jas@extundo.com>
17269
17270         * tests/test-hmac-sha1.c: New file.
17271
17272         * modules/hmac-sha1-tests: New file.
17273
17274         * modules/hmac-sha1: New file.
17275
17276 2005-10-12  Simon Josefsson  <jas@extundo.com>
17277
17278         * modules/gc-sha1: New file.
17279
17280 2005-10-12  Simon Josefsson  <jas@extundo.com>
17281
17282         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
17283
17284         * tests/test-gc-pbkdf2-sha1.c: New file.
17285
17286 2005-10-12  Simon Josefsson  <jas@extundo.com>
17287
17288         * modules/gc-md5, modules/gc-hmac-md5: New files.
17289
17290         * modules/gc (Files): Remove md5, memxor and hmac files.
17291
17292 2005-10-12  Simon Josefsson  <jas@extundo.com>
17293
17294         * m4/gc-pbkdf2-sha1.m4: New file.
17295
17296         * m4/gc-hmac-sha1.m4: New file.
17297
17298         * m4/gc-sha1: New file.
17299
17300         * m4/hmac-sha1.m4: New file.
17301
17302 2005-10-12  Simon Josefsson  <jas@extundo.com>
17303
17304         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
17305
17306         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
17307
17308 2005-10-12  Simon Josefsson  <jas@extundo.com>
17309
17310         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
17311         suggested by Bruno Haible <bruno@clisp.org>.
17312
17313 2005-10-12  Simon Josefsson  <jas@extundo.com>
17314
17315         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
17316
17317 2005-10-12  Simon Josefsson  <jas@extundo.com>
17318
17319         * lib/gc-pbkdf2-sha1.c: New file.
17320
17321         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
17322
17323 2005-10-12  Simon Josefsson  <jas@extundo.com>
17324
17325         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
17326
17327         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
17328
17329 2005-10-12  Simon Josefsson  <jas@extundo.com>
17330
17331         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
17332         GC_USE_HMAC_MD5, respectively.
17333
17334         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
17335         (gc_md5): Fix typo.
17336
17337         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
17338
17339         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
17340
17341         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
17342
17343 2005-10-12  Bruno Haible  <bruno@clisp.org>
17344
17345         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
17346         Reported by Stepan Kasal <kasal@ucw.cz>.
17347
17348 2005-10-11  Simon Josefsson  <jas@extundo.com>
17349
17350         * tests/test-crc.c: New file.
17351
17352         * modules/crc, modules/crc-tests: New files.
17353
17354 2005-10-11  Simon Josefsson  <jas@extundo.com>
17355
17356         * m4/crc.m4: New file.
17357
17358 2005-10-11  Simon Josefsson  <jas@extundo.com>
17359
17360         * lib/gc.h: Add gc_hash and gc_hash_buffer.
17361
17362         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
17363
17364         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
17365
17366 2005-10-11  Simon Josefsson  <jas@extundo.com>
17367
17368         * lib/crc.h, lib/crc.c: New files.
17369
17370         * lib/gc.h (gc_hash_buffer): Add doc.
17371
17372 2005-10-11  Bruno Haible  <bruno@clisp.org>
17373
17374         * modules/c-strcasestr: New file.
17375         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
17376
17377 2005-10-11  Bruno Haible  <bruno@clisp.org>
17378
17379         * modules/c-strcase: New file.
17380         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
17381
17382 2005-10-11  Bruno Haible  <bruno@clisp.org>
17383
17384         * lib/strcasecmp.c: Include limits.h.
17385         (strcasecmp): Avoid integer overflow on exotic platforms.
17386         * lib/strncasecmp.c: Include limits.h.
17387         (strncasecmp): Avoid integer overflow on exotic platforms.
17388         Reported by Paul Eggert.
17389
17390 2005-10-11  Bruno Haible  <bruno@clisp.org>
17391
17392         * lib/c-strcasestr.h: New file, from GNU gettext.
17393         * lib/c-strcasestr.c: New file, from GNU gettext.
17394
17395 2005-10-11  Bruno Haible  <bruno@clisp.org>
17396
17397         * lib/c-strcase.h: New file, from GNU gettext.
17398         * lib/c-strcasecmp.c: New file, from GNU gettext.
17399         * lib/c-strncasecmp.c: New file, from GNU gettext.
17400
17401 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
17402
17403         * modules/mempcpy (License): GPL -> LGPL.
17404         * modules/strchrnul (License): Likewise.
17405         * modules/sysexits (License): Likewise.
17406
17407 2005-10-08  Simon Josefsson  <jas@extundo.com>
17408
17409         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
17410
17411 2005-10-07  Simon Josefsson  <jas@extundo.com>
17412
17413         * m4/memxor.m4: Remove gl_C_RESTRICT call.
17414
17415 2005-10-06  Simon Josefsson  <jas@extundo.com>
17416
17417         * tests/test-hmac-md5.c: New file.
17418
17419         * modules/hmac-md5-tests: New file.
17420
17421         * modules/hmac-md5: New file.
17422
17423 2005-10-06  Simon Josefsson  <jas@extundo.com>
17424
17425         * m4/hmac-md5.m4: New file.
17426
17427         * m4/memxor.m4: Require gl_C_RESTRICT.
17428
17429 2005-10-06  Simon Josefsson  <jas@extundo.com>
17430
17431         * lib/memxor.c (memxor): Avoid casts and warnings.
17432
17433 2005-10-06  Simon Josefsson  <jas@extundo.com>
17434
17435         * lib/hmac-md5.c: New file.
17436
17437         * lib/hmac.h: New file.
17438
17439 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
17440
17441         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
17442         promotes to int, not unsigned int, to catch the AIX 5.3
17443         compiler bug.
17444
17445 2005-10-05  Simon Josefsson  <jas@extundo.com>
17446
17447         * modules/memxor: New file.
17448
17449         * modules/iconv (Files): Move config.rpath to havelib, it is used
17450         there.
17451
17452         * modules/havelib (Files): Add config.rpath.
17453
17454 2005-10-05  Simon Josefsson  <jas@extundo.com>
17455
17456         * m4/memxor.m4: New file.
17457
17458 2005-10-05  Simon Josefsson  <jas@extundo.com>
17459
17460         * lib/memxor.c (memxor): Fix compiler error.
17461
17462         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
17463         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
17464
17465         * lib/memxor.h, lib/memxor.c: New files.
17466
17467         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
17468         we assume all systems have it, suggested by Jim Meyering
17469         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
17470         any systems lack sys/socket.h; mingw32 is known to lack it, but we
17471         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
17472         same reasons.
17473
17474 2005-10-05  Simon Josefsson  <jas@extundo.com>
17475
17476         * config/srclist.txt: Add glibc bug 1423 for md5.h.
17477
17478 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
17479
17480         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
17481         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
17482         needed, since the source code now assumes these .h files.
17483
17484 2005-10-05  Derek Price  <derek@ximbiot.com>
17485
17486         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
17487
17488 2005-10-05  Bruno Haible  <bruno@clisp.org>
17489
17490         * modules/stdint (License): Change to LGPL.
17491
17492 2005-10-04  Simon Josefsson  <jas@extundo.com>
17493
17494         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
17495         D. Baushke" <mdb@gnu.org>.
17496
17497 2005-10-04  Bruno Haible  <bruno@clisp.org>
17498
17499         * lib/verify.h (verify_true): Provide alternative definition for C++.
17500
17501 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
17502
17503         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
17504         (SSIZE_MAX): New macro, if not already defined.
17505         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
17506         than 2 GiB.
17507
17508 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
17509
17510         Sync from coreutils.
17511         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
17512         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
17513         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
17514         ULLONG_MAX doesn't work with 2.7.2.1.
17515
17516 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
17517
17518         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
17519         From Ben Pfaff.
17520
17521         * modules/exclude (Depends-on): Depend on verify.
17522         * modules/strtoimax (Depends-on): Likewise.
17523         * modules/utimecmp (Depends-on): Likewise.
17524
17525 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
17526
17527         * lib/exclude.c: Include verify.h.
17528         (verify): Remove.  All callers changed to use verify.h's version.
17529         * lib/strtoimax.c: Likewise.
17530         * lib/utimecmp.c: Likewis.e
17531
17532         Sync from coreutils.
17533         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
17534         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
17535         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
17536         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
17537         bother returning ENOSYS if settimeofday or stime fails; just let
17538         them return whatever errno they want to return.
17539         * lib/utimens.c: Include unistd.h, for dup2.
17540         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
17541         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
17542
17543 2005-10-02  Jim Meyering  <jim@meyering.net>
17544
17545         Sync from coreutils.
17546         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
17547         from glibc-2.2.5 that fails for read-only files.
17548
17549 2005-10-02  Jim Meyering  <jim@meyering.net>
17550
17551         Sync from coreutils.
17552         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
17553         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
17554         `#if HAVE_CONFIG_H'.
17555         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
17556         Remove AT_FDCWD test.
17557         Do not consume the fd unless successful.
17558         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
17559         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
17560         block, so that we don't even try to compile it if settimeofday is
17561         available.  This works around a compilation failure on OSF1 V5.1,
17562         due to stime requiring a `long int*' while tv_sec is `int'.
17563
17564 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
17565
17566         Sync from coreutils.
17567         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
17568         against `yes', rather than just testing for nonempty.
17569
17570 2005-10-01  Simon Josefsson  <jas@extundo.com>
17571
17572         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
17573         and Darwin.
17574
17575         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
17576         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
17577         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
17578         freeaddrinfo and gai_strerror are declared by the POSIX headers.
17579         Check if struct addrinfo is declared.
17580
17581 2005-10-01  Simon Josefsson  <jas@extundo.com>
17582
17583         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
17584         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
17585         AI_* and EAI_* definitions.  Protect function declarations.
17586
17587 2005-10-01  Jim Meyering  <jim@meyering.net>
17588
17589         Sync from coreutils.
17590
17591         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
17592         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
17593         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
17594         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
17595         in the inet and nsl libraries.  Required on Solaris 5.7.
17596
17597 2005-10-01  Jim Meyering  <jim@meyering.net>
17598
17599         Sync from coreutils.
17600         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
17601         in the inet and nsl libraries.  Required on Solaris 5.7.
17602
17603 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
17604
17605         * lib/getdelim.c (getdelim): Remove unused variables.
17606
17607 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
17608
17609         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
17610         so that the code works even with ancient cpp.  Portability problem
17611         with GCC 2.7.2.1 reported by Thomas M.Ott.
17612
17613 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
17614
17615         * modules/regex (Depends-on): Add strcase.
17616
17617         * modules/gethostname (Licence): Change from GPL to LGPL, since
17618         gethostname.c is a trivial implementation of a standard library
17619         function.
17620         * modules/poll (License): Change from GPL to LGPL, since it's
17621         derived from LGPL code.
17622
17623 2005-09-27  Jim Meyering  <jim@meyering.net>
17624
17625         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
17626         HAVE_CONFIG_H.
17627
17628         * lib/intprops.h (signed_type_or_expr__): Define.
17629         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
17630         for unsigned types.
17631
17632 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
17633
17634         * lib/verify.h (verify_expr): Remove, replacing with:
17635         (verify_true): New macro that returns true instead of void.
17636         (verify_type__): Remove.
17637         (verify): Use verify_true rather than verify_type__.
17638
17639 2005-09-26  Bruno Haible  <bruno@clisp.org>
17640
17641         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
17642         is necessary.
17643         (lib_SOURCES): Remove mbchar.c.
17644         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
17645         (Files): Add m4/mbrtowc.m4.
17646         * modules/mbiter: Likewise.
17647         * modules/mbuiter: Likewise.
17648
17649 2005-09-26  Bruno Haible  <bruno@clisp.org>
17650
17651         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
17652         compile mbchar.c if they are not both present.
17653         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
17654         * m4/mbiter.m4 (gl_MBITER): Likewise.
17655         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
17656         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
17657         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
17658
17659 2005-09-25  Jim Meyering  <jim@meyering.net>
17660
17661         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
17662         also uses socklen_t.
17663
17664 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
17665
17666         * lib/utimens.c (ENOSYS): Define if not already defined.
17667         (futimens): Support having a null PATH if the file descriptor
17668         is nonnegative.
17669
17670         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
17671         Remove.
17672         (__attribute): Define to empty unless GCC 3.1 or later.
17673         This works around a core dump on OpenBSD 3.4, which has GCC
17674         2.95.3, which dumps core when given __attribute__(()).  It also
17675         simplifies other tests, since we really don't want to bother with
17676         worrying about which ancient version of GCC supported what.
17677         Original problem reported by Yoann Vandoorselaere, with part of
17678         the fix suggested by Derek Price.
17679
17680 2005-09-24  Jim Meyering  <jim@meyering.net>
17681
17682         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
17683         so we can once again use a positive bitfield width of 1 -- now we
17684         don't have to explain why we were using a bitfield width of 2.
17685
17686 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
17687
17688         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
17689         and similarly for the other external symbols.  Problem reported
17690         by James Gallager.
17691
17692         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
17693         bug reported by Jim Meyering.
17694
17695         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
17696         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
17697         not needed, since socklen is a prerequisite module.
17698
17699 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
17700
17701         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
17702         Problem reported by Eric Blake.
17703         (getaddrinfo): Initialize se so that it's not garbage.
17704         Redo internal storage allocation so that it doesn't make unportable
17705         assumptions about alignment.
17706         Fix a memory leak.
17707
17708         * lib/utimens.c (futimens): Use futimesat if available.
17709         Prefer it to futimes since it doesn't have the futimes bug.
17710
17711         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
17712         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
17713         Instead, declare a function that returns a pointer to an array,
17714         and use verify_type__ to declare the size of the array.
17715         Problem and germ of a solution reported by Bruno Haible.
17716         (verify_type__): Use 2, not 1, for bitfield size, to avoid
17717         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
17718
17719 2005-09-23  Jim Meyering  <jim@meyering.net>
17720
17721         Sync from coreutils.
17722         Correct build failure (socklen_t not defined) on at least
17723         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
17724         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
17725
17726 2005-09-23  Jim Meyering  <jim@meyering.net>
17727
17728         * modules/getaddrinfo (Depends-on): Add socklen.
17729
17730 2005-09-23  Bruno Haible  <bruno@clisp.org>
17731
17732         * tests/test-verify.c: New file.
17733
17734 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
17735
17736         Sync from coreutils.
17737
17738         * modules/argmatch (Depends-on): Add verify.
17739         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
17740         unistd-safer.
17741         * modules/save-cwd (Depends-on): Likewise.
17742
17743         * modules/openat (Files): Add lib/openat-die.c.
17744         (Depends-on): Remove error, exitfail.
17745         Add dirname.
17746
17747         * modules/verify: New file.
17748         * MODULES.html.sh (Diagnostics <assert.h>): New section,
17749         with "verify" module.
17750
17751 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
17752
17753         Sync from coreutils.
17754
17755         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
17756         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
17757         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
17758         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
17759         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
17760         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
17761         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
17762         Don't bother checking for string.h, stdlib.h, unistd.h.
17763         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
17764         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
17765         module's job.
17766         * m4/jm-macros.m4 (gl_MACROS): Likewise.
17767         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
17768
17769         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
17770         (gl_GETDATE): Use it.
17771
17772         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
17773
17774 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
17775
17776         Sync from coreutils.
17777
17778         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
17779         stat-time.h.
17780         * lib/argmatch.h: Include verify.h
17781         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
17782         (ARGMATCH_ASSERT): Remove; unused.
17783         * lib/canonicalize.c: Assume STDC_HEADERS.
17784         * lib/exclude.c: Include "strcase.h".
17785         * lib/regex_internal.h [!defined _LIBC]: Likewise.
17786         * lib/getusershell.c: Include stdio--.h rather than stdio.h
17787         and stdio-safer.h.
17788         (getusershell): Call fopen, not fopen_safer.
17789         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
17790         Do not include unistd-safer.h.
17791         (save_cwd): Don't call fd_safer; no longer needed
17792         now that we include fcntl--.h.
17793
17794         * lib/getdate.y (relative_time): New type.
17795         (RELATIVE_TIME_0): New constant.
17796         (parser_control): Use relative_time instead of doing it ourselves.
17797         (%union): Add new relative_time rel member.
17798         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
17799         Now typeless.
17800         (relunit, relunit_snumber): Now of type rel.
17801         (zone, rel, relunit, get_date): Adjust to above changes.
17802
17803         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
17804         Do not include unistd-safer.h.
17805         (getloadavg): Don't call fd_safer; no longer needed
17806         now that we include fcntl--.h.
17807
17808         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
17809         (make_dir_parents): Treat ENOSYS like EEXIST.
17810
17811         Improve quality of diagnostics on restore_cwd failure.
17812         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
17813         (make_dir_parents): Last arg is now int * (for errno), not bool *.
17814         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
17815         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
17816         each time through the loop.  Do not diagnose restore_cwd failure;
17817         that is the caller's job (and perhaps the caller does not care).
17818
17819         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
17820         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
17821         If the file already exists but is not a directory, don't bother
17822         to try to make its parents.
17823         Close potential file descriptor leak if we can't chdir("/") (!).
17824         Don't always return true if chdir($PWD) fails; return true only
17825         if the requested action was done successfully (except for the
17826         chdir($PWD)).
17827         Don't log final directory unless we actually made it.
17828         Refactor to avoid duplicate code to fix up permissions.
17829         Don't attempt to fix up parent permissions if chdir($PWD) fails.
17830
17831         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
17832         to make it a bit faster and (I hope) clearer.
17833         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
17834         Fix bug in formats like %2N.
17835
17836         * lib/verify.h: New file.
17837
17838 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
17839
17840         Sync from coreutils.
17841         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
17842
17843 2005-09-22  Jim Meyering  <jim@meyering.net>
17844
17845         Sync from coreutils.
17846
17847         * m4/lstat.m4 (gl_FUNC_LSTAT):
17848         Use AC_LIBSOURCES to require lstat.c and lstat.h.
17849         Remove obsolete comment.
17850         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
17851         * m4/xstrtod.m4: Likewise.
17852
17853         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
17854
17855 2005-09-22  Jim Meyering  <jim@meyering.net>
17856
17857         Sync from coreutils.
17858
17859         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
17860
17861         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
17862         the .tm_year member, since otherwise gcc-4.0 would now warn about
17863         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
17864
17865         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
17866         order to avoid an unsuppressible warning from gcc on 64-bit systems.
17867
17868         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
17869         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
17870         when run in a time zone for which daylight savings time is in effect
17871         for the starting date.
17872
17873         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
17874         stop us from restricting permissions of just-created absolute-named
17875         directories.
17876         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
17877         to restore initial working directory.
17878         * lib/mkdir-p.c (make_dir_parents): New parameter:
17879         different_working_dir, to tell caller if/when we change the working
17880         directory and are unable to return to the initial one.
17881         * lib/mkdir-p.h (make_dir_parents): Update prototype.
17882         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
17883         `return false'.  This fixes a bug introduced on 2004-07-30.
17884
17885         * lib/openat.c (fdopendir): Be sure to close the supplied
17886         file descriptor before returning.  This makes our replacement
17887         implementation a little closer to Solaris's, where fdopendir
17888         ties the file descriptor to the returned DIR* pointer.
17889         * lib/openat.c (unlinkat): New function.
17890         * lib/openat.h (unlinkat): Add prototype.
17891         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
17892         (openat_restore_fail): Rename from openat_restore_die.
17893         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
17894
17895         Provide an alternative to exiting immediately upon save_cwd or
17896         restore_cwd failure.  Now, an application can arrange e.g.,
17897         to perform a longjump in that case.
17898         * lib/openat.c: Include dirname.h.
17899         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
17900         (rpl_openat, fdopendir, fstatat): Call openat_save_die
17901         and openat_restore_die rather than calling error directly.
17902         Don't include "error.h" or "exitfail.h"; they're no longer needed.
17903
17904         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
17905         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
17906         define.
17907
17908         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
17909         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
17910                             int utc, int nanoseconds);
17911         Background:
17912         date should not have to allocate a megabyte of virtual memory to
17913         handle a format argument like +%1048575T.  When implemented with
17914         strftime, it must allocate such a buffer, use strftime to fill it
17915         in, print it, then free it.
17916         With fprintftime, it simply prints everything and exits.
17917         With no need for memory allocation, that's one fewer way to fail.
17918         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
17919         optional field width, not before, so we accept %9:z, not %:9z.
17920         (my_strftime): Be sure to use L_('x') for literals.
17921
17922         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
17923         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
17924         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
17925         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
17926         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
17927         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
17928         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
17929         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
17930         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
17931         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
17932         * lib/xgethostname.c, lib/xreadlink.c:
17933         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
17934
17935         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
17936         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
17937         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
17938         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
17939         and don't include <sys/file.h>).
17940
17941 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
17942
17943         Sync from coreutils.
17944
17945         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
17946         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
17947         [!LDAV_DONE]: Avoid unused variable warning.
17948
17949 2005-09-21  Bruno Haible  <bruno@clisp.org>
17950
17951         * lib/unicodeio.h (unicode_to_mb): New declaration.
17952
17953 2005-09-20  Derek Price  <derek@ximbiot.com>
17954
17955         * lib/getaddrinfo.c: Don't include <netdb.h> included from
17956         getaddrinfo.h.
17957
17958 2005-09-20  Bruno Haible  <bruno@clisp.org>
17959
17960         * gnulib-tool: Remove trailing slashes from the values specified for
17961         --source-base, --m4-base, --tests-base, --aux-dir.
17962         Suggested by Simon Josefsson <jas@extundo.com>.
17963
17964 2005-09-20  Bruno Haible  <bruno@clisp.org>
17965
17966         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
17967         func_modules_to_filelist, func_import, func_create_testdir): Make all
17968         sorting results locale-independent, so that gnulib-cache.m4 doesn't
17969         change when gnulib-tool is invoked in a different locale.
17970
17971 2005-09-19  Simon Josefsson  <jas@extundo.com>
17972
17973         * m4/socklen.m4: Fix typo.
17974
17975 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
17976
17977         Use a consistent style for including <config.h>.
17978         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
17979         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
17980         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
17981         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
17982         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
17983         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
17984         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
17985         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
17986         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
17987         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
17988         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
17989         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
17990         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
17991         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
17992         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
17993         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
17994         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
17995         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
17996         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
17997         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
17998         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
17999         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
18000         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
18001         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
18002         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
18003         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
18004         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
18005         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
18006         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
18007         lib/xstrtoumax.c, lib/yesno.c:
18008         Standardize inclusion of config.h.
18009         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
18010         lib/inttostr.h:  Removed inclusion of config.h from header files.
18011         * lib/inttostr.c:  Adjusted in-tree users.
18012         * lib/timespec.h: Remove superfluous warning to include config.h.
18013         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
18014         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
18015         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
18016         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
18017         config.h with HAVE_CONFIG_H.
18018
18019 2005-09-19  Jim Meyering  <jim@meyering.net>
18020
18021         * modules/pathmax (License): Change to LGPL.
18022
18023 2005-09-19  Derek Price  <derek@ximbiot.com>
18024
18025         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
18026
18027 2005-09-19  Bruno Haible  <bruno@clisp.org>
18028
18029         * gnulib-tool (import): Provide default for --tests-base.
18030
18031 2005-09-19  Bruno Haible  <bruno@clisp.org>
18032
18033         * doc/quote.texi: New file, extracted from gnulib.texi.
18034         * doc/ctime.texi: New file, extracted from gnulib.texi.
18035         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
18036         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
18037         * doc/gnulib.texi: Include them.
18038
18039 2005-09-18  Bruno Haible  <bruno@clisp.org>
18040
18041         Portability fix.
18042         * gnulib-tool (func_readlink): New function.
18043         (func_ln_if_changed): Use it.
18044
18045 2005-09-18  Bruno Haible  <bruno@clisp.org>
18046
18047         * gnulib-tool: Support --with-tests also with --import.
18048         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
18049         (func_import): Use variables $testsbase and $inctests. Emit a
18050         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
18051         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
18052         SUBDIRS += $testsdir.
18053         (func_create_testdir): Update.
18054
18055 2005-09-18  Bruno Haible  <bruno@clisp.org>
18056
18057         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
18058         instead of $dry_run.
18059         (func_cp_if_changed, func_mv_if_changed): Remove functions.
18060         (func_ln_if_changed): Don't handle dry-run here.
18061         (func_import): In dry-run mode, detect more precisely which actions
18062         would be performed, and don't use "...ing" verbs.
18063
18064 2005-09-18  Bruno Haible  <bruno@clisp.org>
18065
18066         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
18067         (func_import): Use join on two temporary files instead of three nested
18068         loops, in order to determine which files are new or old.
18069
18070 2005-09-18  Bruno Haible  <bruno@clisp.org>
18071
18072         * gnulib-tool (func_import): Comment out code that spits out the
18073         new files with --dry-run.
18074
18075 2005-09-18  Bruno Haible  <bruno@clisp.org>
18076
18077         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
18078
18079 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
18080
18081         * lib/stat-time.h: New file.
18082         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
18083         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
18084         in a different way.
18085         (timespec_cmp): New function.
18086         * lib/utimecmp.c: Include stat-time.h.
18087         (SYSCALL_RESOLUTION): Depend on whether various struct stat
18088         members exist, not on the obsolescent ST_MTIM_NSEC.
18089         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
18090
18091 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
18092
18093         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
18094
18095 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
18096
18097         * MODULES.html.sh (File system functions): Add stat-time.
18098         * modules/stat-time: New file.
18099         * modules/timespec (Files): Remove m4/st_mtim.m4; this
18100         is now done in a different way, by the stat-time module.
18101         * modules/utimecmp (Depends-on): Add stat-time.
18102
18103 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
18104
18105         * m4/st_mtim.m4: Remove.  Superseded by...
18106         * m4/stat-time.m4: New file.
18107         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
18108         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
18109
18110 2005-09-15  Derek Price  <derek@ximbiot.com>
18111
18112         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
18113
18114 2005-09-15  Derek Price  <derek@ximbiot.com>
18115
18116         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
18117         * lib/regex_internal.c: Ditto, using this...
18118         (__GNUC_PREREQ): ...new macro.
18119         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
18120         using...
18121         (__GNUC_PREREQ): ...this new macro.
18122
18123         * lib/strstr.h: Include string.h. Define strstr as a macro here.
18124
18125 2005-09-15  Derek Price  <derek@ximbiot.com>
18126             Paul Eggert  <eggert@cs.ucla.edu>
18127
18128         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
18129         changes, consolidating in...
18130         * lib/regex_internal.h: ...this file.
18131
18132 2005-09-13  Jim Meyering  <jim@meyering.net>
18133
18134         * lib/canon-host.c: Filter through gnu indent and reword comments
18135         slightly.
18136         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
18137
18138 2005-09-13  Derek Price  <derek@ximbiot.com>
18139
18140         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
18141         failure.
18142         Reported by Jim Meyering  <jim@meyering.net>.
18143
18144 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
18145
18146         * lib/base64.c: Typo.
18147         (base64_encode): Put b64str in initialized data section.
18148
18149 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
18150
18151         Merge glibc and coreutils changes into gnulib, plus a few
18152         extra fixes.
18153         * lib/md5.c: Use #error rather than a string.
18154         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
18155         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
18156         (__attribute__): Define to empty for non recent-GCC.
18157         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
18158         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
18159         Renamed from their non-__ counterparts, with new macros replacing
18160         them if not _LIBC.  Add __THROW attribute.
18161         (rol): Remove.
18162         (struct md5_ctx): Align buffer if using GCC.
18163         * lib/sha1.h (struct sha1_ctx): Likewise.
18164         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
18165         The old name was backwards.
18166         (NOTSWAP): Remove; not used.
18167         (rol): New macro, moved here from md5.h.
18168         (sha1_process_block): Remove a FIXME that doesn't make sense.
18169
18170 2005-09-12  Derek Price  <derek@ximbiot.com>
18171
18172         Return usable errors from canon-host.
18173         * lib/canon-host.h: New file.
18174         * lib/canon-host.c (canon_host): Wrap...
18175         (canon_host_r): ...this new function, which now relies exclusively on
18176         getaddrinfo.
18177         (ch_strerror): New function.
18178         (last_cherror): New global.
18179         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
18180         interface.
18181         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
18182         void *.
18183         (freeaddrinfo): Free ai->ai_canonname when set.
18184
18185 2005-09-12  Derek Price  <derek@ximbiot.com>
18186
18187         Make canon-host require getaddrinfo.
18188         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
18189         AC_LIBSOURCE canon-host.h.  Call...
18190         (gl_PREREQ_CANON_HOST): ...this new function, which requires
18191         gl_GETADDRINFO.
18192         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
18193
18194 2005-09-12  Derek Price  <derek@ximbiot.com>
18195
18196         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
18197         LGPL.
18198         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
18199
18200 2005-09-12  Derek Price  <derek@ximbiot.com>
18201
18202         * lib/gai_strerror.c: Include config.h when available.  Include
18203         getaddrinfo.h before other headers to test interface.
18204         Reported by Larry Jones <lawrence.jones@ugs.com>.
18205
18206 2005-09-12  Derek Price  <derek@ximbiot.com>
18207             Paul Eggert  <eggert@cs.ucla.edu>
18208
18209         * modules/glob (Files): Add glob-libc.h.
18210
18211 2005-09-12  Derek Price  <derek@ximbiot.com>
18212             Paul Eggert  <eggert@cs.ucla.edu>
18213
18214         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
18215         glob_.h, glob-libc.h.
18216         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
18217
18218 2005-09-12  Derek Price  <derek@ximbiot.com>
18219             Paul Eggert  <eggert@cs.ucla.edu>
18220
18221         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
18222         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
18223         protecting things that should be done only in gnulib contexts.
18224         * lib/glob_.h: New file, containing only the glob things needed for
18225         gnulib.
18226         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
18227         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
18228         (glob, globfree, glob_pattern_p): Now defined simply in terms of
18229         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
18230         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
18231         and to respect the namespace rules better.
18232
18233 2005-09-08  Simon Josefsson  <jas@extundo.com>
18234
18235         * modules/socklen: New file.
18236
18237 2005-09-08  Simon Josefsson  <jas@extundo.com>
18238
18239         * m4/socklen.m4: New file.
18240
18241 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
18242
18243         * modules/utimens (Files): Add m4/utimbuf.m4, since
18244         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
18245         Reported by Sergey Poznyakoff.
18246
18247 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
18248
18249         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
18250         definitions, since that's the preferred style in glibc.
18251         Fix a minor spacing issue, and update copyright notice to match
18252         glibc's.
18253
18254 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
18255
18256         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
18257
18258 2005-09-06  Simon Josefsson  <jas@extundo.com>
18259
18260         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
18261         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
18262
18263 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
18264
18265         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
18266         warning.
18267
18268 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
18269
18270         * config/srclist.txt: Add glibc bug 1302.
18271
18272 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
18273
18274         Change bitset word type from unsigned int to unsigned long int,
18275         as this has better performance on typical 64-bit hosts.
18276         Port bitset code to hosts with unusual word sizes.
18277         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
18278         (build_collating_symbol):
18279         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
18280         argument is a bitset.  This is merely a style issue, but it makes
18281         it clearer that an entire array is expected.
18282         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
18283         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
18284         Port to the case where bitset_word is not the same as unsigned int.
18285         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
18286         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
18287         Likewise.
18288         * lib/regexec.c (check_dst_limits_calc_pos_1,
18289         check_subexp_matching_top):
18290         (build_trtable, group_nodes_into_DFAstates):
18291         Likewise.
18292         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
18293         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
18294         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
18295         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
18296         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
18297         * lib/regcomp.c (optimize_subexps, lower_subexp):
18298         Work even if bitset_word has holes in its bitwise representation.
18299         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
18300         * lib/regexec.c (check_dst_limits_calc_pos_1,
18301         check_subexp_matching_top):
18302         Likewise.
18303         * lib/regex_internal.c (re_string_reconstruct):
18304         Don't assume UCHAR_MAX == 255.
18305         * lib/regex_internal.h (bitset_set_all): Likewise.
18306         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
18307         All uses changed.
18308         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
18309         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
18310         All uses changed.
18311         (BITSET_WORD_MAX): New macro.
18312         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
18313         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
18314         (bitset_empty, bitset_copy):
18315         Prefer sizeof (bitset) to multiplying it out ourselves.
18316         (bitset_not_merge): Remove; unused.
18317         (bitset_contain): Return bool, not unsigned int with one bit on.
18318         All callers changed.
18319         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
18320         alignment than re_node_set; do this by defining a new internal
18321         type struct dests_alloc and using it to allocate memory.
18322
18323 2005-09-05  Bruno Haible  <bruno@clisp.org>
18324
18325         * gnulib-tool (func_import): Fix comparison in handling of symbolic
18326         links.
18327
18328 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
18329
18330         * modules/size_max (Makefile.am): Add size_max.h
18331
18332 2005-09-04  Derek Price  <derek@ximbiot.com>
18333
18334         * gnulib-tool (func_import): Fix reversed $symbolic logic.
18335
18336 2005-09-03  Simon Josefsson  <jas@extundo.com>
18337
18338         * gnulib-tool: Fix typo.
18339
18340 2005-09-03  Simon Josefsson  <jas@extundo.com>
18341
18342         * config/srclist.txt: Add glibc bug 1293.
18343
18344 2005-09-03  Derek Price  <derek@ximbiot.com>
18345
18346         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
18347         From Larry Jones <lawrence.jones@ugs.com>.
18348
18349 2005-09-02  Simon Josefsson  <jas@extundo.com>
18350
18351         * modules/socklen: New file.
18352
18353 2005-09-02  Simon Josefsson  <jas@extundo.com>
18354
18355         * modules/havelib: New module.
18356
18357         * modules/gettext, modules/iconv, modules/lock, modules/readline:
18358         Use havelib.
18359
18360 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
18361
18362         Check for arithmetic overflow when calculating sizes, to prevent
18363         some buffer-overflow issues.  These patches are conservative, in the
18364         sense that when I couldn't determine whether an overflow was possible,
18365         I inserted a run-time check.
18366         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
18367         macros.
18368         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
18369         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
18370         (re_xnrealloc, re_x2nrealloc): New inline functions.
18371         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
18372         parse_bracket_exp):
18373         (build_equiv_class, build_charclass): Check for arithmetic overflow
18374         in size expression calculations.
18375         * lib/regex_internal.c (re_string_realloc_buffers):
18376         (build_wcs_upper_buffer, re_node_set_add_intersect):
18377         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
18378         (re_dfa_add_node, register_state): Likewise.
18379         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
18380         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
18381         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
18382         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
18383
18384 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
18385
18386         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
18387         m4/ulonglong.m4.  Problem reported by Martin Lambers.
18388
18389 2005-09-02  Bruno Haible  <bruno@clisp.org>
18390
18391         Support for lib vs. lib64 distinction on biarch platforms.
18392         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
18393         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
18394         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
18395
18396 2005-09-02  Bruno Haible  <bruno@clisp.org>
18397
18398         * gnulib-tool (import): In the other first-use case, provide defaults
18399         as well.
18400
18401 2005-09-02  Bruno Haible  <bruno@clisp.org>
18402
18403         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
18404         patches not yet found in the latest gettext release.
18405
18406 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
18407
18408         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
18409         to avoid a collision with bits/local_lim.h in glibc.
18410         All uses changed.  Problem reported by Dmitry V. Levin in
18411         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
18412
18413         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
18414         bugs in int versus size_t comparisons.
18415         (re_string_context_at): Fix bug where the code assumed that
18416         Idx is signed.
18417
18418         Use bool where appropriate.
18419         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
18420         All callers changed.
18421         (calc_eclosure_iter): Likewise, for ROOT arg.
18422         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
18423         (build_charclass_op): Likewise, for NON_MATCH arg.
18424         * lib/regex_internal.c (re_string_allocate, re_string_construct):
18425         (re_string_construct_common): Likewise, for ICASE arg.
18426         * lib/regexec.c (re_search_2_stub, re_search_stub):
18427         Likewise, for RET_LEN arg.
18428         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
18429         (set_regs): Likewise, for FL_BACKTRACK arg.
18430         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
18431         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
18432         (calc_eclosure_iter, parse_bracket_exp):
18433         Use bool for internal variables that are booleans.
18434         * lib/regexec.c (re_search_internal, check_matching,
18435         proceed_next_node):
18436         (set_regs, build_sifted_states, sift_states_bkref):
18437         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
18438         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
18439         (find_collation_sequence_value):
18440         Likewise.
18441         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
18442         (re_node_set_compare):
18443         Return bool, not int. All callers changed.
18444         * lib/regexec.c (check_halt_node_context, check_dst_limits):
18445         (build_trtable, check_node_accept): Likewise.
18446         * lib/regex_internal.h: Include stdbool.h.
18447
18448         Fix bugs uncovered when converting to bool.
18449         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
18450         failure instead of charging ahead blindly.
18451         * lib/regex_internal.c (register_state): Likewise.
18452         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
18453         for freeing internal storage.
18454         (group_nodes_into_DFA_states): Use unsigned int, not int, for
18455         bitset pieces used as boolean, to avoid undefined behavior
18456         on hosts that do int overflow checking.
18457
18458 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
18459
18460         * config/srclist.txt: Add glibc bugs 1285-1287.
18461
18462 2005-09-01  Jim Meyering  <jim@meyering.net>
18463
18464         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
18465         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
18466         Require gl_STAT_MACROS, too.
18467
18468 2005-09-01  Bruno Haible  <bruno@clisp.org>
18469
18470         * gnulib-tool (import): In the first-use case, provide defaults.
18471
18472 2005-09-01  Bruno Haible  <bruno@clisp.org>
18473
18474         * gnulib-tool (func_import): Remove the .tmp files.
18475
18476 2005-09-01  Bruno Haible  <bruno@clisp.org>
18477
18478         * gnulib-tool (func_import): Fix handling of symbolic links.
18479
18480 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
18481
18482         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
18483         old glibc regex code mishandles strings longer than 2**31 bytes.
18484         This patch fixes this when the regex code is used in gnulib
18485         (i.e., outside glibc).
18486
18487         This patch should not affect the use of the regex code inside
18488         glibc.  No doubt this problem also needs to be handled for glibc
18489         as well, but the result will be an incompatible change to the
18490         glibc ABI, and the old ABI will have to be supported too.  That
18491         can be the the subject for another patch.
18492
18493         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
18494         governing whether the rest of this patch is active.  By default,
18495         the macro is disabled and the patch has no effect.
18496         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
18497         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
18498         (struct re_pattern_buffer, re_search, re_search_2, re_match):
18499         (re_match_2, re_set_registers): Use the new types.
18500         * lib/regex_internal.h (Idx, re_hashval_t): New types.
18501         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
18502         New macros.
18503         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
18504         (re_string_context_at, bin_tree_t, re_dfastate_t):
18505         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
18506         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
18507         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
18508         (re_string_char_size_at, re_string_wchar_at):
18509         (re_string_elem_size_at):
18510         Use the new types and macros to port to 64-bit hosts.
18511         Use unsigned types for internal values, so that the code
18512         mostly works even for arrays larger than SSIZE_MAX.
18513         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
18514         (search_duplicated_node, calc_eclosure_iter, fetch_number):
18515         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
18516         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
18517         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
18518         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
18519         (calc_inveclosure, parse_dup_op, build_range_exp):
18520         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
18521         (fetch_number, create_token_tree, mark_opt_subexp):
18522         Likewise.
18523         * lib/regex_internal.c (re_string_construct_common,
18524         create_ci_newstate):
18525         (create_cd_newstate, re_string_allocate, re_string_construct):
18526         (re_string_realloc_buffers, build_wcs_upper_buffer):
18527         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
18528         (re_string_reconstruct, re_string_peek_byte_case):
18529         (re_string_fetch_byte_case, re_string_context_at):
18530         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
18531         (re_node_set_init_copy, re_node_set_add_intersect):
18532         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
18533         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
18534         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
18535         (re_acquire_state, re_acquire_state_context, register_state):
18536         Likewise.
18537         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
18538         search_cur_bkref_entry):
18539         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
18540         (re_search_internal, re_search_2_stub, re_search_stub)
18541         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
18542         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
18543         (update_cur_sifted_state, check_dst_limits):
18544         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
18545         (check_subexp_limits, sift_states_bkref, merge_state_array):
18546         (check_subexp_matching_top, get_subexp, get_subexp_sub):
18547         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
18548         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
18549         (expand_bkref_cache, check_node_accept_bytes):
18550         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
18551         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
18552         (acquire_init_state_context, check_halt_node_context):
18553         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
18554         (sift_states_backward, clean_state_log_if_needed):
18555         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
18556         (find_recover_state, transit_state_sb, transit_state_mb):
18557         (transit_state_bkref, build_trtable, match_ctx_clean):
18558         Likewise.
18559         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
18560         to work around an assumption that REG_MISSING is negative.
18561
18562         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
18563         (seek_collating_symbol_entry) [defined _LIBC]:
18564         (lookup_collation_sequence_value) [defined _LIBC]:
18565         (build_range_exp, build_collating_symbol) [defined _LIBC]:
18566         Use prototypes rather than old-style function definitions.
18567         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
18568         (transit_state_sb) [0]:
18569         (find_collation_sequence_value) [defined _LIBC]: Likewise.
18570
18571         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
18572         rm_eo.
18573
18574         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
18575         (optimize_subexps, lower_subexp):
18576         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
18577         since the signed shift might overflow.  Use 1u<<31 instead.
18578         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
18579         Likewise.
18580         * lib/regexec.c (check_dst_limits_calc_pos_1,
18581         check_subexp_matching_top): Likewise.
18582
18583         * lib/regcomp.c (optimize_subexps, lower_subexp):
18584         Use CHAR_BIT rather than 8, for clarity.
18585         * lib/regexec.c (check_dst_limits_calc_pos_1):
18586         (check_subexp_matching_top): Likewise.
18587         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
18588         have to worry about portability issues when shifting it left.
18589         Remove no-longer-needed test for table_size > 0.
18590         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
18591         in a word, as the resulting behavior is undefined.
18592         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
18593         in one case, a <= should have been an <, and in another case the
18594         whole test was missing.
18595         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
18596         the standard name CHAR_BIT.
18597         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
18598         this is not true on one's complement and signed-magnitude hosts.
18599
18600         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
18601         next_last_offset.
18602         (struct re_dfa_t): Remove unused member states_alloc.
18603         * lib/regcomp.c (init_dfa): Don't initialize unused members.
18604
18605 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
18606
18607         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
18608         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
18609         and large-file glibc and in 32-bit large-file Solaris.
18610
18611 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
18612
18613         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
18614         lengths fit in regoff_t; this isn't true if regoff_t is the same
18615         width as size_t.
18616         * lib/regex.c (re_search_internal): 5th arg is LAST_START
18617         (= START + RANGE) instead of RANGE.  This avoids overflow
18618         problems when regoff_t is the same width as size_t.
18619         All callers changed.
18620         (re_search_2_stub): Check for overflow when adding the
18621         sizes of the two strings.
18622         (re_search_stub): Check for overflow when adding START
18623         to RANGE; if it occurs, substitute the extreme value.
18624
18625 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
18626
18627         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
18628
18629 2005-08-31  Jim Meyering  <jim@meyering.net>
18630
18631         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
18632         a pointer-to-const.
18633         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
18634         (register_state): Likewise.
18635         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
18636         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
18637         (group_nodes_into_DFAstates): Likewise.
18638
18639 2005-08-31  Jim Meyering  <jim@meyering.net>
18640
18641         * check-module: Add a FIXME comment.
18642
18643 2005-08-31  Eric Blake  <ebb9@byu.net>
18644
18645         * modules/unistd-safer (Files): Add unistd--.h.
18646         * modules/stdio-safer (Files): Add stdio--.h.
18647
18648 2005-08-31  Derek Price  <derek@ximbiot.com>
18649
18650         * lib/getdelim.c (getdelim): Return EOF on EOF.
18651         Reported by Larry Jones <lawrence.jones@ugs.com>.
18652
18653 2005-08-31  Bruno Haible  <bruno@clisp.org>
18654
18655         Avoid unnecessary diffs in the generated lib/Makefile.am.
18656         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
18657         the generated files.
18658         (func_import): Don't set cmd.
18659
18660 2005-08-31  Bruno Haible  <bruno@clisp.org>
18661
18662         * lib/strstr.c: Include <stddef.h>, for NULL.
18663         * lib/strcasestr.c: Likewise.
18664         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
18665
18666 2005-08-31  Bruno Haible  <bruno@clisp.org>
18667
18668         * gnulib-tool: New option --macro-prefix.
18669         (func_import): Use macro_prefix.
18670         (import): Handle option --macro-prefix.
18671
18672 2005-08-31  Bruno Haible  <bruno@clisp.org>
18673
18674         * gnulib-tool (import): Rename most ac_* variables to cached_*.
18675         Also use new variables cached_lgpl, cached_libtool.
18676
18677 2005-08-31  Bruno Haible  <bruno@clisp.org>
18678
18679         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
18680         always instantiating them.
18681
18682 2005-08-31  Bruno Haible  <bruno@clisp.org>
18683
18684         * gnulib-tool (func_import): Read the previous cached settings
18685         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
18686         earlier added by gnulib but are now dropped. Warn when a gnulib file
18687         overwrites a non-gnulib file.
18688
18689 2005-08-31  Bruno Haible  <bruno@clisp.org>
18690
18691         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
18692         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
18693         projects that don't keep autogenerated files in CVS. Put into
18694         actioncmd only the specified modules, not the transitive closure.
18695
18696 2005-08-31  Bruno Haible  <bruno@clisp.org>
18697
18698         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
18699         Create directories that shall be filled.
18700         (import): Don't look for gl_* macros in configure.ac. Recurse across
18701         all directories containing a gnulib-cache.m4 files, if meaningful.
18702
18703 2005-08-31  Bruno Haible  <bruno@clisp.org>
18704
18705         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
18706         (import): Set seen_libtool when we see gl_LIBTOOL.
18707
18708 2005-08-31  Bruno Haible  <bruno@clisp.org>
18709
18710         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
18711         declaration macro definitions from generated gnulib.m4.
18712
18713 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
18714
18715         * lib/iconvme.h: Add prototype for iconv_alloc.
18716
18717 2005-08-29  Simon Josefsson  <jas@extundo.com>
18718
18719         * lib/iconvme.c: Fix errno.
18720
18721 2005-08-29  Bruno Haible  <bruno@clisp.org>
18722
18723         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
18724         that it works when the directory contains spaces.
18725
18726 2005-08-29  Bruno Haible  <bruno@clisp.org>
18727
18728         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
18729
18730 2005-08-29  Bruno Haible  <bruno@clisp.org>
18731
18732         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
18733         Emit more advice.
18734
18735 2005-08-29  Bruno Haible  <bruno@clisp.org>
18736         and Stepan Kasal  <kasal@ucw.cz>
18737
18738         * check-module: If more parameters are given, check each of them
18739         separately; add more exceptions, as noted by Jim Meyering.
18740         (check_module): New procedure.
18741         (%exempt_header): Now contains all exceptions.
18742
18743 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
18744
18745         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
18746
18747 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
18748
18749         * lib/iconvme.c: Split iconv_string into iconv_alloc.
18750
18751 2005-08-28  Bruno Haible  <bruno@clisp.org>
18752
18753         * m4/gnulib-tool.m4: New file.
18754
18755 2005-08-27  Jim Meyering  <jim@meyering.net>
18756
18757         * modules/unistd-safer (Files): Add pipe-safer.c.
18758         * modules/fcntl-safer (Files): Add creat-safer.c.
18759
18760 2005-08-27  Jim Meyering  <jim@meyering.net>
18761
18762         * m4/stdlib-safer.m4: New file.  From coreutils.
18763         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
18764         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
18765         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
18766         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
18767         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
18768
18769 2005-08-27  Jim Meyering  <jim@meyering.net>
18770
18771         * lib/fopen-safer.c: Merge minor changes from coreutils.
18772         * lib/dup-safer.c: Likewise.
18773         * lib/fd-safer.c: Likewise.
18774
18775         Merge from coreutils.
18776         * lib/stdio--.h: New file.
18777         * lib/stdlib--.h: New file.
18778         * lib/mkstemp-safer.c: New file.
18779
18780         GNU tar needs these.
18781         * lib/pipe-safer.c: New file.
18782         * lib/creat-safer.c: New file.
18783         * lib/fcntl--.h (creat): Define to creat_safer.
18784         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
18785         * lib/unistd--.h (pipe): Define to pipe_safer.
18786         * lib/unistd-safer.h: Declare pipe_safer.
18787
18788 2005-08-26  Simon Josefsson  <jas@extundo.com>
18789
18790         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
18791         Haible <bruno@clisp.org>.
18792
18793 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
18794
18795         * lib/regex_internal.h: Remove all references to
18796         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
18797         or better.
18798         (bitset_not, bitset_merge, bitset_not_merge):
18799         (bitset_mask, re_string_allocate, re_string_construct):
18800         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
18801         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
18802         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
18803         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
18804         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
18805         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
18806         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
18807         (re_acquire_state_context):
18808         Remove unnecessary forward decls.
18809         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
18810         Put __attribute at function definition,
18811         now that the function decl has been removed.
18812         * lib/regex_internal.c (re_string_peek_byte_case):
18813         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
18814         Likewise.
18815
18816 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
18817
18818         * m4/regex.m4: Add AC_PREREQ(2.50).
18819         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
18820
18821 2005-08-25  Simon Josefsson  <jas@extundo.com>
18822
18823         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
18824         __fsetlocking.
18825
18826 2005-08-25  Simon Josefsson  <jas@extundo.com>
18827
18828         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
18829         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
18830         GLIBC specific code.
18831
18832 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
18833
18834         Make regex safe for g++.  This fixes one real bug (an "err"
18835         that should have been "*err").  g++ problem reported by
18836         Sam Steingold.
18837         * lib/regex_internal.h (re_calloc): New macro, consistent with
18838         re_malloc etc.  All callers of calloc changed to use re_calloc.
18839         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
18840         not int.  All callers changed.
18841         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
18842         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
18843         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
18844         (find_recover_state): Change "err" to "*err"; this fixes what
18845         appears to be a real bug.
18846         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
18847         versus int.
18848
18849 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
18850
18851         * modules/regex (Depends-on): Add malloc, since the code
18852         assumes that !malloc(0) means failure.
18853
18854 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
18855
18856         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
18857
18858         alloca modernization/simplification for regex.
18859         * lib/regex.c: Remove portability cruft for alloca.  This no longer
18860         needs to be at the start of the file, and can be moved into
18861         regex_internal.h and simplified.
18862         * lib/regex_internal.h: Include <alloca.h>.
18863         (__libc_use_alloca) [!defined _LIBC]: New macro.
18864         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
18865         now works outside glibc.
18866
18867 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
18868
18869         * config/srclist.txt: Add glibc bugs 1241, 1245.
18870
18871 2005-08-25  Jim Meyering  <jim@meyering.net>
18872
18873         * lib/open-safer.c: Include <config.h>.
18874         Otherwise, we'd lose LARGEFILE support in any file using
18875         e.g. "fcntl--.h"
18876
18877 2005-08-25  Bruno Haible  <bruno@clisp.org>
18878
18879         * m4/minmax.m4: Require autoconf 2.52.
18880         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
18881         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
18882         alternatives of translit over the alphabet.
18883         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
18884
18885 2005-08-24  Simon Josefsson  <jas@extundo.com>
18886
18887         * tests/test-getpass.c: New file.
18888
18889 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
18890
18891         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
18892         for GNU regex features.
18893
18894 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
18895
18896         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
18897         * lib/regex.h (regerror): Likewise.
18898
18899         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
18900         requires this.  (The code never needed it.)
18901
18902         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
18903         All uses of recently-renamed identifiers changed to use the new,
18904         POSIX-compliant names.  The code will build and run just fine
18905         without these changes, but it's better to eat our own dog food
18906         and use the standard-conforming names.
18907
18908         * lib/regex.h: Fix a multitude of POSIX name space violations.
18909         These changes have an effect only for programs that define
18910         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
18911         do not change anything for programs compiled in the normal way.
18912         Also, there is no effect on the ABI.
18913
18914         (_REGEX_SOURCE): New macro.
18915         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
18916         defined and _GNU_SOURCE is not; this fixes a name space violation.
18917
18918         Rename the following macros to obey POSIX requirements.
18919         The old names are still visible as macros if _REGEX_SOURCE is defined.
18920         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
18921         RE_BACKSLASH_ESCAPE_IN_LISTS.
18922         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
18923         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
18924         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
18925         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
18926         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
18927         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
18928         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
18929         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
18930         (REG_INTERVALS): renamed from RE_INTERVALS.
18931         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
18932         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
18933         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
18934         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
18935         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
18936         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
18937         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
18938         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
18939         RE_UNMATCHED_RIGHT_PAREN_ORD.
18940         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
18941         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
18942         (REG_DEBUG): renamed from RE_DEBUG.
18943         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
18944         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
18945         unusual, since we can't clash with the POSIX REG_ICASE.
18946         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
18947         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
18948         (REG_NO_SUB): renamed from RE_NO_SUB.
18949         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
18950         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
18951         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
18952         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
18953         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
18954         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
18955         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
18956         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
18957         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
18958         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
18959         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
18960         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
18961         RE_SYNTAX_POSIX_MINIMAL_BASIC.
18962         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
18963         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
18964         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
18965         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
18966         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
18967         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
18968         (REG_FIXED): Renamed from REGS_FIXED.
18969         (REG_NREGS): Renamed from RE_NREGS.
18970
18971         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
18972         of other REG_* macros, since POSIX says the user is allowed to
18973         #undef these macros selectively.
18974
18975         (reg_errcode_t): Update comment stating what other tables need
18976         to be consistent.
18977
18978         Rename the following enum values to obey POSIX requirements.
18979         The old names are still visible as macros.
18980         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
18981         is not defined, since GNU is supposed to be a superset of POSIX as
18982         much as possible, and since we want reg_errcode_t to be a signed
18983         type for implementation consistency.
18984         (_REG_NOERROR): Renamed from REG_NOERROR.
18985         (_REG_NOMATCH): Renamed from REG_NOMATCH.
18986         (_REG_BADPAT): Renamed from REG_BADPAT.
18987         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
18988         (_REG_ECTYPE): Renamed from REG_ECTYPE.
18989         (_REG_EESCAPE): Renamed from REG_EESCAPE.
18990         (_REG_ESUBREG): Renamed from REG_ESUBREG.
18991         (_REG_EBRACK): Renamed from REG_EBRACK.
18992         (_REG_EPAREN): Renamed from REG_EPAREN.
18993         (_REG_EBRACE): Renamed from REG_EBRACE.
18994         (_REG_BADBR): Renamed from REG_BADBR.
18995         (_REG_ERANGE): Renamed from REG_ERANGE.
18996         (_REG_ESPACE): Renamed from REG_ESPACE.
18997         (_REG_BADRPT): Renamed from REG_BADRPT.
18998         (_REG_EEND): Renamed from REG_EEND.
18999         (_REG_ESIZE): Renamed from REG_ESIZE.
19000         (_REG_ERPAREN): Renamed from REG_ERPAREN.
19001         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
19002         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
19003         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
19004         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
19005
19006         (_REG_RE_NAME, _REG_RM_NAME): New macros.
19007         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
19008         changed.  But support the old name if the new one is not defined
19009         and if _REGEX_SOURCE.
19010
19011         Change the following member names in struct re_pattern_buffer.
19012         The old names are still supported if !_REGEX_SOURCE.
19013         The new names are always supported, regardless of _REGEX_SOURCE.
19014         (re_buffer): Renamed from buffer.
19015         (re_allocated): Renamed from allocated.
19016         (re_used): Renamed from used.
19017         (re_syntax): Renamed from syntax.
19018         (re_fastmap): Renamed from fastmap.
19019         (re_translate): Renamed from translate.
19020         (re_can_be_null): Renamed from can_be_null.
19021         (re_regs_allocated): Renamed from regs_allocated.
19022         (re_fastmap_accurate): Renamed from fastmap_accurate.
19023         (re_no_sub): Renamed from no_sub.
19024         (re_not_bol): Renamed from not_bol.
19025         (re_not_eol): Renamed from not_eol.
19026         (re_newline_anchor): Renamed from newline_anchor.
19027
19028         Change the following member names in struct re_registers.
19029         The old names are still supported if !_REGEX_SOURCE.
19030         The new names are always supported, regardless of _REGEX_SOURCE.
19031         (rm_num_regs): Renamed from num_regs.
19032         (rm_start): Renamed from start.
19033         (rm_end): Renamed from end.
19034
19035         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
19036         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
19037         Prepend __ to parameter names.
19038
19039         Undo yesterday's changes.
19040
19041 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
19042
19043         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
19044         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
19045         lib/regex.c.
19046
19047 2005-08-24  Jim Meyering  <jim@meyering.net>
19048
19049         Sync from coreutils.
19050         * m4/fcntl-safer.m4: New file.
19051
19052         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
19053         and object files for this module.
19054
19055 2005-08-24  Jim Meyering  <jim@meyering.net>
19056
19057         Sync from coreutils.
19058         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
19059
19060 2005-08-24  Jim Meyering  <jim@meyering.net>
19061
19062         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
19063         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
19064
19065 2005-08-24  Jim Meyering  <jim@meyering.net>
19066
19067         * modules/fcntl-safer: New module.
19068         * modules/fts (Depends-on): Add fcntl-safer.
19069         * MODULES.html.sh (File descriptor based Input/Output):
19070         Add fcntl-safer.
19071
19072 2005-08-24  Bruno Haible  <bruno@clisp.org>
19073
19074         Support for unit test modules.
19075         * modules/README: Mention tests modules.
19076         * modules/TEMPLATE-TESTS: New file.
19077         * gnulib-tool: New options --extract-tests-module, --with-tests and
19078         --tests-base (unused for the moment).
19079         (testsbase, inctests): New variables.
19080         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
19081         (func_verify_module): Exclude TEMPLATE-TESTS.
19082         (func_verify_nontests_module, func_verify_tests_module): New functions.
19083         (func_get_dependencies): Add implicit dependency for tests modules.
19084         (func_get_tests_module): New function.
19085         (func_modules_transitive_closure): When --with-tests was specified,
19086         include the unit tests as well, unless explicitly avoided.
19087         (func_emit_lib_Makefile_am): Ignore the tests modules here.
19088         (func_emit_tests_Makefile_am): New function.
19089         (func_create_testdir): When --with-tests was specified, emit a
19090         tests/ directory.
19091         * MODULES.html.sh (Future developments): Update.
19092
19093 2005-08-24  Bruno Haible  <bruno@clisp.org>
19094
19095         * modules/tls-tests: New file.
19096         * tests/test-tls.c: New file, from GNU gettext.
19097
19098 2005-08-24  Bruno Haible  <bruno@clisp.org>
19099
19100         * modules/lock-tests: New file.
19101         * tests/test-lock.c: New file, from GNU gettext.
19102
19103 2005-08-24  Bruno Haible  <bruno@clisp.org>
19104
19105         * lib/lock.h: Add multiple inclusion guard.
19106         * lib/tls.h: Add multiple inclusion guard.
19107
19108 2005-08-24  Bruno Haible  <bruno@clisp.org>
19109
19110         * gnulib-tool: Add support for the --aux-dir option to
19111         --create-testdir, --create-megatestdir, --test, --megatest.
19112         (func_create_testdir, func_create_megatestdir): Optionally emit a
19113         AC_CONFIG_AUX_DIR directive.
19114         (create-testdir, create-megatestdir, test, megatest): Provide a
19115         default value for $auxdir.
19116
19117 2005-08-24  Bruno Haible  <bruno@clisp.org>
19118
19119         * gnulib-tool (import): Use compound statement instead of subshell
19120         where possible.
19121
19122 2005-08-24  Bruno Haible  <bruno@clisp.org>
19123
19124         * gnulib-tool (import): Change --aux-dir default to "build-aux".
19125
19126 2005-08-24  Bruno Haible  <bruno@clisp.org>
19127
19128         * gnulib-tool (func_version): Update.
19129
19130 2005-08-24  Bruno Haible  <bruno@clisp.org>
19131
19132         * gnulib-tool (func_import, func_create_testdir,
19133         func_create_megatestdir): Quote all autoconf macro arguments.
19134
19135 2005-08-24  Bruno Haible  <bruno@clisp.org>
19136
19137         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
19138         option --force, because --force causes the aclocal.m4 of each
19139         subdirectory to be newer than the corresponding config.h.in.
19140
19141 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
19142
19143         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
19144         All contents moved to gl_REGEX.
19145         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
19146         assume that it does.
19147
19148 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
19149
19150         * lib/regex.h (REG_NOSYS)
19151         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
19152         Define, since POSIX requires it as of 2001.
19153         (_REG_ENOSYS)
19154         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
19155         New private symbol, used to keep the enum signed in all cases.
19156         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
19157         Youngman in
19158         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
19159
19160         * lib/regex_internal.c (re_string_skip_chars, register_state):
19161         (calc_state_hash):
19162         Remove forward decls; no longer needed now that we use prototypes.
19163         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
19164         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
19165         (clean_state_log_if_needed): Likewise.
19166
19167 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
19168
19169         * config/srclist.txt: Add glibc bugs 1231-1233.
19170
19171 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
19172
19173         Fix problems reported by Sam Steingold in
19174         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
19175         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
19176         assumed that reg_errcode_t is a signed type, which is not
19177         necessarily true if _XOPEN_SOURCE is not defined.
19178         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
19179         since some compilers warn about it otherwise.
19180
19181 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
19182
19183         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
19184         (init_word_char, create_initial_state, duplicate_node_closure):
19185         (fetch_token, peek_token_bracket, build_range_exp):
19186         (build_collating_symbol): Remove forward decls; no longer needed
19187         now that we use prototypes.
19188
19189         * lib/regcomp.c:
19190         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
19191         (re_compile_fastmap_iter, regcomp, regerror, regfree):
19192         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
19193         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
19194         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
19195         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
19196         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
19197         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
19198         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
19199         (build_range_exp, build_collating_symbol, parse_bracket_exp):
19200         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
19201         (build_charclass, build_charclass_op, fetch_number, create_tree):
19202         (create_token_tree, mark_opt_subexp, duplicate_tree):
19203         Use prototypes rather than old-style definitions.
19204
19205         * lib/regex_internal.c:
19206         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
19207         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
19208         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
19209         (re_string_reconstruct, re_string_peek_byte_case):
19210         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
19211         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
19212         (re_node_set_init_copy, re_node_set_add_intersect):
19213         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
19214         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
19215         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
19216         (re_acquire_state, re_acquire_state_context, register_state):
19217         (create_ci_newstate, create_cd_newstate, free_state):
19218         Likewise.
19219         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
19220         re_search_2):
19221         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
19222         (re_search_internal, prune_impossible_nodes):
19223         (acquire_init_state_context, check_matching, static):
19224         (check_halt_node_context, check_halt_state_context, proceed_next_node):
19225         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
19226         (update_regs, sift_states_backward, build_sifted_states):
19227         (clean_state_log_if_needed, merge_state_array):
19228         (update_cur_sifted_state, add_epsilon_src_nodes):
19229         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
19230         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
19231         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
19232         (find_recover_state, check_subexp_matching_top, transit_state_mb):
19233         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
19234         (check_arrival, check_arrival_add_next_nodes):
19235         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
19236         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
19237         (check_node_accept_bytes, check_node_accept, extend_buffers):
19238         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
19239         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
19240         (sift_ctx_init):
19241         Likewise.
19242
19243         * lib/regex_internal.h:
19244         (re_string_allocate, re_string_construct, re_string_reconstruct):
19245         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
19246         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
19247         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
19248         (re_string_context_at, re_string_peek_byte_case):
19249         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
19250         is defined, since we now use prototypes always.
19251
19252         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
19253         C89 or better.  All uses removed.
19254
19255 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
19256
19257         * config/srclist.txt: Add glibc bugs 1220-1227.
19258
19259 2005-08-20  Jim Meyering  <jim@meyering.net>
19260
19261         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
19262         of unused local, dfa.
19263
19264 2005-08-20  Bruno Haible  <bruno@clisp.org>
19265
19266         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
19267
19268 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
19269
19270         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
19271         (re_node_set_insert_last, re_dfa_add_node):
19272         Rename local variables to avoid GCC shadowing warnings.
19273
19274 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
19275
19276         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
19277         [defined lint]: Suppress bogus uninitialized-variable warnings.
19278
19279         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
19280         and let the caller return REG_ESPACE if out of space.  This
19281         removes an uninitialied-variable warning with GCC 4.0.1, and also
19282         avoids taking the address of a local variable.  All callers
19283         changed.
19284
19285 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
19286
19287         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
19288         $LIBCSRC/posix/regexec.c.
19289         Add glibc bug 1217 for regcomp.c.
19290
19291 2005-08-19  Jim Meyering  <jim@meyering.net>
19292
19293         * lib/regexec.c (proceed_next_node): Redo local variables to
19294         avoid GCC shadowing warnings.
19295
19296 2005-08-18  Bruno Haible  <bruno@clisp.org>
19297
19298         * lib/strstr.c (strstr): Fix return value in multibyte case.
19299         * lib/strcasestr.c (strcasestr): Likewise.
19300
19301 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
19302
19303         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
19304
19305 2005-08-17  Jim Meyering  <jim@meyering.net>
19306
19307         Make the %s format (seconds since the epoch) work for a negative
19308         number and when used with a zero-padded field width, e.g. %015s.
19309
19310         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
19311         label so that it precedes the code to set `digits'.  Otherwise,
19312         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
19313         print `00-22'.  Now, it prints `-0022', as it should.
19314
19315 2005-08-17  Bruno Haible  <bruno@clisp.org>
19316
19317         * modules/strstr (Files): Add m4/mbrtowc.m4.
19318         (Depends-on): Add mbuiter.
19319
19320 2005-08-17  Bruno Haible  <bruno@clisp.org>
19321
19322         * modules/strcasestr: New file.
19323         * MODULES.html.sh (String handling, based on ANSI C 89): Add
19324         strcasestr.
19325
19326 2005-08-17  Bruno Haible  <bruno@clisp.org>
19327
19328         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
19329
19330 2005-08-17  Bruno Haible  <bruno@clisp.org>
19331
19332         * modules/mbuiter: New file.
19333         * MODULES.html.sh (Extended multibyte and wide character utilities):
19334         Add mbuiter.
19335
19336 2005-08-17  Bruno Haible  <bruno@clisp.org>
19337
19338         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
19339         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
19340
19341 2005-08-17  Bruno Haible  <bruno@clisp.org>
19342
19343         * m4/strcasestr.m4: New file.
19344
19345 2005-08-17  Bruno Haible  <bruno@clisp.org>
19346
19347         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
19348         * lib/strstr.c: Completely rewritten, with multibyte locale support.
19349
19350 2005-08-17  Bruno Haible  <bruno@clisp.org>
19351
19352         * lib/strcasestr.h: New file.
19353         * lib/strcasestr.c: New file.
19354
19355 2005-08-17  Bruno Haible  <bruno@clisp.org>
19356
19357         * lib/strcasecmp.c: Use mbuiter.h.
19358
19359 2005-08-17  Bruno Haible  <bruno@clisp.org>
19360
19361         * lib/mbuiter.h: New file.
19362
19363 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
19364
19365         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
19366         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
19367         and gl_GETOPT are both invoked via different paths (as happens
19368         with GNU tar CVS because it uses both argp and getopt), the former
19369         wins.
19370
19371 2005-08-16  Bruno Haible  <bruno@clisp.org>
19372
19373         * modules/tls: New file.
19374         * MODULES.html.sh (Multithreading): Add tls.
19375
19376 2005-08-16  Bruno Haible  <bruno@clisp.org>
19377
19378         * modules/strnlen1: New file.
19379         * MODULES.html.sh (String handling): Add strnlen1.
19380
19381 2005-08-16  Bruno Haible  <bruno@clisp.org>
19382
19383         * modules/strcase (Files): Add m4/mbrtowc.m4.
19384         (Depends-on): Add strnlen1, mbchar.
19385
19386 2005-08-16  Bruno Haible  <bruno@clisp.org>
19387
19388         * modules/mbiter: New file.
19389         * MODULES.html.sh (Extended multibyte and wide character utilities):
19390         Add mbiter.
19391
19392 2005-08-16  Bruno Haible  <bruno@clisp.org>
19393
19394         * modules/mbfile: New file.
19395         * MODULES.html.sh (Extended multibyte and wide character utilities):
19396         Add mbfile.
19397
19398 2005-08-16  Bruno Haible  <bruno@clisp.org>
19399
19400         * modules/mbchar: New file.
19401         * MODULES.html.sh (Extended multibyte and wide character utilities):
19402         New section.
19403
19404 2005-08-16  Bruno Haible  <bruno@clisp.org>
19405
19406         * m4/tls.m4: New file, from GNU gettext.
19407
19408 2005-08-16  Bruno Haible  <bruno@clisp.org>
19409
19410         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
19411         always.
19412         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
19413
19414 2005-08-16  Bruno Haible  <bruno@clisp.org>
19415
19416         * m4/mbiter.m4: New file.
19417
19418 2005-08-16  Bruno Haible  <bruno@clisp.org>
19419
19420         * m4/mbfile.m4: New file.
19421
19422 2005-08-16  Bruno Haible  <bruno@clisp.org>
19423
19424         * m4/mbchar.m4: New file.
19425
19426 2005-08-16  Bruno Haible  <bruno@clisp.org>
19427
19428         * lib/tls.h: New file, from GNU gettext.
19429         * lib/tls.c: New file, from GNU gettext.
19430
19431 2005-08-16  Bruno Haible  <bruno@clisp.org>
19432
19433         * lib/strnlen1.h: New file.
19434         * lib/strnlen1.c: New file.
19435
19436 2005-08-16  Bruno Haible  <bruno@clisp.org>
19437
19438         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
19439         (mbi_init): Update.
19440         (mbi_avail, mbi_advance): Let the iteration end before the terminating
19441         NUL byte, not after it.
19442
19443 2005-08-16  Bruno Haible  <bruno@clisp.org>
19444
19445         * lib/strcase.h (strcasecmp): Add note in comments.
19446         * lib/strncasecmp.c: Use code from strcasecmp.c.
19447         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
19448         (strcasecmp): Work correctly in multibyte locales.
19449
19450 2005-08-16  Bruno Haible  <bruno@clisp.org>
19451
19452         * lib/mbiter.h: New file.
19453
19454 2005-08-16  Bruno Haible  <bruno@clisp.org>
19455
19456         * lib/mbfile.h: New file.
19457
19458 2005-08-16  Bruno Haible  <bruno@clisp.org>
19459
19460         * lib/mbchar.h: New file.
19461         * lib/mbchar.c: New file.
19462
19463 2005-08-16  Bruno Haible  <bruno@clisp.org>
19464
19465         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
19466         the valid ones. Makes the comparison operations transitive:
19467         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
19468         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
19469
19470 2005-08-15  Simon Josefsson  <jas@extundo.com>
19471
19472         * modules/ssize_t (License): Change to 'unlimited'.
19473
19474         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
19475
19476 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
19477
19478         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
19479         Add comments for each pending glibc patch.
19480
19481 2005-08-15  Bruno Haible  <bruno@clisp.org>
19482
19483         * lib/regex.h (__restrict_arr): Don't define to __restrict if
19484         __cplusplus is defined.
19485
19486 2005-08-14  Jim Meyering  <jim@meyering.net>
19487
19488         Sync from coreutils.
19489
19490         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
19491         Use the hash-table-based cycle-detection code not just when
19492         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
19493         Reported by James Youngman in
19494         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
19495         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
19496         FTS_TIGHT_CYCLE_CHECK.
19497         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
19498         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
19499         once again.
19500         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
19501         * lib/fts.c (fd_safer): Remove decl.
19502         Include fcntl--.h rather than unistd-safer.h
19503         (fts_safe_changedir): Don't call fd_safer; no longer needed
19504         now that we include fcntl--.h.
19505
19506 2005-08-12  Simon Josefsson  <jas@extundo.com>
19507
19508         * modules/getndelim2: Use ssize_t module.
19509         * modules/getnline: Likewise.
19510         * modules/safe-read: Likewise.
19511         * modules/xreadlink: Likewise.
19512
19513         * modules/ssize_t: New file.
19514
19515 2005-08-12  Simon Josefsson  <jas@extundo.com>
19516
19517         * m4/readline.m4: Look for termcap, curses or ncurses if required.
19518
19519 2005-08-12  Simon Josefsson  <jas@extundo.com>
19520
19521         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
19522         ssize_t.
19523
19524 2005-08-12  Simon Josefsson  <jas@extundo.com>
19525
19526         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
19527         readline, getdelim and check_version.
19528         (Support for systems lacking ISO C 99: Sizes of integer types):
19529         Add size_max.
19530
19531 2005-08-12  Bruno Haible  <bruno@clisp.org>
19532
19533         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
19534
19535 2005-08-11  Simon Josefsson  <jas@extundo.com>
19536
19537         * modules/readline: New file.
19538
19539         * modules/strnlen (Files): Add strnlen.h.
19540
19541 2005-08-11  Simon Josefsson  <jas@extundo.com>
19542
19543         * m4/readline.m4: New file.
19544
19545 2005-08-11  Simon Josefsson  <jas@extundo.com>
19546
19547         * lib/readline.h, readline.c: New file.
19548
19549 2005-08-11  Simon Josefsson  <jas@extundo.com>
19550
19551         * doc/gnulib.texi (Initial import, Finishing touches): Mention
19552         gl_AVOID.
19553
19554 2005-08-11  Bruno Haible  <bruno@clisp.org>
19555
19556         * lib/strnlen.h (strnlen): Change parameter name to match comment.
19557
19558 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
19559
19560         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
19561
19562 2005-08-10  Simon Josefsson  <jas@extundo.com>
19563
19564         * tests/test-iconvme.c: New file.
19565
19566 2005-08-10  Simon Josefsson  <jas@extundo.com>
19567
19568         * m4/strnlen.m4: New file.
19569
19570         * m4/strndup.m4: Don't check for strnlen declaration, done in
19571         strnlen.m4.
19572
19573 2005-08-10  Simon Josefsson  <jas@extundo.com>
19574
19575         * lib/strndup.c: Use strnlen.h.
19576
19577         * lib/strnlen.h: New file.
19578
19579 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
19580
19581         * README: Typos.
19582
19583 2005-08-02  Simon Josefsson  <jas@extundo.com>
19584
19585         * modules/readline: New file.
19586
19587 2005-08-02  Simon Josefsson  <jas@extundo.com>
19588
19589         * modules/getdelim: New file.
19590
19591         * modules/getline: Rewrite, don't use getndelim2.
19592
19593 2005-08-02  Simon Josefsson  <jas@extundo.com>
19594
19595         * m4/getline.m4: Separate out getdelim stuff into separate module.
19596
19597         * m4/getdelim.m4: New file.
19598
19599 2005-08-02  Simon Josefsson  <jas@extundo.com>
19600
19601         * lib/getline.h, getline.c: Rewrite.
19602
19603         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
19604
19605 2005-07-31  Bruno Haible  <bruno@clisp.org>
19606
19607         * lib/lock.h (gl_lock_initializer): New macro.
19608         (gl_lock_define_initialized): Use it.
19609         (gl_rwlock_initializer): New macro.
19610         (gl_rwlock_define_initialized): Use it.
19611         (gl_recursive_lock_initializer): New macro.
19612         (gl_recursive_lock_define_initialized): Use it.
19613
19614 2005-07-30  Karl Berry  <karl@gnu.org>
19615
19616         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
19617         Report from Ben Pfaff, regarding getopt.
19618
19619 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
19620
19621         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
19622         normal way.
19623         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
19624         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
19625         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
19626         (gl_GETOPT): Use the new macros.  Most of the implementation
19627         is moved to the new macros.  This is for programs like Emacs
19628         that don't want all the functionality of gl_GETOPT.
19629
19630 2005-07-26  Bruno Haible  <bruno@clisp.org>
19631
19632         * m4/lock.m4: Update from GNU gettext.
19633
19634 2005-07-26  Bruno Haible  <bruno@clisp.org>
19635
19636         * lib/lock.h: Update from GNU gettext.
19637         * lib/lock.c: Update from GNU gettext.
19638
19639 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
19640
19641         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
19642         obsolescent AC_TRY_RUN.  Include the default includes files, for
19643         'exit'.
19644
19645 2005-07-24  Bruno Haible  <bruno@clisp.org>
19646
19647         * modules/visibility: New file.
19648         * MODULES.html.sh (Misc): Add visibility.
19649
19650 2005-07-24  Bruno Haible  <bruno@clisp.org>
19651
19652         * m4/visibility.m4: New file.
19653
19654 2005-07-24  Bruno Haible  <bruno@clisp.org>
19655
19656         * doc/visibility.texi: New file.
19657
19658 2005-07-22  Bruno Haible  <bruno@clisp.org>
19659
19660         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
19661         $(ALLOCA_H), redundant through BUILT_SOURCES.
19662         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
19663         redundant through BUILT_SOURCES.
19664         * modules/byteswap (Makefile.am): Remove explicit dependency on
19665         $(BYTESWAP_H), redundant through BUILT_SOURCES.
19666         * modules/fnmatch (Makefile.am): Remove explicit dependency on
19667         $(FNMATCH_H), redundant through BUILT_SOURCES.
19668         * modules/getopt (Makefile.am): Remove explicit dependency on
19669         $(GETOPT_H), redundant through BUILT_SOURCES.
19670         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
19671         redundant through BUILT_SOURCES.
19672         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
19673         redundant through BUILT_SOURCES.
19674         * modules/stdbool (Makefile.am): Remove explicit dependency on
19675         $(STDBOOL_H), redundant through BUILT_SOURCES.
19676         * modules/stdint (Makefile.am): Remove explicit dependency on
19677         $(STDINT_H), redundant through BUILT_SOURCES.
19678         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
19679         Remove explicit dependency on $(SYSEXITS_H).
19680         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
19681
19682 2005-07-18  Simon Josefsson  <jas@extundo.com>
19683
19684         * lib/check-version.c (check_version): Accept identical versions too.
19685
19686 2005-07-18  Bruno Haible  <bruno@clisp.org>
19687
19688         * modules/lock: New file.
19689         * MODULES.html.sh (Multithreading): New section.
19690
19691 2005-07-18  Bruno Haible  <bruno@clisp.org>
19692
19693         * m4/lock.m4: New file, from GNU gettext.
19694
19695 2005-07-18  Bruno Haible  <bruno@clisp.org>
19696
19697         * lib/lock.h: New file, from GNU gettext.
19698         * lib/lock.c: New file, from GNU gettext.
19699
19700 2005-07-18  Bruno Haible  <bruno@clisp.org>
19701
19702         * lib/lock.h (gl_once_t): New type.
19703         (gl_once_define, gl_once): New macros.
19704         * lib/lock.c (fresh_once): New variable.
19705         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
19706         functions.
19707
19708 2005-07-16  Simon Josefsson  <jas@extundo.com>
19709
19710         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
19711         workaround, suggested by Bruno.
19712
19713 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
19714
19715         * modules/xalloc (Depends-on): Add xalloc-die.
19716         * modules/xvasprintf (Depends-on): Add xalloc-die.
19717
19718 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
19719
19720         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
19721         with a minor change.
19722
19723 2005-07-15  Bruno Haible  <bruno@clisp.org>
19724
19725         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
19726         When using lib/poll.c, define poll as rpl_poll.
19727
19728 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
19729
19730         * modules/argp (Depends-on): Remove unlocked-io.
19731
19732 2005-07-14  Derek Price  <derek@ximbiot.com>
19733
19734         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
19735         for glob symlink bug.
19736
19737 2005-07-14  Bruno Haible  <bruno@clisp.org>
19738
19739         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
19740         Instead, test for *_unlocked function declarations directly.
19741
19742 2005-07-11  Simon Josefsson  <jas@extundo.com>
19743
19744         * modules/size_max: New file.
19745
19746         * modules/xsize: Depend on size_max module for size_max.m4.
19747
19748 2005-07-11  Simon Josefsson  <jas@extundo.com>
19749
19750         * lib/size_max.h: New file.
19751
19752 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
19753
19754         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
19755         copyright symbol and the year.
19756         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
19757         (version_etc_va): Use parameterized copyright notice.
19758         Reword to conform to the current GNU coding standards.
19759
19760 2005-07-11  Karl Berry  <karl@gnu.org>
19761
19762         * doc/gnulib.texi (Quoting): new node.
19763         (Initial import): more info, from Patrice.
19764
19765 2005-07-11  Bruno Haible  <bruno@clisp.org>
19766
19767         * gnulib-tool (func_usage): Document option --avoid.
19768         (Command line options): Handle --avoid.
19769         (func_acceptable): New function.
19770         (func_modules_transitive_closure): Use it.
19771
19772 2005-07-11  Bruno Haible  <bruno@clisp.org>
19773
19774         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
19775         Reported by Jim Meyering.
19776
19777 2005-07-10  Bruno Haible  <bruno@clisp.org>
19778
19779         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
19780         Needed when size_t is smaller than 'unsigned int'.
19781         Reported by Paul Eggert.
19782
19783 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
19784
19785         * modules/argp (Depends-on): Add unlocked-io
19786
19787 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
19788
19789         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
19790         block of defines.
19791
19792 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
19793
19794         * config/srclist.txt: Comment out regcomp.c, since we have a porting
19795         fix now.
19796
19797 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
19798         and Paul Eggert  <eggert@cs.ucla.edu>
19799
19800         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
19801         in wint_t, not wchar_t.  Remove now-unnecessary cast.
19802
19803 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
19804
19805         * modules/regex (Files): Add lib/regex_internal.c,
19806         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
19807         (Depends-on): Add extensions.
19808         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
19809
19810 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
19811
19812         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
19813         pathconf.
19814         * m4/same.m4 (gl_SAME): Likewise.
19815         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
19816
19817         * m4/regex.m4: Adjust to new libc regex implementation.
19818         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
19819         all the .c and .h parts of (the new) regex.
19820         Quote the m4 stuff better.
19821         Check for RE_ICASE bug of old gnulib.
19822         Check for REG_STARTEND of recent libc.
19823         Rename local variables from jm_* to gl_*.
19824         Quote operand of "test -f".
19825         Say "recent enough" version of libc, not "version 2".
19826         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
19827         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
19828         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
19829         Remove check for btowc, isascii.
19830         Require AM_LANGINFO_CODESET.
19831
19832 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
19833
19834         * lib/regex.c, regex.h: Sync from libc.
19835         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
19836         * lib/regexec.c:
19837         New files, synced from libc, except that regex_internal.h
19838         currently has a small porting fix.
19839
19840 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
19841
19842         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
19843         regex_internal.c, regexec.c.
19844         Add regex_internal.h too, but as a comment, since the libc version
19845         is currently broken in gnulib mode.
19846
19847 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
19848
19849         Support programs like Emacs that use gnulib but not gettext.
19850         * MODULES.html.sh (Internationalization functions): Add gettext-h.
19851         * modules/gettext-h: New file.
19852         * modules/gettext (Files): Remove lib/gettext.h.
19853         (Depends-on): Add gettext-h.
19854         (Makefile.am): Remove lib_SOURCES.
19855         * modules/argmatch, modules/c-stack, modules/closeout:
19856         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
19857         * modules/execute, modules/file-type, modules/getaddrinfo:
19858         * modules/getopt, modules/human, modules/javacomp:
19859         * modules/javaexec, modules/mkdir-p, modules/obstack:
19860         * modules/openat, modules/pagealign_alloc, modules/pipe:
19861         * modules/quotearg, modules/regex, modules/rpmatch:
19862         * modules/unicodeio, modules/userspec, modules/version-etc:
19863         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
19864         * modules/xsetenv:
19865         Depend on gettext-h, not gettext.
19866
19867 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
19868
19869         * gnulib-tool (func_import): Add support for 'public domain' license.
19870         * modules/alloca, modules/atexit, modules/memmove:
19871         Now public domain, not GPL.
19872         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
19873         * modules/realloc, modules/strerror, modules/strtod:
19874         Now LGPL, not GPL.
19875
19876 2005-07-05  Bruno Haible  <bruno@clisp.org>
19877
19878         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
19879         autoconf CVS. Needed for mingw.
19880
19881 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
19882
19883         Remove the dependency of the strftime module on the tzset module.
19884         * modules/strftime (Depends-on): Remove dependency on tzset.
19885
19886 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
19887
19888         Remove the dependency of the strftime module on the tzset module.
19889         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
19890         gl_FUNC_TZSET_CLOBBER.
19891
19892 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
19893
19894         Remove the dependency of the strftime module on the tzset module.
19895         * lib/strftime.c (my_strftime)
19896         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
19897         Copy the input structure, to work around some of the bug with
19898         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
19899         Solaris releases, you should also use the tzset module, but we won't
19900         require it as a dependency any more since we don't want LGPLed code
19901         to depend on GPLed code.
19902
19903 2005-07-02  Jim Meyering  <jim@meyering.net>
19904
19905         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
19906         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
19907         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
19908         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
19909
19910 2005-07-02  Jim Meyering  <jim@meyering.net>
19911
19912         * lib/backupfile.c (backup_args): Change a `0' to NULL.
19913
19914 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
19915
19916         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
19917         declares only 'struct timespec;' (!).
19918
19919 2005-07-01  Jim Meyering  <jim@meyering.net>
19920
19921         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
19922         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
19923         * lib/save-cwd.c, tempname.c:
19924         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
19925         and don't include <sys/file.h>).
19926
19927 2005-06-29  Jim Meyering  <jim@meyering.net>
19928
19929         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
19930         type name.  Use the variable name instead.
19931         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
19932         Likewise.
19933
19934 2005-06-28  Simon Josefsson  <jas@extundo.com>
19935
19936         * modules/check-version (Files): Add check-version.m4.
19937
19938 2005-06-28  Simon Josefsson  <jas@extundo.com>
19939
19940         * m4/check-version.m4: New file, suggested by Jim Meyering
19941         <jim@meyering.net>.
19942
19943 2005-06-28  Simon Josefsson  <jas@extundo.com>
19944
19945         * lib/check-version.h, lib/check-version.c: New files.
19946
19947 2005-06-28  Simon Josefsson  <jas@extundo.com>
19948
19949         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
19950         collision with global variable.  Better indentation.  Don't
19951         increment buffer pointer beyond buffer end.  Based on comments
19952         from Paul Eggert <eggert@cs.ucla.edu>.
19953
19954         * lib/base64.h: Indent.
19955
19956 2005-06-28  Simon Josefsson  <jas@extundo.com>
19957
19958         * doc/gnulib.texi (Library version handling): New section.
19959
19960 2005-06-28  Jim Meyering  <jim@meyering.net>
19961
19962         * check-module (find_included_lib_files): Hard-code another
19963         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
19964         but modules/fts-lgpl (correctly) does not list those files.
19965
19966         * modules/canonicalize (Files): Add lib/pathmax.h.
19967
19968 2005-06-25  Simon Josefsson  <jas@extundo.com>
19969
19970         * modules/check-version: New file.
19971
19972 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
19973
19974         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
19975         initializer of struct addrinfo, as an indication that we don't
19976         care how many members the structure has.
19977
19978 2005-06-24  Derek Price  <derek@ximbiot.com>
19979         and Bruno Haible  <bruno@clisp.org>
19980
19981         Remove stat module & update lstat.
19982         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
19983         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
19984         * m4/stat.m4: Remove this file.
19985
19986 2005-06-24  Derek Price  <derek@ximbiot.com>
19987         and Bruno Haible  <bruno@clisp.org>
19988
19989         Remove stat module & update lstat.
19990         * lib/stat.c: Remove this file...
19991         (slash_aware_lstat): ...moving this content and its support...
19992         * lib/lstat.c (rpl_lstat): ...into here.
19993         * lib/lstat.h: New file.
19994
19995 2005-06-24  Derek Price  <derek@ximbiot.com>
19996         and Bruno Haible  <bruno@clisp.org>
19997
19998         Remove stat module & update lstat.
19999         * config/srclist.txt (libc sources): Remove stat.
20000
20001 2005-06-24  Derek Price  <derek@ximbiot.com>
20002         and Bruno Haible  <bruno@clisp.org>
20003
20004         Remove stat module & update lstat.
20005         * MODULES.html.sh (stat): Remove.
20006         * MODULES.html: Regenerated.
20007         * modules/lstat (Description): Correct function name.
20008         (Files): Add "lstat.h".
20009         (Depends-on): Remove stat, add xalloc, stat-macros.
20010         * modules/stat: Remove this file.
20011         (Include): Add "lstat.h", remove <sys/stat.h>.
20012
20013 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
20014
20015         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
20016         (ranged_convert): Don't save conversion in a temporary struct.
20017         This causes a warning with GCC 4.0.0, and anyway in the typical
20018         case it's not worth the extra 100 bytes or so of code.
20019         (ranged_convert, __mktime_internal): When calling a function via a
20020         pointer P, use P () rather than (*P) (), as we now assume C89 or
20021         better.
20022
20023 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
20024
20025         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
20026         "who -r" failed to give output.  Problem reported by Tim Waugh.
20027
20028         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
20029         (xcalloc): Use it to avoid needless tests.
20030         Problem reported by Jim Meyering.
20031
20032 2005-06-20  Derek Price  <derek@ximbiot.com>
20033
20034         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
20035         unnecessary for Autoconfs > 2.59c.
20036
20037 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20038
20039         * lib/argp.h (__option_is_short): Check upper limit of
20040         __key. Isprint() requires its argument to have the value
20041         of an unsigned char or EOF.
20042
20043 2005-06-16  Jim Meyering  <jim@meyering.net>
20044
20045         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
20046         when either N or S is zero.
20047
20048 2005-06-16  Derek Price  <derek@ximbiot.com>
20049
20050         * m4/bison.m4: Declare YACC & YFLAGS precious.
20051
20052 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
20053
20054         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
20055         multibyte string or pattern, fall back on unibyte matching.
20056         Problem reported by James Youngman.
20057
20058 2005-06-08  Bruno Haible  <bruno@clisp.org>
20059
20060         * modules/csharpcomp: New file.
20061         * MODULES.html.sh (C#): Add csharpcomp.
20062
20063 2005-06-08  Bruno Haible  <bruno@clisp.org>
20064
20065         * m4/csharpcomp.m4: New file, from GNU gettext.
20066
20067 2005-06-08  Bruno Haible  <bruno@clisp.org>
20068
20069         * lib/csharpcomp.h: New file, from GNU gettext.
20070         * lib/csharpcomp.c: New file, from GNU gettext.
20071         * lib/csharpcomp.sh.in: New file, from GNU gettext.
20072
20073 2005-06-08  Bruno Haible  <bruno@clisp.org>
20074
20075         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
20076         warning on mingw.
20077
20078 2005-06-07  Derek Price  <derek@ximbiot.com>
20079
20080         Sync from CVS.
20081         * lib/glob_.h: Indent nested #ifdef.
20082
20083 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
20084
20085         Sync from coreutils.
20086         Use "file name" when talking about file names, instead of "filename"
20087         or "path", as per the GNU coding standards.
20088         * lib/mkdir-p.c: Renamed from makepath.c.
20089         (make_dir_parents): Renamed from make_path.  All callers changed.
20090         * lib/mkdir-p.h: Likewise.  All includers changed.
20091         * lib/filenamecat.c: Renamed from path-concat.c.
20092         (file_name_concat): Renamed from path_concat.  All callers changed.
20093         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
20094         * lib/filenamecat.h: Likewise.  All includers changed.
20095         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
20096         in comments or local variable names.
20097         * lib/basename.c: Likewise.
20098         * lib/canonicalize.c, canonicalize.h: Likewise.
20099         * lib/dirname.c, dirname.h: Likewise.
20100         * lib/euidaccess.c: Likewise.
20101         * lib/exclude.c: Likewise
20102         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
20103         * lib/fsusage.c, fsuage.h: Likewise.
20104         * lib/fts.c, fts_.h: Likewise.
20105         * lib/getcwd.c: Likewise.
20106         * lib/getloadavg.c: Likewise.
20107         * lib/mkstemp.c: Likewise.
20108         * lib/mountlist.c, mountlist.h: Likewise.
20109         * lib/openat.c, openat.h: Likewise.
20110         * lib/readlink-stub.c: Likewise.
20111         * lib/readutmp.c, readutmp.h: Likewise.
20112         * lib/rename.c: Likewise.
20113         * lib/rmdir.c: Likewise.
20114         * lib/same.c: Likewise.
20115         * lib/savedir.c: Likewise.
20116         * lib/stripslash.c: Likewise.
20117         * lib/tempname.c: Likewise.
20118         * lib/xreadlink.c: Likewise.
20119         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
20120         All uses changed.
20121         * lib/exclude.h: Likewise.
20122
20123         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
20124         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
20125         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
20126         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
20127         * lib/pathmax.h: Include <limits.h> unconditionally, since other
20128         files have been getting away with it for years (MORE/BSD 4.3
20129         is extinct now).
20130         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
20131         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
20132
20133         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
20134         Define to 256, not 255, as per modern POSIX.
20135
20136 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
20137
20138         Sync from coreutils.
20139         Use "file name" when talking about file names, instead of "filename"
20140         or "path", as per the GNU coding standards.
20141         * MODULES.html.sh: mkdir-p renamed from makepath.
20142         filenamecat renamed from path-concat.
20143         * modules/filenamecat: Renamed from modules/path-concat.
20144         (Files): filenamecat.h and filenamecat.c renamed from
20145         path-concat.h and path-concat.c.
20146         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
20147         (Include): filenamecat.h, not path-concat.h.
20148         * modules/mkdir-p: Renamed from modules/makepath.
20149         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
20150         makepath.c.
20151         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
20152         (Include): mkdir-p.h, not makepath.h.
20153
20154 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
20155
20156         Sync from coreutils.
20157         * m4/mkdir-p.m4: Renamed from makepath.m4.
20158         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
20159         Rename files from makepath.c to mkdir-p.c, and from
20160         makepath.h to mkdir-p.h.
20161         * m4/filenamecat.m4: Renamed from path-concat.m4.
20162         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
20163         Rename files from path-concat.c to filenamecat.c,
20164         and from path-concat.h to filenamecat.h.
20165         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
20166         "file name" in local variables or comments.
20167         * m4/rename.m4: Likewise.
20168
20169 2005-06-01  Bruno Haible  <bruno@clisp.org>
20170
20171         * modules/csharpexec: New file.
20172         * MODULES.html.sh (C#): New section.
20173
20174 2005-06-01  Bruno Haible  <bruno@clisp.org>
20175
20176         * m4/csharp.m4: New file, from GNU gettext.
20177         * m4/csharpexec.m4: New file, from GNU gettext.
20178
20179 2005-06-01  Bruno Haible  <bruno@clisp.org>
20180
20181         * lib/csharpexec.h: New file, from GNU gettext.
20182         * lib/csharpexec.c: New file, from GNU gettext.
20183         * lib/csharpexec.sh.in: New file, from GNU gettext.
20184
20185 2005-05-31  Derek Price  <derek@ximbiot.com>
20186             Paul Eggert  <eggert@cs.ucla.edu>
20187
20188         Sync from cvs.
20189         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
20190
20191 2005-05-31  Derek Price  <derek@ximbiot.com>
20192             Paul Eggert  <eggert@cs.ucla.edu>
20193
20194         Sync from cvs.
20195         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
20196
20197 2005-05-29  Derek Price  <derek@ximbiot.com>
20198
20199         * config/srclist.txt (glob_.h, glob.c): Add these files.
20200
20201 2005-05-29  Derek Price  <derek@ximbiot.com>
20202
20203         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
20204         * modules/glob: New file.
20205         * modules/getlogin_r: Add link to POSIX spec in description.
20206
20207 2005-05-29  Derek Price  <derek@ximbiot.com>
20208             Paul Eggert  <eggert@cs.ucla.edu>
20209
20210         * m4/glob.m4: New file.
20211
20212 2005-05-29  Derek Price  <derek@ximbiot.com>
20213             Paul Eggert  <eggert@cs.ucla.edu>
20214
20215         * lib/glob_.h, lib/glob.c: New files.
20216
20217 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
20218
20219         * modules/fts (Files): Remove m4/inttypes-pri.m4.
20220         * modules/fts-lgpl (Depends-on): Remove gettext.
20221
20222 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
20223
20224         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
20225         and don't require gt_INTTYPES_PRI.
20226
20227 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
20228
20229         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
20230
20231         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
20232         the configuration hassle isn't worth it.
20233         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
20234         (LONGEST_MODIFIER, PRIuMAX): Remove.
20235
20236 2005-05-27  Bruno Haible  <bruno@clisp.org>
20237
20238         * lib/getlogin_r.h: Remove second include of <stddef.h>.
20239
20240 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
20241
20242         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
20243         _POSIX_PTHREAD_SEMANTICS for Solaris.
20244
20245 2005-05-25  Derek Price  <derek@ximbiot.com>
20246
20247         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
20248
20249 2005-05-25  Derek Price  <derek@ximbiot.com>
20250             Paul Eggert  <eggert@cs.ucla.edu>
20251
20252         * modules/getlogin_r, m4/getlogin_r.m4: New files.
20253         * lib/getlogin_r.c, getlogin_r.h: New files.
20254
20255 2005-05-25  Bruno Haible  <bruno@clisp.org>
20256             Derek Price  <derek@ximbiot.com>
20257
20258         * lib/getlogin_r.h: Simplify API documentation.
20259
20260 2005-05-23  Derek Price  <derek@ximbiot.com>
20261
20262         * modules/minmax (Files): Add m4/minmax.m4.
20263         (configure.ac): Add gl_MINMAX.
20264
20265 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
20266
20267         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
20268         so that unistd-safer.h (GPL'ed code) need not be included.
20269
20270 2005-05-22  Bruno Haible  <bruno@clisp.org>
20271
20272         * m4/minmax.m4: New file.
20273         Based on a patch by Derek Price <derek@ximbiot.com>.
20274
20275 2005-05-22  Bruno Haible  <bruno@clisp.org>
20276
20277         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
20278         (INT64_MIN): Fix definition.
20279         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
20280
20281         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
20282         NEED_SIGNED_INT_TYPES.
20283
20284         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
20285         HAVE_SYSTEM_INTTYPES.
20286
20287 2005-05-22  Bruno Haible  <bruno@clisp.org>
20288
20289         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
20290         Also include <sys/param.h> if it defines MIN, MAX.
20291         Based on a patch by Derek Price <derek@ximbiot.com>.
20292
20293 2005-05-21  Jim Meyering  <jim@meyering.net>
20294
20295         * modules/fts (Files): Add m4/inttypes-pri.m4.
20296         (Depends-on): Add lstat and remove gettext.  Alphabetize.
20297
20298 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
20299
20300         New fts module.
20301         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
20302         (setup_dir, free_dir): New functions.
20303         (enter_dir, leave_dir): Define trivial
20304         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
20305         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
20306         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
20307         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
20308         Move to fts-cycle.c.
20309         (fts_open): Use setup_dir.
20310         (fts_close): Use free_dir.
20311         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
20312         This adds a label and some gotos, but the alternatives were messier.
20313         Check for memory allocation failure when entering a dir.
20314         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
20315         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
20316         (FTS): New member fts_cycle, that is a union that contains the
20317         old active_dir_ht and cycle_state.  All uses changed to mention
20318         fts_cycle.ht and fts_cycle.state.
20319         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
20320         fts.c, with the following changes:
20321         (setup_dir, free_dir): New functions.
20322         (enter_dir): Now returns bool.  Return true if successful, false
20323         if memory exhausted.  All callers changed.
20324         Do not bother partly cleaning up on
20325         memory allocation failure; that is free_dir's job.
20326         However, free ad if hash_insert fails, to avoid memory leak.
20327         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
20328         fts->fts_options to see which union member to use.
20329
20330 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
20331
20332         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
20333         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
20334
20335 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
20336
20337         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
20338
20339 2005-05-20  Jim Meyering  <jim@meyering.net>
20340
20341         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
20342         Now a macro, to pacify GCC.
20343
20344 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
20345
20346         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
20347         of -1.
20348
20349 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
20350
20351         * lib/chown.c (rpl_chown): Return -1 on failure.
20352
20353 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
20354
20355         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
20356         Don't check for stddef.h.
20357         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
20358         don't use its results.
20359         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
20360         since we include them unconditionally.  Don't require
20361         AM_STDBOOL_H, since stdbool is a prerequisite.
20362         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
20363         since we assume C89 or better.
20364         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
20365         as we don't use their results.
20366         Don't check for fchdir, memmove, memset, strrchr, as we use
20367         them unconditionally.
20368         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
20369         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
20370
20371 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
20372
20373         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
20374         Include <stddef.h> unconditionally, since we assume C89 now.
20375         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
20376         * lib/fts.c: Include fts_.h first, to check interface.
20377         Do not include intprops.h; no longer needed.
20378         Include cycle-check.h and hash.h, since fts_.h no longer does.
20379         Remove unnecessary casts of closedir to void.
20380         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
20381         decide whether to decrement nlinks.
20382         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
20383         (FTS): Use struct hash_table * instead of Hash_table, so that
20384         we no longer need to include hash.h here.
20385
20386 2005-05-18  Jim Meyering  <jim@meyering.net>
20387
20388         * modules/dirfd (License): Change to LGPL.  Most of the code
20389         is already in the public domain.
20390
20391 2005-05-18  Jim Meyering  <jim@meyering.net>
20392
20393         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
20394         Reported by Yoann Vandoorselaere.
20395
20396 2005-05-17  Jim Meyering  <jim@meyering.net>
20397
20398         * m4/fts.m4: New file, from coreutils.
20399
20400 2005-05-17  Jim Meyering  <jim@meyering.net>
20401
20402         * lib/fts.c, lib/fts_.h: New files, from coreutils.
20403
20404 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
20405
20406         Sync from coreutils.
20407         * m4/unlinkdir.m4: New file.
20408
20409 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
20410
20411         Sync from coreutils.
20412         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
20413         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
20414         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
20415         White space changes only.
20416         * lib/makepath.c (make_path): Port to hosts where leading "//" is
20417         special.
20418         * lib/yesno.c: Include getline.h, not ctype.h.
20419         (yesno): Don't remove leading white space; POSIX doesn't allow it.
20420         Use getline to remove arbitrary restriction on response length.
20421
20422 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
20423
20424         * config/srclist-update: Spell out "Street" in FSF postal
20425         mail address; this is the style the FSF seems to prefer.
20426
20427         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
20428         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
20429         this updates FSF postal mail address.
20430
20431         Sync from coreutils.
20432         * modules/unlinkdir: New file.
20433         * modules/yesno (Depends-on): Add getline.
20434         * MODULES.html.sh (File system functions): Add unlinkdir.
20435
20436 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
20437
20438         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
20439         lib/strsep.h:
20440         Change the initial comment to refer to GPL, not LGPL.
20441         gnulib-tool will change it to LGPL as needed.
20442
20443         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
20444         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
20445         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
20446         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
20447         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
20448         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
20449         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
20450         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
20451         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
20452         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
20453         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
20454         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
20455         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
20456         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
20457         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
20458         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
20459         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
20460         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
20461         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
20462         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
20463         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
20464         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
20465         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
20466         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
20467         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
20468         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
20469         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
20470         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
20471         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
20472         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
20473         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
20474         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
20475         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
20476         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
20477         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
20478         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
20479         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
20480         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
20481         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
20482         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
20483         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
20484         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
20485         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
20486         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
20487         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
20488         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
20489         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
20490         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
20491         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
20492         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
20493         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
20494         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
20495         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
20496         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
20497         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
20498         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
20499         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
20500         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
20501         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
20502         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
20503         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
20504         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
20505         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
20506         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
20507         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
20508         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
20509         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
20510         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
20511         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
20512         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
20513         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
20514         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
20515         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
20516         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
20517         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
20518         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
20519         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
20520         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
20521         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
20522         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
20523         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
20524         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
20525         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
20526         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
20527         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
20528         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
20529         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
20530         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
20531         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
20532         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
20533         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
20534         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
20535         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
20536         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
20537         lib/yesno.c, lib/yesno.h:
20538         Update FSF postal mail address.
20539
20540 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
20541
20542         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
20543         tests/test-memmem.c, tests/test-stpncpy.c:
20544         Update FSF postal mail address.
20545
20546 2005-05-13  Bruno Haible  <bruno@clisp.org>
20547
20548         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
20549         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
20550         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
20551         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
20552         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
20553         Add support for 64-bit integers in the MSVC compiler.
20554
20555 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20556
20557         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
20558
20559 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
20560
20561         * gnulib-tool (func_import): Sort and uniquify recommended includes.
20562
20563 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
20564
20565         * doc/getdate.texi (General date syntax): Don't say that date
20566         date --iso-8601=ns generates acceptable dates; it doesn't yet.
20567         Problem reported by Nic Ferrier.
20568
20569 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
20570
20571         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
20572         specified in ai_socktype. Fix invalid ai_protocol
20573         check. ai_protocol is usually set to 0 or depending on
20574         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
20575         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
20576         ai_socktype / ai_protocol in the returned addrinfo structure.
20577
20578 2005-05-10  Simon Josefsson  <jas@extundo.com>
20579
20580         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
20581         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
20582
20583 2005-05-10  Karl Berry  <karl@gnu.org>
20584
20585         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
20586         (from http://www.gnu.org/licenses).
20587         * doc/COPYING.LIB: also rename to COPYING.LESSER.
20588         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
20589         fdl.texi suffices.
20590
20591 2005-05-10  Karl Berry  <karl@gnu.org>
20592
20593         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
20594         (COPYING.DOC): remove.
20595
20596         * config/srclist-update: new FSF address.
20597
20598 2005-05-10  Derek Price  <derek@ximbiot.com>
20599
20600         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
20601         possible.
20602
20603 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
20604             Bruno Haible  <bruno@clisp.org>
20605
20606         * modules/inet_ntop: New file.
20607         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
20608         inet_ntop.
20609
20610 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
20611             Bruno Haible  <bruno@clisp.org>
20612
20613         * m4/inet_ntop.m4: New file.
20614
20615 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
20616             Bruno Haible  <bruno@clisp.org>
20617
20618         * lib/inet_ntop.h: New file.
20619         * lib/inet_ntop.c: New file, from glibc with modifications.
20620
20621 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
20622
20623         * modules/time_r (License): Change to LGPL.
20624         * modules/extensions (License): Change to LGPL.  Actually,
20625         the license is more permissive than that, but currently gnulib-tool
20626         doesn't know how to handle more-permissive licenses.
20627
20628         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
20629         Problem reported by Dave Love.
20630
20631 2005-05-08  Jim Meyering  <jim@meyering.net>
20632
20633         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
20634         blank.
20635
20636 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
20637
20638         * modules/argmatch (Depends-on): Add stdbool.
20639         * modules/backupfile (Depends-on): Likewise.
20640         * modules/chdir-long (Depends-on): Likewise.
20641         * modules/closeout (Depends-on): Likewise.
20642         * modules/cycle-check (Depends-on): Likewise.
20643         * modules/dirname (Depends-on): Likewise.
20644         * modules/fnmatch (Depends-on): Likewise.
20645         * modules/fsusage (Depends-on): Likewise.
20646         * modules/fwriteerror (Depends-on): Likewise.
20647         * modules/getcwd (Depends-on): Likewise.
20648         * modules/getloadavg (Depends-on): Likewise.
20649         * modules/hard-locale (Depends-on): Likewise.
20650         * modules/makepath (Depends-on): Likewise.
20651         * modules/mountlist (Depends-on): Likewise.
20652         * modules/nanosleep (Depends-on): Likewise.
20653         * modules/posixtm (Depends-on): Likewise.
20654         * modules/quotearg (Depends-on): Likewise.
20655         * modules/readtokens (Depends-on): Likewise.
20656         * modules/readtokens0 (Depends-on): Likewise.
20657         * modules/readutmp (Depends-on): Likewise.
20658         * modules/save-cwd (Depends-on): Likewise.
20659         * modules/strftime (Depends-on): Likewise.
20660         * modules/userspec (Depends-on): Likewise.
20661         * modules/utimecmp (Depends-on): Likewise.
20662         * modules/xgetcwd (Depends-on): Likewise.
20663         * modules/xnanosleep (Depends-on): Likewise.
20664         * modules/xstrtod (Depends-on): Likewise.
20665         * modules/yesno (Depends-on): Likewise.
20666
20667 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
20668
20669         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
20670         needless checks.
20671
20672 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
20673
20674         Merge from coreutils.  Among other things,
20675         add bulletproofing for cases where stdin, stdout, or stderr are closed.
20676         * lib/fd-safer.c: New file.
20677         * lib/fcntl-safer.h, open-safer.c: Remove.
20678         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
20679         * lib/dup-safer.c: Include unistd-safer.h first.
20680         Don't include errno.h.
20681         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
20682         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
20683         * lib/file-type.c: Rely on file-type.h change.
20684         * lib/getloadavg.c: Include unistd-safer.h.
20685         (getloadavg): Use safer open.
20686         * lib/getusershell.c: Include "stdio-safer.h".
20687         (getusershell): Use safer fopen.
20688         * lib/long-options.c (long_options): Use NULL rather than 0.
20689         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
20690         'free'.
20691         * lib/modechange.c: Likewise.
20692         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
20693         (MODE_DONE): New constant.
20694         (struct mode_change): Remove 'next' member.
20695         (make_node_op_equals): New function; like the old one of the
20696         same name, except it allocates an array.
20697         (mode_compile, mode_create_from_ref): Use it.
20698         (mode_compile): Allocate result as an array, not a linked list.
20699         Parse octal string ourself, so that we catch mistakes like "+0".
20700         (mode_adjust): Arg is an array, not a linked list.
20701         * lib/modechange.c: Include stat-macros.h, xalloc.h.
20702         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
20703         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
20704         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
20705         Remove.  This is now stat-macros.h's job.
20706         (talloc): Remove.  All callers replaced by xalloc, so that
20707         our invokers don't have to worry about reporting memory failures.
20708         (make_node_op_equals): Remove.
20709         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
20710         New constants.
20711         (struct mode_change): Moved here from modechange.h.
20712         (mode_append_entry): Remove.
20713         (mode_compile): Remove MASKED_OPS arg, since it encouraged
20714         apps to have incorrect behavior.  Use simpler algorithm for head
20715         and tail.  Don't futz with umask; that's now the job of mode_adjust.
20716         Detect more invalid usages rather than having somewhat-random behavior.
20717         Don't insert an "a=" action, as that leads to incorrect behavior.
20718         (mode_compile, mode_create_from_ref): Return NULL on error instead
20719         of an enum, since now there's only one way to have an error.  All
20720         callers changed.
20721         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
20722         at the correct time.  Simplify calculation of "+u" and its ilk.
20723         Don't mishandle "+X".
20724         (mode_free): Remove "register" and localize decls.
20725         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
20726         (struct mode_change): Move to modechange.c; callers don't
20727         need to see this stuff.
20728         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
20729         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
20730         (mode_change, mode_adjust): Reflect the new signatures noted above.
20731         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
20732         that might redefine system include files.
20733         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
20734         (my_usleep): Use NULL rather than (void *) 0.
20735         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
20736         Use siginterrupt to specify that system calls should be interrupted.
20737         (rpl_nanosleep): Move initialization of suspended closer to call of
20738         my_usleep.
20739         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
20740         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
20741         (desirable_utmp_entry): New function.
20742         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
20743         using x2nrealloc, to simplify logic.
20744         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
20745         size calculation.  Do not assume utmp file is a regular file.
20746         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
20747         (READ_UTMP_CHECK_PIDS): New constant.
20748         * lib/save-cwd.c: Include unistd-safer.h.
20749         (save_cwd): Use fd_safer.
20750         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
20751         [!_LIBC] Include "stat-macros.h" instead.
20752         * lib/unistd-safer.h (fd_safer): New decl.
20753
20754 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
20755
20756         * modules/getloadavg (Depends-on): Add unistd-safer.
20757         * modules/getusershell (Depends-on): Add stdio-safer.
20758         * modules/lstat (Depends-on): Remove xalloc.
20759         * modules/mkstemp (Depends-on): Add stat-macros.
20760         * modules/modechange (Depends-on): Remove xstrtol.
20761         Add stat-macros, xalloc.
20762         * modules/save-cwd (Depends-on): Add unistd-safer.
20763         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
20764         * modules/unistd-safer (Files): Add lib/fd-safer.c
20765         (Makefile.am): Remove lib_SOURCES.
20766
20767         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
20768         Remove fcntl-safer; unistd-safer supersedes it.
20769
20770 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
20771
20772         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
20773         AC_HEADER_STAT.
20774         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
20775         (gl_PREREQ_CHOWN): Remove.
20776         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
20777         it.  Don't require AC_HEADER_STAT.
20778         (gl_PREREQ_LSTAT): Remove.
20779         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
20780         Don't require AC_HEADER_STAT.
20781         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
20782         (gl_PREREQ_RMDIR): Remove.
20783         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
20784         mention stat-macros.h or AC_HEADER_STAT, since we'll make
20785         the stat-macros module a prerequisite.
20786         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
20787         * m4/filemode.m4 (gl_FILEMODE): Likewise.
20788         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
20789         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
20790         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
20791         variable names.
20792         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
20793         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
20794         variable prefixes.
20795         * m4/fcntl-safer.m4: Remove.
20796         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
20797         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
20798         Invoke gl_PREREQ_FD_SAFER.
20799         (gl_PREREQ_FD_SAFER): New macro.
20800         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
20801         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
20802         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
20803         Remove duplicate call to AC_LIBOBJ(readutmp).
20804         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
20805
20806         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
20807         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
20808
20809 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
20810
20811         * MODULES.html.sh (Misc): Add byteswap.
20812
20813 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
20814
20815         * modules/getcwd (Depends-on): Add extensions.
20816         * modules/openat (Depends-on): Likewise.
20817
20818 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
20819
20820         * modules/byteswap: New file.
20821
20822 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
20823
20824         * m4/byteswap.m4: New file.
20825
20826 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
20827
20828         * lib/byteswap_.h: New file.
20829
20830 2005-04-25  Karl Berry  <karl@gnu.org>
20831
20832         * m4/gettext.m4: Update from GNU gettext 0.14.4.
20833
20834 2005-04-25  Albert Chin  <china@thewrittenword.com>
20835
20836         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
20837         Toolkit C bug.
20838
20839 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
20840
20841         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
20842         (func_ln_if_changed) Remove forcibly for no error message
20843         in case file does not exist.
20844
20845 2005-04-19  Simon Josefsson  <jas@extundo.com>
20846
20847         * gnulib-tool (Options): Make --symlink mean --symbolic.
20848
20849 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
20850
20851         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
20852
20853 2005-04-16  Simon Josefsson  <jas@extundo.com>
20854
20855         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
20856
20857 2005-04-15  Simon Josefsson  <jas@extundo.com>
20858
20859         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
20860
20861 2005-04-15  Simon Josefsson  <jas@extundo.com>
20862
20863         * gnulib-tool: Rename --symlink to --symbolic.
20864
20865 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
20866
20867         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
20868         symbolic links to files instead of copying/moving.  Add --aux-dir,
20869         specifying directory relative --dir where auxiliary build tools
20870         are placed.
20871
20872 2005-04-14  Bruno Haible  <bruno@clisp.org>
20873
20874         * modules/allocsa (License): Change to LGPL.
20875         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
20876
20877 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
20878
20879         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
20880         that "UTC +1 second" continues to work.  Problem reported
20881         by Dmitry V. Levin.
20882         (relunit_snumber): New rule.
20883         (relunit): Use it.
20884
20885 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
20886
20887         * lib/getdate.y (universal_time_zone_table): New constant.
20888         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
20889         universal_time_zone_table.
20890         (lookup_zone): Prefer universal_time_zone_table to
20891         local_time_zone_table, so that "GMT" time stamps are allowed in
20892         London during the summer.  Problem reported by Ian Abbott.
20893
20894 2005-04-12  Jim Meyering  <jim@meyering.net>
20895
20896         * lib/human.c (humblock): Set *options even when returning due to
20897         xstrtoumax conversion failure.  Thanks to a used-uninitialized
20898         warning from gcc-4.
20899
20900 2005-04-09  Jim Meyering  <jim@meyering.net>
20901
20902         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
20903         -Wuninitialized: initialize tm0.tm_year.
20904
20905 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
20906
20907         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
20908         count, since there's no maximum.  All uses changed.
20909         Add member dsts_seen.
20910         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
20911         not being INT_MAX.
20912         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
20913         Use pc_rels_seen to decide whther a date is absolute.
20914
20915         * lib/getdate.y (number): Don't overwrite year.
20916         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
20917         check.
20918
20919 2005-04-02  Simon Josefsson  <jas@extundo.com>
20920
20921         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
20922         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
20923
20924 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
20925
20926         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
20927         where no absolute path name can be longer than PATH_MAX.
20928
20929 2005-03-27  Jim Meyering  <jim@meyering.net>
20930
20931         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
20932
20933 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
20934
20935         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
20936         "one's complement" -> "ones' complement" in comment, as per Knuth.
20937         "value of type" -> "type or expression" in comment.
20938         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
20939
20940 2005-03-26  Jim Meyering  <jim@meyering.net>
20941
20942         Comment nits.
20943         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
20944         Correct typos: s/or/of/.
20945
20946 2005-03-26  Jim Meyering  <jim@meyering.net>
20947
20948         * modules/check-include-files: Move to ../ and rename to...
20949         * check-module: ...this.
20950
20951 2005-03-25  Jim Meyering  <jim@meyering.net>
20952
20953         * modules/xvasprintf (Files): Add xalloc.h.
20954
20955 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
20956
20957         * modules/gettext (Files): config/config.rpath ->
20958         build-aux/config.rpath
20959         * modules/iconv (Files): Likewise.
20960         Problem reported by Oskar Liljeblad.
20961
20962 2005-03-23  Jim Meyering  <jim@meyering.net>
20963
20964         * modules/check-include-files: New script to check for
20965         missing dependencies, multiple includes, etc.
20966
20967         * modules/c-strtold (Depends-on): Add xalloc.
20968         * modules/c-strtod (Depends-on): Add xalloc.
20969         * modules/hash (Depends-on): Add xalloc.
20970         (Files): Remove lib/xalloc.h.
20971
20972         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
20973         * modules/userspec (Files): Add lib/inttostr.h.
20974
20975 2005-03-23  Jim Meyering  <jim@meyering.net>
20976
20977         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
20978
20979 2005-03-22  Jim Meyering  <jim@meyering.net>
20980
20981         * modules/stat-macros: New module.
20982         * modules/canonicalize, modules/euidaccess, modules/file-type,
20983         * modules/filemode, modules/lchown, modules/makepath,
20984         * modules/rmdir, modules/stat: Depend on new stat-macros module
20985         rather than listing lib/stat-macros.h manually.
20986         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
20987
20988 2005-03-22  Jim Meyering  <jim@meyering.net>
20989
20990         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
20991
20992 2005-03-22  Bruno Haible  <bruno@clisp.org>
20993
20994         * config/srclist.txt: Replace target directory 'config' with
20995         'build-aux'.
20996         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
20997         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
20998         ../build-aux/.
20999
21000 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
21001
21002         * modules/chdir-long (Depends-on): Add mempcpy.
21003
21004         * modules/acl, modules/backupfile, modules/c-strtod,
21005         modules/c-strtold, modules/canon-host, modules/canonicalize,
21006         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
21007         modules/exclude, modules/exitfail, modules/file-type,
21008         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
21009         modules/getdate, modules/getline, modules/getpagesize,
21010         modules/getpass, modules/getugroups, modules/group-member,
21011         modules/hard-locale, modules/hash, modules/human, modules/idcache,
21012         modules/inttostr, modules/long-options, modules/makepath,
21013         modules/md5, modules/memcasecmp, modules/memcoll,
21014         modules/modechange, modules/mountlist, modules/path-concat,
21015         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
21016         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
21017         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
21018         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
21019         modules/strftime, modules/strndup, modules/strverscmp,
21020         modules/timespec, modules/unlocked-io, modules/userspec,
21021         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
21022         modules/yesno:
21023         Remove lib_SOURCES line from Makefile.am section, as this is now
21024         done automatically by the corresponding Autoconf macro.
21025
21026 2005-03-21  Jim Meyering  <jim@meyering.net>
21027
21028         Changes imported from coreutils.
21029
21030         * lib/cycle-check.c: Don't include xalloc.h.
21031
21032         * lib/path-concat.c: Don't include assert.h.
21033         (path_concat): Remove assertion that would have triggered
21034         for ABASE starting with more than one slash.
21035         Reported by Andreas Schwab.
21036
21037         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
21038         properly when ABASE is an absolute file name.
21039         Correct the description of this function.
21040         Include <assert.h>.
21041         Add an assertion and a test driver.
21042         This fixes a bug introduced on 2004-07-02.
21043         Andreas Schwab reported the resulting failure of cp --parents:
21044         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
21045
21046 2005-03-21  Jim Meyering  <jim@meyering.net>
21047
21048         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
21049         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
21050
21051 2005-03-21  Jim Meyering  <jim@meyering.net>
21052         and  Paul Eggert  <eggert@cs.ucla.edu>
21053
21054         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
21055         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
21056         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
21057         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
21058         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
21059         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
21060         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
21061         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
21062         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
21063         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
21064         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
21065         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
21066         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
21067         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
21068         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
21069         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
21070         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
21071         for these modules.
21072
21073 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
21074
21075         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
21076         (which shouldn't happen), generate nothing instead of returning 0
21077         immediately, so that nstrftime (NULL, ...) doesn't return 0.
21078
21079 2005-03-16  Bruno Haible  <bruno@clisp.org>
21080
21081         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
21082         HAVE_LONGLONG_64BIT.
21083
21084 2005-03-16  Bruno Haible  <bruno@clisp.org>
21085
21086         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
21087         HAVE_LONGLONG_64BIT.
21088
21089 2005-03-16  Bruno Haible  <bruno@clisp.org>
21090
21091         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
21092         HAVE_LONGLONG_64BIT.
21093
21094 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
21095
21096         * lib/strftime.c (my_strftime): Prepend space to format so that we can
21097         reliably distinguish strftime failure from empty output on POSIX
21098         hosts.
21099
21100 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
21101
21102         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
21103         (iconv_string): Don't guess a size-zero buffer, as that might cause
21104         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
21105         result would be 'too large', where 'too large' is (heuristically)
21106         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
21107         overflow concerns.  This will prevent some unwanted malloc failures
21108         when the inputs are very large.
21109
21110 2005-03-15  Karl Berry  <karl@gnu.org>
21111
21112         * config/srclist.txt (config.rpath): from gettext.
21113         * config/config.rpath: update.
21114
21115 2005-03-15  Bruno Haible  <bruno@clisp.org>
21116
21117         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
21118         to 'negate'.
21119
21120         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
21121         variable.
21122
21123         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
21124         results.
21125
21126 2005-03-14  Simon Josefsson  <jas@extundo.com>
21127
21128         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
21129         <fx@gnu.org>.
21130
21131 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
21132
21133         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
21134         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
21135         intprops.h.
21136         * lib/strtol.c: Likewise.
21137
21138 2005-03-14  Jim Meyering  <jim@meyering.net>
21139
21140         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
21141         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
21142         to be nonzero so that we (and caller) can detect the difference
21143         between a valid zero-length expansion and an error return, even
21144         when the underlying strftime fails before writing anything into
21145         that location.
21146
21147 2005-03-14  Bruno Haible  <bruno@clisp.org>
21148
21149         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
21150         Update from GNU gettext 0.14.3.
21151
21152 2005-03-10  Jim Meyering  <jim@meyering.net>
21153
21154         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
21155
21156 2005-03-10  Jim Meyering  <jim@meyering.net>
21157
21158         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
21159         so that this module works on systems without fchdir.
21160
21161 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
21162
21163         Factor int-properties macros into a single file, except for
21164         glibc-related files.
21165         * lib/intprops.h: New file.
21166         * lib/getloadavg.c: Include it instead of limits.h.
21167         (INT_STRLEN_BOUND): Remove.
21168         * lib/human.c: Include intprops.h.
21169         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
21170         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
21171         302/1000.
21172         * lib/inttostr.h: Include intprops.h instead of limits.h.
21173         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
21174         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
21175         for consistency with intprops.h.
21176         (time_t_is_integer, twos_complement_arithmetic): Use them.
21177         * lib/sig2str.h: Include <signal.h>, intprops.h.
21178         (INT_STRLEN_BOUND): Remove.
21179         * lib/strftime.c (TYPE_SIGNED): Remove.
21180         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
21181         * lib/strtol.c: Adjust comments to match intprops.h.
21182         * lib/userspec.c: Include intprops.h.
21183         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
21184         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
21185         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
21186         instead of rolling our own expressions.
21187         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
21188
21189         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
21190         instead of int.
21191         (my_strftime): Do not mishandle years close to INT_MAX, by doing
21192         the right thing even if adding 1900 would overflow.  Similarly
21193         for tm_mon + 1 and tm_yday + 1.
21194         Make %Y always equivalent to %C%y, and similarly for %G and %g.
21195         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
21196         (DO_SIGNED_NUMBER): New macro.
21197         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
21198
21199 2005-03-07  Bruno Haible  <bruno@clisp.org>
21200
21201         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
21202
21203 2005-03-07  Bruno Haible  <bruno@clisp.org>
21204
21205         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
21206
21207 2005-03-04  Derek R. Price  <derek@ximbiot.com>
21208
21209         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
21210         (func_import): Only replace files via --import when they have actually
21211         changed.
21212
21213 2005-03-03  Derek R. Price  <derek@ximbiot.com>
21214
21215         * m4/mmap-anon.m4: New file.
21216         * m4/pagealign_alloc.m4: New file.
21217
21218 2005-03-03  Derek R. Price  <derek@ximbiot.com>
21219             Bruno Haible  <bruno@clisp.org>
21220
21221         * modules/pagealign_alloc: New file.
21222         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
21223
21224 2005-03-03  Derek R. Price  <derek@ximbiot.com>
21225             Bruno Haible  <bruno@clisp.org>
21226
21227         * lib/pagealign_alloc.h: New file.
21228         * lib/pagealign_alloc.c: New file.
21229
21230 2005-03-03  Bruno Haible  <bruno@clisp.org>
21231
21232         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
21233         Use an all-permissive copyright notice, recommended by RMS.
21234
21235 2005-03-02  Bruno Haible  <bruno@clisp.org>
21236
21237         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
21238         of AIX, the replacement has to be done only after <string.h> is
21239         included, therefore not in config.h. stpncpy.h does the replacement,
21240         and stpncpy.c uses it.
21241
21242 2005-03-02  Bruno Haible  <bruno@clisp.org>
21243
21244         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
21245         stpncpy.c uses it.
21246
21247 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
21248
21249         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
21250         The workaround isn't strictly needed for POSIX conformance, and
21251         it's too much of a pain to configure and maintain.  We'll ask
21252         people to fix their kernels instead.
21253         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
21254         (NANOSLEEP_BUG_WORKAROUND): Remove.
21255         (xnanosleep): Remove the workaround.
21256
21257 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
21258
21259         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
21260         Reported by Derek Price.
21261         (Include): Add "timespec.h".
21262
21263         * modules/xnanosleep (Depends-on): Remove gethrxtime.
21264
21265 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
21266
21267         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
21268         to detect nanosleep bug.
21269
21270 2005-03-01  Bruno Haible  <bruno@clisp.org>
21271
21272         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
21273
21274 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
21275
21276         * modules/gethrxtime: New file.
21277         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
21278         (Depends-on): Add gethrxtime.
21279         (configure.ac): Add gl_XNANOSLEEP.
21280         (Makefile.am): Remove lib_SOURCES line.
21281
21282 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
21283
21284         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
21285         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
21286
21287 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
21288
21289         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
21290         * lib/timespec.h (gettime): Return void, since it always
21291         succeeds now.  All uses changed.
21292         * lib/gettime.c (gettime) Likewise.
21293         [HAVE_NANOTIME]: Prefer nanotime.
21294         Assume gettimeofday succeeds, as POSIX requires.
21295         Assime time () succeeds, since other code already does.
21296         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
21297         (timespec_subtract): Remove.
21298         (NANOSLEEP_BUG_WORKAROUND): New constant.
21299         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
21300         things considerably.  Use it only on GNU/Linux hosts, since the
21301         workaround shouldn't be needed elsewhere.
21302
21303 2005-02-24  Bruno Haible  <bruno@clisp.org>
21304
21305         * modules/gettext (Files): Add m4/glibc2.m4.
21306
21307 2005-02-24  Bruno Haible  <bruno@clisp.org>
21308
21309         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
21310         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
21311         * m4/progtest.m4:
21312         Update from GNU gettext 0.14.2.
21313         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
21314
21315 2005-02-24  Bruno Haible  <bruno@clisp.org>
21316
21317         * lib/localcharset.c: Update from GNU gettext 0.14.2.
21318         * lib/config.charset: Update from GNU gettext 0.14.2.
21319
21320 2005-02-24  Bruno Haible  <bruno@clisp.org>
21321
21322         * lib/gettext.h: Update from GNU gettext 0.14.2.
21323
21324 2005-02-23  Simon Josefsson  <jas@extundo.com>
21325
21326         * m4/iconvme.m4: New file.
21327
21328 2005-02-23  Jim Meyering  <jim@meyering.net>
21329
21330         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
21331         change.
21332         Thanks to Bruno Haible for catching it.
21333
21334 2005-02-22  Simon Josefsson  <jas@extundo.com>
21335
21336         * modules/iconvme: New file.
21337
21338         * MODULES.html.sh: Add iconvme.
21339
21340 2005-02-22  Simon Josefsson  <jas@extundo.com>
21341
21342         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
21343
21344 2005-02-22  Simon Josefsson  <jas@extundo.com>
21345
21346         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
21347
21348 2005-02-22  Jim Meyering  <jim@meyering.net>
21349
21350         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
21351         s/ifndef/ifdef/.
21352
21353 2005-02-20  Neil Conway  <neilc@samurai.com>
21354
21355         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
21356         returned by OSX/Darwin if the specified buffer is not large
21357         enough for the hostname.
21358
21359 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21360
21361         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
21362         pass it to _help, otherwise the latter coredumps trying to
21363         dereference state.root_argp.
21364
21365 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
21366
21367         * modules/chdir-long (Depends-on): Add memrchr.
21368         * modules/memrchr (Files): Add lib/memrchr.h.
21369         (Include): "memrchr.h".
21370
21371 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
21372
21373         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
21374
21375 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
21376
21377         * lib/memrchr.h: New file.
21378         * lib/chdir-long.c: Include it.
21379         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
21380         Don't bother including stddef.h.
21381
21382 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
21383
21384         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
21385         inclusion.
21386         Include <sys/types.h>, for dev_t.
21387         (ME_DUMMY, ME_REMOTE): Move from here....
21388         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
21389         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
21390         Dmitry V. Levin.
21391         Include mountlist.h first, to test the interface.
21392
21393 2005-01-29  Bruno Haible  <bruno@clisp.org>
21394
21395         * lib/progname.c (program_name): Initialize.
21396         Needed when linking statically on MacOS X.
21397
21398 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
21399
21400         Sync from coreutils.
21401         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
21402         (Depends-on): Add c-strtod.
21403         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
21404
21405 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
21406
21407         Sync from coreutils.
21408         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
21409
21410         Remove files that are specific to coreutils.
21411         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
21412
21413 2005-01-28  Bruno Haible  <bruno@clisp.org>
21414
21415         * modules/javacomp: New file.
21416         * MODULES.html.sh (Java): Add javacomp.
21417
21418 2005-01-28  Bruno Haible  <bruno@clisp.org>
21419
21420         * m4/javacomp.m4: New file, from GNU gettext.
21421
21422 2005-01-28  Bruno Haible  <bruno@clisp.org>
21423
21424         * lib/javacomp.sh.in: New file, from GNU gettext.
21425         * lib/javacomp.h: New file, from GNU gettext.
21426         * lib/javacomp.c: New file, from GNU gettext.
21427
21428 2005-01-26  Simon Josefsson  <jas@extundo.com>
21429
21430         * lib/gai_strerror.c: Use GPL in header.
21431
21432 2005-01-26  Bruno Haible  <bruno@clisp.org>
21433
21434         * modules/javaexec: New file.
21435         * MODULES.html.sh (Java): Add javaexec.
21436
21437 2005-01-26  Bruno Haible  <bruno@clisp.org>
21438
21439         * m4/javaexec.m4: New file, from GNU gettext.
21440
21441 2005-01-26  Bruno Haible  <bruno@clisp.org>
21442
21443         * lib/javaexec.sh.in: New file, from GNU gettext.
21444         * lib/javaexec.h: New file, from GNU gettext.
21445         * lib/javaexec.c: New file, from GNU gettext.
21446
21447 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21448
21449         * modules/lchown (Depends-on): Remove lchown.h
21450
21451 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21452
21453         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
21454         must be defined if the header file was not found, in order
21455         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
21456
21457 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21458
21459         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
21460         initializers for struct pentry_state.
21461         (__argp_error): Check return value of __asprintf
21462         (__argp_failure): Translate error message
21463
21464         * lib/argp-parse.c: Removed braces around the expansion of N_()
21465
21466 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
21467
21468         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
21469         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
21470         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
21471         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
21472         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
21473         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
21474         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
21475         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
21476         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
21477         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
21478         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
21479         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
21480         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
21481         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
21482         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
21483         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
21484         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
21485         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
21486         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
21487         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
21488         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
21489         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
21490         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
21491         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
21492         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
21493         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
21494         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
21495         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
21496         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
21497         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
21498         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
21499         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
21500         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
21501         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
21502         xstrtol.m4, xstrtoumax.m4, yesno.m4:
21503         Use an all-permissive copyright notice, recommended by RMS.
21504
21505 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
21506
21507         * modules/chdir-long (Depends-on): Remove mempcpy.
21508
21509 2005-01-21  Jim Meyering  <jim@meyering.net>
21510
21511         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
21512         same value as for Solaris 9.
21513
21514         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
21515         component length.  This included changing the parameter to be
21516         of type `char *' rather than `char const *'.
21517         * lib/chdir-long.h (chdir_long): Update prototype.
21518
21519         * lib/openat.c (fdopendir, fstatat): New functions.
21520         * lib/openat.h: Include headers required for use of DIR and struct
21521         stat.
21522         [AT_SYMLINK_NOFOLLOW]: Define.
21523         (fdopendir, fstatat): Add prototypes.
21524
21525 2005-01-21  Bruno Haible  <bruno@clisp.org>
21526
21527         * modules/classpath: New file.
21528         * MODULES.html.sh (Java): Add classpath.
21529
21530 2005-01-21  Bruno Haible  <bruno@clisp.org>
21531
21532         * lib/classpath.h: New file, from GNU gettext.
21533         * lib/classpath.c: New file, from GNU gettext.
21534
21535 2005-01-20  Simon Josefsson  <jas@extundo.com>
21536
21537         * modules/version-etc-fsf: New file.
21538
21539 2005-01-20  Simon Josefsson  <jas@extundo.com>
21540
21541         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
21542         * lib/version-etc.c: Remove version_etc_copyright.
21543         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
21544         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
21545
21546 2005-01-20  Simon Josefsson  <jas@extundo.com>
21547
21548         * lib/base64.h (isbase64): Add.
21549
21550         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
21551         using a unsigned prototype, don't inline.
21552         (base64_decode): Use it.
21553
21554 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
21555
21556         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
21557         it.
21558
21559 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
21560
21561         * lib/save-cwd.c (save_cwd): Remove code to support the case
21562         where fchdir is missing or flaky.
21563
21564 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
21565
21566         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
21567
21568 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
21569
21570         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
21571         AC_LIBSOURCES now does this.
21572         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
21573         with new ullong_max module.
21574
21575 2005-01-19  Bruno Haible  <bruno@clisp.org>
21576
21577         * modules/sh-quote: New file.
21578         * MODULES.html.sh (Executing programs): Add sh-quote.
21579
21580 2005-01-19  Bruno Haible  <bruno@clisp.org>
21581
21582         * lib/sh-quote.h: New file, from GNU gettext.
21583         * lib/sh-quote.c: New file, from GNU gettext.
21584
21585 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
21586
21587         Merge from coreutils.
21588         * m4/ullong_max.m4: New file.
21589         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
21590         (gl_MACROS): Assume localeconv exists.
21591
21592 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
21593
21594         Merge changes from coreutils, as described below in several
21595         changelogs dated today.
21596
21597         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
21598         (O_DIRECTORY): Remove; not needed here, since "." must be
21599         a directory.  All uses removed.
21600         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
21601         universal on Suns, and we also need to test for IRIX.
21602         Revamp code to use 'if' rather than '#if'.
21603         Avoid unnecessary comparison of cwd->desc to 0.
21604
21605         * lib/utimens.c (futimens): Robustify the previous patch, by checking
21606         for known valid error numbers rather than observed invalid ones.
21607
21608 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
21609
21610         * modules/ullong_max: New file.
21611
21612         * modules/chdir-long, modules/openat: New files.
21613         * modules/save-cwd (Depends-on): Depend on chdir-long.
21614         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
21615
21616 2005-01-18  Jim Meyering  <jim@meyering.net>
21617
21618         Merge from coreutils.
21619         * m4/chdir-long.m4, m4/openat.m4: New files.
21620         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
21621         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
21622         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
21623         is sane and DOES follow symlinks.  Besides, testing 20 different
21624         systems found no broken chown implementations.
21625         Prompted by a change in rsync's copy of this macro.
21626         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
21627
21628         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
21629
21630         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
21631         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
21632         NULL-means-set-to-current-time semantics.
21633         Remove temporary file immediately, rather than waiting
21634         for configure's at-exit trap code to do it.
21635
21636 2005-01-18  Jim Meyering  <jim@meyering.net>
21637
21638         * lib/version-etc.c (version_etc_copyright): Update copyright date.
21639
21640         * lib/utimens.c (futimens): Account for the fact that futimes
21641         can also fail with errno == ENOSYS or errno == ENOENT.
21642         Patch from Dmitry V. Levin.
21643
21644         Change the name of the robust chdir function from chdir to chdir_long.
21645         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
21646         (restore_cwd): Use chdir_long, not chdir.
21647         * lib/chdir-long.c: Renamed from chdir.c.
21648         * lib/chdir-long.h: Renamed from chdir.h.
21649         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
21650         Hurd.
21651
21652 2005-01-18  Bruno Haible  <bruno@clisp.org>
21653
21654         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
21655         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
21656         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
21657         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
21658         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
21659         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
21660         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
21661         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
21662         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
21663         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
21664         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
21665         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
21666         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
21667         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
21668         Use an all-permissive copyright notice, recommended by RMS.
21669
21670 2005-01-18  Bob Proulx  <bob@proulx.com>
21671
21672         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
21673         simplify offsetof() macro construct to avoid compile failure with
21674         native HP-UX 11.0 ANSI C compiler.
21675
21676 2005-01-17  Bruno Haible  <bruno@clisp.org>
21677
21678         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
21679         redundant because stpncpy.m4 takes care of it.
21680
21681 2005-01-17  Bruno Haible  <bruno@clisp.org>
21682
21683         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
21684
21685 2005-01-17  Bruno Haible  <bruno@clisp.org>
21686
21687         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
21688         used.
21689
21690 2005-01-17  Bruno Haible  <bruno@clisp.org>
21691
21692         * lib/fwriteerror.h (fwriteerror): Change specification to include
21693         fclose.
21694         * lib/fwriteerror.c: Include <stdbool.h>.
21695         (fwriteerror): At the end, close the file stream. Record whether
21696         stdout was already closed.
21697
21698 2005-01-17  Bruno Haible  <bruno@clisp.org>
21699
21700         * lib/execute.c (environ): Declare if needed.
21701         * lib/pipe.c (environ): Likewise.
21702         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
21703
21704 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21705
21706         * modules/argp: Depend on vsnprintf
21707
21708 2005-01-10  Jim Meyering  <jim@meyering.net>
21709
21710         * modules/closeout (Depends-on): Add atexit.
21711
21712 2005-01-06  Bruno Haible  <bruno@clisp.org>
21713
21714         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
21715
21716 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
21717
21718         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
21719         definitions to be after all include files, to avoid collisions.
21720         Problem reported by Bob Proulx.
21721
21722 2005-01-04  Jim Meyering  <jim@meyering.net>
21723
21724         Changes imported from coreutils.
21725         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
21726         as the mkstemp template, use a temporary directory and an
21727         8.3-friendly template to avoid trouble on systems like DJGPP.
21728         Reported by Juan M. Guerrero via Stepan Kasal.
21729         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
21730         close. Remove the temporary directory right away, rather than waiting
21731         for configure's at-exit trap code to do it.
21732         Suggestion from Stepan Kasal.
21733
21734 2005-01-01  Simon Josefsson  <jas@extundo.com>
21735
21736         * gnulib-tool: Print #include directives when --import'ing.
21737
21738 2004-12-28  Simon Josefsson  <jas@extundo.com>
21739
21740         * tests/test-base64.c: Include required header files.  Remove
21741         unused variables.
21742
21743 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
21744
21745         * modules/error (Depends-on): Remove gettext.
21746
21747 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
21748
21749         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
21750         not needed.  This removes a dependency on the gettext module.
21751         [defined _LIBC]: Do not include <libintl.h>; not needed.
21752
21753 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
21754
21755         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
21756         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
21757
21758 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
21759
21760         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
21761         HAVE_DECL_STRTOLD.
21762
21763 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
21764
21765         * modules/getdate (Depends-on): Remove alloca-opt.
21766
21767 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
21768
21769         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
21770
21771 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
21772
21773         * lib/argp-parse.c: Include <stddef.h>.
21774         (alignof, alignto): New macros.
21775         (parser_init): Don't assume that void * is aligned sufficiently
21776         for struct option.
21777
21778         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
21779         need to extend the stack.
21780         (YYINITDEPTH): New macro, so that the initial stack isn't overly
21781         large.
21782
21783 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21784
21785         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
21786
21787 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
21788
21789         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
21790         (2004-10-24) change.  Apparently this was a false alarm.
21791
21792         * modules/getdate: Depend on alloca-opt, not alloca.
21793
21794 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
21795
21796         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
21797         Remove now-obsolete comment about AIX.
21798         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
21799         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
21800         (YYMAXDEPTH): New macro.
21801
21802 2004-12-18  Simon Josefsson  <jas@extundo.com>
21803
21804         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
21805
21806 2004-12-18  Bruno Haible  <bruno@clisp.org>
21807
21808         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
21809
21810 2004-12-18  Bruno Haible  <bruno@clisp.org>
21811
21812         * lib/fatal-signal.c (fatal_signals): Make non-const.
21813         (init_fatal_signals): New function.
21814         (uninstall_handlers, install_handlers): Ignore signals that were set to
21815         SIG_IGN.
21816         (at_fatal_signal): Call init_fatal_signals.
21817         (init_fatal_signal_set): Likewise. Ignore signals that were set to
21818         SIG_IGN.
21819         Reported by Paul Eggert.
21820
21821 2004-12-18  Bruno Haible  <bruno@clisp.org>
21822
21823         * doc/alloca.texi: New file.
21824         * doc/alloca-opt.texi: New file.
21825
21826 2004-12-17  Jim Meyering  <jim@meyering.net>
21827
21828         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
21829         Otherwise, install-sh could exit with improper exit status when
21830         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
21831
21832 2004-12-16  Simon Josefsson  <jas@extundo.com>
21833
21834         * tests/test-base64.c: Add license.
21835
21836 2004-12-15  Stepan Kasal  <address@hidden>
21837
21838         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
21839
21840 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
21841
21842         * modules/getcwd (Files): Add m4/d-ino.m4.
21843         Suggested by Mark D. Baushke.
21844
21845 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
21846
21847         * lib/getdate.y (textint): New member "negative".
21848         (time_zone_hhmm): New function.
21849         Expect 14 shift-reduce conflicts, not 13.
21850         (o_colon_minutes): New rule.
21851         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
21852         (yylex): Set the "negative" member of signed numbers.
21853
21854 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
21855
21856         * doc/getdate.texi (Time of day items, Time zone items):
21857         Describe new formats +00:00, UTC+00:00.
21858
21859 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
21860
21861         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
21862         spurious "-l"s.  Problem reported by Stepan Kasal.
21863
21864 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
21865
21866         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
21867         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
21868
21869 2004-12-04  Simon Josefsson  <jas@extundo.com>
21870
21871         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
21872         Vandoorselaere <yoann@prelude-ids.org>.
21873
21874 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
21875
21876         Changes imported from coreutils.
21877         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
21878         exist.
21879         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
21880
21881 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
21882
21883         Changes imported from coreutils.
21884         * lib/hard-locale.c: Assume <locale.h> exists.
21885         Include "strdup.h".
21886         (GLIBC_VERSION): New macro.
21887         (hard_locale): Assume setlocale exists.
21888         Rewrite to avoid #ifdef.
21889         Use strdup rather than malloc + strcpy.
21890         * lib/human.c: Assume <locale.h> exists.
21891         (human_readable): Assume localeconv exists.
21892
21893 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
21894
21895         * modules/hard-locale (Depends-on): Add strdup.
21896
21897 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
21898
21899         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
21900         convert T2, not T.  (Imported from libc.)
21901
21902 2004-11-30  Simon Josefsson  <jas@extundo.com>
21903
21904         * modules/restrict (License): Change to LGPL.
21905
21906 2004-11-30  Simon Josefsson  <jas@extundo.com>
21907
21908         * m4/restrict.m4: Add copyright and copying conditions.
21909
21910 2004-11-30  Simon Josefsson  <jas@extundo.com>
21911
21912         * m4/base64.m4: New file.
21913
21914 2004-11-30  Simon Josefsson  <jas@extundo.com>
21915
21916         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
21917         base64.
21918
21919         * tests/test-base64.c: New file.
21920
21921         * modules/base64: New file.
21922
21923 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
21924
21925         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
21926         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
21927
21928         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
21929
21930 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
21931
21932         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
21933         (__getcwd.c): Don't restore errno; glibc doesn't.
21934         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
21935         first, falling back to our code only if its results look suspicious.
21936         Ensure that the resulting buffer is only as large as necessary.
21937
21938         * lib/readutmp.c: Include readutmp.h first.
21939         Include <errno.h>, since readutmp.h no longer does that.
21940         * lib/readutmp.h: Don't include <errno.h>,
21941         <sys/param.h>, <time.h>; not needed to establish interface.
21942         (errno): Remove decl.
21943         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
21944         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
21945         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
21946
21947 2004-11-28  Simon Josefsson  <jas@extundo.com>
21948
21949         * lib/base64.h, base64.c: New file.
21950
21951 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
21952
21953         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
21954
21955 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
21956
21957         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
21958         (Depends-on): Remove pathmax, same.  Add mempcpy.
21959         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
21960         (Makefile.am): Append getcwd.h to lib_SOURCES.
21961         (Include): Add getcwd.h.
21962         (Maintainer): Change from Jim Meyering to "all, glibc",
21963         since getdate now uses intended-for-glibc code.
21964         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
21965         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
21966
21967 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
21968
21969         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
21970         HP's ANSI C compiler.
21971         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
21972         Declaring int functions causes warnings on some modern systems and
21973         shouldn't be needed to compile on ancient ones.
21974         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
21975         defined.
21976
21977         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
21978         with the following changes.
21979         (__set_errno): Parenthesize properly.
21980         Include <stdbool.h>.
21981         (MIN, MAX, MATCHING_INO): New macros.
21982         (__getcwd): Define with prototype, not K&R form.
21983         Use heuristics to allocate default buffer on stack if possible.
21984         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
21985         behavior, and to avoid the PATH_MAX limit when computing
21986         ../../../../...
21987         Use MATCHING_INO to compare inode number to file.
21988         Check for arithmetic overflow in size calculations.
21989         Fix bug in reallocation of dot array that caused getcwd to fail
21990         on directories nested deeper than 75.
21991         Be more careful about saving errno on error.
21992         Do not use realloc; use only free+malloc, as this is a bit
21993         more flexible and avoids a needless copy operation.
21994         Do not inspect st_dev and st_ino for symbolic links; POSIX
21995         doesn't specify the latter.
21996         Check for closedir errors.
21997         Avoid needless casts.
21998         Use "#ifdef weak_alias" around weak_alias, to be like other
21999         glibc code.
22000         The following changes to getcwd.c have effect only when used in
22001         gnulib; they have no effect inside glibc proper.
22002         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
22003         as alloca isn't used.
22004         (alloca, __alloca): Likewise.
22005         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
22006         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
22007         unconditionally, as gnulib assumes C89 or better.
22008         Do not include <sys/param.h>.
22009         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
22010         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
22011         better.
22012         (NULL) [!defined NULL]: Remove; we assume C89 or better.
22013         Include <dirent.h> in a way that is compatible with modern Autoconf.
22014         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
22015         New macros, if not already defined.
22016         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
22017         Use "_LIBC", not "defined _LIBC", for consistency.
22018         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
22019         a mempcpy module.
22020         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
22021         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
22022         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
22023         credit only to Jim Meyering and adjust the copyright dates.
22024         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
22025         <stdlib.h>, <unistd.h>, "pathmax.h".
22026         Instead, include "xgetcwd.h" (first) and "getcwd.h".
22027         (INITIAL_BUFFER_SIZE): Remove.
22028         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
22029
22030 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
22031
22032         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
22033         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
22034         Use the _ONCE methods, for efficiency.
22035         Check for fcntl.h.  In test program, include <errno.h>
22036         and <fcntl.h> if available.  Remove old K&R cruft from
22037         test program.  Check for common errors in GNU/Linux,
22038         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
22039         don't do AC_LIBOBJ, as that's getcwd.m4's job.
22040         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
22041         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
22042         name accordingly.
22043         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
22044         accommodate new getcwd.c.
22045         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
22046         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
22047         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
22048         that's all we need now.
22049
22050 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
22051
22052         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
22053         argp-parse.c depends on getopt internals, that means we should
22054         always use our getopt, to be on the safe side.
22055         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
22056         order not to spoil the result of an eventual previous invocation
22057         of gl_GETOPT_SUBSTITUTE.
22058
22059 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
22060
22061         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
22062         redefinition warnings. To avoid them, include the defines
22063         in `#if !defined __need_getopt ... #endif'. The only place
22064         where __getopt_argv_const is used is in definitions
22065         of getopt_long and getopt_long_only below, which are as well
22066         protected by `#ifndef __need_getopt'.
22067         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
22068         __need_getopt after including <stdio.h> and <unistd.h> These
22069         headers might have defined it.
22070
22071 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
22072
22073         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
22074
22075 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
22076
22077         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
22078         (futimens): New function, which uses futimes if available.
22079         (futimens, utimens): Support timespec==NULL, with same semantics
22080         as utime and utimens.
22081         * lib/utimens.h (futimens): New decl.
22082
22083 2004-11-23  Jim Meyering  <jim@meyering.net>
22084
22085         * lib/getopt_.h: Remove trailing blanks.
22086
22087 2004-11-23  Jim Meyering  <jim@meyering.net>
22088
22089         * lib/__fpending.c: Add comment.
22090
22091 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
22092
22093         * modules/canonicalize (Depends-on): Add xreadlink.
22094         Problem reported by James Youngman.
22095
22096 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
22097
22098         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
22099         New macros.
22100         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
22101         optopt): Use them instead of invoking ## directly; otherwise, the
22102         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
22103
22104 2004-11-19  Bruno Haible  <bruno@clisp.org>
22105
22106         * lib/strtok_r.c: Move comments from here...
22107         * lib/strtok_r.h: ... to here.
22108
22109 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
22110
22111         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
22112         implementations that mishandle size_t overflow.
22113
22114 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
22115
22116         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
22117         might fail.  Problem reported by Yoann Vandoorselaere.
22118         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
22119         implementations that mishandle size_t overflow.
22120
22121 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
22122
22123         * modules/canon-host (Depends-on): Add strdup.
22124
22125 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
22126
22127         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
22128
22129 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
22130
22131         * lib/canon-host.c: Include "strdup.h".
22132         (canon_host): Use getaddrinfo if available, so that IPv6 works.
22133         Use strdup instead of malloc/strcpy to duplicate strings.
22134
22135         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
22136         (human_space_before_unit): New constant.
22137         * lib/human.c (human_readable): Support it.
22138
22139         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
22140         (xgetcwd): Set errno correctly when failing.
22141         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
22142         the failure is actually due to a PATH_MAX problem.
22143
22144         Further getopt changes to make it more likely that glibc will
22145         buy the changes back.
22146         * lib/getopt.c (POSIXLY_CORRECT): New constant.
22147         (getopt): Use it, so to preserve glibc semantic
22148         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
22149         when compiling for libc.
22150         * lib/getopt_.h (__getopt_argv_const): Bring it back.
22151         (getopt_long, getopt_long_only): Use it.
22152
22153         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
22154         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
22155         (getopt): Argv is now char * const *, as per standard.
22156         (_getopt_internal_r, _getopt_internal): Argv is now char **,
22157         not char *__getopt_argv_const *.
22158         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
22159         _getopt_long_only_r): Likewise.
22160         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
22161         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
22162         _getopt_long_r, _getopt_long_only_r): Likewise.
22163         * lib/getopt_.h (__getopt_argv_const): Remove.
22164         (getopt): Argv is now char * const *, as per standard.
22165
22166         * lib/getdate.y (tORDINAL): New token.
22167         (day, relunit): Allow it for relative times.
22168         (relative_time_table): Use tORDINAL for ordinals.
22169
22170 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
22171
22172         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
22173         Document that "second" isn't allowed as an ordinal number.
22174
22175 2004-11-16  Jim Meyering  <jim@meyering.net>
22176
22177         * modules/closeout (Depends-on): Add fpending.
22178
22179 2004-11-15  Jim Meyering  <jim@meyering.net>
22180
22181         * lib/closeout.c: Include "__fpending.h" once again.
22182         Include <stdbool.h>.
22183         (close_stdout): Don't fail just because stdout was closed initially,
22184         since some programs don't write to stdout in the normal course of
22185         operation (other than --version and --help), and we don't want this
22186         function to make e.g. `touch file >&-' fail.
22187         But do fail if it was closed and someone has tried to write to it.
22188         E.g., `printf foo >&-' must fail.
22189
22190 2004-11-13  Jim Meyering  <jim@meyering.net>
22191
22192         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
22193
22194 2004-11-12  Simon Josefsson  <jas@extundo.com>
22195
22196         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
22197         small doc fix is still pending.
22198
22199 2004-11-11  Simon Josefsson  <jas@extundo.com>
22200
22201         * modules/strtok_r: New file.
22202
22203         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
22204         strtok_r.
22205
22206 2004-11-11  Simon Josefsson  <jas@extundo.com>
22207
22208         * m4/strtok_r.m4: New file.
22209
22210         * m4/getopt.m4: Replace opterr.
22211
22212 2004-11-11  Simon Josefsson  <jas@extundo.com>
22213
22214         * lib/strtok_r.h, strtok_r.c: New file.
22215
22216 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
22217
22218         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
22219         of replacing opterr, getopt, etc.  This should handle the
22220         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
22221
22222 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
22223
22224         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
22225         we can stop lying to compilers about the constness of argv when we
22226         are compiled outside glibc.
22227         (getopt, getopt_long, getopt_long_only): Use it.
22228         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
22229         _getopt_internal, getopt): Likewise.
22230         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
22231         _getopt_long_only_r): Likewise.
22232         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
22233         _getopt_long_r, _getopt_long_only_r): Likewise.
22234
22235         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
22236         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
22237         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
22238         the other external symbols.
22239         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
22240         declaration, since the above renaming now works around collisions.
22241
22242 2004-11-11  Jim Meyering  <jim@meyering.net>
22243
22244         * lib/linebreak.c: Remove trailing blanks.
22245         * lib/alloca_.h: Likewise.
22246         * lib/acosl.c: Likewise.
22247         * lib/euidaccess.c: Likewise.
22248         * lib/allocsa.h: Likewise.
22249
22250 2004-11-10  Simon Josefsson  <jas@extundo.com>
22251
22252         * m4/getaddrinfo.m4: New file.
22253
22254 2004-11-10  Simon Josefsson  <jas@extundo.com>
22255
22256         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
22257
22258 2004-11-10  Simon Josefsson  <jas@extundo.com>
22259
22260         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
22261         getaddrinfo.
22262
22263         * modules/getaddrinfo: New file.
22264
22265 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
22266
22267         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
22268
22269 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
22270
22271         * lib/mktime.c (SHR): New macro, which is a portable
22272         substitute for >> that should work even on Crays.
22273         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
22274         Problem reported by Mark D. Baushke in
22275         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
22276         * lib/getdate.y (SHR): Likewise.
22277         (tm_diff): Use it.
22278         * lib/strftime.c (SHR): Likewise.
22279         (tm_diff): Use it.
22280         * lib/quotearg.c (struct quoting_options): Use unsigned int for
22281         quote_these_too, so that right shifts are well defined.  All uses
22282         changed.
22283
22284 2004-11-10  Jim Meyering  <jim@meyering.net>
22285
22286         Ensure that no close failure goes unreported.
22287         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
22288         return early when it seems there's nothing to flush.
22289         Don't include __fpending.h.
22290
22291 2004-11-10  Jim Meyering  <jim@meyering.net>
22292
22293         * modules/closeout (Depends-on): Remove fpending.
22294
22295 2004-11-10  Jim Meyering  <jim@meyering.net>
22296
22297         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
22298
22299 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
22300
22301         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
22302         gl_FUNC_STRFTIME.
22303         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
22304         and AC_REQUIRE when possible, to avoid duplicate checks.
22305         Check for <wchar.h>.
22306
22307 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
22308
22309         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
22310
22311 2004-11-09  Bruno Haible  <bruno@clisp.org>
22312
22313         * m4/sockpfaf.m4: New file.
22314
22315 2004-11-05  Bruno Haible  <bruno@clisp.org>
22316
22317         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
22318         Reported by Mark D. Baushke <mdb@cvshome.org>.
22319
22320 2004-11-04  Bruno Haible  <bruno@clisp.org>
22321
22322         2004-09-11  Bruno Haible  <bruno@clisp.org>
22323                 * allocsa.valgrind: New file.
22324         2004-02-06  Bruno Haible  <bruno@clisp.org>
22325                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
22326                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
22327                 Reported by Christopher Seip <chris.seip@hp.com>.
22328
22329 2004-11-04  Bruno Haible  <bruno@clisp.org>
22330
22331         * modules/allocsa (Files): Add lib/allocsa.valgrind.
22332         (Makefile.am): Distribute it.
22333
22334 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
22335
22336         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
22337         with errno == ERANGE if the buffer is too small.
22338         Problem reported by Mark D. Baushke.
22339
22340 2004-11-03  Albert Chin  <china@thewrittenword.com>
22341             Paul Eggert  <eggert@cs.ucla.edu>
22342
22343         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
22344         equivalent, substitute $ac_type for equivalent type rather than
22345         blindly using uint32_t *always* which won't work if uint32_t is not
22346         available.  Define _UINT32_T to work around typedef of uint32_t if
22347         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
22348         2.5.1.
22349
22350 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
22351
22352         * m4/jm-macros.m4: Sync from coreutils.
22353         (gl_MACROS): Check for mbrlen, for pathchk.
22354         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
22355
22356 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
22357
22358         * lib/xreadlink.c (MAXSIZE): New macro.
22359         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
22360         size does not exceed MAXSIZE.  Avoid cast.
22361         As suggested by Mark D. Baushke in
22362         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
22363         if readlink fails with buffer size just under MAXSIZE, try again
22364         with MAXSIZE.
22365
22366 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
22367
22368         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
22369
22370 2004-11-02  Derek R. Price  <derek@ximbiot.com>
22371         and  Paul Eggert  <eggert@cs.ucla.edu>
22372
22373         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
22374         (get_date): Overparenthesize to avoid GCC warning.
22375
22376 2004-11-02  Bruno Haible  <bruno@clisp.org>
22377
22378         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
22379         returns void.
22380
22381 2004-11-02  Bruno Haible  <bruno@clisp.org>
22382
22383         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
22384         function returns void.
22385
22386 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
22387
22388         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
22389         fflush_unlocked, flockfile, funlockfile, funlockfile,
22390         fputs_unlocked, putc_unlocked.
22391
22392 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
22393
22394         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
22395         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
22396         already declared.
22397
22398 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
22399
22400         * modules/getdate (Files): Add doc/getdate.texi.
22401         (Depends-on): Add setenv, xalloc.
22402
22403 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
22404
22405         * lib/getdate.y: Add support for TZ="foo" within a date string.
22406         Fix some bugs near time_t boundaries.  Reject dates with
22407         out-of-range components, e.g., "Sept 31".
22408         Include <stdlib.h>, "setenv.h", "xalloc.h".
22409         (ISDIGIT_LOCALE): Remove; unused.
22410         Note that the TZ and time functions used here are not reentrant.
22411         (mktime_ok, get_tz): New functions.
22412         (TZBUFSIZE): New constant.
22413         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
22414         This requires that we sometimes generate our own TZ="XXX..." setting.
22415
22416 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
22417
22418         * doc/getdate.texi: New file, from coreutils with modifications for
22419         the new TZ parsing.
22420
22421 2004-10-27  Derek R. Price  <derek@ximbiot.com>
22422
22423         * lib/mktime.c (not_equal_tm): Remove redundant check.
22424
22425 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
22426
22427         * modules/regex (lib_SOURCES): Add regex.c.
22428         Reported by James Youngman in
22429         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
22430
22431 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
22432
22433         * lib/getdate.y: Use Bison 1.875 features, and some minor
22434         code cleanups.  This change does not affect semantics.
22435         Don't include <stdlib.h>; no longer needed.
22436         Don't include unlocked-io.h; only the "#if TEST" code uses
22437         stdio, and performance isn't crucial there.
22438         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
22439         Bison 1.875 features as described below.
22440         All uses of "PC." replaced by "pc->".
22441         (YYSTYPE): Add a forward declaration.
22442         (yylex, yyerror): Use full prototypes in forward decls.
22443         Use "%pure-parser" rather than obsolescent "%pure_parser".
22444         Use %parse-param and %lex-param instead of obsolescent
22445         YYPARSE_PARAM and YYLEX_PARAM.
22446         (meridian_table, month_and_day_table, time_units_table,
22447         relative_time_table, time_zone_table, military_table,
22448         lookup_zone, lookup_word, get_date):
22449         Use NULL instead of 0 where appropriate.
22450         (to_hour): Avoid abort (), to avoid a dependency on
22451         stdlib.h.
22452         (yyerror, yylex): Now accepts parser_control * arg.
22453         (main) [TEST]: Use '\0' rather than 0 for char.
22454
22455 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
22456
22457         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
22458
22459 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
22460
22461         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
22462         It's now the caller's responsibility to handle the case where
22463         !HAVE_GETPAGESIZE && !defined getpagesize.
22464
22465         * lib/mktime.c (leapyear): Arg is long int, not int.
22466
22467 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
22468
22469         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
22470
22471 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
22472
22473         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
22474         missing.  Problem reported by James Youngman.
22475
22476 2004-10-16  Simon Josefsson  <jas@extundo.com>
22477
22478         * gnulib-tool: Fix comments.  Fix parse problem.
22479         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
22480
22481 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
22482
22483         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
22484         implementation of getopt_long.  Problem reported by Alexander Taler in:
22485         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
22486
22487 2004-10-15  Bruno Haible  <bruno@clisp.org>
22488
22489         * gnulib-tool: Untabify. Initialize supplied_libname.
22490         (func_usage): More homogenous output.
22491         (func_modules_transitive_closure, func_modules_to_filelist,
22492         func_emit_lib_Makefile_am): New functions.
22493         (func_import): New function, extracted from big case statement. Use
22494         func_get_license, func_modules_transitive_closure,
22495         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
22496         opt_lgpl. Don't use test -a, as it's not portable.
22497         (func_create_testdir): Use func_modules_transitive_closure,
22498         func_modules_to_filelist, func_emit_lib_Makefile_am.
22499
22500 2004-10-15  Bruno Haible  <bruno@clisp.org>
22501
22502         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
22503
22504 2004-10-15  Bruno Haible  <bruno@clisp.org>
22505
22506         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
22507         the portions belonging to each module.
22508         Suggested by Derek Robert Price <derek@ximbiot.com>.
22509
22510 2004-10-12  Simon Josefsson  <jas@extundo.com>
22511
22512         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
22513         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
22514         to real functions.
22515
22516 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22517
22518         * modules/vsnprintf: New file.
22519
22520 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22521
22522         * m4/vsnprintf.m4: New file.
22523
22524 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22525
22526         * lib/vsnprintf.h: New file.
22527         * lib/vsnprintf.c: New file.
22528
22529 2004-10-11  Bruno Haible  <bruno@clisp.org>
22530
22531         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
22532         vsnprintf.
22533
22534 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
22535
22536         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
22537
22538 2004-10-07  Bruno Haible  <bruno@clisp.org>
22539
22540         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
22541         fits into the provided buffer.
22542
22543 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
22544
22545         * lib/diacrit.c, diacrit.h: Add GPL notice.
22546
22547         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
22548         notice.
22549         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
22550         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
22551         This avoids a potential constant-folding bug.
22552
22553 2004-10-05  Bruno Haible  <bruno@clisp.org>
22554
22555         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
22556         for the declaration of strsep.
22557
22558 2004-10-05  Bruno Haible  <bruno@clisp.org>
22559
22560         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
22561
22562 2004-10-04  Simon Josefsson  <jas@extundo.com>
22563
22564         * modules/memmem: New file.
22565         * tests/test-memmem.c: New file.
22566         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
22567
22568 2004-10-04  Simon Josefsson  <jas@extundo.com>
22569
22570         * m4/memmem.m4: New file.
22571
22572 2004-10-04  Simon Josefsson  <jas@extundo.com>
22573
22574         * lib/memmem.h: New file.
22575         * lib/memmem.c: New file, taken from glibc.
22576
22577 2004-10-04  Simon Josefsson  <jas@extundo.com>
22578
22579         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
22580         '#ifdef USE_UNLOCKED_IO'.
22581
22582 2004-10-04  Simon Josefsson  <jas@extundo.com>
22583
22584         * config/srclist.txt: Add memmem from glibc.
22585
22586 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
22587
22588         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
22589
22590         * modules/argmatch, modules/argp, modules/closeout, modules/error,
22591         modules/exclude, modules/getdate, modules/getline,
22592         modules/getndelim2, modules/getpass, modules/getpass-gnu,
22593         modules/getusershell, modules/linebuffer, modules/md5,
22594         modules/mountlist, modules/posixtm, modules/readtokens,
22595         modules/readutmp, modules/regex, modules/sha1,
22596         modules/version-etc, modules/yesno:
22597         Remove dependency on unlocked-io.
22598
22599 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
22600
22601         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
22602
22603         * m4/unlocked-io.m4: Add copyright notice.
22604         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
22605
22606 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
22607
22608         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
22609         * lib/xmalloc.c (xmemdup): Likewise.
22610         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
22611         XFREE): Remove these long-obsolescent macros.
22612         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
22613         * lib/xstrdup.c: Remove.
22614
22615         * lib/regex.c (re_comp): Cast gettext return value to char *,
22616         Problem reported by Martin Neitzel via Mark D. Baushke.
22617
22618 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
22619
22620         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
22621         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
22622         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
22623         regex.c, sha1.c, version-etc.c, yesno.c:
22624         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
22625         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
22626         the includer's responsibility.
22627
22628         Sync from coreutils.
22629
22630         * lib/modechange.c (mode_compile): Don't decrement a pointer that
22631         points to the start of a string, as the C Standard says the
22632         resulting behavior is undefined.
22633
22634         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
22635         simple -> simple_backups, numbered_existing ->
22636         numbered_existing_backups, numbered -> numbered_backups
22637         to avoid shadowing problems.  All uses changed.
22638         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
22639         * lib/backupfile.c (check_extension, numbered_backup):
22640         Rename locals to avoid shadowing 'basename'.
22641         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
22642         once.
22643
22644         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
22645         * lib/.cvsignore: Add getopt.h.
22646
22647 2004-10-04  Bruno Haible  <bruno@clisp.org>
22648
22649         * modules/README: New file.
22650         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
22651         not a module.
22652
22653 2004-10-02  Jim Meyering  <jim@meyering.net>
22654
22655         * lib/dirfd.h, getpagesize.h: Add copyright notice.
22656
22657 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22658
22659         * modules/strsep: New file.
22660
22661 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22662
22663         * m4/strsep.m4: New file.
22664
22665 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22666
22667         * lib/strsep.h: New file.
22668         * lib/strsep.c: New file.
22669
22670 2004-10-01  Simon Josefsson  <jas@extundo.com>
22671
22672         * lib/snprintf.c (snprintf): Handle size==0.
22673
22674 2004-10-01  Simon Josefsson  <jas@extundo.com>
22675             Bruno Haible  <bruno@clisp.org>
22676
22677         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
22678         (snprintf): Declare 'args'.
22679
22680 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
22681
22682         * lib/snprintf.c: Remove comments as to why each header is needed.
22683
22684 2004-10-01  Bruno Haible  <bruno@clisp.org>
22685
22686         * MODULES.html.sh: Add strsep.
22687
22688 2004-09-30  Simon Josefsson  <jas@extundo.com>
22689
22690         * modules/snprintf: New file.
22691
22692 2004-09-30  Simon Josefsson  <jas@extundo.com>
22693
22694         * m4/snprintf.m4: New file.
22695
22696 2004-09-30  Simon Josefsson  <jas@extundo.com>
22697
22698         * lib/snprintf.h, lib/snprintf.c: New files.
22699
22700 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
22701
22702         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
22703         (hol_entry_help): Never translate an empty string.
22704         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
22705         * lib/argp.h (OPTION_NO_TRANS): New option.
22706
22707 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
22708
22709         * modules/argp (Maintainer): Replace Simon Josefsson
22710         by Sergey Poznyakoff.
22711
22712 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
22713
22714         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
22715         changes merged back into glibc.
22716
22717 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
22718
22719         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
22720
22721 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
22722
22723         * lib/xvasprintf.c: Include xalloc.h.
22724         (xvasprintf): Use xalloc_die, not xmalloc_die.
22725
22726 2004-09-29  Bruno Haible  <bruno@clisp.org>
22727
22728         * modules/alloca-opt: New file, derived from modules/alloca.
22729         * modules/allocsa: Depend on alloca-opt instead of alloca.
22730         * modules/setenv: Likewise.
22731         * modules/vasnprintf: Likewise.
22732         * MODULES.html.sh: Add alloca-opt.
22733
22734 2004-09-28  Simon Josefsson  <jas@extundo.com>
22735
22736         * gnulib-tool: New parameter --lgpl, to asseert that modules are
22737         LGPL, and to replace license template from GPL to LGPL.
22738
22739 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
22740
22741         * modules/dummy: Change license to LGPL.
22742
22743 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
22744
22745         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
22746
22747 2004-09-24  Simon Josefsson  <jas@extundo.com>
22748
22749         * modules/minmax (License): Change from GPL to LGPL.
22750
22751 2004-09-23  Simon Josefsson  <jas@extundo.com>
22752
22753         * gnulib-tool (--import): Typo.
22754
22755 2004-09-23  Simon Josefsson  <jas@extundo.com>
22756
22757         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
22758
22759 2004-09-22  Bruno Haible  <bruno@clisp.org>
22760
22761         * modules/*: Add 'License' field.
22762         * gnulib-tool: Accept --extract-license option.
22763         (func_get_license): New function.
22764
22765 2004-09-21  Bruno Haible  <bruno@clisp.org>
22766
22767         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
22768         Reported by Simon Josefsson.
22769
22770 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
22771
22772         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
22773         gl_AC_TYPE_LONG_LONG.
22774
22775 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
22776
22777         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
22778
22779 2004-09-18  Simon Josefsson  <jas@extundo.com>
22780         and  Paul Eggert  <eggert@cs.ucla.edu>
22781
22782         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
22783         calls with autoreconf.  Define GL_LIB.
22784
22785 2004-09-14  Karl Berry  <karl@gnu.org>
22786
22787         * config/srclist.txt: unsync setenv.c, sigh.
22788
22789 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
22790
22791         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
22792         Problem reported by Bruno Haible in:
22793         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
22794
22795 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
22796
22797         * config/srclist.txt: Comment out argp-pvh.c.
22798
22799 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
22800
22801         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
22802         in case some system header has #define'd it.  Problem reported by
22803         Soeren D. Schulze in
22804         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
22805
22806 2004-09-09  Karl Berry  <karl@gnu.org>
22807
22808         * regex.[ch]: delete from the root.  These were supposed to be
22809                 synced with emacs cvs, but this has not happened for about
22810                 a year, and anyway nothing else uses emacs regex.[ch].
22811                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
22812                 lib/regex[.ch] is untouched.
22813
22814 2004-09-09  Bruno Haible  <bruno@clisp.org>
22815
22816         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
22817
22818 2004-09-09  Bruno Haible  <bruno@clisp.org>
22819
22820         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
22821         modifications.
22822         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
22823
22824 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
22825
22826         * modules/xvasprintf: New file.
22827         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
22828
22829 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
22830
22831         * lib/xvasprintf.h: New file.
22832         * lib/xvasprintf.c: New file.
22833         * lib/xasprintf.c: New file.
22834
22835 2004-09-08  Bruno Haible  <bruno@clisp.org>
22836
22837         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
22838
22839 2004-09-08  Bruno Haible  <bruno@clisp.org>
22840
22841         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
22842         length is > INT_MAX.
22843         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
22844         more.
22845
22846 2004-09-08  Bruno Haible  <bruno@clisp.org>
22847
22848         * lib/stdint_.h: New file, taken from GNU clisp.
22849
22850 2004-09-08  Bruno Haible  <bruno@clisp.org>
22851             Oskar Liljeblad  <oskar@osk.mine.nu>
22852
22853         * modules/stdint: New file.
22854         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
22855
22856 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
22857
22858         Import from coreutils.
22859         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
22860         strings on unbounded length.  alloca's performance benefits aren't
22861         that important here.
22862         (V_STRDUP): Remove.
22863         (parse_with_separator): New function, with most of the internals
22864         of the old parse_user_spec.  Allow user to omit both user and group,
22865         for compatibility with FreeBSD.
22866         Clone only the user name, not the entire spec.
22867         Do not set *uid, *gid unless entirely successful.
22868         Avoid memory leak in some failing cases.
22869         Fix regression for USER.GROUP reported by Dmitry V. Levin in
22870         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
22871         (parse_user_spec): Rewrite to use parse_with_separator.
22872
22873 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
22874
22875         * modules/userspec: Don't depend on alloca.
22876
22877 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
22878
22879         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
22880
22881 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
22882
22883         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
22884         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
22885         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
22886
22887 2004-08-16  Simon Josefsson  <jas@extundo.com>
22888
22889         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
22890         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
22891         Add --dry-run for --import.
22892         Let user provided command line parameters override configure.ac
22893         settings.
22894
22895 2004-08-12  Simon Josefsson  <jas@extundo.com>
22896
22897         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
22898         as discussed with Paul Eggert in threads rooted at
22899         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
22900         and
22901         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
22902         Before, the test was empty, and relied on ELIDE_CODE in source
22903         code.)
22904         (gl_PREREQ_GETOPT): New macro.
22905         (gl_GETOPT): Use them.
22906
22907 2004-08-12  Simon Josefsson  <jas@extundo.com>
22908
22909         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
22910         * lib/getopt_.h: Renamed from getopt.h.
22911
22912 2004-08-12  Simon Josefsson  <jas@extundo.com>
22913
22914         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
22915         Change default library name from libfoo to libgnu.
22916         Now, if you have a configure.ac that says:
22917                 gl_SOURCE_BASE(gl)
22918                 gl_M4_BASE(gl/m4)
22919                 gl_MODULES(error getopt etcetera)
22920                 gl_INIT
22921         you can import all you need by running:
22922                 ../gnulib/gnulib-tool --import
22923
22924         * modules/getopt (Files): Rename getopt.h to getopt_.h.
22925         (Makefile.am): Rewrite, use logic from argz.
22926         (Include): Use <getopt.h> instead of "getopt.h".
22927
22928 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
22929
22930         * modules/argp (Files): Add m4/unlocked-io.m4.
22931         (Depends-on): Add extensions.
22932
22933 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
22934
22935         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
22936         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
22937         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
22938         Check for program_invocation_name, program_invocation_short_name,
22939         flockfile, funlockfile, features.h, _getopt_long_only_r.
22940
22941 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
22942
22943         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
22944         its complicated substitute.
22945         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
22946         and program_invocation_name.
22947         (__argp_basename) [!_LIBC]: Remove; the only use was
22948         replaced by its body.
22949         (__argp_short_program_name): Change condition from
22950         !defined __argp_short_program_name to
22951         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
22952         to match argp-namefrob.h.
22953         (__argp_failure): Don't assume strerror_r returns char *.
22954         * lib/argp-parse.c (N_): Define unconditionally.
22955         (argp_default_options): Fill out initializers with 0 to avoid
22956         gcc warnings.
22957
22958 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
22959
22960         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
22961         getopt1.c.
22962
22963 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
22964
22965         Merge from coreutils.
22966
22967         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
22968
22969         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
22970         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
22971
22972 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
22973
22974         Merge from coreutils.
22975
22976         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
22977         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
22978         for Reliant Unix 5.43.
22979
22980         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
22981         (union fooround): Use uintmax_t, not long int.
22982         The rest is a merge from libc:
22983         [defined _LIBC]: Include <shlib-compat.h>.
22984         (_obstack) [defined _LIBC]: Remove after 2.3.4.
22985
22986         * lib/settime.c (settime): Recode to avoid warning with
22987         Sun Forte C 6U2.
22988
22989         * lib/strverscmp.c: Convert to UTF-8.
22990
22991 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
22992
22993         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
22994         m4/uintmax_t.m4.
22995
22996 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
22997
22998         * modules/xalloc-die: New file.
22999         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
23000
23001         * modules/md5 (Files): Add m4/uint32_t.m4.
23002         * modules/sha1: Renamed from modules/sha.
23003         (Files):
23004         Rename lib/sha.h to lib/sha1.h.
23005         Rename lib/sha.c to lib/sha1.c.
23006         Rename m4/sha.m4 to m4/sha1.m4.
23007         (lib_SOURCES): Likewise.
23008         (configure.ac): Rename gl_SHA to gl_SHA1.
23009         (Include): sha.h -> sha1.h.
23010
23011 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
23012
23013         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
23014         * m4/sha1.m4: Renamed from sha.m4.
23015         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
23016
23017 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
23018
23019         * lib/obstack.h (obstack_empty_p):
23020         Don't assume that chunk->contents is suitably aligned.
23021         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
23022         Likewise. Problem reported by Benno in
23023         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
23024
23025         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
23026         readable.  This could be improved further but it'd take some work.
23027
23028 2004-08-08  Simon Josefsson  <jas@extundo.com>
23029
23030         * modules/xgethostname (Depends-on): Remove exit and error (not
23031         used).
23032
23033         * modules/getpass-gnu: Add getpass.h.
23034         (Depends-on): Add stdbool.
23035         * modules/getpass: Add getpass.h.
23036
23037 2004-08-08  Simon Josefsson  <jas@extundo.com>
23038
23039         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
23040         Check getpass declaration.
23041
23042 2004-08-08  Simon Josefsson  <jas@extundo.com>
23043
23044         * lib/xgethostname.c: Don't include error.h (not used).
23045
23046         * lib/getpass.h: Add.
23047         * lib/getpass.c: Include getpass.h first.
23048
23049 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
23050
23051         * lib/xalloc-die.c: New file.
23052         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
23053         All uses removed.
23054         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
23055         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
23056         xalloc-die.c.
23057         (_, N_, xalloc_die): Move to xalloc-die.c.
23058         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
23059         so that we needn't mess with xalloc_msg_memory_exhausted.
23060
23061         * lib/sha1.h: Renamed from sha.h.
23062         (SHA1_H): Renamed from _SHA_H.
23063         (sha1_ctx): Renamed from sha_ctx.
23064         (sha1_init_ctx): Renamed from sha_init_ctx.
23065         (sha1_process_block): Renamed from sha_process_block.
23066         (sha1_process_bytes): Renamed from sha_process_bytes.
23067         (sha1_finish_ctx): Renamed from sha_finish_ctx.
23068         (sha1_read_ctx): Renamed from sha_read_ctx.
23069         (sha1_stream): Renamed from sha_stream.
23070         (sha1_buffer): Renamed from sha_buffer.
23071         * lib/sha1.c: Likewise; renamed from sha.c.
23072         Do not include <sys/types.h>.
23073         Include <stddef.h> rather than <stdlib.h>.
23074
23075 2004-08-08  Bruno Haible  <bruno@clisp.org>
23076
23077         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
23078         FILESYSTEM_PREFIX_LEN.
23079         * lib/progreloc.c: Likewise.
23080         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
23081
23082 2004-08-06  Simon Josefsson  <jas@extundo.com>
23083
23084         * modules/progname (Depends-on): Don't depend on stdbool.
23085
23086 2004-08-06  Simon Josefsson  <jas@extundo.com>
23087
23088         * modules/getsubopt: New file.
23089         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
23090         getsubopt.
23091
23092 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
23093
23094         More merge from coreutils.
23095
23096         * m4/utimens.m4, m4/utimecmp.m4: New files.
23097         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
23098         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
23099         prereq.m4, sha.m4: Import changes from coreutils.
23100
23101 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
23102
23103         More merge from coreutils.
23104         * modules/raise, modules/readtokens0, modules/utimens:
23105         * modules/utimecmp, module/xnanosleep: New files.
23106         * modules/strftime: Add lib/strftime.h.
23107         Change include from <time.h> to "strftime.h".
23108         * modules/yesno: Add lib/yesno.h.
23109         * modules/backupfile: Remove lib/addext.c.
23110         * modules/euidaccess: Add stat-macros.h.
23111         * modules/canonicalize, modules/euidaccess,
23112         modules/filemode, modules/lchown, modules/makepath,
23113         modules/rmdir, modules/stat: Likewise.
23114
23115 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
23116
23117         Merge from tar.
23118         * lib/argp-help.c (make_hol, hol_append): Don't assume that
23119         SIZE_MAX is a valid preprocessor constant.
23120         (__argp_basename): Change from "#ifndef _LIBC"
23121         to "#ifndef __argp_short_program_name", so that
23122         we don't compile these functions for tar.
23123
23124         More merges from coreutils.
23125         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
23126         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
23127         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
23128         * lib/addext.c: Remove; no longer needed.
23129         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
23130         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
23131         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
23132         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
23133         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
23134         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
23135         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
23136         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
23137         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
23138         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
23139         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
23140         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
23141         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
23142         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
23143         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
23144         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
23145         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
23146         Import changes from coreutils.
23147
23148 2004-08-05  Simon Josefsson  <jas@extundo.com>
23149
23150         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
23151
23152 2004-08-05  Simon Josefsson  <jas@extundo.com>
23153
23154         * m4/getsubopt.m4: New file.
23155
23156 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
23157
23158         Merge from coreutils.
23159
23160         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
23161         * m4/getcwd-path-max.m4: New files.
23162
23163         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
23164         FILESYSTEM_PREFIX_LEN ->
23165         FILE_SYSTEM_PREFIX_LEN.
23166         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
23167         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
23168         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
23169         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
23170
23171         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
23172         prerequisite modules now handle the DOS stuff.
23173         Don't check for unistd.h.
23174
23175 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
23176
23177         Merge from coreutils.
23178
23179         * lib/.gdb-history: Remove; this doesn't belong here.
23180
23181         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
23182         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
23183         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
23184         * lib/getcwd.c: New files.
23185
23186         * lib/dirname.h: Include <stdbool.h>.
23187         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
23188         for consistency with POSIX terminology.  All uses changed.
23189         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
23190         (strip_trailing_slashes): Use bool for booleans.
23191         * lib/stripslash.c (strip_trailing_slashes): Likewise.
23192
23193         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
23194         sometimes returns a positive errno value even when it succeeds.
23195         (print_errno_message) [!LIBC]: Fall back on strerror if
23196         __strerror_r fails.
23197
23198         * lib/path-concat.c (mempcpy): Don't define if a system header defines
23199         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
23200         (longest_relative_suffix): New function.
23201         (path_concat): Use it.  Assume first argument is not NULL.
23202         Port to DOS.  Omit redundant separators.
23203         Report an error instead of returning NULL.
23204         Use mempcpy instead of memcpy.
23205         (xpath_concat): Remove: not declared or used.
23206
23207         * lib/same.h: Include <stdbool.h>
23208         (same_name): Return bool, not int.
23209         * lib/same.c (same_name): Likewise.
23210         (errno): Don't declare; we assume C89 or better now.
23211
23212         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
23213         if not already defined.
23214
23215         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
23216         * lib/dup-safer.c (errno): Likewise.
23217
23218 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
23219
23220         Merge from coreutils.
23221         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
23222         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
23223         * modules/path-concat: Don't depend on strdup.
23224
23225 2004-08-03  Simon Josefsson  <jas@extundo.com>
23226
23227         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
23228         * lib/progname.h: Don't include stdbool.h.
23229
23230 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
23231
23232         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
23233         * MODULES.html.sh (func_all_modules): Remove fatal.
23234
23235 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
23236
23237         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
23238
23239 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
23240
23241         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
23242         working.
23243
23244 2004-08-02  Simon Josefsson  <jas@extundo.com>
23245
23246         * lib/getsubopt.h: New file, with comments from Bruno Haible.
23247         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
23248         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
23249
23250 2004-08-01  Simon Josefsson  <jas@extundo.com>
23251
23252         * lib/xgetdomainname.c: Include stdlib.h, for free().
23253
23254 2004-07-19  Bruno Haible  <bruno@clisp.org>
23255
23256         * MODULES.html.sh (func_all_modules): Add dummy.
23257
23258 2004-07-16  Simon Josefsson  <jas@extundo.com>
23259
23260         * modules/dummy: New file.
23261
23262 2004-07-16  Simon Josefsson  <jas@extundo.com>
23263
23264         * lib/dummy.c: New file.
23265
23266 2004-07-16  Bruno Haible  <bruno@clisp.org>
23267
23268         * lib/backupfile.h: Add extern "C" for C++.
23269         * lib/closeout.h: Likewise.
23270         * lib/copy-file.h: Likewise.
23271         * lib/findprog.h: Likewise.
23272         * lib/full-write.h: Likewise.
23273         * lib/pathname.h: Likewise.
23274         * lib/progname.h: Likewise.
23275         * lib/stpcpy.h: Likewise.
23276         * lib/stpncpy.h: Likewise.
23277         * lib/strcase.h: Likewise.
23278         * lib/strstr.h: Likewise.
23279         * lib/xalloc.h: Likewise.
23280
23281         * lib/mbswidth.h: Add extern "C" for C++.
23282         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
23283
23284 2004-07-13  Robert Millan  <robertmh@gnu.org>
23285
23286         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
23287
23288 2004-07-09  Simon Josefsson  <jas@extundo.com>
23289
23290         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
23291         failed without this.)
23292
23293 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
23294
23295         * modules/chown (Files): Add lib/fchown-stub.c, since
23296         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
23297
23298 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
23299
23300         * lib/fchown-stub.c: New file.
23301
23302 2004-06-24  Jim Meyering  <jim@meyering.net>
23303
23304         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
23305
23306 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
23307
23308         * modules/argz: Omit "#include".
23309
23310         * MODULES.html.sh (func_all_modules): Add calloc, to match
23311         2004-06-01 addition of calloc module.
23312
23313 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
23314
23315         * m4/argz.m4: New file, which is autoupdated from libtool.
23316
23317 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
23318
23319         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
23320         libtool.
23321
23322 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
23323
23324         * config/srclist-update: Don't insist on "USA." before the
23325         close-comment, as libtool omits the period and puts the */ on a
23326         separate line.
23327         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
23328         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
23329
23330 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
23331
23332         * modules/argz: New file.
23333         * MODULES.html.sh (func_all_modules): Add argz.
23334
23335 2004-06-12  Jim Meyering  <jim@meyering.net>
23336         and  Paul Eggert  <eggert@cs.ucla.edu>
23337
23338         * modules/hash (Files): Add lib/xalloc.h.
23339         * modules/pipe (Depends-on): Add wait-process.
23340         * modules/stat (Depends-on): Add xalloc.
23341         * modules/userspec (Files): Add lib/userspec.h.
23342         * modules/xstrto
23343
23344         Upgrade from gettext-0.13.
23345         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
23346         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
23347         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
23348
23349 2004-06-10  Jim Meyering  <jim@meyering.net>
23350
23351         * lib/calloc.c: New file.
23352
23353 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
23354
23355         * lib/getdate.y (yylex): Allow space between sign and number.
23356         Problem reported by Dan Jacobson.
23357
23358 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
23359
23360         Merge from coreutils CVS.
23361
23362         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
23363         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
23364         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
23365         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
23366         xstrtol.m4: Fix copyright date and/or serial number.
23367
23368         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
23369         See if we need an fchown replacement.
23370         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
23371         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
23372         and use the replacement function if we detect either defect.
23373
23374         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
23375         gl_UTIMECMP.
23376
23377 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
23378         and  Jim Meyering  <jim@meyering.net>
23379
23380         Merge from coreutils CVS.
23381
23382         * lib/stat-macros.h: New file, with contents from file-type.h
23383         and coreutils' system.h.
23384         * lib/file-type.c: Include "stat-macros.h".
23385         * lib/file-type.h (file_type): Move all macro definitions to new file,
23386         stat-macros.h.
23387
23388         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
23389         Wrap old code with this conditional.
23390         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
23391         function that does not dereference symlinks.
23392         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
23393
23394         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
23395         dependency problems.
23396         (xreadlink): Accept new arg SIZE, for efficiency.
23397         All decls and uses changed.
23398         * lib/xreadlink.h: Include <stddef.h>, for size_t.
23399
23400         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
23401         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
23402
23403         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
23404         sysexits.h.
23405
23406 2004-06-01  Jim Meyering  <jim@meyering.net>
23407
23408         * m4/calloc.m4: New file.
23409
23410 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
23411
23412         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
23413         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
23414         Also, fix a typo in a diagnostic.
23415
23416 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
23417
23418         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
23419         or AC_FUNC_REALLOC.
23420
23421 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
23422
23423         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
23424         macros to be defined.
23425         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
23426         the allocator returns NULL because the requested size is zero.
23427
23428 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
23429
23430         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
23431         var.  Add comment explaining why libc still defines it.  This
23432         merges the following patch from glibc:
23433         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
23434
23435 2004-05-20  Andreas Schwab  <schwab@suse.de>
23436
23437         * m4/free.m4: Replace free if it not known to work, not the other
23438         way round.
23439
23440 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
23441
23442         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
23443         present in glibc since revision 1.1 of this file.
23444         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
23445         obstack_alignment_mask, obstack_alloc, obstack_base,
23446         obstack_blank, obstack_blank_fast, obstack_chunk_size,
23447         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
23448         obstack_grow0, obstack_init, obstack_int_grow,
23449         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
23450         obstack_next_free, obstack_object_size, obstack_ptr_grow,
23451         obstack_ptr_grow_fast, obstack_room): Remove declarations of
23452         nonexistent functions.
23453
23454 2004-05-18  Karl Berry  <karl@gnu.org>
23455
23456         * config/srclist.txt: break link for vasnprintf.c.
23457
23458 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
23459
23460         Port obstack to the AS/400, where pointers are 16 bytes wide and
23461         you cannot cast an integer to a valid pointer.  This patch is
23462         currently waiting to be integrated into glibc; see
23463         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
23464
23465         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
23466         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
23467         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
23468         (struct obstack): temp member is now a union of a pointer and
23469         an integer, instead of an integer.  All integer uses changed.
23470         This does not affect the physical layout of struct obstack,
23471         except on hosts (like the AS/400) where the size or alignment of
23472         void * is greater than that of ptrdiff_t.
23473         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
23474         __STDC__)]: Store temporary in pointer member of union, not
23475         integer member.
23476         * lib/obstack.c: Include <stddef.h>, for offsetof.
23477         (struct fooalign): Remove; it doesn't need a name.
23478         (union fooround): Change double to long double, and add void *.
23479         (DEFAULT_ALIGNMENT): Use offsetof to compute.
23480         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
23481         not a macro.  Hence the values are always int; so remove all
23482         casts-to-int in uses.
23483
23484 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
23485
23486         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
23487         we can get this patch merged into glibc.
23488
23489 2004-05-17  Derek R. Price  <derek@ximbiot.com>
23490             Paul Eggert  <eggert@cs.ucla.edu>
23491
23492         * m4/argp: Depend on alloca.
23493
23494 2004-05-17  Derek R. Price  <derek@ximbiot.com>
23495             Paul Eggert  <eggert@cs.ucla.edu>
23496
23497         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
23498         freecoding.
23499
23500 2004-05-17  Bruno Haible  <bruno@clisp.org>
23501
23502         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
23503         precision that consists of a '.' followed by an empty digit string.
23504         Patch by Tor Lillqvist <tml@iki.fi>.
23505
23506 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
23507
23508         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
23509         for backward compatibility with older code.  We need our own
23510         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
23511         it under some other name, and our alloca.h will define it.
23512
23513 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
23514             Derek Price  <derek@ximbiot.com>
23515
23516         * lib/alloca.c: Include <alloca.h>, to get our interface.
23517         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
23518         include <alloca.h> first.  Use C89 prototype for alloca; this
23519         requires including <stddef.h> for size_t.  Use extern "C" if C++.
23520         Use #elif for simplicity, since we can assume C89 now.
23521         Don't try to source the system alloca.h since it will not be found
23522         and to prevent recursively including its replacement.
23523         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
23524         * lib/regex.c: Likewise.
23525
23526 2004-05-16  Derek Price  <derek@ximbiot.com>
23527             Paul Eggert  <eggert@cs.ucla.edu>
23528
23529         getline cleanup.  This changes the getndelim2 API: both order of
23530         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
23531         no delimiter).
23532
23533         * lib/getline.c: Don't include stddef.h or stdio.h, since our
23534         interface does that.
23535         (getline): Always use getdelim, so that we don't have two
23536         copies of this code.
23537         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
23538         if available.
23539         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
23540         (GETNDELIM2_MAXIMUM): New macro.
23541         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
23542         instead of the old practice of delim2==0.  All callers changed.
23543         Return -1 on overflow, instead of returning junk.
23544         Do not set *linesize unless allocation succeeds.
23545         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
23546         that we include sys/types.h.
23547         * lib/getnline.h: Likewise.
23548         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
23549         (getndelim2): Reorder arguments.
23550         * lib/getnline.c (getnline, getndelim):
23551         Don't discard the NMAX argument.
23552         (getnline): Invoke getndelim, to avoid code duplication.
23553         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
23554         of (size_t) -1 by callers of the getnline family.
23555
23556 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
23557
23558         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
23559         Check for gettimeofday.
23560         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
23561         Check for settimeofday, stime.
23562
23563 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
23564
23565         * lib/nanosleep.c (suspended): Change its type from int to
23566         sig_atomic_t volatile.
23567         (first_call): Make it private to rpl_nanosleep, and have it
23568         be zero initially as that's a bit faster.
23569         (my_usleep): Round up fractional times instead of truncating them,
23570         as this is the usual meaning for 'sleep'.
23571
23572         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
23573         doesn't work.
23574         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
23575         (ENOSYS): Define if not defined.
23576         (settime): Fall back on stime if it exists and settimeofday fails.
23577         But don't bother with fallbacks if a method fails with errno == EPERM.
23578
23579 2004-05-11  Jim Meyering  <jim@meyering.net>
23580
23581         Prior to this change, the save_cwd caller required read access to the
23582         current directory on most systems (ones with the fchdir function).
23583
23584         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
23585         fails, try write-only, and finally, resort to using xgetcwd.
23586
23587 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
23588
23589         * lib/obstack.c, obstack.h: Import changes from libc.
23590
23591 2004-04-28  Bruno Haible  <bruno@clisp.org>
23592
23593         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
23594         also implicitly appends .exe to executables.
23595         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
23596         accepts Windows pathnames.
23597         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
23598         Treat Cygwin like Windows, since it now accepts Windows pathnames.
23599         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
23600         Treat Cygwin like Windows, since it now accepts Windows pathnames.
23601         Reported by Derek Robert Price <derek@ximbiot.com>.
23602
23603 2004-04-21  Karl Berry  <karl@gnu.org>
23604
23605         * config/srclist.txt (localcharset.c): break sync.
23606
23607 2004-04-20  Paul Eggert  <eggert@twinsun.com>
23608
23609         * m4/host-os.m4: Add a copyright notice.
23610
23611 2004-04-20  Jim Meyering  <jim@meyering.net>
23612
23613         Change UTILS_ to gl_ in AC_DEFINE'd names.
23614         Change utils_- and jm_-prefixed variables, too.
23615         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
23616         UTILS_FUNC_MKDIR_TRAILING_SLASH.
23617         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
23618
23619         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
23620         Don't emit trailing blanks.
23621         Also rename jm_-prefixed variables to have gl_ prefix.
23622
23623         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
23624         Also rename jm_-prefixed variables to have gl_ prefix.
23625
23626         * m4/jm-macros.m4: Reflect the renamings.
23627         * m4/prereq.m4: Likewise.
23628
23629 2004-04-20  Jim Meyering  <jim@meyering.net>
23630
23631         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
23632         memory.
23633
23634 2004-04-20  Jim Meyering  <jim@meyering.net>
23635             Bruno Haible  <bruno@clisp.org>
23636
23637         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
23638         memory when realloc fails.
23639
23640 2004-04-19  Jim Meyering  <jim@meyering.net>
23641
23642         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
23643         now that readutmp.c may call `free (0)'.
23644
23645 2004-04-19  Bruno Haible  <bruno@clisp.org>
23646
23647         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
23648         * m4/inttypes_h.m4: Likewise.
23649         * m4/stdint_h.m4: Likewise.
23650         * m4/intmax_t.m4: Likewise.
23651         * m4/uintmax_t.m4: Likewise.
23652
23653 2004-04-18  Jim Meyering  <jim@meyering.net>
23654
23655         * m4/prereq.m4: Don't forbid jm_ prefix.
23656
23657         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
23658         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
23659         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
23660         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
23661         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
23662         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
23663         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
23664         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
23665         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
23666         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
23667         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
23668         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
23669         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
23670         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
23671         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
23672         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
23673         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
23674         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
23675         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
23676
23677 2004-04-18  Jim Meyering  <jim@meyering.net>
23678
23679         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
23680         failure, don't leak memory and do call END_UTMP_ENT.
23681
23682 2004-04-16  Jim Meyering  <jim@meyering.net>
23683
23684         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
23685         coreutils' stat program.
23686         (gl_PREREQ): Don't require jm_PREREQ_STAT.
23687
23688 2004-04-11  Paul Eggert  <eggert@twinsun.com>
23689
23690         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
23691         C89.
23692         (CHAR_BIT): Remove, since we assume C89.
23693         Include <stdint.h> if available, as per current Autoconf CVS advice.
23694
23695 2004-03-31  Jim Meyering  <jim@meyering.net>
23696
23697         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
23698         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
23699         * m4/xalloc.m4: Likewise.
23700
23701 2004-03-30  Paul Eggert  <eggert@twinsun.com>
23702
23703         Merge from coreutils.
23704
23705         * m4/inttostr.m4: New file.
23706         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
23707         Require AM_STDBOOL_H and gl_TIMESPEC instead.
23708         Require gl_CLOCK_TIME.
23709         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
23710
23711 2004-03-30  Paul Eggert  <eggert@twinsun.com>
23712
23713         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
23714         not bool, to be more consistent with Unix conventions.
23715         Suggested by Bruno Haible.
23716
23717         Merge from coreutils.
23718
23719         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
23720         * lib/umaxtostr.c: New files.
23721
23722         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
23723         the usual <time.h> dance.
23724         (get_date): Change signature to support fractional time stamps.
23725         All callers changed.
23726         * lib/getdate.y: Include "getdate.h" first, as we can now
23727         assume C89 and don't need to worry about 'const'.
23728         Similarly, include "unlocked-io.h" near start, not in middle.
23729         Include <limits.h>.
23730         (textint.value): Use long int rather than int.
23731         (textint.digits): Use size_t rather than int.
23732         (BILLION, LOG10_BILLION): New constants.
23733         (parser_control): New member rel_ns.  Members day_ordinal,
23734         time_zone, month, day, hour, minutes, rel_year, rel_month,
23735         rel_day, rel_hour, rel_minutes, rel_seconds
23736         are now long int, not int.  Member seconds is now struct timespec,
23737         not int.  New member timespec_seen.  Members dates_seen, days_seen,
23738         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
23739         not int.
23740         (%union.intval): Now long int, not int.
23741         New member timespec.
23742         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
23743         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
23744         (spec): Now is a timespec or an item list.
23745         (timespec, items): New nonterminals.
23746         (time, rel, relunit, number, get_date):
23747         Add support for fractional seconds.
23748         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
23749         (gmtime, localtime, mktime): Remove decls; not needed with C89.
23750         (to_hour): First arg is now long int, not int.
23751         (to_year): Returns long int, not int.
23752         Don't treat year -70 like 70.
23753         (tm_diff): Returns long int, not int.
23754         (lookup_word): Use bool instead of int when appropriate.
23755         (yylex): Use size_t for count, not int.
23756         Detect overflow when parsing large integer constants.
23757         Add support for fractions.
23758         (get_date): Make pointers 'const' if possible.
23759         Use more-portable code to detect integer overflow.
23760         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
23761         Don't use ctime; it's not reliable if the year has >4 digits.
23762
23763         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
23764         This is for compatibility with BSD.
23765
23766         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
23767         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
23768         From coreutils' system.h.
23769
23770         * lib/userspec.c: Don't include "posixver.h".
23771         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
23772         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
23773         compatible extension.  Simplify code by removing a boolean int
23774         that was always nonzero if a string was nonnull.
23775
23776 2004-03-30  Jim Meyering  <jim@meyering.net>
23777
23778         Merge from coreutils.
23779
23780         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
23781         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
23782         on some systems one must include <grp.h> before it.
23783         Reported by Christian Krackowizer.
23784
23785 2004-03-30  Jim Meyering  <jim@meyering.net>
23786
23787         Merge from coreutils.
23788
23789         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
23790
23791         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
23792         an empty input stream.
23793
23794         * lib/readtokens.c: Include <stdbool.h>.
23795         (readtoken): Use `size_t' rather than int/long.
23796         All callers adjusted.
23797         Use `bool' rather than `int' where appropriate.
23798         Use memset rather than an explicit loop.
23799         Use x2nrealloc rather than xrealloc.
23800         Allow the use of `\0' as a delimiter.
23801         (readtokens): Likewise.
23802         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
23803
23804 2004-03-30  Jim Meyering  <jim@meyering.net>
23805
23806         * m4/realloc.m4: Remove file, since now it does no more than
23807         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
23808         the `configure.ac' section of module/realloc.
23809         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
23810
23811 2004-03-30  Bruno Haible  <bruno@clisp.org>
23812
23813         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
23814         nonnull.
23815
23816 2004-03-29  Paul Eggert  <eggert@twinsun.com>
23817
23818         Merge changes to getloadavg.c from coreutils and Emacs.
23819
23820         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
23821         Define to an expression, not to the empty string.
23822         Include cloexec.h and xalloc.h.
23823         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
23824         Use set_cloexec_flag rather than rolling our own.
23825         * lib/cloexec.c, lib/cloexec.h: New files.
23826
23827 2004-03-29  Paul Eggert  <eggert@twinsun.com>
23828
23829         * m4/cloexec.m4: New file.
23830
23831 2004-03-18  Paul Eggert  <eggert@twinsun.com>
23832
23833         * lib/getopt.h: Sync with libc CVS.
23834
23835 2004-03-18  Paul Eggert  <eggert@twinsun.com>
23836             Bruno Haible  <bruno@clisp.org>
23837
23838         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
23839         mbswidth.
23840
23841 2004-03-18  Paul Eggert  <eggert@twinsun.com>
23842             Bruno Haible  <bruno@clisp.org>
23843
23844         * lib/mbswidth.h: Include <wchar.h> only if
23845         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
23846         <wchar.h>.
23847         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
23848
23849 2004-03-09  Paul Eggert  <eggert@twinsun.com>
23850
23851         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
23852         Sync with libc CVS.
23853         * lib/getopt_int.h: New file, also synced from libc.
23854
23855 2004-03-09  Paul Eggert  <eggert@twinsun.com>
23856
23857         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
23858         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
23859         Bring back getopt.c, getopt.h, getopt1.c.
23860
23861 2004-03-07  Paul Eggert  <eggert@twinsun.com>
23862
23863         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
23864         All uses changed.  Check for sa_sigaction member; this fixes
23865         a bug first reported by Jason Andrade in
23866         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
23867
23868 2004-03-07  Paul Eggert  <eggert@twinsun.com>
23869
23870         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
23871         '#if' expressions.  Unlike the code it replaces, it does not
23872         depend on (defined _SC_PAGESIZE).  However, it does depend on
23873         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
23874         first reported by Jason Andrade in
23875         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
23876
23877 2004-02-25  Simon Josefsson  <jas@extundo.com>
23878
23879         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
23880
23881 2004-02-25  Simon Josefsson  <jas@extundo.com>
23882
23883         * lib/strdup.h: New file.
23884         * lib/strdup.c: Include it.
23885         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
23886         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
23887
23888 2004-02-23  Karl Berry  <karl@gnu.org>
23889
23890         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
23891         (from fencepost.gnu.org:/gd/gnuorg).
23892
23893 2004-02-23  Karl Berry  <karl@gnu.org>
23894
23895         * config/srclistvars.sh (GNUORG) [karl]: redefine.
23896         * config/srclist.txt: add maintain/standards documents.
23897
23898 2004-02-18  Bruno Haible  <bruno@clisp.org>
23899
23900         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
23901         Reported by Derek Robert Price <derek@ximbiot.com>.
23902
23903 2004-02-16  Karl Berry  <karl@gnu.org>
23904
23905         * config/mkinstalldirs, install-sh: update from automake.
23906
23907 2004-02-06  Karl Berry  <karl@gnu.org>
23908
23909         * m4/po.m4: update from gettext 0.14.1.
23910
23911 2004-02-06  Karl Berry  <karl@gnu.org>
23912
23913         * lib/config.charset: update from gettext 0.14.1.
23914
23915 2004-02-05  Paul Eggert  <eggert@twinsun.com>
23916
23917         Add comments and code, prompted by suggestions from Bruno Haible
23918         for sh-quote.
23919         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
23920         describing the enum quoting_style values.
23921         * lib/quotearg.c (quotearg_alloc): New function.
23922         (quotearg_buffer_restyled): Treat lone { and } as special.
23923         Treat = as special.  Work around bug with older shells
23924         that "see" a '\' that is really the 2nd byte of a multibyte char.
23925         Quote empty string with shell_quoting_style.
23926
23927 2004-02-03  Bruno Haible  <bruno@clisp.org>
23928
23929         * m4/pipe.m4: New file, from GNU gettext.
23930
23931 2004-02-03  Bruno Haible  <bruno@clisp.org>
23932
23933         * lib/pipe.h: New file, from GNU gettext.
23934         * lib/pipe.c: New file, from GNU gettext.
23935
23936 2004-01-27  Bruno Haible  <bruno@clisp.org>
23937
23938         * m4/execute.m4: New file, from GNU gettext.
23939
23940 2004-01-27  Bruno Haible  <bruno@clisp.org>
23941
23942         * lib/execute.h: New file, from GNU gettext.
23943         * lib/execute.c: New file, from GNU gettext.
23944         * lib/w32spawn.h: New file, from GNU gettext.
23945
23946 2004-01-24  Paul Eggert  <eggert@twinsun.com>
23947
23948         Merge from diffutils.
23949
23950         * lib/file-type.c (file_type): Add typed memory objects.
23951         * lib/file-type.h (S_TYPEISTMO): New macro.
23952
23953         * lib/c-stack.h (c_stack_action): Remove argv argument.
23954         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
23955         (die): Don't calculate message unless segv_action returns.
23956         (get_stack_location, min_address_from_argv, max_address_from_argv,
23957         volatile stack_base, volatile_stack_size): Remove.
23958         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
23959         that every segmentation violation is a stack overflow.  (Ouch!)
23960         See Debian bug 136249 (still outstanding) for more info about why
23961         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
23962
23963 2004-01-24  Paul Eggert  <eggert@twinsun.com>
23964
23965         Exit-status fix from coreutils.
23966
23967         Use exit_failure consistently in place of EXIT_FAILURE,
23968         so that program exit statuses are consistent on failure.
23969
23970         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
23971         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
23972         * lib/argmatch.h: Comment fix to match the above.
23973         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
23974         Now a macro referring to exit_failure, instead of a separate
23975         variable.  Include "exitfail.h" to get it.
23976         * lib/xstrtol.h: Include "exitfail.h".
23977         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
23978
23979         * lib/long-options.c (parse_long_options): Use prototype
23980         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
23981         for clarity.
23982
23983 2004-01-21  Jim Meyering  <jim@meyering.net>
23984
23985         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
23986         so as not to conflict with a different-sized __mktime_internal
23987         function in GNU libc.
23988         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
23989         Problem building statically-linked `ls' reported by Michael Brunnbauer.
23990
23991 2004-01-20  Karl Berry  <karl@gnu.org>
23992
23993         * config/config.guess: update from config.
23994
23995         * config/srclistvars.sh: GNUWWWLICENSES for karl.
23996
23997 2004-01-20  Bruno Haible  <bruno@clisp.org>
23998
23999         Safer stack allocation.
24000         * lib/setenv.c: Include allocsa.h.
24001         (alloca): Remove fallback definition.
24002         (freea): Remove macro.
24003         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
24004         instead of freea.
24005
24006 2004-01-20  Bruno Haible  <bruno@clisp.org>
24007
24008         * m4/eealloc.m4: New file, from GNU gettext.
24009
24010 2004-01-20  Bruno Haible  <bruno@clisp.org>
24011
24012         * m4/allocsa.m4: New file, from GNU gettext.
24013
24014 2004-01-20  Bruno Haible  <bruno@clisp.org>
24015
24016         * lib/xallocsa.h: New file, from GNU gettext.
24017         * lib/xallocsa.c: New file, from GNU gettext.
24018
24019 2004-01-20  Bruno Haible  <bruno@clisp.org>
24020
24021         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
24022
24023 2004-01-20  Bruno Haible  <bruno@clisp.org>
24024
24025         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
24026         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
24027         specially.
24028
24029 2004-01-20  Bruno Haible  <bruno@clisp.org>
24030
24031         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
24032         patch.
24033
24034 2004-01-20  Bruno Haible  <bruno@clisp.org>
24035
24036         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
24037
24038 2004-01-20  Bruno Haible  <bruno@clisp.org>
24039
24040         * lib/eealloc.h: New file.
24041
24042 2004-01-20  Bruno Haible  <bruno@clisp.org>
24043
24044         * lib/binary-io.h: Avoid warnings on Cygwin.
24045
24046 2004-01-20  Bruno Haible  <bruno@clisp.org>
24047
24048         * lib/allocsa.h: New file, from GNU gettext.
24049         * lib/allocsa.c: New file, from GNU gettext.
24050
24051 2004-01-18  Karl Berry  <karl@gnu.org>
24052
24053         * doc/gpl.texi, doc/lgpl.texi: new files.
24054
24055 2004-01-18  Karl Berry  <karl@gnu.org>
24056
24057         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
24058         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
24059
24060 2004-01-15  Paul Eggert  <eggert@twinsun.com>
24061
24062         Merge from coreutils.
24063
24064         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
24065         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
24066         (gl_DEFAULT_POSIX2_VERSION): Move
24067         the documentation from 'configure' into 'config.hin',
24068         so that 'configure --help' isn't burdened by it and
24069         we don't have to worry about its formatting there.
24070         Reword the documentation so that it's more succinct
24071         and can be run together into a single paragraph.
24072         * m4/same.m4 (gl_SAME): Check for pathconf.
24073
24074 2004-01-15  Paul Eggert  <eggert@twinsun.com>
24075
24076         Merge from coreutils.
24077
24078         * lib/posixver.c: Include posixver.h.
24079
24080         * lib/same.c: Include <stdbool.h>, <limits.h>.
24081         (_POSIX_NAME_MAX): Define if not defined.
24082         (MIN): New macro.
24083         (same_name): If file names are silently truncated, report
24084         that the file names are the same if they are the same after
24085         the silent truncation.
24086
24087         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
24088         conversion function.
24089         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
24090         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
24091         longer needed.
24092
24093 2004-01-15  Jim Meyering  <jim@meyering.net>
24094
24095         Merge from coreutils.
24096
24097         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
24098         if no library is required.
24099         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
24100         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
24101         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
24102         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
24103         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
24104         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
24105         value, $ac_cv_search_crypt, if it's "none required".
24106         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
24107         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
24108         not gl_FUNC_GETLOADAVG.
24109         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
24110         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
24111
24112 2004-01-15  Jim Meyering  <jim@meyering.net>
24113
24114         Merge from coreutils.
24115
24116         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
24117         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
24118         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
24119
24120         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
24121         optional configure-time default.
24122
24123         * lib/version-etc.c (version_etc_copyright): Update copyright date.
24124
24125         * lib/xreadlink.c (xreadlink): Correct outdated comment.
24126
24127 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
24128
24129         Merge from coreutils.
24130
24131         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
24132         value, $ac_cv_search_nanosleep, if it's "none required".
24133
24134 2004-01-14  Paul Eggert  <eggert@twinsun.com>
24135
24136         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
24137         with like-named macro in fnmatch.c.
24138         (EXT): Use an internal constant instead.
24139
24140         Merge fnmatch patches from glibc.
24141         * lib/fnmatch.c (mbsinit): Remove define.
24142         Add libc_hidden_ver (__fnmatch, fnmatch).
24143         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
24144         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
24145
24146 2004-01-14  Karl Berry  <karl@gnu.org>
24147
24148         * config/install-sh: update from automake.
24149
24150 2004-01-13  Karl Berry  <karl@gnu.org>
24151
24152         * config/install-sh: update from automake.
24153
24154 2004-01-09  Karl Berry  <karl@gnu.org>
24155
24156         * config/install-sh: update from automake.
24157
24158 2004-01-05  Karl Berry  <karl@gnu.org>
24159
24160         * config/config.{sub,guess}: update from config.
24161
24162 2003-12-31  Karl Berry  <karl@gnu.org>
24163
24164         * config/depcomp: update from automake.
24165
24166 2003-12-14  Karl Berry  <karl@gnu.org>
24167
24168         * lib/config.charset: update from gettext-runtime.
24169
24170 2003-12-03  Paul Eggert  <eggert@twinsun.com>
24171
24172         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
24173         Bug reported by Alfred M. Szmidt.
24174
24175 2003-12-03  Bruno Haible  <bruno@clisp.org>
24176
24177         * m4/gettext.m4: Upgrade from gettext-0.13.
24178         * m4/po.m4: Upgrade from gettext-0.13.
24179         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
24180         * m4/intmax.m4: New file, from gettext-0.13.
24181         * m4/printf-posix.m4: New file, from gettext-0.13.
24182
24183 2003-11-29  Karl Berry  <karl@gnu.org>
24184
24185         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
24186
24187 2003-11-25  Paul Eggert  <eggert@twinsun.com>
24188             Bruno Haible  <bruno@clisp.org>
24189
24190         * lib/printf-parse.h: Don't include sys/types.h.
24191         (ARG_NONE): New macro.
24192         (char_directive): Change type of *arg_index fields to size_t.
24193         * lib/printf-parse.c: Don't include sys/types.h.
24194         (SSIZE_MAX): Remove macro.
24195         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
24196         Remove unnecessary overflow check.
24197         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
24198         fields.
24199
24200 2003-11-25  Bruno Haible  <bruno@clisp.org>
24201
24202         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
24203
24204 2003-11-25  Bruno Haible  <bruno@clisp.org>
24205
24206         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
24207         gt_TYPE_SSIZE_T.
24208
24209 2003-11-24  Paul Eggert  <eggert@twinsun.com>
24210
24211         * modules/alloca: Remove dependency on xalloc.
24212
24213 2003-11-24  Paul Eggert  <eggert@twinsun.com>
24214
24215         * lib/alloca.c: Remove dependency on xalloc module.
24216         (xalloc_die): Remove.
24217         (memory_full) [!defined emacs]: New macro.
24218         [!defined emacs]: Don't include xalloc.h.
24219         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
24220         address arithmetic overflows.  Change datatypes a bit to avoid
24221         unnecessary casts.
24222
24223 2003-11-22  Jim Meyering  <jim@meyering.net>
24224
24225         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
24226         s/size/size_t/.
24227
24228 2003-11-21  Karl Berry  <karl@gnu.org>
24229
24230         * config/config.{sub,guess}: update from config.
24231
24232 2003-11-18  Karl Berry  <karl@gnu.org>
24233
24234         * config/config.{sub,guess}: update from config.
24235
24236         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
24237
24238 2003-11-17  Paul Eggert  <eggert@twinsun.com>
24239
24240         * README: Mention that S+T cannot overflow if S is the size of
24241         an existing object and T is sufficiently small.
24242
24243 2003-11-17  Jim Meyering  <jim@meyering.net>
24244
24245         On systems without utime and without a utimes function capable of
24246         dealing with a NULL struct utimbuf* argument, this utime replacement
24247         could -- in unusual circumstances -- leak a file descriptor.
24248         * lib/utime.c: Include <unistd.h> and <errno.h>.
24249         (utime_null): Be sure to close `fd' and to preserve errno.
24250         Reported by Geoff Collyer via Arnold Robbins.
24251
24252 2003-11-17  Bruno Haible  <bruno@clisp.org>
24253
24254         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
24255         (Depends-on): Add xsize.
24256
24257 2003-11-17  Bruno Haible  <bruno@clisp.org>
24258
24259         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
24260
24261 2003-11-17  Bruno Haible  <bruno@clisp.org>
24262
24263         * lib/vasnprintf.c (alloca): Remove fallback definition.
24264         (freea): Remove definition.
24265         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
24266         Reported by Paul Eggert.
24267
24268 2003-11-16  Paul Eggert  <eggert@twinsun.com>
24269             Bruno Haible  <bruno@clisp.org>
24270
24271         Protect against address arithmetic overflow.
24272         * lib/printf-args.h: Include stddef.h.
24273         (arguments): Change type of field 'count' to size_t.
24274         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
24275         'unsigned int' where appropriate.
24276         * lib/printf-parse.h: Include sys/types.h.
24277         (char_directive): Change type of *arg_index fields to ssize_t.
24278         (char_directives): Change type of fields 'count', max_*_length to
24279         size_t.
24280         * lib/printf-parse.c: Include sys/types.h and xsize.h.
24281         (SSIZE_MAX): Define fallback value.
24282         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
24283         instead of 'int' where appropriate. Check a_allocated, d_allocated
24284         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
24285         * lib/vasnprintf.c: Include xsize.h.
24286         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
24287         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
24288         overflow. Avoid wraparound when converting a width or precision from
24289         decimal to binary.
24290
24291 2003-11-16  Bruno Haible  <bruno@clisp.org>
24292
24293         Update from GNU gettext.
24294         * lib/printf-parse.c: Generalize to it can be compiled for wide
24295         strings.
24296         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
24297         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
24298         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
24299         SNPRINTF): New macros.
24300         Don't include <alloca.h> if the file is used inside libintl.
24301         (local_wcslen): New function, for Solaris 2.5.1.
24302         (VASNPRINTF): Use it instead of wcslen.
24303
24304 2003-11-16  Bruno Haible  <bruno@clisp.org>
24305
24306         * lib/xsize.h (xmax): New function.
24307         (xsum, xsum3, xsum4): Declare as "pure" functions.
24308
24309 2003-11-12  Paul Eggert  <eggert@twinsun.com>
24310
24311         * modules/xalloc (Files): Undo latest change, since xalloc.h
24312         no longer needs SIZE_MAX or PTRDIFF_MAX.
24313
24314 2003-11-12  Paul Eggert  <eggert@twinsun.com>
24315
24316         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
24317         gl_PTRDIFF_MAX.
24318
24319 2003-11-12  Paul Eggert  <eggert@twinsun.com>
24320
24321         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
24322         "return", to pacify some unknown compiler.  Problem reported
24323         by Joerg Schilling.
24324
24325 2003-11-12  Paul Eggert  <eggert@twinsun.com>
24326
24327         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
24328         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
24329         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
24330         heuristic is just as accurate as far as we know, and it removes a
24331         dependency on size_max.m4 and ptrdiff_max.m4.
24332
24333 2003-11-11  Bruno Haible  <bruno@clisp.org>
24334
24335         * modules/xsize (Files): Add m4/size_max.m4.
24336         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
24337
24338 2003-11-11  Bruno Haible  <bruno@clisp.org>
24339
24340         * m4/size_max.m4: New file.
24341         * m4/ptrdiff_max.m4: New file.
24342         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
24343         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
24344         (gl_XALLOC): Invoke it.
24345
24346 2003-11-11  Bruno Haible  <bruno@clisp.org>
24347
24348         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
24349         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
24350         defined.
24351
24352 2003-11-10  Paul Eggert  <eggert@twinsun.com>
24353
24354         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
24355         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
24356         rejected some allocations of exactly SIZE_MAX - 2 bytes.
24357         From Bruno Haible.
24358         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
24359         not (size_t) -1, since it's defined here.
24360
24361 2003-11-09  Karl Berry  <karl@gnu.org>
24362
24363         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
24364
24365 2003-11-06  Paul Eggert  <eggert@twinsun.com>
24366
24367         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
24368         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
24369         Reject sizes of exactly SIZE_MAX bytes.
24370         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
24371         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
24372
24373 2003-11-05  Bruno Haible  <bruno@clisp.org>
24374
24375         * lib/xsize.h: Include limits.h, to avoid a possible collision with
24376         SIZE_MAX defined in <limits.h> on Solaris.
24377
24378 2003-11-04  Jim Meyering  <jim@meyering.net>
24379
24380         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
24381         variable names, rather than @VAR@.
24382         * modules/poll: Likewise.
24383
24384 2003-11-04  Bruno Haible  <bruno@clisp.org>
24385
24386         * modules/xsize: New file.
24387         * modules/linebreak: Depend on xsize.
24388         * MODULES.html.sh (func_all_modules): Add xsize.
24389
24390 2003-11-04  Bruno Haible  <bruno@clisp.org>
24391
24392         * m4/xsize.m4: New file.
24393
24394 2003-11-04  Bruno Haible  <bruno@clisp.org>
24395
24396         * lib/xsize.h: New file.
24397         * lib/linebreak.c: Include xsize.h.
24398         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
24399         argument for overflow.
24400         Suggested by Paul Eggert.
24401
24402 2003-11-03  Karl Berry  <karl@gnu.org>
24403
24404         * config/config.{guess,sub}: update from config.
24405
24406 2003-11-03  Jim Meyering  <jim@meyering.net>
24407
24408         * modules/userspec (lib_SOURCES): Add userspec.h.
24409         (Include): Add "userspec.h".
24410         Improve description.
24411
24412 2003-11-03  Jim Meyering  <jim@meyering.net>
24413
24414         * lib/userspec.c: Include "userspec.h".
24415         * lib/userspec.h: New file.
24416
24417 2003-11-03  Bruno Haible  <bruno@clisp.org>
24418
24419         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
24420
24421 2003-11-03  Bruno Haible  <bruno@clisp.org>
24422
24423         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
24424         available, to avoid (extremely rare) race condition.
24425         Suggested by Paul Eggert.
24426
24427 2003-11-02  Karl Berry  <karl@gnu.org>
24428
24429         * config/srclist.txt (vasprintf.c): sync broken, sigh.
24430
24431 2003-10-31  Paul Eggert  <eggert@twinsun.com>
24432
24433         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
24434         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
24435         (read_filesystem_list): Set and use me_type_malloced.
24436         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
24437         whatever the type happens to be), for brevity and consistency.
24438         Check for size calculation overflow on Alphas running OSF/1.
24439
24440 2003-10-31  Jim Meyering  <jim@meyering.net>
24441
24442         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
24443
24444         * lib/linebuffer.c: Include <string.h> for declaration of memset.
24445
24446 2003-10-30  Paul Eggert  <eggert@twinsun.com>
24447             Bruno Haible  <bruno@clisp.org>
24448
24449         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
24450         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
24451
24452 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
24453
24454         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
24455         netbsd*-gnu*.  Suggested by Robert Millan.
24456
24457 2003-10-29  Paul Eggert  <eggert@twinsun.com>
24458
24459         * modules/group-member: Depend on stdbool.
24460
24461 2003-10-29  Paul Eggert  <eggert@twinsun.com>
24462
24463         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
24464
24465 2003-10-29  Paul Eggert  <eggert@twinsun.com>
24466
24467         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
24468         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
24469         after the 'gnu' in these cases.  This fixes some bugs in the
24470         previous change, and is based on suggestions by Robert Millan.
24471
24472 2003-10-29  Paul Eggert  <eggert@twinsun.com>
24473
24474         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
24475         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
24476         no longer needed.
24477         * lib/quotearg.c (quotearg_n_options): Use it.
24478         * lib/group-member.c: Include <stdbool.h>.
24479         (free_group_info): Arg is now const *; don't free arg.
24480         (get_group_info): Now returns bool and accepts struct group_info *,
24481         rather than returning a malloc'ed struct group_info *.
24482         All uses changed.  Check for overflow in internal size calculation.
24483
24484         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
24485         rather than xmalloc/xrealloc.
24486         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
24487         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
24488         conformance bug: the old code used a pointer after freeing the
24489         storage that it addressed.
24490         * lib/hash.c (hash_initialize): Simplify the code by using
24491         xalloc_oversized rather than doing it by hand.
24492         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
24493         the buffer preserved.  Use free and xmalloc instead.
24494         * lib/quotearg.c (quotearg_n_options): Likewise.
24495         Use a simpler test for size overflow.  Don't use xalloc_oversized
24496         because unsigned int might be wider than size_t (!); this suggests
24497         that we should switch from unsigned int to size_t for slot numbers.
24498
24499 2003-10-28  Paul Eggert  <eggert@twinsun.com>
24500
24501         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
24502         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
24503         NetBSD kernels.  Requested by Richard Stallman.
24504
24505 2003-10-27  Paul Eggert  <eggert@twinsun.com>
24506
24507         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
24508         to allocate the returned structure.  Do not allocate a subarray,
24509         as x2nrealloc will do that.
24510         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
24511         instead of xnrealloc.
24512         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
24513
24514 2003-10-27  Bruno Haible  <bruno@clisp.org>
24515
24516         * lib/stdbool_.h: Better support for BeOS.
24517
24518 2003-10-26  Paul Eggert  <eggert@twinsun.com>
24519
24520         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
24521         now uses inline.
24522
24523 2003-10-26  Paul Eggert  <eggert@twinsun.com>
24524
24525         * lib/xalloc.h (xalloc_oversized): New static inline function, for
24526         callers that want to do their own size-overflow checking.  Include
24527         <stdbool.h>, since xalloc_oversized returns bool.
24528         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
24529         to use xalloc_oversized.
24530
24531         Add two functions x2realloc, x2nrealloc, for programs that grow
24532         arrays dynamically by doubling their sizes.
24533         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
24534         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
24535         New functions.
24536
24537         Port to C99 semantics for 'inline' of external functions.
24538         Bug reported by Bruno Haible.
24539         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
24540         with the old contents of xnmalloc.
24541         (xnmalloc, xmalloc): Use it.
24542         (xnrealloc_inline): New static inline function,
24543         with the old contents of xnrealloc.
24544         (xnrealloc, xrealloc): Use it.
24545
24546         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
24547         that.
24548
24549 2003-10-26  Karl Berry  <karl@gnu.org>
24550
24551         * config/srclist.txt (COPYING.DOC): no longer available from
24552         /gd/gnuorg; don't know where the ultimate source is.
24553
24554 2003-10-25  Paul Eggert  <eggert@twinsun.com>
24555
24556         Fix several address-calculation bugs in the hash modules,
24557         plus some minor code cleanup.
24558
24559         * lib/hash.h: Include <stdbool.h>, for bool.
24560         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
24561         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
24562         hash_get_n_entries, hash_get_max_bucket_length,
24563         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
24564         hash_rehash): Use size_t rather than unsigned.
24565         * lib/hash.c (struct hash_table, hash_get_n_buckets,
24566         hash_get_n_buckets_used, hash_get_n_entries,
24567         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
24568         hash_get_entries, hash_do_for_each, hash_string, is_prime,
24569         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
24570         Likewise.
24571         (SIZE_MAX): Define if not defined.
24572         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
24573         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
24574         hash_print):
24575         Use const * when possible.
24576         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
24577         (check_tuning): Fix bug: if tuning parameters were very close to
24578         0 or 1, rounding errors could have caused subscript violations.
24579         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
24580         (hash_initialize): Add 'fail:' label
24581         to free table and return NULL, and use it to simplify code.
24582         Use calloc rather than clearing the storage ourself.
24583         (hash_initialize, hash_rehash): Check for arithmetic overflow in
24584         buffer size calculations.
24585         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
24586         Include <stddef.h>, for size_t.
24587         * lib/hash-pjw.c (hash_pjw): Likewise.
24588         Switch to method described by Bruno Haible.
24589         Include <limits.h>, for CHAR_BIT.
24590         (SIZE_BITS): New macro.
24591
24592 2003-10-23  Paul Eggert  <eggert@twinsun.com>
24593
24594         * m4/getline.m4 (AM_FUNC_GETLINE):
24595         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
24596         hosts.  Problem reported by Derek Robert Price in
24597         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
24598         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
24599         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
24600
24601 2003-10-21  Paul Eggert  <eggert@twinsun.com>
24602
24603         * lib/getndelim2.c (getndelim2): When size calculation overflows,
24604         ceiling the allocation at NMAX bytes rather than silently
24605         discarding input bytes before NMAX is reached.  This makes
24606         a difference only if NMAX exceeds SIZE_MAX / 2.
24607
24608         * lib/obstack.c: Merge from glibc.
24609         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
24610         Add libc_hidden_def (_obstack_newchunk).
24611         (_obstack_free) [! defined _LIBC]: Remove.
24612         [defined _LIBC]: Make a strong alias from obstack_free, rather than
24613         a clone of the function body.
24614         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
24615         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
24616
24617         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
24618         glibc.
24619         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
24620         arg to memcpy.
24621
24622         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
24623         (obstack_ptr_grow_fast, obstack_int_grow_fast):
24624         Don't use lvalue casts, as GCC plans to remove support for them
24625         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
24626         was also present in the non-GCC version, indicating that this
24627         code had always been buggy and had never been widely used.
24628         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
24629         Use the fast variant of each macro, rather than copying the
24630         definiens of the fast variant; that way, we'll be more likely to
24631         catch future bugs in the fast variants.
24632
24633 2003-10-20  Bruno Haible  <bruno@clisp.org>
24634
24635         * modules/wait-process: New file.
24636         * MODULES.html.sh (func_all_modules): Add wait-process.
24637
24638 2003-10-20  Bruno Haible  <bruno@clisp.org>
24639
24640         * m4/wait-process.m4: New file.
24641
24642 2003-10-20  Bruno Haible  <bruno@clisp.org>
24643
24644         * lib/wait-process.h: New file, from GNU gettext.
24645         * lib/wait-process.c: New file, from GNU gettext.
24646
24647 2003-10-19  Jim Meyering  <jim@meyering.net>
24648
24649         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
24650         HPUX 10.20.
24651
24652 2003-10-18  Karl Berry  <karl@gnu.org>
24653
24654         * config/config.guess: update from config.
24655
24656 2003-10-16  Paul Eggert  <eggert@twinsun.com>
24657
24658         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
24659         (getgroups): First arg is int, not size_t.
24660         Don't let 'free' mangle errno.
24661
24662 2003-10-16  Paul Eggert  <eggert@twinsun.com>
24663
24664         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
24665
24666 2003-10-16  Karl Berry  <karl@gnu.org>
24667
24668         * config/config.{guess,sub}: update from config.
24669
24670 2003-10-16  Jim Meyering  <jim@meyering.net>
24671
24672         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
24673         memcpy.
24674
24675 2003-10-15  Paul Eggert  <eggert@twinsun.com>
24676
24677         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
24678         (SIZE_MAX): Remove.
24679         (new_exclude, add_exclude_file): Initial size no longer needs to
24680         be a power of 2.
24681         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
24682         our own address arithmetic overflow checking.
24683
24684         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
24685         (fnmatch): Do not alloca more than 2000 wide characters;
24686         instead, use malloc for large buffers.
24687         Check for address arithmetic overflow, and return -1
24688         with errno set to ENOMEM in that case.
24689         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
24690         (NEW_PATTERN): Do not alloca more than 8000 bytes;
24691         instead, return -1.  Check for address arithmetic overflow.
24692
24693 2003-10-14  Paul Eggert  <eggert@twinsun.com>
24694
24695         Handle invalid suffixes and overflow independently, so that
24696         callers can treat them independently as needed.  Fix some bugs in
24697         suffix handling, e.g., "100k@" was not diagnosed as an invalid
24698         suffix for a human-readable blocksize.  The major caller-visible
24699         change is the addition of a new
24700         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
24701         that both overflow and suffix chars were found.
24702
24703         * lib/human.c (humblock): Don't check separately for invalid suffix
24704         char; that is xstrtoumax's job (now that its bug is fixed).
24705         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
24706         INTMAX_MAX]: New macros.
24707         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
24708         TYPE_MAXIMUM): New macros.
24709         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
24710         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
24711         if overflow occurs, as it's what __strtol does and it's more useful
24712         in practice.
24713         (__xstrtol): If __strtol reports some error other than ERANGE,
24714         reflect it to the caller as LONGINT_INVALID.  If it reports
24715         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
24716         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
24717         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
24718         value.
24719         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
24720         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
24721         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
24722         [defined UINTMAX_MAX]: New macros.
24723
24724 2003-10-14  Bruno Haible  <bruno@clisp.org>
24725
24726         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
24727
24728 2003-10-14  Bruno Haible  <bruno@clisp.org>
24729
24730         * m4/sig_atomic_t: New file, from GNU gettext.
24731         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
24732
24733 2003-10-14  Bruno Haible  <bruno@clisp.org>
24734
24735         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
24736         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
24737         Also use volatile where needed.
24738
24739 2003-10-12  Paul Eggert  <eggert@twinsun.com>
24740
24741         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
24742         Change maintainer from Bruno Haible to 'all'.
24743
24744 2003-10-12  Paul Eggert  <eggert@twinsun.com>
24745
24746         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
24747
24748 2003-10-12  Paul Eggert  <eggert@twinsun.com>
24749
24750         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
24751         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
24752         and define in terms of the other primitives.
24753         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
24754         (SIZE_MAX): Define if not already defined.
24755         (array_size_overflow): New function.
24756         (xalloc_die): Abort instead of exiting if 'error' returns.
24757         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
24758         (xmalloc, xrealloc): Use them.
24759         (xcalloc): Check for address arithmetic overflow.
24760         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
24761         a bit faster than strcpy.
24762
24763 2003-10-10  Simon Josefsson  <jas@extundo.com>
24764
24765         * modules/argp (Depends-on): Add restrict and strcase.
24766
24767 2003-10-10  Simon Josefsson  <jas@extundo.com>
24768
24769         * m4/argp.m4: Add AC_C_INLINE.
24770
24771 2003-10-08  Paul Eggert  <eggert@twinsun.com>
24772
24773         Merge getpass from libc, plus a few fixes.
24774
24775         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
24776         Include <stdbool.h>.
24777         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
24778         __fsetlocking to empty.
24779         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
24780         do include <bits/libc-lock.h>.
24781         Do not include <fcntl.h>; not needed.
24782         [_LIBC]: Include <wchar.h>.
24783         (NOTCANCEL_MODE): New macro.
24784         (flockfile, funlockfile) [_LIBC]: New macros.
24785         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
24786         [!_LIBC]: New macros.
24787         (call_fclose): New function.
24788         (getpass): Use it.  Save tty stream separately; this simplifies the
24789         code and makes it more reliable if stdin happens to equal stdout.
24790         Invoke __fsetlocking on tty.
24791         Handle thread cancellation if needed.
24792         Namespace cleanup (use __tcgetattr, __getline).
24793         Use bool for Booleans.
24794         [USE_IN_LIBIO]: Handle wide streams.
24795         [!_LIBC]: Unconditionally do the fseek, since we don't know what
24796         stream might go where.
24797
24798         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
24799         doesn't have to include <stdio.h> before us.
24800         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
24801         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
24802         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
24803         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
24804         if not declared, so that we can use getpass.c code from libc without
24805         rewriting it.
24806         (flockfile, ftrylockfile, funlockfile): New macros.
24807
24808 2003-10-08  Paul Eggert  <eggert@twinsun.com>
24809
24810         * modules/getpass: Depend on stdbool.
24811
24812 2003-10-08  Paul Eggert  <eggert@twinsun.com>
24813
24814         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
24815
24816 2003-10-07  Karl Berry  <karl@gnu.org>
24817
24818         * config/config.{guess,sub}: update from config.
24819
24820 2003-10-06  Jim Meyering  <jim@meyering.net>
24821             Bruno Haible  <bruno@clisp.org>
24822
24823         This lets translators provide better translations for the
24824         "Written by ..." part of --version output.
24825         * lib/version-etc.h: Include stdarg.h.
24826         (version_etc_copyright): Declare as readonly.
24827         (version_etc): Make this function variadic with a NULL-terminated list
24828         of author name strings.
24829         (version_etc_va): New declaration.
24830         * lib/version-etc.c: Include stdarg.h, stdlib.h.
24831         (version_etc_copyright): Declare as readonly.
24832         (version_etc_va): New function. Provide a different translatable string
24833         for each possible number of authors < 10. Abbreviate when there are 10
24834         authors or more.
24835         (version_etc): Make this function variadic. Call version_etc_va.
24836         Suggestion from Gary V. Vaughan.
24837
24838         * lib/long-options.h (parse_long_options): Change prototype: the
24839         authors string is moved to the end and becomes variadic.
24840         * lib/long-options.c: Include stdarg.h.
24841         (parse_long_options): Make this function variadic, too.
24842         Call version_etc_va, not version_etc.
24843
24844 2003-10-06  Bruno Haible  <bruno@clisp.org>
24845
24846         * modules/version-etc-2: Remove file.
24847         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
24848
24849 2003-10-06  Bruno Haible  <bruno@clisp.org>
24850
24851         * modules/fatal-signal: New file.
24852         * MODULES.html.sh (func_all_modules): Add fatal-signal.
24853
24854 2003-10-06  Bruno Haible  <bruno@clisp.org>
24855
24856         * m4/fatal-signal.m4: New file.
24857         * m4/signalblocking.m4: New file, from GNU gettext.
24858
24859 2003-10-06  Bruno Haible  <bruno@clisp.org>
24860
24861         * lib/version-etc-2.h: Remove file.
24862         * lib/version-etc-2.c: Remove file.
24863
24864 2003-10-06  Bruno Haible  <bruno@clisp.org>
24865
24866         * lib/fatal-signal.h: New file, from GNU gettext.
24867         * lib/fatal-signal.c: New file, from GNU gettext.
24868
24869 2003-10-05  Paul Eggert  <eggert@twinsun.com>
24870
24871         * README: Rework advice for preventing empty .o files.
24872         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
24873         not <sys/types.h>.
24874
24875 2003-10-04  Karl Berry  <karl@gnu.org>
24876
24877         * lib/argp*: update from libc.
24878
24879 2003-10-04  Karl Berry  <karl@gnu.org>
24880
24881         * config/config.{guess,sub}: update from config.
24882
24883 2003-10-02  Bruno Haible  <bruno@clisp.org>
24884
24885         * modules/lchown (Include): Add lchown.h.
24886         * modules/time_r (Include): Use "..." syntax.
24887         * modules/xgetdomainname (Include): Add xgetdomainname.h.
24888
24889 2003-10-01  Simon Josefsson  <jas@extundo.com>
24890
24891         * MODULES.html.sh (func_all_modules): Move gethostname from section
24892         'based on' to section 'lacking' POSIX:2001.
24893
24894 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
24895
24896         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
24897         to output mode on the same stream.
24898
24899 2003-09-29  Paul Eggert  <eggert@twinsun.com>
24900
24901         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
24902         Fix arg typo in previous patch.
24903
24904 2003-09-28  Jim Meyering  <jim@meyering.net>
24905
24906         * lib/error.c: Correct cpp indentation.
24907
24908 2003-09-27  Paul Eggert  <eggert@twinsun.com>
24909
24910         * modules/free: New file.
24911
24912 2003-09-27  Paul Eggert  <eggert@twinsun.com>
24913
24914         * m4/free.m4: New file.
24915
24916 2003-09-27  Paul Eggert  <eggert@twinsun.com>
24917
24918         * lib/minmax.h (MIN, MAX)
24919         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
24920         Omit the special code that used __typeof__, since we worry that
24921         it could be more trouble than it's worth.  See:
24922         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
24923         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
24924
24925         * lib/free.c: New file.
24926
24927 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
24928
24929         Trivial fixes to Makefile.am parts of module listings.
24930         * modules/strstr: Append strstr.h to lib_SOURCES.
24931         * modules/strcase: Likewise, for strcase.h.
24932
24933 2003-09-27  Karl Berry  <karl@gnu.org>
24934
24935         * config/mkinstalldirs: update from automake.
24936
24937 2003-09-26  Paul Eggert  <eggert@twinsun.com>
24938
24939         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
24940         (error_tail): Do not loop, reallocating temporary buffer, since
24941         the output cannot contain more wide characters than the input
24942         contains bytes, the size must be big enough already.  This avoids
24943         one potential size overflow calculation.  Check for size overflow
24944         when calculating temporary buffer size.  Free temporary buffer
24945         when done, if it was allocated with malloc; this plugs a memory
24946         leak.  Remove casts from void * to pointers, that are no longer
24947         needed now that we're assuming C89 or better.
24948
24949         Merge error changes from glibc.
24950
24951         * lib/error.c, error.h: Update copyright notice header to match glibc.
24952         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
24953         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
24954         Disable cancellation while printing error.
24955         * lib/error.h: Prepend __ to parameter names.
24956
24957 2003-09-26  Jim Meyering  <jim@meyering.net>
24958
24959         * lib/error.c (error_tail): Move some declarations
24960         into inner scope where the local variables are used.
24961
24962 2003-09-26  Bruno Haible  <bruno@clisp.org>
24963
24964         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
24965         stpncpy().
24966         Don't define stpncpy through config.h; it's now done through stpncpy.h.
24967
24968 2003-09-26  Bruno Haible  <bruno@clisp.org>
24969
24970         * lib/stpncpy.h (gnu_stpncpy): New declaration.
24971         (stpncpy): Define as alias for gnu_stpncpy.
24972         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
24973
24974 2003-09-25  Simon Josefsson  <jas@extundo.com>
24975
24976         * lib/xgetdomainname.h: New file.
24977         * lib/xgetdomainname.c: New file.
24978
24979 2003-09-25  Simon Josefsson  <jas@extundo.com>
24980             Bruno Haible  <bruno@clisp.org>
24981
24982         * modules/getdomainname: New file.
24983         * modules/xgetdomainname: New file.
24984         * MODULES.html.sh (func_all_modules): Add getdomainname,
24985         xgetdomainname.
24986
24987 2003-09-25  Simon Josefsson  <jas@extundo.com>
24988             Bruno Haible  <bruno@clisp.org>
24989
24990         * m4/getdomainname.m4: New file.
24991
24992 2003-09-25  Simon Josefsson  <jas@extundo.com>
24993             Bruno Haible  <bruno@clisp.org>
24994
24995         * lib/getdomainname.h: New file.
24996         * lib/getdomainname.c: New file.
24997
24998 2003-09-25  Karl Berry  <karl@gnu.org>
24999
25000         * lib/argp-fmtstream.c, argp-help.c: update from libc.
25001
25002 2003-09-25  Karl Berry  <karl@gnu.org>
25003
25004         * config/install-sh: update from automake.
25005
25006 2003-09-25  Bruno Haible  <bruno@clisp.org>
25007
25008         * modules/version-etc-2: New file, from modules/version-etc with
25009         modifications.
25010         * MODULES.html.sh (func_all_modules): Add version-etc-2.
25011
25012 2003-09-25  Bruno Haible  <bruno@clisp.org>
25013
25014         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
25015         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
25016
25017 2003-09-24  Simon Josefsson  <jas@extundo.com>
25018
25019         * modules/xgethostname: Add xgethostname.h.
25020
25021 2003-09-24  Paul Eggert  <eggert@twinsun.com>
25022
25023         * lib/linebuffer.c (freebuffer): Don't free the argument, just
25024         the buffer associated with the argument.  Bug reported by
25025         Simon Josefsson.
25026
25027 2003-09-24  Paul Eggert  <eggert@twinsun.com>
25028
25029         * README: Document assumptions that 'int' is at least 32 bits
25030         wide, that integer arithmetic is 2's complement without overflow,
25031         that there are no holes in integer values, that adding sizes of
25032         two nonoverlapping objects can't overflow, and that all-bits-zero
25033         yields scalar zero.  Fix spelling and capitalization typos.
25034
25035 2003-09-19  Karl Berry  <karl@gnu.org>
25036
25037         * lib/argp.h: update from libc.
25038
25039 2003-09-17  Paul Eggert  <eggert@twinsun.com>
25040
25041         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
25042         to avoid spurious warnings like "AC_RUN_IFELSE was called before
25043         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
25044
25045 2003-09-17  Paul Eggert  <eggert@twinsun.com>
25046
25047         * gnulib-tool: Use "test -h", not "test -L", for portability
25048         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
25049         (tags_regexp): Remove, since \| doesn't conform to POSIX.
25050         (sed_extract_prog): Issue s commands one-by-one, rather than
25051         using \| in one s command.
25052
25053 2003-09-16  Paul Eggert  <eggert@twinsun.com>
25054
25055         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
25056         input error, instead of returning NULL the next time we are called
25057         (and therefore losing track of errno).
25058
25059 2003-09-16  Bruno Haible  <bruno@clisp.org>
25060
25061         * gnulib-tool (func_create_testdir): Warn about duplicated
25062         dependencies.
25063
25064 2003-09-15  Paul Eggert  <eggert@twinsun.com>
25065
25066         * modules/argmatch, modules/fatal, modules/obstack,
25067         modules/xalloc, modules/xgethostname: Sort dependencies by
25068         importance, not alphabetically.
25069
25070 2003-09-15  Paul Eggert  <eggert@twinsun.com>
25071
25072         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
25073         fails, so that the caller gets the proper errno.
25074
25075         * lib/readutmp.c (read_utmp): Likewise.
25076         Check for fstat error.  Close stream and free storage
25077         when failing.
25078
25079 2003-09-14  Karl Berry  <karl@gnu.org>
25080
25081         * config/srclist.txt (strdup.c): disable for c89 changes.
25082
25083 2003-09-14  Jim Meyering  <jim@meyering.net>
25084
25085         * lib/getloadavg.c: Correct cpp indentation.
25086         * lib/strdup.c: Likewise.
25087         * lib/vasnprintf.c: Likewise.
25088
25089 2003-09-14  Bruno Haible  <bruno@clisp.org>
25090
25091         * modules/fwriteerror: New file.
25092         * MODULES.html.sh (func_all_modules): Add fwriteerror.
25093
25094 2003-09-14  Bruno Haible  <bruno@clisp.org>
25095
25096         * lib/fwriteerror.h: New file.
25097         * lib/fwriteerror.c: New file.
25098
25099 2003-09-12  Paul Eggert  <eggert@twinsun.com>
25100
25101         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
25102         modules/xgethostname, modules/xalloc: Depend on exit.
25103
25104 2003-09-12  Paul Eggert  <eggert@twinsun.com>
25105
25106         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
25107
25108         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
25109         and AC_MINIX, too, so that their extensions are available.
25110
25111         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
25112         This macro has been superseded by gl_BACKUPFILE.
25113
25114         More patches to assume C89 or better.
25115
25116         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
25117
25118         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
25119         unconditionally.
25120         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
25121         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
25122         Include <string.h>, <stdlib.h> unconditionally.
25123         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
25124         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
25125         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
25126         headers or for string.h.
25127         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
25128         or strtoul.
25129
25130         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
25131         headers.
25132         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
25133         * m4/userspec.m4 (gl_USERSPEC): Likewise.
25134         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
25135         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
25136         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
25137         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
25138         memcpy, memset.
25139         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
25140         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
25141         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
25142         strtol.
25143         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
25144         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
25145         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
25146         strtoul.
25147
25148 2003-09-12  Paul Eggert  <eggert@twinsun.com>
25149
25150         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
25151         * lib/obstack.c [!defined _LIBC]: Likewise.
25152         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
25153         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
25154         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
25155
25156         More changes to assume C89 or better.
25157
25158         * lib/error.c (error_tail): Assume vprintf.
25159
25160         * lib/argmatch.c (getenv): Remove decl.
25161         * lib/progreloc.c (get_full_program_name): Define via prototype.
25162         * lib/setenv.c (clearenv): Likewise.
25163         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
25164         needed.
25165         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
25166         (malloc, memcpy): Remove decls.
25167         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
25168         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
25169         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
25170         (memcpy): Remove macro.
25171         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
25172         (__P): Remove.  All uses removed.
25173         (PTR): Remove.  All uses changed to void *.
25174         (CHAR_BIT, NULL): Remove.
25175         (spaces, zeros, memset_space, memset_zero)
25176         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
25177         Remove.
25178         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
25179         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
25180         Define with prototype.
25181         Remove now-unnecessary prototype decl.
25182         (extra_args_spec): Assume ANSI C.  All uses changed.
25183         (extra_args_spec_iso): Remove.
25184         (my_strftime, emacs_strftimeu): Define via prototype.
25185         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
25186         unconditionally.
25187         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
25188         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
25189         (strtoul, strtol): Remove decls.
25190         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
25191         LONG_MAX): Remove.
25192         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
25193         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
25194         (LOCALE_PARAM_PROTO): New macro.
25195         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
25196         (INTERNAL (strtol), strtol): Define with a prototype.
25197         (PARAMS): Remove.  All uses removed.
25198         * lib/tempname.c: Include <string.h> unconditionally.
25199         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
25200         * lib/xgethostname.c (main): Define with a prototype.
25201         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
25202         Include <stdlib.h> unconditionally.
25203         (calloc, malloc, realloc, free): Remove decls.
25204         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
25205         Include <stdlib.h> unconditionally.  Sort include file names.
25206         (strtod): Remove.
25207         (xstrtod): Define with a prototype.
25208         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
25209         (strtol, strtoul): Remove decls.
25210
25211 2003-09-11  Paul Eggert  <eggert@twinsun.com>
25212
25213         More patches to assume C89 or better.
25214         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
25215         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
25216         string.h, memchr, STDC_HEADERS.
25217
25218 2003-09-11  Paul Eggert  <eggert@twinsun.com>
25219
25220         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
25221         Include <stdlib.h>, <string.h> unconditionally.
25222         Remove now-unnecessary cast to char *.
25223         * lib/strnlen.c: Include <string.h> unconditionally.
25224         * lib/yesno.c (yesno): Define with a prototype.
25225
25226 2003-09-11  Bruno Haible  <bruno@clisp.org>
25227
25228         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
25229
25230 2003-09-10  Jim Meyering  <jim@meyering.net>
25231
25232         * lib/error.c: Correct indentation of cpp directives.
25233
25234 2003-09-10  Bruno Haible  <bruno@clisp.org>
25235
25236         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
25237         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
25238         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
25239         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
25240         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
25241         <stdlib.h> and <string.h> checks.
25242         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
25243         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
25244
25245 2003-09-10  Bruno Haible  <bruno@clisp.org>
25246
25247         * lib/strcspn.c: Include <string.h> unconditionally.
25248         * lib/strpbrk.c: Include <string.h> unconditionally.
25249         * lib/strstr.c: Include <string.h> unconditionally.
25250         * lib/unicodeio.c: Include <string.h> unconditionally.
25251         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
25252         * lib/unsetenv.c: Likewise.
25253         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
25254         * lib/yesno.c: Include <stdlib.h> unconditionally.
25255         (rpmatch): Add prototype.
25256
25257 2003-09-09  Paul Eggert  <eggert@twinsun.com>
25258
25259         More patches to assume C89 or better.
25260         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
25261         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
25262         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
25263         or for string.h.
25264         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
25265         stdlib.h.
25266         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
25267         C headers.
25268         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
25269         string.h.
25270         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
25271         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
25272         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
25273         or for string.h.
25274         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
25275         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
25276         C headers.
25277         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
25278         memcpy.
25279         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
25280         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
25281         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
25282         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
25283         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
25284         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
25285         string.h, free.
25286         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
25287         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
25288         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
25289         C headers, or for string.h.
25290         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
25291         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
25292         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
25293         headers, memory.h, stdlib.h, string.h, strings.h.
25294         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
25295         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
25296         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
25297         strchr.
25298         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
25299         headers, memory.h, string.h.
25300         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
25301         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
25302         free.
25303         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
25304         headers.
25305         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
25306         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
25307         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
25308         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
25309         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
25310
25311 2003-09-09  Paul Eggert  <eggert@twinsun.com>
25312
25313         More K&R removal.
25314
25315         * lib/acosl.c (main): Use a prototype.
25316         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
25317         tanl.c: Likewise.
25318
25319         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
25320
25321         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
25322         (getopt, etopt_long, getopt_long_only, _getopt_internal)
25323         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
25324         with a prototype.
25325         * lib/getopt.c (const): Remove macro.
25326         Include <string.h> unconditionally.
25327         (my_index): Remove; all uses changed to strchr.
25328         (strlen): Remove decl.
25329         (exchange): Remove forward decl; no longer needed.
25330         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
25331         Define with prototype.
25332         * lib/getopt1.c (const): Remove macro.
25333         (getopt_long, getopt_long_only, main): Define with prototype.
25334
25335         * lib/getugroups.c: Include <string.h> unconditionally.
25336
25337         * lib/getusershell.c: Include <stdlib.h> unconditionally.
25338         (getusershell, setusershell, endusershell, readname, main):
25339         Define with prototypes.
25340
25341         * lib/group-member.c: Include group-member.h first.
25342         Include <stdlib.h> unconditionally.
25343
25344         * lib/hard-locale.c: Include hard-locale.h first.
25345         Include <stdlib.h>, <string.h> unconditionally.
25346
25347         * lib/hash.c (free, malloc): Remove decls.
25348         Include <stdlib.h> unconditionally.
25349
25350         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
25351         (getenv): Do not declare.
25352
25353         * lib/idcache.c: Include <string.h> unconditionally.
25354
25355         * lib/long-options.c: Include long-options.h first, to test interface.
25356         Include <stdlib.h> unconditionally.
25357
25358         * lib/makepath.c: Include makepath.h first, to test interface.
25359         Include <stdlib.h> and <string.h> unconditionally.
25360
25361         * lib/linebuffer.c: Include <stdlib.h>.
25362         (free): Remove decl.
25363
25364         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
25365         stddef.h. rpl_malloc returns void *, not char *.
25366         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
25367         prototype.
25368
25369         * lib/md5.h: Include <limits.h> unconditionally.
25370         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
25371         (__P): Remove; all uses removed.
25372         * lib/md5.c: Include "md5.h" first.
25373         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
25374         md5_buffer, md5_process_bytes, md5_process_block):
25375         Define with prototypes.
25376         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
25377         * lib/sha.c: Include "sha.h" first.
25378         Include <stdlib.h>, <string.h> unconditionally.
25379
25380         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
25381         * lib/memcmp.c (__ptr_t): Likewise.
25382         * lib/memrchr.c (__ptr_t): Likewise.
25383         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
25384         Include <string.h> unconditionally.
25385         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
25386         * lib/memchr.c: Include <stdlib.h> unconditionally.
25387         * lib/memchr.c (LONG_MAX): Remove.
25388         * lib/memrchr.c (LONG_MAX): Likewise.
25389         * lib/memchr.c (__memchr): Define via a prototype.
25390         * lib/memrchr.c (__memrchr): Likewise.
25391         * lib/memcmp.c (__P): Remove, and remove all uses.
25392         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
25393         Remove forward decls; no longer needed.
25394         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
25395         Use types required by C89 in prototype.
25396
25397         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
25398         * lib/savedir.c: Likewise.
25399         * lib/mkdir.c (free): Remove decl.
25400         * lib/rmdir.c (rmdir): Define with a prototype.
25401         * lib/savedir.c: Include savedir.h first, to test interface.
25402
25403         * lib/mktime.c (STDC_HEADERS): Remove.
25404         Include <stdlib.h>, <string.h> unconditionally.
25405
25406         * lib/modechange.c: Include <stdlib.h> unconditionally.
25407         (malloc): Remove decl.
25408
25409         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
25410         (free): Remove decl.
25411
25412         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
25413         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
25414         (This type really should be intptr_t, but that's a C99ism.)
25415         (_obstack_memcpy): Remove: all uses changed to memcpy.
25416         Include <string.h> unconditionally.
25417         (struct obstack): Assume __STDC__ for types of members
25418         chunkfun, freefun, extra_arg.
25419         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
25420         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
25421         obstack_begin, obstack_specify_allocation,
25422         obstack_specify_allocation_with_arg, obstack_chunkfun,
25423         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
25424         Remove unprototyped decls and the macros that use them.
25425         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
25426         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
25427         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
25428         (defined __STDC__ && __STDC__)]:
25429         Remove nonprototyped code.
25430         Include <stdlib.h> unconditionally.
25431         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
25432         _obstack_allocated_p, _obstack_free, obstack_free,
25433         _obstack_memory_used, print_and_abort):
25434         Define using prototypes.
25435         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
25436         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
25437         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
25438         obstack_next_free, obstack_object_size, obstack_room) [0]:
25439         Remove unused, unprototyped code.
25440
25441         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
25442
25443         * lib/physmem.c (physmem_total, physmem_available, main): Define
25444         with prototypes.
25445
25446         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
25447         (main): Define with a prototype.
25448
25449         * lib/posixver.c (getenv): Remove decl.
25450
25451         * lib/putenv.c (malloc): Returns void *, not char *.
25452         Include <string.h> unconditionally.
25453         (strchr, memcpy, NULL): Do not define.
25454
25455         * lib/readtokens.c: Include readtokens.h first, to test interface.
25456         Include <stdlib.h>, <string.h> unconditionally.
25457         (init_tokenbuffer): Define with a prototype.
25458
25459         * lib/regex.c (PARAMS): Remove.  All uses removed.
25460         All uses of _RE_ARGS removed, too.
25461         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
25462         unconditionally.
25463         (bzero): Assume memset exists.
25464         (memcmp, memcpy, NULL): Remove.
25465         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
25466         char, or assignments to local vars of type signed char.
25467         (init_syntax_once, PREFIX(extract_number_and_incr),
25468         PREFIX(print_partial_compiled_pattern),
25469         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
25470         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
25471         PREFIX(regex_grow_registers), PREFIX(regex_compile),
25472         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
25473         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
25474         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
25475         wcs_compile_range, byte_compile_range, truncate_wchar,
25476         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
25477         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
25478         count_mbs_length, wcs_re_match_2_internal,
25479         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
25480         PREFIX(alt_match_null_string_p),
25481         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
25482         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
25483         regfree, PREFIX(extract_number)): Define with prototype.  Remove
25484         now-unnecessary declaration, if any.
25485         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
25486         regcomp, regexec):
25487         Remove now-unnecessary casts among pointer types.
25488         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
25489
25490         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
25491         (free): Remove decl.
25492
25493         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
25494
25495         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
25496         (free): Remove decl.
25497
25498         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
25499         * lib/xgetcwd.c: Likewise.
25500
25501         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
25502         (free): Remove decl.
25503
25504         * lib/strchrnul.c (strchrnul): Define with a prototype.
25505         Fix bug: c_in was not converted to char before searching.
25506
25507         The following changes are not K&R related:
25508
25509         * lib/group-member.h: Include <sys/types.h>, so that this file is
25510         self-contained.
25511         * lib/makepath.h: Likewise.
25512
25513         * lib/getusershell.c (readname, default_index, line_size, readname):
25514         Use size_t, not int, for sizes.
25515         (readname): If the size overflows, report an error instead of
25516         looping forever.
25517
25518 2003-09-09  Paul Eggert  <eggert@twinsun.com>
25519
25520         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
25521         libc.
25522
25523 2003-09-09  Paul Eggert  <eggert@twinsun.com>
25524
25525         * README: New section: portability guidelines.
25526
25527 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
25528
25529         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
25530         C89 spec.
25531
25532 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
25533
25534         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
25535
25536 2003-09-08  Paul Eggert  <eggert@twinsun.com>
25537
25538         Assume C89 or better; remove K&R cruft.
25539         A few of these changes were first proposed by Derek Robert Price
25540         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
25541
25542         * lib/addext.c: Include <string.h> unconditionally.
25543         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
25544         Don't declare getenv or malloc.
25545
25546         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
25547         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
25548         (NULL): Remove.
25549         (find_stack_direction, alloca): Use prototypes.
25550
25551         * lib/atexit.c (atexit): Define using a prototype.
25552
25553         * lib/basename.c, dirname.c, stripslash.c:
25554         Include <string.h> unconditionally.
25555
25556         * lib/bcopy.c: Include <stddef.h>.
25557         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
25558
25559         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
25560
25561         * lib/error.h (error, error_at_line, error_print_progname)
25562         [! (defined (__STDC__) && __STDC__)]: Remove decls.
25563         * lib/error.c: Include error.h first, to check interface.
25564         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
25565         (VA_START): Remove; all uses changeed to va_start.
25566         (exit, strerror): Remove decls.
25567         (error_print_progname): Prototype uncondionally.
25568         Don't include <errno.h>; no longer needed.
25569         (private_strerror): Remove.
25570         (error_tail): Always define.
25571         (error, error_at_line): Assume C89 or better; always use prototypes.
25572         * lib/fatal.c: Include "fatal.h" first, to test interface.
25573         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
25574         (VA_START): Remove; all uses changed to va_start.
25575         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
25576         this case.
25577         (exit): Remove decl.
25578         (fatal): Prototype unconditionally.  Assume va_start works.
25579         Abort at end, to pacify gcc.
25580
25581         * lib/euidaccess.c (main): Define with a prototype.
25582
25583         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
25584
25585         * lib/exitfail.c: Include <stdlib.h> unconditionally.
25586
25587         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
25588         prototypes.
25589         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
25590         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
25591         (getenv): Remove decl.
25592         (fnmatch): Define using a prototype.
25593         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
25594         (FCT): Define using a prototype.
25595
25596         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
25597
25598         * lib/gethostname.c: Include <stddef.h>.
25599         (gethostname): Define with prototype.  Length is size_t, not int.
25600
25601 2003-09-08  Paul Eggert  <eggert@twinsun.com>
25602
25603         Assume C89 or better; remove K&R cruft.
25604         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
25605         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
25606         string.h, getenv, malloc.
25607         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
25608         headers.
25609         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
25610         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
25611         do not check for strerror.
25612         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
25613         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
25614         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
25615         do not check for doprnt or vprintf.
25616         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
25617         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
25618
25619 2003-09-08  Paul Eggert  <eggert@twinsun.com>
25620
25621         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
25622         getversion.c should have been removed then, but was accidentally
25623         preserved.
25624
25625         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
25626         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
25627
25628 2003-09-08  Karl Berry  <karl@gnu.org>
25629
25630         * config/config.sub, config.guess, srclistvars.sh: update from savannah
25631                 config, forget about prep.
25632
25633         * config/depcomp, missing: update from automake.
25634
25635 2003-09-07  Paul Eggert  <eggert@twinsun.com>
25636
25637         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
25638         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
25639
25640 2003-09-07  Paul Eggert  <eggert@twinsun.com>
25641
25642         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
25643         copy_tm_result.  Bug reported by Simon Josefsson in
25644         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
25645
25646 2003-09-06  Paul Eggert  <eggert@twinsun.com>
25647
25648         * m4/time_r.m4: New file.
25649         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
25650         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
25651         is. Check for timegm declaration.
25652         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
25653         Do not check for gmtime_r.
25654         Replace mktime if __mktime_internal does not exist and if mktime
25655         hasn't been replaced already.
25656
25657 2003-09-06  Paul Eggert  <eggert@twinsun.com>
25658
25659         * lib/time_r.c, lib/time_r.h: New files.
25660
25661         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
25662         __localtime_r.
25663         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
25664         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
25665
25666         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
25667         __gmtime_r.
25668         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
25669         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
25670         Include <time_r.h>.
25671
25672         * lib/timegm.c: Switch to glibc implementation, with the following
25673         changes:
25674         [defined HAVE_CONFIG_H]: Include <config.h>.
25675         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
25676         (__mktime_internal) [!defined _LIBC]: New decl.
25677         (__gmtime_r) [!defined _LIBC]: New macro and function.
25678         (timegm): Use a prototype, since gnulib assumes C89.
25679         Do not bother declaring tmp to be const, as it's not really usefu.
25680         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
25681         (timegm): Declare only if HAVE_DECL_TIMEGM.
25682
25683 2003-09-06  Paul Eggert  <eggert@twinsun.com>
25684
25685         * MODULES.html.sh (func_all_modules): Add time_r.
25686         * modules/time_r: New file.
25687         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
25688         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
25689
25690 2003-09-03  Paul Eggert  <eggert@twinsun.com>
25691
25692         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
25693         Bug reported by Lute Kamstra in
25694         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
25695
25696         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
25697         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
25698         course with correspondingly smaller numbers for tomorrow and
25699         yesterday.  From Tadayoshi Funaba.  Originally installed into
25700         sh-utils on 1999-08-07, but the patch got lost (I guess during the
25701         coreutils merge?).
25702
25703 2003-08-31  Simon Josefsson  <jas@extundo.com>
25704
25705         * modules/timegm: New file.
25706         * MODULES.html.sh (func_all_modules): Add timegm.
25707
25708 2003-08-31  Simon Josefsson  <jas@extundo.com>
25709
25710         * m4/timegm.m4: New file.
25711
25712 2003-08-31  Simon Josefsson  <jas@extundo.com>
25713
25714         * lib/timegm.h: New file.
25715         * lib/timegm.c: New file.  Based on
25716         wget-1.8.2/src/http.c:mktime_from_utc.
25717
25718 2003-08-31  Karl Berry  <karl@gnu.org>
25719
25720         * lib/argp.h: update from libc.
25721
25722 2003-08-28  Bruno Haible  <bruno@clisp.org>
25723
25724         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
25725         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
25726         followed by '#define fnmatch fnmatch_posix' gives an error.
25727
25728 2003-08-28  Bruno Haible  <bruno@clisp.org>
25729
25730         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
25731         warning on QNX, which defines O_BINARY to 000000.
25732
25733 2003-08-27  Jim Meyering  <jim@meyering.net>
25734
25735         * m4/mkstemp.m4: Require that the system mkstemp be able to create
25736         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
25737         would fail after 32.  Reported by Danny Levinson.  Details here:
25738         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
25739
25740 2003-08-24  Bruno Haible  <bruno@clisp.org>
25741
25742         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
25743         MSVC7 <stdio.h> is included later.
25744
25745 2003-08-22  Simon Josefsson  <jas@extundo.com>
25746
25747         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
25748
25749 2003-08-20  Karl Berry  <karl@gnu.org>
25750
25751         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
25752
25753 2003-08-20  Bruno Haible  <bruno@clisp.org>
25754
25755         * modules/progname: New file.
25756         * MODULES.html.sh (func_all_modules): Add progname.
25757
25758 2003-08-20  Bruno Haible  <bruno@clisp.org>
25759
25760         * lib/progname.h: New file, from GNU gettext.
25761         * lib/progname.c: New file, from GNU gettext.
25762         * lib/progreloc.c: New file, from GNU gettext.
25763
25764 2003-08-19  Jim Meyering  <jim@meyering.net>
25765
25766         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
25767         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
25768
25769 2003-08-19  Bruno Haible  <bruno@clisp.org>
25770
25771         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
25772         more.
25773
25774 2003-08-19  Bruno Haible  <bruno@clisp.org>
25775
25776         * lib/xstrdup.c: Assume <string.h> exists.
25777
25778 2003-08-18  Paul Eggert  <eggert@twinsun.com>
25779
25780         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
25781         in makefile rules.
25782
25783 2003-08-18  Jim Meyering  <jim@meyering.net>
25784
25785         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
25786         * m4/lib-ld.m4: Likewise.
25787
25788 2003-08-18  Jim Meyering  <jim@meyering.net>
25789
25790         * lib/setenv.h: Indent nested cpp directive.
25791         * lib/vasnprintf.c: Remove trailing blanks.
25792
25793 2003-08-17  Simon Josefsson  <jas@extundo.com>
25794
25795         * modules/xstrndup: New file.
25796         * MODULES.html.sh (func_all_modules): Add xstrndup.
25797
25798 2003-08-17  Simon Josefsson  <jas@extundo.com>
25799
25800         * modules/argp: Fix autoconf macro name. Add more dependencies.
25801
25802 2003-08-17  Simon Josefsson  <jas@extundo.com>
25803
25804         * m4/xstrndup.m4: New file.
25805
25806 2003-08-17  Simon Josefsson  <jas@extundo.com>
25807
25808         * m4/argp.m4: New file.
25809
25810 2003-08-17  Simon Josefsson  <jas@extundo.com>
25811             Bruno Haible  <bruno@clisp.org>
25812
25813         * lib/xstrndup.h: New file.
25814         * lib/xstrndup.c: New file.
25815
25816 2003-08-17  Bruno Haible  <bruno@clisp.org>
25817
25818         * modules/strndup (Files, Include): Add lib/strndup.h.
25819
25820 2003-08-17  Bruno Haible  <bruno@clisp.org>
25821
25822         * modules/euidaccess (Files): Add lib/euidaccess.h.
25823
25824 2003-08-17  Bruno Haible  <bruno@clisp.org>
25825
25826         * lib/strndup.h: New file.
25827
25828 2003-08-17  Bruno Haible  <bruno@clisp.org>
25829
25830         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
25831         like AC_GNU_SOURCE.
25832         * modules/extensions (configure.ac): Comment out the invocation of
25833         gl_USE_SYSTEM_EXTENSIONS.
25834
25835 2003-08-16  Paul Eggert  <eggert@twinsun.com>
25836
25837         Merges from coreutils, etc.
25838         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
25839         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
25840         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
25841         fixing a typo.
25842         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
25843         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
25844
25845 2003-08-16  Paul Eggert  <eggert@twinsun.com>
25846
25847         Document merge from coreutils.
25848         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
25849         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
25850         * modules/utime: Add m4/utimes-null.m4.
25851
25852 2003-08-16  Paul Eggert  <eggert@twinsun.com>
25853
25854         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
25855         space, undoing this 2003-08-12 change:
25856         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
25857
25858 2003-08-16  Paul Eggert  <eggert@twinsun.com>
25859
25860         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
25861         strtoul.c from libc, undoing this 2003-08-12 change:
25862         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
25863
25864 2003-08-16  Jim Meyering  <jim@meyering.net>
25865
25866         Merges from coreutils.
25867         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
25868         prefix.  Adjust cache variables similarly.  Create 500 rather than
25869         just 300 files, to exercise bug on Darwin6.5, too.
25870         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
25871         $missing_dir.
25872         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
25873         AM_SYS_POSIX_TERMIOS.
25874         Reported by mkc@mathdogs.com.
25875         Also change use of $am_cv_sys_posix_termios
25876         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
25877         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
25878         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
25879         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
25880         in /proc/mounts until it finds one with matching device number.  This
25881         is unnecessary when the FILE argument *is* a mount point.  No stat call
25882         is necessary in that case.  So, disable the statvfs-testing code on
25883         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
25884         as RedHat bug# 84846.
25885         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
25886         to 1MB, so as not to render systems with no stack size limit (e.g.,
25887         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
25888         Include <unistd.h>.  On some systems,
25889         it is required for the definition of _SC_PAGESIZE.
25890
25891 2003-08-16  Jim Meyering  <jim@meyering.net>
25892
25893         Merge from coreutils.
25894         * lib/xstrtoimax.c: #else #if -> #elif.
25895         * lib/xstrtoumax.c: Likewise.
25896
25897 2003-08-16  Jim Meyering  <jim@meyering.net>
25898
25899         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
25900         * m4/utimes.m4: Removed.
25901         * m4/utimes-null.m4: Renamed from utimes.m4.
25902
25903         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
25904         to 1MB, so as not to render systems with no stack size limit (e.g.,
25905         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
25906         Include <unistd.h>.  On some systems,
25907         it is required for the definition of _SC_PAGESIZE.
25908
25909 2003-08-16  Jim Meyering  <jim@meyering.net>
25910         and Paul Eggert  <eggert@cs.ucla.edu>
25911
25912         Merges from coreutils, etc.
25913
25914         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
25915         using the latest version from cvs.  This avoids problems with #line
25916         directives using a vendor (Sun) compiler.
25917         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
25918         Don't set GETGROUPS_LIB here; now it's
25919         done via getgroups.m4's wrapper function.
25920         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
25921         rather than just in sh-util/configure.in, so that the
25922         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
25923         same.
25924         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
25925         AC_FUNC_GETLOADAVG where to find getloadavg.c.
25926         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
25927         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
25928         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
25929         Remove code that is now done by the newly-required macros.
25930         Append $(EXEEXT) to DF_PROG.
25931         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
25932         Do not invoke or require the following here,
25933         since prereq.m4 or some gnulib .m4 now does this for us:
25934         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
25935         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
25936         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
25937         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
25938         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
25939         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
25940         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
25941         AC_FUNC_OBSTACK.
25942         Do not replace the following functions, as this is now the job
25943         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
25944         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
25945         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
25946         atexit getpass, strdup, getpagesize.
25947         Replace 'raise'.
25948         Do not check for the following functions, as this is now the job
25949         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
25950         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
25951         setregid.
25952         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
25953         Check for sys/sysctl.h.
25954         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
25955         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
25956         of checking for ssize_t ourselves.
25957
25958         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
25959         Require every macro that gnulib/modules/* suggests for us.
25960         (jm_PREREQ_ADDEXT): New macro.
25961         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
25962         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
25963
25964         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
25965         (gl_PHYSMEM): Use it.
25966         Also check for `table' function.
25967         Check for new headers and functions.
25968         Add check for sys/sysmp.h.
25969         With suggestions from Kaveh Ghazi.
25970         Ignore headers that are present but cannot be compiled.  This
25971         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
25972         C 5.4.
25973
25974 2003-08-15  Paul Eggert  <eggert@twinsun.com>
25975
25976         Document merge from coreutils.
25977         * modules/userspec: Depend on posixver.
25978         * modules/strftime: Depend on tzset.
25979
25980 2003-08-15  Paul Eggert  <eggert@twinsun.com>
25981
25982         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
25983         rather than tab, after '#' in shell-script copyright notices.
25984         Suggested by Bruno Haible.
25985
25986 2003-08-15  Paul Eggert  <eggert@twinsun.com>
25987
25988         * config/srclist-update: Use three spaces, rather than tab, after '#'
25989         in shell-script copyright notices.  Suggested by Bruno Haible.
25990         Remove unnecessary parenthesization in regular expression.
25991
25992 2003-08-15  Jim Meyering  <jim@meyering.net>
25993
25994         Merge from coreutils.
25995         * lib/xgethostname.c: Include <stdlib.h>.
25996         (xghostname): Don't exit for anything other than memory-related
25997         failure; just return NULL.
25998         * lib/userspec.c: Include "posixver.h".
25999         (parse_user_spec): Accept `.' as a separator only
26000         in pre-POSIX-200112 mode.
26001         * lib/strtoimax.c: Use #elif rather than #else #if.
26002         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
26003         Remove function, now that we can rely on a working tzset function.
26004         [!_LIBC]: Ensure that the required autoconf test has been run.
26005         [!defined _NL_CURRENT && HAVE_STRFTIME]:
26006         Use underlying_strftime for %r.
26007         * lib/sha.c: Merge in some clean-up and optimization changes from
26008         glibc.
26009         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
26010         Ensure that it is a multiple of 64.
26011         Rearrange loop exit tests so as to avoid performing an
26012         additional fread after encountering an error or EOF.
26013         * lib/realloc.c: Update copyright date.
26014
26015 2003-08-15  Jim Meyering  <jim@meyering.net>
26016         and Paul Eggert  <eggert@twinsun.com>
26017
26018         Merge from coreutils.
26019         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
26020         member but strut utmpx does not.  Needed for AIX 4.3.3.
26021         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
26022
26023 2003-08-15  Jim Meyering  <jim@meyering.net>
26024         and Paul Eggert  <eggert@cs.ucla.edu>
26025
26026         Merges from coreutils, etc.
26027         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
26028         Require gl_FUNC_TZSET_CLOBBER.
26029         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
26030         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
26031         members.
26032
26033 2003-08-14  Paul Eggert  <eggert@twinsun.com>
26034
26035         Help the merge from coreutils.
26036         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
26037         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
26038         * m4/tzset.m4: Use it too.
26039
26040 2003-08-14  Paul Eggert  <eggert@twinsun.com>
26041
26042         * modules/tzset: New file.
26043
26044 2003-08-14  Jim Meyering  <jim@meyering.net>
26045
26046         Merges from coreutils.
26047         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
26048         variable names, rather than @FNMATCH_H@.
26049         * modules/alloca: Likewise for $(ALLOCA_H).
26050
26051         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
26052         the three copies of the literal target, `fnmatch.h'.
26053         * modules/alloca (alloca.h): Likewise.
26054
26055 2003-08-14  Jim Meyering  <jim@meyering.net>
26056
26057         Merge from coreutils.
26058         * m4/tzset.m4: New file.
26059         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
26060         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
26061         otherwise, AIX 5.1 systems would end up using the latter.
26062         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
26063         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
26064         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
26065         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
26066
26067 2003-08-14  Jim Meyering  <jim@meyering.net>
26068
26069         Merge from coreutils.
26070         * lib/obstack.h: Whitespace changes.
26071         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
26072         and xcalloc return values.
26073         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
26074         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
26075         hang on OSF/1 5.1 for DIR on both local and remote file systems.
26076         Reported by (and fix confirmed by) Nelson H. F. Beebe.
26077         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
26078         error from mntctl.
26079         Use mntctl's return value to drive the entry-processing loop, since
26080         we can't rely on the value of the vmt_length member in the last
26081         entry.  On some systems doing so could result in exhausting
26082         virtual memory.  Based in part on a patch from Mike Jetzer.
26083
26084 2003-08-14  Jim Meyering  <jim@meyering.net>
26085         and Paul Eggert  <eggert@twinsun.com>
26086
26087         Merges from coreutils, plus other fixes.
26088         * lib/physmem.c: Merge in portability changes from gcc/libiberty
26089         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
26090         for credits and details.  Thanks to Kaveh Ghazi for helping
26091         to keep these files in sync.
26092         (ARRAY_SIZE): Define it.
26093         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
26094         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
26095         (memcasecmp): Don't assume size_t fits in unsigned int.
26096         Remove casts and duplicate code.
26097         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
26098         (memcpy): Remove definition.
26099         Merge in some clean-up and optimization changes from glibc.
26100         [BLOCKSIZE]: Move definition to top of file.
26101         Ensure that it is a multiple of 64.
26102         Rearrange loop exit tests so as to avoid performing an
26103         additional fread after encountering an error or EOF.
26104         * lib/md5.h (md5_uintptr): Define.
26105         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
26106         return to the initial working directory.  Preserve errno
26107         for caller.
26108         * lib/idcache.c: Include "xalloc.h".
26109         (xmalloc, xrealloc): Remove decls.
26110         (getuser): Remove casts no longer required in C89.
26111         * lib/human.c: Include stdio.h, for sprintf.
26112         * lib/group-member.c: Include "xalloc.h".
26113         (xmalloc, xrealloc): Remove decls.
26114         (get_group_info): Remove casts no longer required in C89.
26115         * lib/getusershell.c (readname): Remove casts no longer required in
26116         C89.
26117         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
26118         * lib/getline.c: Whitespace fix, from coreutils.
26119
26120 2003-08-13  Paul Eggert  <eggert@twinsun.com>
26121
26122         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
26123         Check for isascii.
26124
26125         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
26126         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
26127         Undo previous (whitespace-only) change.
26128
26129 2003-08-13  Paul Eggert  <eggert@twinsun.com>
26130
26131         * lib/exclude.c: Include <ctype.h>
26132         (IN_CTYPE_DOMAIN): New macro.
26133         (is_space): New fn.
26134         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
26135         and empty lines.
26136
26137         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
26138         Undo previous (whitespace-only) change.
26139
26140 2003-08-13  Paul Eggert  <eggert@twinsun.com>
26141
26142         * config/srclist-update: Change update back to the old behavior,
26143         leaving whitespace alone.  Use one 'sed' command rather than a
26144         pipeline.
26145         (fixlicense): Now a variable, not a function.
26146         (remove_trailing_blanks): Remove.
26147         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
26148         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
26149         Undo previous (whitespace-only) change.
26150
26151 2003-08-12  Paul Eggert  <eggert@twinsun.com>
26152
26153         Merge from coreutils.
26154         * modules/euidaccess: Add lib_SOURCES, include for new
26155         file euidaccess.h
26156
26157 2003-08-12  Paul Eggert  <eggert@twinsun.com>
26158
26159         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
26160         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
26161         Normalize leading white space and remove trailing white space.
26162
26163         Merge from coreutils
26164         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
26165
26166         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
26167         0.12.1.  These files are now being upgraded automatically by
26168         ../config/srclist-update.
26169
26170 2003-08-12  Paul Eggert  <eggert@twinsun.com>
26171
26172         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
26173         Normalize leading white space and remove trailing white space.
26174         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
26175         notice, as per ../config/srclist-update.
26176
26177         Merge from coreutils.
26178         * lib/euidaccess.h: New file.
26179         * lib/euidaccess.c: Include it.
26180         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
26181         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
26182         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
26183
26184 2003-08-12  Paul Eggert  <eggert@twinsun.com>
26185
26186         * config/srclist-update: Add copyright notice.
26187         (remove_id_lines, remove_trailing_blanks): New constants.
26188         (fixfile): Use them to normalize spacing a bit in copied files.
26189         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
26190         Normalize leading white space and remove trailing white space.
26191
26192         * config/texinfo.tex: Sync with texinfo.
26193
26194         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
26195         strtoul.c from libc, to merge coreutils whitespace changes.
26196
26197         * config/srclist.txt: Get the following m4 files from gettext:
26198         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
26199         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
26200         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
26201         wint_t.m4.
26202
26203 2003-08-12  Karl Berry  <karl@gnu.org>
26204
26205         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
26206         been made.
26207
26208 2003-08-11  Paul Eggert  <eggert@twinsun.com>
26209
26210         * modules/gnu-source, m4/gnu-source.m4:
26211         Remove; we're assuming Autoconf 2.54 or later now.
26212         Suggested by Bruno Haible.
26213         * MODULES.html.sh (func_all_modules): Remove gnu-source.
26214
26215 2003-08-11  Bruno Haible  <bruno@clisp.org>
26216
26217         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
26218
26219 2003-08-11  Bruno Haible  <bruno@clisp.org>
26220
26221         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
26222         (vasnprintf): Use it instead of wcslen.
26223
26224 2003-08-11  Bruno Haible  <bruno@clisp.org>
26225
26226         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
26227         value to ensure that _Bool promotes to int. Use #define for _Bool when
26228         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
26229
26230 2003-08-10  Karl Berry  <karl@gnu.org>
26231
26232         * lib/regex.h: update from libc (whitespace fix).
26233
26234 2003-08-09  Paul Eggert  <eggert@twinsun.com>
26235
26236         Merge some files from coreutils.  These changes were
26237         originally made by Jim Meyering.
26238         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
26239         many older Unixes require this.
26240         * lib/alloca.c (alloca): Remove cast to argument of free;
26241         no longer needed in C89.
26242         * lib/alloca_.h, regex.h: Fix white space to match
26243         what GNU indent does.
26244
26245 2003-08-09  Paul Eggert  <eggert@twinsun.com>
26246
26247         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
26248         apparently Emacs's Unicode mode got confused before my 2003-08-05
26249         checkin.
26250
26251 2003-08-08  Paul Eggert  <eggert@twinsun.com>
26252
26253         * m4/extensions.m4: New file.
26254         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
26255         Require gl_USE_SYSTEM_EXTENSIONS.
26256         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
26257         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
26258
26259 2003-08-08  Paul Eggert  <eggert@twinsun.com>
26260
26261         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
26262         * modules/extensions, modules/gnu-source: New files.
26263         * modules/timespec, modules/unlocked-io: Depend on extensions.
26264
26265 2003-08-07  Paul Eggert  <eggert@twinsun.com>
26266
26267         * modules/restrict: New file.
26268         * MODULES.html.sh (func_all_modules): Add restrict.
26269         * modules/regex: Depend on restrict.
26270
26271 2003-08-07  Paul Eggert  <eggert@twinsun.com>
26272
26273         * m4/restrict.m4: New file.
26274         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
26275
26276 2003-08-07  Bruno Haible  <bruno@clisp.org>
26277
26278         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
26279         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
26280
26281 2003-08-07  Bruno Haible  <bruno@clisp.org>
26282
26283         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
26284         makes the module 'getndelim2' compatible with the module 'getline'.
26285
26286 2003-08-05  Paul Eggert  <eggert@twinsun.com>
26287
26288         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
26289         byte with "\201" to avoid glitches when editing that source file
26290         with multi-gnome-terminal.
26291
26292 2003-08-05  Paul Eggert  <eggert@twinsun.com>
26293
26294         * lib/bumpalloc.h: Remove.
26295
26296 2003-08-05  Paul Eggert  <eggert@twinsun.com>
26297
26298         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
26299         * modules/bumpalloc: Remove.
26300
26301 2003-08-04  Paul Eggert  <eggert@twinsun.com>
26302
26303         * lib/getloadavg.c: Change copyright notice and spacing to conform to
26304         GNU coding style.
26305
26306         Merge from coreutils.
26307         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
26308         1. From glibc.
26309         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
26310         from Karl Berry, implemented by Jim Meyering.
26311         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
26312         from Dmitry V. Levin.
26313         Remove anachronistic cast of xrealloc.
26314         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
26315         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
26316         type. Otherwise, it wouldn't compile with at least /bin/cc on
26317         ymp-cray-unicos9.0.2.X.
26318         Combine two mostly-identical uses of alloca into one.
26319         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
26320
26321 2003-08-04  Dave Love  <d.love@dl.ac.uk>
26322
26323         [From Emacs.]
26324
26325         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
26326         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
26327         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
26328         obsolete NLIST_NAME_UNION.
26329         [__GNU__]: Undef BSD and FSCALE.
26330         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
26331
26332 2003-08-03  Paul Eggert  <eggert@twinsun.com>
26333
26334         * lib/stdbool_.h (_Bool): Make it signed char, instead of
26335         an enum type, so that it's guaranteed to promote to int.  See:
26336         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
26337
26338 2003-08-03  Karl Berry  <karl@gnu.org>
26339
26340         * config/depcomp: update from automake.
26341
26342 2003-07-31  Paul Eggert  <eggert@twinsun.com>
26343
26344         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
26345         (strerror): Don't assume that a printable int fits in 14 bytes.
26346
26347 2003-07-31  Bruno Haible  <bruno@clisp.org>
26348
26349         * modules/getpass-gnu: New file.
26350         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
26351
26352 2003-07-31  Bruno Haible  <bruno@clisp.org>
26353
26354         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
26355
26356 2003-07-24  Karl Berry  <karl@gnu.org>
26357
26358         * config/missing: update from automake.
26359
26360 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
26361             Bruno Haible  <bruno@clisp.org>
26362
26363         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
26364         * lib/getline.c (getline, getdelim): Likewise.
26365         Remove _GNU_SOURCE define; now it's defined in config.h through
26366         m4/getline.m4.
26367
26368 2003-07-23  Karl Berry  <karl@gnu.org>
26369
26370         * config/config.sub: update from prep.
26371
26372 2003-07-22  Paul Eggert  <eggert@twinsun.com>
26373
26374         * modules/xalloc (Depends-on): Add exitfail.
26375         * modules/xmemcoll: Likewise.
26376
26377 2003-07-22  Paul Eggert  <eggert@twinsun.com>
26378
26379         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
26380         over-parenthesization in macros.
26381
26382         Sync with coreutils.
26383
26384         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
26385         required by C99.
26386
26387         Use `exit_failure' for xalloc and xmemcoll instead of their own
26388         private exit-failure variables.
26389         * lib/xalloc.h (xalloc_exit_failure): Remove.
26390         * lib/xmalloc.c: Likewise.  Include exitfail.h.
26391         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
26392         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
26393         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
26394         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
26395
26396 2003-07-20  Jim Meyering  <jim@meyering.net>
26397
26398         * modules/closeout (Depends-on): Add exitfail.
26399         Suggestion from Bruno Haible.
26400
26401 2003-07-19  Karl Berry  <karl@gnu.org>
26402
26403         * config/config.sub: update from prep.
26404
26405 2003-07-18  Paul Eggert  <eggert@twinsun.com>
26406
26407         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
26408         Remove.
26409         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
26410         to test that it can stand by itself.  Include "exitfail.h".
26411         Clients should set exit_failure instead.
26412         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
26413
26414 2003-07-18  Bruno Haible  <bruno@clisp.org>
26415
26416         * modules/getndelim2: New file.
26417         * modules/getline: Share files with module getndelim2.
26418         * modules/getnline: Depend on getndelim2 instead of sharing files with
26419         it. Add getnline.c to lib_SOURCES.
26420         * MODULES.html.sh (func_all_modules): Add getndelim2.
26421
26422 2003-07-18  Bruno Haible  <bruno@clisp.org>
26423
26424         * m4/getndelim2.m4: New file.
26425         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
26426         invoke gl_PREREQ_GETNDELIM2.
26427         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
26428         gl_PREREQ_GETNDELIM2.
26429         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
26430         gl_GETNDELIM2.
26431
26432 2003-07-18  Bruno Haible  <bruno@clisp.org>
26433
26434         * lib/getndelim2.h: New file.
26435         * lib/getndelim2.c: Make into a module of its own. Include config.h,
26436         getndelim2.h.
26437         (getndelim2): Make non-static. Change return type to ssize_t.
26438         * lib/getline.h: Change argument names.
26439         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
26440         * lib/getnline.c: Include getndelim2.h.
26441
26442 2003-07-18  Andreas Schwab  <schwab@suse.de>
26443
26444         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
26445
26446 2003-07-17  Karl Berry  <karl@gnu.org>
26447
26448         * config/config.sub: update from prep.
26449
26450 2003-07-17  Bruno Haible  <bruno@clisp.org>
26451
26452         * modules/getnline: New file.
26453         * modules/getline: Add lib/getndelim2.c to source file list.
26454         * MODULES.html.sh (func_all_modules): Add getnline.
26455
26456 2003-07-17  Bruno Haible  <bruno@clisp.org>
26457
26458         * m4/getnline.m4: New file.
26459
26460 2003-07-17  Bruno Haible  <bruno@clisp.org>
26461
26462         * m4/Makefile.am.in: Remove file.
26463         * m4/Makefile.am: Remove file.
26464         * m4/Makefile.in: Remove file.
26465
26466 2003-07-17  Bruno Haible  <bruno@clisp.org>
26467
26468         * lib/getnline.h: New file.
26469         * lib/getnline.c: New file.
26470         * lib/getndelim2.c: New file, extracted from getline.c.
26471         (getndelim2): Renamed from getdelim2, with added nmax argument.
26472         * lib/getline.c: Include getndelim2.c.
26473         (getdelim2): Moved out to getndelim2.c.
26474         (getline, getdelim): Update.
26475
26476 2003-07-17  Bruno Haible  <bruno@clisp.org>
26477
26478         * lib/Makefile.am: Remove file.
26479         * lib/Makefile.in: Remove file.
26480
26481 2003-07-17  Bruno Haible  <bruno@clisp.org>
26482
26483         * configure.in: Remove file.
26484         * Makefile.in: Remove file.
26485
26486 2003-07-17  Bruno Haible  <bruno@clisp.org>
26487
26488         * MODULES.html.sh: Put the </BODY> right before </HTML>.
26489
26490 2003-07-16  Karl Berry  <karl@gnu.org>
26491
26492         * config/srclist-update: was running fixlicense twice, which caused
26493                 texinfo.tex to be nullified for some reason.  Simplify,
26494                 $gplsrc is no longer needed as far as I can see?
26495
26496 2003-07-16  Jim Meyering  <jim@meyering.net>
26497
26498         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
26499
26500 2003-07-15  Paul Eggert  <eggert@twinsun.com>
26501
26502         * config/srclist.txt: Get the following files from gettext-runtime/intl
26503         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
26504         ref-del.sin.  From Bruno Haible.
26505         * config/srclist-update (fixfile): Change grep pattern again, since the
26506         previous fix didn't work (there was another trailing $).  Use
26507         '[$]' to escape the $s.
26508
26509 2003-07-15  Karl Berry  <karl@gnu.org>
26510
26511         * lib/vasnprintf.c: update from gettext.
26512
26513 2003-07-15  Karl Berry  <karl@gnu.org>
26514
26515         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
26516         gets expanded when surrounded by '$'.
26517
26518 2003-07-15  Jim Meyering  <jim@meyering.net>
26519
26520         * modules/save-cwd: Don't depend on error.  From Derek Price.
26521
26522 2003-07-15  Jim Meyering  <jim@meyering.net>
26523
26524         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
26525
26526 2003-07-14  Simon Josefsson  <jas@extundo.com>
26527
26528         * modules/mempcpy: New file.
26529         * MODULES.html.sh (func_all_modules): Add mempcpy.
26530
26531 2003-07-14  Simon Josefsson  <jas@extundo.com>
26532
26533         * m4/mempcpy.m4: New file.
26534
26535 2003-07-14  Simon Josefsson  <jas@extundo.com>
26536
26537         * lib/mempcpy.h: New file.
26538         * lib/mempcpy.c: New file.
26539
26540 2003-07-14  Paul Eggert  <eggert@twinsun.com>
26541
26542         * modules/getdate, modules/posixtm: Depend on mktime.
26543
26544 2003-07-14  Paul Eggert  <eggert@twinsun.com>
26545
26546         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
26547         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
26548         unicodeio.c, unicodeio.h, unlocked-io.h:
26549         Switch from LGPL to GPL.
26550
26551 2003-07-14  Paul Eggert  <eggert@twinsun.com>
26552
26553         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
26554         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
26555         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
26556         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
26557         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
26558         updated automatically by ../config/srclist-update.  This changes
26559         their license from LPGL to GPL.
26560
26561 2003-07-14  Paul Eggert  <eggert@twinsun.com>
26562
26563         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
26564         assumed to refer to the root of the most recent stable gettext version.
26565         * config/srclistvars.sh: Add defaults for eggert.
26566         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
26567         Match "This program" as well as "The program".  This is needed
26568         for gettext.
26569
26570 2003-07-14  Jim Meyering  <jim@meyering.net>
26571
26572         Don't emit diagnostics.  Let callers do that.
26573         * lib/save-cwd.c: Don't include "error.h".
26574         (save_cwd): Don't call error.  Ensure that errno is valid
26575         when returning nonzero.
26576
26577         * lib/save-cwd.h (restore_cwd): Update prototype.
26578         * lib/save-cwd.c (restore_cwd): Remove two parameters.
26579         Simplify.  Don't call error upon failure.  Let callers do that.
26580         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
26581         when auditing is enabled.  But don't bother updating the #if.
26582
26583 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
26584
26585         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
26586         it breaks C++ compilation.
26587         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
26588
26589 2003-07-10  Simon Josefsson  <jas@extundo.com>
26590
26591         * modules/strchrnul (Makefile.am): Add strchrnul.h.
26592
26593 2003-07-10  Jim Meyering  <jim@meyering.net>
26594
26595         * m4/clock_time.m4: Remove trailing blank.
26596         * m4/intmax_t.m4: Likewise.
26597
26598 2003-07-10  Jim Meyering  <jim@meyering.net>
26599
26600         * lib/vasnprintf.c: Remove trailing blanks.
26601         Make cpp indentation consistent.
26602
26603 2003-07-09  Paul Eggert  <eggert@twinsun.com>
26604
26605         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
26606         posixver.c, strftime.c, strnlen.c, strverscmp.c:
26607         Switch from LGPL to GPL.
26608
26609 2003-07-09  Paul Eggert  <eggert@twinsun.com>
26610
26611         * config/srclist.txt: Sort sublists.  Add
26612         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
26613         that differ from gnulib for one reason or another; we'd like this list
26614         to be smaller but for now let's document what we have.
26615
26616 2003-07-08  Paul Eggert  <eggert@twinsun.com>
26617
26618         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
26619         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
26620         and sweeter "eval x=$x".
26621         * config/srclist.txt: Get lib/argp* from glibc.
26622
26623 2003-07-07  Paul Eggert  <eggert@twinsun.com>
26624
26625         * lib/mktime.c: Fix some boundary cases and remove need for floating
26626         point.
26627
26628         Issue a compile-time diagnostic if time_t is floating point, or if
26629         two's complement arithmetic is not in effect, or if arithmetic
26630         right shift does not propagate the sign.  These assumptions were
26631         all in the original code but they weren't checked.
26632
26633         (TIME_T_MIDPOINT, verify): New macros.
26634         (__isleap): Remove; it has integer overflow problems.
26635         (leapyear): New function, without those problems.
26636         (ydhms_tm_diff): Remove; splitting into two parts.
26637         (ydhms_diff): New function, containing the arithmetic part of
26638         the old ydhms_tm_diff function.  Issue a compile-time
26639         diagnostic if we are not using C99 integer division.
26640         Avoid casts when possible.
26641         (guess_time_tm): New function, containing the checking part of
26642         the old ydhms_tm_diff function.  Return the new value, rather than
26643         the difference between it and the old.  Accept a new argument T
26644         so that *T specifies the old value.  Check for overflow in the result.
26645
26646         (__mktime_internal): Use a time_t offset, not a long int offset.
26647         This undoes the 2003-06-04 change, which is no longer needed now
26648         that we have better overflow checking.
26649         (localtime_offset): Likewise.
26650
26651         (__mktime_internal): Avoid harmful overflow on hosts where time_t
26652         and long are 64-bit but int is only 32-bit.
26653         (ydhms_diff): Use long int to store year1 and yday1.
26654         Issue a compile-time diagnostic if long int is not wide enough.
26655
26656         (__mktime_internal): Use long int to store adjusted year and yday.
26657         Use plain C rather than preprocessor commands, if that doesn't
26658         affect efficiency.
26659         Check for overflow (and try to repair) after each probe
26660         rather than checking only at the very end.  This avoids some bugs
26661         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
26662         does not equal GMT offset at maximum time).
26663         Use integer to check for overflow rather than floating point; this
26664         is more portable to non-IEEE hosts, and is a tad faster.
26665         When we detect that we are oscillating between two values,
26666         don't check whether tm_isdst has the requested value, since
26667         we already know the answer.  When tm_isdst has the wrong value,
26668         use a different heuristic to find the right one, based on the
26669         extreme values actually observed in practice in tz2003a,
26670         rather than the (overly optimistic) "previous 3 calendar quarters".
26671
26672         (not_equal_tm, print_tm, check_result): Use "const T" rather than
26673         "T const" to accommodate glibc style.
26674         (check_result): Use less-confusing report format.  "long" -> "long int.
26675         (main): Likewise.
26676         Don't loop if the iteration overflows time_t.
26677         Allow a negative step in the iteration.
26678
26679 2003-07-06  Karl Berry  <karl@gnu.org>
26680
26681         * config/depcomp: update from automake.
26682         * config/config.sub: update from prep.
26683
26684 2003-07-03  Karl Berry  <karl@gnu.org>
26685
26686         * config/config.guess: update from prep.
26687
26688 2003-07-01  Paul Eggert  <eggert@twinsun.com>
26689
26690         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
26691         xreadlink.c now includes it unconditionally.
26692
26693 2003-07-01  Paul Eggert  <eggert@twinsun.com>
26694
26695         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
26696         having it depend on HAVE_SYS_TYPES_H.
26697
26698 2003-07-01  Bruno Haible  <bruno@clisp.org>
26699
26700         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
26701         <sys/types.h> should be sufficient.
26702         Reported by Paul Eggert.
26703
26704 2003-06-26  Karl Berry  <karl@gnu.org>
26705
26706         * config/depcomp: update from automake.
26707
26708 2003-06-26  Bruno Haible  <bruno@clisp.org>
26709
26710         * modules/human: Depend on module stdbool.
26711
26712 2003-06-25  Bruno Haible  <bruno@clisp.org>
26713
26714         * modules/readlink: New file.
26715         * modules/xreadlink: Depend on it.
26716         * MODULES.html.sh (func_all_modules): Add readlink.
26717
26718 2003-06-25  Bruno Haible  <bruno@clisp.org>
26719
26720         * m4/readlink.m4: New file.
26721
26722 2003-06-25  Bruno Haible  <bruno@clisp.org>
26723
26724         * lib/readlink.c: New file.
26725
26726 2003-06-22  Karl Berry  <karl@gnu.org>
26727
26728         * config/srclist.txt: update mkinstalldirs from automake.
26729         * config/mkinstalldirs: update.
26730
26731 2003-06-22  Bruno Haible  <bruno@clisp.org>
26732
26733         Portability to mingw32.
26734         * m4/ssize_t.m4: New file, from GNU gettext.
26735         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
26736         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
26737
26738 2003-06-22  Bruno Haible  <bruno@clisp.org>
26739
26740         * modules/safe-read: Add m4/ssize_t.m4.
26741         * modules/xreadlink: Add m4/ssize_t.m4.
26742
26743 2003-06-20  Bruno Haible  <bruno@clisp.org>
26744
26745         Assume C89, so PARAMS isn't needed.
26746         * lib/unicodeio.h (PARAMS): Remove.
26747         * lib/unicodeio.c: Don't use PARAMS.
26748
26749 2003-06-18  Karl Berry  <karl@gnu.org>
26750
26751         * config/config.{guess,sub}: update from prep.
26752
26753 2003-06-18  Jim Meyering  <jim@meyering.net>
26754
26755         Merge changes from coreutils.
26756         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
26757         Remove explicit declarations of xmalloc and realloc.
26758         Include xalloc.h.
26759         (read_utmp): Remove anachronistic cast of xmalloc.
26760
26761 2003-06-17  Paul Eggert  <eggert@twinsun.com>
26762
26763         Assume C89, so PARAMS isn't needed.
26764         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
26765         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
26766         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
26767         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
26768         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
26769         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
26770         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
26771         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
26772         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
26773         lib/xstrtod.h, lib/xstrtol.h: Likewise.
26774         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
26775         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
26776         no longer needed. Anyway, config.h should always be included before any
26777         other file.
26778
26779 2003-06-11  Simon Josefsson  <jas@extundo.com>
26780
26781         * modules/sysexits: New file.
26782         * MODULES.html.sh (func_all_modules): Add sysexits.
26783
26784 2003-06-11  Simon Josefsson  <jas@extundo.com>
26785
26786         * lib/sysexit_.h: New file.
26787
26788 2003-06-11  Derek Price  <derek@ximbiot.com>
26789
26790         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
26791         necessary.
26792
26793 2003-06-11  Bruno Haible  <bruno@clisp.org>
26794
26795         * m4/sysexits.m4: New file.
26796
26797 2003-06-10  Simon Josefsson  <jas@extundo.com>
26798
26799         * lib/argp.h: New file, from glibc.
26800         * lib/argp-ba.c: New file, from glibc.
26801         * lib/argp-eexst.c: New file, from glibc.
26802         * lib/argp-fmtstream.c: New file, from glibc.
26803         * lib/argp-fmtstream.h: New file, from glibc.
26804         * lib/argp-fs-xinl.c: New file, from glibc.
26805         * lib/argp-help.c: New file, from glibc.
26806         * lib/argp-namefrob.h: New file, from glibc.
26807         * lib/argp-parse.c: New file, from glibc.
26808         * lib/argp-pv.c: New file, from glibc.
26809         * lib/argp-pvh.c: New file, from glibc.
26810         * lib/argp-xinl.c: New file, from glibc.
26811
26812 2003-06-10  Simon Josefsson  <jas@extundo.com>
26813
26814         * modules/strchrnul: New file.
26815
26816 2003-06-10  Simon Josefsson  <jas@extundo.com>
26817
26818         * modules/argp: New file.
26819
26820 2003-06-10  Simon Josefsson  <jas@extundo.com>
26821
26822         * m4/strchrnul.m4: New file.
26823
26824 2003-06-10  Simon Josefsson  <jas@extundo.com>
26825
26826         * lib/strchrnul.h: New file.
26827         * lib/strchrnul.c: New file.
26828
26829 2003-06-10  Bruno Haible  <bruno@clisp.org>
26830
26831         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
26832
26833 2003-06-07  Karl Berry  <karl@gnu.org>
26834
26835         * config/config.{guess,sub}: update from prep.
26836
26837 2003-06-07  Jim Meyering  <jim@meyering.net>
26838
26839         * modules/strtod: Use $(...) notation, not @...@ for
26840         AC_REPLACE'd variables.
26841         * modules/localcharset: Likewise.
26842
26843 2003-06-07  Jim Meyering  <jim@meyering.net>
26844
26845         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
26846         in place of my name in the copyright comment.
26847         Remove definition and uses of __P.
26848
26849         From coreutils.
26850         * lib/stat.c: Don't declare xmalloc explicitly.
26851         Instead, include "xalloc.h".
26852         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
26853         xrealloc, and xcalloc return values.
26854         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
26855         Improve comment.
26856         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
26857
26858 2003-06-07  Bruno Haible  <bruno@clisp.org>
26859
26860         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
26861         avoid AC_CONFIG_LINKS.
26862         * modules/fnmatch (Makefile.am): Use explicit creation rule for
26863         fnmatch.h, to avoid AC_CONFIG_LINKS.
26864         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
26865
26866 2003-06-07  Bruno Haible  <bruno@clisp.org>
26867
26868         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
26869         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
26870         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
26871         directory.
26872         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
26873         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
26874         directory.
26875
26876 2003-06-06  Jim Meyering  <jim@meyering.net>
26877
26878         Merge from coreutils.
26879         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
26880         Consolidate declarations and initializations of *_base* locals.
26881
26882         Merge from coreutils.
26883         This avoids a core dump on systems without GNU putenv,
26884         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
26885         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
26886         (unsetenv): New static function, from GNU libc.
26887         (rpl_putenv): Use it.
26888
26889         * lib/modechange.c: Remove trailing blanks.
26890
26891         Merge from coreutils.
26892         * lib/fsusage.c: Remove declaration of statfs.
26893         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
26894
26895         * lib/posixtm.c: Include <stdbool.h> unconditionally.
26896
26897 2003-06-06  Jim Meyering  <jim@meyering.net>
26898
26899         * lib/stdbool_.h: Renamed from stdbool.h.in.
26900
26901 2003-06-06  Jim Meyering  <jim@meyering.net>
26902             Bruno Haible  <bruno@clisp.org>
26903
26904         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
26905         Adjust Makefile.am snippet not to redirect directly to target.
26906         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
26907
26908 2003-06-05  Paul Eggert  <eggert@twinsun.com>
26909
26910         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
26911         mismatch, look in future quarters as well as past.  This fixes a
26912         bug when processing fall-backwards gaps immediately after a long
26913         period of daylight-saving time.
26914
26915         * lib/mktime.c: Assume freestanding C89 or better.
26916         (HAVE_LIMITS_H): Remove.  Assume it's 1.
26917         (__P): Remove; not used.
26918         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
26919         (mktime, not_equal_tm, print_tm, check_result,
26920         main): Use prototypes.  Use const * where appropriate.
26921         (main): Fix typo in testing code that uncovered by above changes.
26922         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
26923
26924 2003-06-04  Paul Eggert  <eggert@twinsun.com>
26925
26926         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
26927         locale.h, localeconv.  This merges changes from coreutils.
26928
26929         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
26930         It can be removed after the next Autoconf is released.
26931         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
26932         needed.
26933
26934 2003-06-04  Paul Eggert  <eggert@twinsun.com>
26935
26936         * lib/mktime.c: Fix Debian bug 177940
26937         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
26938         (localtime_offset): Now long int, not time_t, because we want it
26939         to be guaranteed to be signed.  All uses changed.
26940         (__mktime_internal): If overflow would occur when adding offset,
26941         don't add it.
26942
26943         Merge 'human' changes from coreutils.  Rewrite to support
26944         locale-specific notations like thousands separators.
26945         * lib/human.c: Simplify authorship notice.
26946         Include human.h immediately after config.h.
26947         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
26948         <limits.h>: Do not include, since human.h does.
26949         (SIZE_MAX, UINTMAX_MAX): New macros.
26950         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
26951         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
26952         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
26953         (power_letter): Renamed from suffixes.
26954         (generate_suffix_backwards): Remove.
26955         (adjust_value): Now takes int style (because of human.h changes)
26956         and long double value (for greater precision on some platforms).
26957         (group_number): New function.
26958         (human_readable): Use it.  Use integer options, not enum.
26959         Put the options before the sizes in the arg list.
26960         Support all the new options.
26961         The old human_readable function has been removed;
26962         use inttostr.h instead.
26963         (human_readable, default_block_size, humblock):
26964         Use uintmax_t, not int, for block sizes.
26965         (human_readable_inexact, block_size_types): Remove.
26966         (block_size_opts): New constant.
26967         (human_options): Renamed from human_block_size, with new signature
26968         that allows block sizes up to UINTMAX_MAX.  All callers changed.
26969         * lib/human.h: Add copyright and authorship notice.
26970         Include <limits.h> and <stdbool.h> unconditionally.
26971         (PARAMS): Remove.  All uses removed.
26972         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
26973         (enum human_inexact_style): Remove tag; now a nameless enum.
26974         (human_floor, human_ceiling, human_round_to_even): Now have
26975         values 2, 0, 1 rather than -1, 1, 0.
26976         (human_group_digits, human_suppress_point_zero, human_autoscale,
26977         human_base_1024, human_SI, human_B): New constants.
26978         (human_readable_inexact, human_block_size): Remove.
26979         (human_readable): Size args are now uintmax_t, not int.
26980         (human_options): New decl.
26981
26982         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
26983         unnecessary now that we assume C89 or better.  This change
26984         imported from coreutils.
26985
26986         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
26987         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
26988         in the 2003-05-30 sync from glibc.
26989
26990         .h files should stand alone, but we shouldn't include <sys/types.h>
26991         if we can get away with just <stddef.h>.
26992
26993         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
26994         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
26995         rather than <sys/types.h>, as we merely need size_t.
26996         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
26997         to get size_t.
26998         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
26999         Include <stdio.h>, to get FILE.
27000         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
27001         memcasecmp.h has included <stddef.h> and all we need is size_t.
27002         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
27003         our interface, instead of including <sys/types.h>
27004
27005 2003-06-04  Paul Eggert  <eggert@twinsun.com>
27006
27007         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
27008         now, as glibc mktime is buggy on non-glibc systems.
27009
27010 2003-06-03  Karl Berry  <karl@gnu.org>
27011
27012         * config/config.sub: update from prep.
27013
27014 2003-06-02  Paul Eggert  <eggert@twinsun.com>
27015
27016         [from coreutils]
27017         Fix some minor time-related bugs with POSIX time arguments.
27018         Some valid time stamps were being rejected (notably -1, and
27019         time stamps before 1900 on 64-bit hosts).  And some invalid
27020         time stamps were being accepted, e.g. September 31.
27021
27022         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
27023         that we can return (time_t) -1 successfully.
27024         * lib/posixtm.c: Likewise.
27025         [HAVE_STDBOOL_H]: Include <stdbool.h>.
27026         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
27027         (t): Remove static var.
27028         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
27029         of static var.  All uses changed.
27030         (year): Do not reject years before 1900; they can occur with
27031         64-bit time_t.
27032         (posix_time_parse): Do not check for out-of-range components;
27033         that is now the caller's responsibility, since our checks were
27034         only approximations.
27035         (posixtime): Use mktime to check for out-of-range components,
27036         since it knows them exactly.
27037         If mktime returns (time_t) -1, check whether an error actually occurred
27038         by invoking localtime on -1.
27039         (main) [TEST_POSIXTIME]: Check for input data errors, and report
27040         posixtime failures better.
27041         Improve the test data (in comments only).
27042
27043 2003-06-02  Karl Berry  <karl@gnu.org>
27044
27045         * config/mkinstalldirs (version): new variable.
27046         (--version): new option.
27047         (usage): improve message.
27048
27049 2003-05-30  Karl Berry  <karl@gnu.org>
27050
27051         * lib/mktime.c: update from libc.
27052
27053 2003-05-30  Bruno Haible  <bruno@clisp.org>
27054
27055         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
27056         * config/config.rpath: Upgrade to gettext-0.12.1.
27057
27058 2003-05-30  Bruno Haible  <bruno@clisp.org>
27059
27060         * m4/gettext.m4: Upgrade to gettext-0.12.1.
27061         * m4/nls.m4: New file, from gettext-0.12.1.
27062         * m4/po.m4: New file, from gettext-0.12.1.
27063         * m4/progtest.m4: Upgrade to gettext-0.12.1.
27064
27065 2003-05-30  Bruno Haible  <bruno@clisp.org>
27066
27067         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
27068         * lib/localcharset.h: Likewise.
27069         * lib/localcharset.c: Likewise.
27070
27071 2003-05-29  Karl Berry  <karl@gnu.org>
27072
27073         * config/config.rpath: update from gettext.
27074
27075 2003-05-28  Paul Eggert  <eggert@twinsun.com>
27076
27077         Assume the headers required for C89 freestanding compilers.
27078         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
27079         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
27080         * m4/human.m4 (gl_HUMAN): Likewise.
27081         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
27082         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
27083         * m4/userspec.m4 (gl_USERSPEC): Likewise.
27084         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
27085         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
27086         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
27087
27088 2003-05-28  Paul Eggert  <eggert@twinsun.com>
27089
27090         Assume the headers required for C89 freestanding compilers.
27091         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
27092         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
27093         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
27094         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
27095         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
27096         define, since <limits.h> is guaranteed to do that.
27097         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
27098         * lib/exclude.c: Include <stdbool.h> unconditionally.
27099         * lib/tempname.c: Include <stddef.h> unconditionally.
27100         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
27101         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
27102         <stddef.h> does that.
27103         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
27104         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
27105         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
27106         needed.
27107         * lib/xstrtol.c: Likewise.
27108         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
27109         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
27110
27111         * lib/addext.c (addext): Use assignment rather than cast, to avoid
27112         warnings on some platforms.
27113
27114         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
27115         arbitrarily.
27116
27117 2003-05-26  Jim Meyering  <jim@meyering.net>
27118
27119         Merge in a change from coreutils:
27120         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
27121         that is guaranteed to be `no'.  Use `no_such_member' to indicate
27122         that condition, rather than `-1' which is slightly misleading.
27123         Change the name of the cache variable to have the gl_ prefix.
27124         Prompted by a patch from Richard Dawe for DJGPP.
27125
27126 2003-05-24  Karl Berry  <karl@gnu.org>
27127
27128         * config/config.guess: update from prep.
27129
27130 2003-05-22  Karl Berry  <karl@gnu.org>
27131
27132         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
27133
27134 2003-05-20  Karl Berry  <karl@gnu.org>
27135
27136         * config/config.guess: update from prep.
27137
27138 2003-05-18  Karl Berry  <karl@gnu.org>
27139
27140         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
27141         might actually be set by the user.
27142
27143         * config/depcomp, install-sh, mdate-sh: update from automake.
27144
27145 2003-05-17  Bruno Haible  <bruno@clisp.org>
27146
27147         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
27148         invalid expansion for AC_EGREP_CPP.
27149         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
27150         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
27151         Suggested by Akim Demaille <akim@epita.fr> in
27152         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
27153
27154 2003-05-12  Jim Meyering  <jim@meyering.net>
27155
27156         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
27157         the space-padded-by-default conversion specifiers, %e, %k, %l.
27158
27159 2003-05-12  Bruno Haible  <bruno@clisp.org>
27160
27161         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
27162         the string is longer than 4 KB.
27163
27164 2003-05-11  Karl Berry  <karl@gnu.org>
27165
27166         * config/config.{guess,sub}: update from prep.
27167
27168 2003-05-09  Bruno Haible  <bruno@clisp.org>
27169
27170         * modules/error: Add m4/strerror_r.m4 to file list.
27171
27172 2003-05-03  Bruno Haible  <bruno@clisp.org>
27173
27174         Upgrade to Unicode-4.0.
27175         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
27176         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
27177         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
27178         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
27179         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
27180         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
27181         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
27182         Change width of U+E0100..U+E01EF from 1 to 0.
27183
27184 2003-04-25  Jim Meyering  <jim@meyering.net>
27185
27186         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
27187         of type size_t, not int.
27188
27189 2003-04-25  Bruno Haible  <bruno@clisp.org>
27190
27191         * lib/copy-file.c: Include <stddef.h>, for size_t.
27192
27193 2003-04-21  Paul Eggert  <eggert@twinsun.com>
27194
27195         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
27196         code which expansion is under static control.  Patch imported from
27197         Akim Demaille's patch to Bison; see
27198         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
27199
27200 2003-04-14  Bruno Haible  <bruno@clisp.org>
27201
27202         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
27203
27204 2003-04-11  Jim Meyering  <jim@meyering.net>
27205
27206         Merge changes from Coreutils.
27207
27208         2003-03-22  Jim Meyering  <jim@meyering.net>
27209
27210         * lib/strftime.c (widen): Cast alloca return value to proper type.
27211
27212         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
27213
27214         From GNU libc.
27215         * lib/strftime.c (my_strftime): Handle very large width
27216         specifications for numeric values correctly.  Improve checks for
27217         overflow.
27218
27219         2003-01-19  Jim Meyering  <jim@meyering.net>
27220
27221         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
27222         definitions.
27223         (nl_get_alt_digit) [! defined my_strftime]: Define.
27224         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
27225         _nl_get_alt_digit and _nl_get_walt_digit.
27226
27227         * lib/strftime.c (my_strftime): Merge in locale-related changes from
27228         libc. These changes have no effect outside of _LIBC.
27229
27230 2003-04-10  Bruno Haible  <bruno@clisp.org>
27231
27232         * modules/findprog: New file.
27233         * MODULES.html.sh (func_all_modules): Add it.
27234
27235 2003-04-10  Bruno Haible  <bruno@clisp.org>
27236
27237         * m4/findprog.m4: New file.
27238         * m4/eaccess.m4: New file.
27239
27240 2003-04-10  Bruno Haible  <bruno@clisp.org>
27241
27242         * lib/findprog.h: New file, from GNU gettext.
27243         * lib/findprog.c: New file, from GNU gettext.
27244
27245 2003-04-05  Jim Meyering  <jim@meyering.net>
27246
27247         Merge changes from Coreutils.
27248
27249         * lib/exclude.h (PARAMS): Remove definition and uses.
27250         * lib/exclude.c: Remove uses of `PARAMS'.
27251
27252         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
27253         Add test-cases for DOS filenames. Declare program_name.
27254         (main): Set up program_name.  Patch by Rich Dawe.
27255
27256         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
27257         error from mntctl.
27258         Use mntctl's return value to drive the entry-processing loop, since
27259         we can't rely on the value of the vmt_length member in the last
27260         entry.  On some systems doing so could result in exhausting
27261         virtual memory.  Based in part on a patch from Mike Jetzer.
27262
27263 2003-04-04  Bruno Haible  <bruno@clisp.org>
27264
27265         * modules/linebreak: New file.
27266         * MODULES.html.sh (func_all_modules): Add it.
27267
27268 2003-04-04  Bruno Haible  <bruno@clisp.org>
27269
27270         * m4/linebreak.m4: New file.
27271
27272 2003-04-04  Bruno Haible  <bruno@clisp.org>
27273
27274         * lib/linebreak.h: New file, from GNU gettext.
27275         * lib/linebreak.c: New file, from GNU gettext with slight
27276         modifications.
27277         * lib/lbrkprop.h: New file, from GNU gettext.
27278
27279 2003-04-03  Bruno Haible  <bruno@clisp.org>
27280
27281         * modules/utf8-ucs4: New file.
27282         * modules/utf16-ucs4: New file.
27283         * modules/ucs4-utf8: New file.
27284         * modules/ucs4-utf16: New file.
27285         * MODULES.html.sh (func_all_modules): Add them.
27286
27287 2003-04-03  Bruno Haible  <bruno@clisp.org>
27288
27289         * m4/utf-ucs4.m4: New file.
27290         * m4/ucs4-utf.m4: New file.
27291
27292 2003-04-03  Bruno Haible  <bruno@clisp.org>
27293
27294         * lib/utf8-ucs4.h: New file, from GNU gettext.
27295         * lib/utf16-ucs4.h: New file, from GNU gettext.
27296         * lib/ucs4-utf8.h: New file, from GNU gettext.
27297         * lib/ucs4-utf16.h: New file, from GNU gettext.
27298
27299 2003-04-02  Bruno Haible  <bruno@clisp.org>
27300
27301         * modules/binary-io: New file.
27302         * MODULES.html.sh (func_all_modules): Add it.
27303
27304 2003-04-02  Bruno Haible  <bruno@clisp.org>
27305
27306         * lib/binary-io.h: New file, from GNU gettext.
27307
27308 2003-04-01  Bruno Haible  <bruno@clisp.org>
27309
27310         * modules/pathname: New file.
27311         * MODULES.html.sh (func_all_modules): Add it.
27312
27313 2003-04-01  Bruno Haible  <bruno@clisp.org>
27314
27315         * lib/pathname.h: New file, from GNU gettext.
27316         * lib/concatpath.c: New file, from GNU gettext.
27317
27318 2003-03-30  Bruno Haible  <bruno@clisp.org>
27319
27320         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
27321
27322 2003-03-30  Bruno Haible  <bruno@clisp.org>
27323
27324         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
27325         function chown() doesn't exist.
27326
27327 2003-03-28  Bruno Haible  <bruno@clisp.org>
27328
27329         * modules/copy-file: New file.
27330         * MODULES.html.sh (func_all_modules): Add it.
27331
27332 2003-03-28  Bruno Haible  <bruno@clisp.org>
27333
27334         * m4/copy-file.m4: New file.
27335
27336 2003-03-28  Bruno Haible  <bruno@clisp.org>
27337
27338         * lib/copy-file.h: New file, from GNU gettext.
27339         * lib/copy-file.c: New file, from GNU gettext.
27340
27341 2003-03-18  Jim Meyering  <jim@meyering.net>
27342
27343         * lib/quote.c (quote_n): Fix typo in comment.
27344
27345 2003-03-18  Bruno Haible  <bruno@clisp.org>
27346
27347         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
27348         checking.
27349         * m4/onceonly_2_57.m4: Likewise.
27350
27351 2003-03-17  Bruno Haible  <bruno@clisp.org>
27352
27353         * m4/onceonly.m4: Require autoconf 2.54 or newer.
27354         (m4_quote): Remove macro.
27355         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
27356
27357 2003-03-14  Jim Meyering  <jim@meyering.net>
27358
27359         Merge changes from Coreutils.
27360         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
27361         to be const, in order to avoid warnings.
27362         (obstack_room): Likewise.
27363         (obstack_empty_p): Likewise.
27364
27365 2003-03-14  Bruno Haible  <bruno@clisp.org>
27366
27367         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
27368         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
27369
27370 2003-03-13  Paul Eggert  <eggert@twinsun.com>
27371
27372         Merge changes from Bison.
27373         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
27374         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
27375         when compiling Bison 1.875's `bitset bset = obstack_alloc
27376         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
27377         * lib/hash.c: Include <stdbool.h> unconditionally.
27378
27379 2003-03-13  Paul Eggert  <eggert@twinsun.com>
27380
27381         * m4/onceonly.m4 (m4_quote): New macro.
27382         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
27383         Quote AC_FOREACH variable-expansions properly.
27384
27385 2003-03-13  Paul Eggert  <eggert@twinsun.com>
27386
27387         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
27388
27389 2003-03-09  Paul Eggert  <eggert@twinsun.com>
27390
27391         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
27392         Reported by Bruce Becker; see:
27393         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
27394
27395 2003-03-03  Paul Eggert  <eggert@twinsun.com>
27396             Bruno Haible  <bruno@clisp.org>
27397
27398         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
27399         Reported by John Hughes, see
27400         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
27401
27402 2003-02-20  Bruno Haible  <bruno@clisp.org>
27403
27404         * MODULES.html.sh (func_all_modules): Add poll.
27405
27406 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
27407
27408         * modules/poll: New file.
27409
27410 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
27411
27412         * lib/poll_.h: New file.
27413         * lib/poll.c: New file.
27414
27415 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
27416
27417         * m4/poll.m4: New file.
27418
27419 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
27420
27421         * modules/mathl: New file.
27422
27423 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
27424
27425         * lib/mathl.h: New file.
27426         * lib/acosl.c: New file.
27427         * lib/asinl.c: New file.
27428         * lib/atanl.c: New file.
27429         * lib/ceill.c: New file.
27430         * lib/cosl.c: New file.
27431         * lib/expl.c: New file.
27432         * lib/floorl.c: New file.
27433         * lib/frexpl.c: New file.
27434         * lib/ldexpl.c: New file.
27435         * lib/logl.c: New file.
27436         * lib/sincosl.c: New file.
27437         * lib/sinl.c: New file.
27438         * lib/sqrtl.c: New file.
27439         * lib/tanl.c: New file.
27440         * lib/trigl.c: New file.
27441         * lib/trigl.h: New file.
27442
27443 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
27444
27445         * m4/mathl.m4: New file.
27446
27447 2003-02-18  Bruno Haible  <bruno@clisp.org>
27448
27449         * MODULES.html.sh (func_all_modules): Add mathl.
27450
27451 2003-02-17  Bruno Haible  <bruno@clisp.org>
27452
27453         * modules/mkdtemp: New module.
27454         * MODULES.html.sh (func_all_modules): Add it.
27455
27456 2003-02-17  Bruno Haible  <bruno@clisp.org>
27457
27458         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
27459
27460 2003-02-17  Bruno Haible  <bruno@clisp.org>
27461
27462         * lib/mkdtemp.h: New file, from GNU gettext.
27463         * lib/mkdtemp.c: New file, from GNU gettext.
27464
27465 2003-02-02  Jim Meyering  <jim@meyering.net>
27466
27467         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
27468         e.g. glibc-2.2.93.
27469
27470 2003-01-31  Bruno Haible  <bruno@clisp.org>
27471
27472         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
27473         'rpl_rename'.
27474         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
27475         'rpl_strnlen'.
27476         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
27477         'rpl_strtod'.
27478         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
27479         'rpl_utime'.
27480
27481 2003-01-31  Bruno Haible  <bruno@clisp.org>
27482
27483         * lib/rename.c: #undef rename before defining rpl_rename.
27484         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
27485
27486 2003-01-30  Bruno Haible  <bruno@clisp.org>
27487
27488         * modules/vasnprintf, modules/vasprintf: New modules.
27489         * MODULES.html.sh (func_all_modules): Add them.
27490
27491 2003-01-30  Bruno Haible  <bruno@clisp.org>
27492
27493         * m4/signed.m4: New file, from GNU gettext.
27494         * m4/longdouble.m4: New file, from GNU gettext.
27495         * m4/wchar_t.m4: New file, from GNU gettext.
27496         * m4/wint_t.m4: New file, from GNU gettext.
27497         * m4/vasnprintf.m4: New file.
27498         * m4/vasprintf.m4: New file.
27499
27500 2003-01-30  Bruno Haible  <bruno@clisp.org>
27501
27502         * lib/printf-args.h: New file, from GNU gettext.
27503         * lib/printf-args.c: New file, from GNU gettext.
27504         * lib/printf-parse.h: New file, from GNU gettext.
27505         * lib/printf-parse.c: New file, from GNU gettext.
27506         * lib/vasnprintf.h: New file, from GNU gettext.
27507         * lib/vasnprintf.c: New file, from GNU gettext.
27508         * lib/asnprintf.c: New file, from GNU gettext.
27509         * lib/vasprintf.h: New file, from GNU gettext with modifications.
27510         * lib/vasprintf.c: New file, from GNU gettext.
27511         * lib/asprintf.c: New file, from GNU gettext.
27512
27513 2003-01-29  Bruno Haible  <bruno@clisp.org>
27514
27515         * modules/stpncpy: New module.
27516         * MODULES.html.sh (func_all_modules): Add it.
27517
27518 2003-01-29  Bruno Haible  <bruno@clisp.org>
27519
27520         * m4/stpncpy.m4: New file.
27521
27522 2003-01-29  Bruno Haible  <bruno@clisp.org>
27523
27524         * lib/stpncpy.h: New file, from GNU gettext with modifications.
27525         * lib/stpncpy.c: New file, from GNU gettext with modifications.
27526
27527 2003-01-28  Bruno Haible  <bruno@clisp.org>
27528
27529         * modules/c-ctype: New module.
27530         * MODULES.html.sh (func_all_modules): Add it.
27531
27532 2003-01-28  Bruno Haible  <bruno@clisp.org>
27533
27534         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
27535         Paul Eggert.
27536         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
27537         Paul Eggert.
27538
27539 2003-01-27  Bruno Haible  <bruno@clisp.org>
27540
27541         * modules/xsetenv: New module.
27542         * MODULES.html.sh (func_all_modules): Add it.
27543
27544 2003-01-27  Bruno Haible  <bruno@clisp.org>
27545
27546         * lib/xsetenv.h: New file, from GNU gettext.
27547         * lib/xsetenv.c: New file, from GNU gettext.
27548
27549 2003-01-23  Jim Meyering  <jim@meyering.net>
27550
27551         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
27552         from working on systems without dirfd (at least Irix and OSF1/Tru64).
27553
27554 2003-01-23  Bruno Haible  <bruno@clisp.org>
27555
27556         * modules/minmax: New module.
27557         * MODULES.html.sh (func_all_modules): Add it.
27558
27559 2003-01-23  Bruno Haible  <bruno@clisp.org>
27560
27561         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
27562         Eggert.
27563
27564 2003-01-22  Bruno Haible  <bruno@clisp.org>
27565
27566         * modules/exit: New module.
27567         * MODULES.html.sh (func_all_modules): Add it.
27568
27569 2003-01-22  Bruno Haible  <bruno@clisp.org>
27570
27571         * lib/exit.h: New file, from GNU gettext.
27572
27573 2003-01-19  Bruno Haible  <bruno@clisp.org>
27574
27575         * gnulib-tool: Recognize option --extract-maintainer.
27576         (func_get_maintainer): New function.
27577         * modules/*: Add Maintainer entry.
27578
27579 2003-01-16  Jim Meyering  <jim@meyering.net>
27580
27581         * m4/regex.m4: The `regex' struct is both input and output.
27582         Initialize it before each use.  Patch by Tim Waugh.
27583
27584 2003-01-16  Bruno Haible  <bruno@clisp.org>
27585
27586         * MODULES.html.sh: Add a table of contents. Add the module name as
27587         leftmost column. Add hyperlinks.
27588
27589 2003-01-15  Bruno Haible  <bruno@clisp.org>
27590
27591         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
27592
27593 2003-01-15  Bruno Haible  <bruno@clisp.org>
27594
27595         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
27596         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
27597         suffix.
27598
27599 2003-01-15  Bruno Haible  <bruno@clisp.org>
27600
27601         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
27602
27603 2003-01-15  Bruno Haible  <bruno@clisp.org>
27604
27605         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
27606         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
27607
27608 2003-01-14  Jim Meyering  <jim@meyering.net>
27609
27610         * lib/same.c (same_name): Tweak a comment.
27611
27612 2003-01-14  Bruno Haible  <bruno@clisp.org>
27613
27614         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
27615         when a string comparison is sufficient.
27616
27617 2003-01-14  Bruno Haible  <bruno@clisp.org>
27618
27619         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
27620         'unsigned int'.
27621
27622 2003-01-14  Bruno Haible  <bruno@clisp.org>
27623
27624         * lib/hash-pjw.c: Add comment about low quality of this function.
27625
27626 2003-01-13  Bruno Haible  <bruno@clisp.org>
27627
27628         * modules/stpcpy: Distribute lib/stpcpy.h.
27629         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
27630
27631 2003-01-13  Bruno Haible  <bruno@clisp.org>
27632
27633         * modules/*: Add a description.
27634         * modules/strpbrk: Fix Makefile.am snippet.
27635         * modules/strtoimax: Fix dependencies.
27636         * modules/strtoumax: Likewise.
27637
27638 2003-01-13  Bruno Haible  <bruno@clisp.org>
27639
27640         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
27641         * modules/alloca (Makefile.am): All object files depend on alloca.h.
27642         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
27643
27644 2003-01-13  Bruno Haible  <bruno@clisp.org>
27645
27646         * gnulib-tool (func_create_testdir): Store config/* files in the main
27647         directory.
27648         * config.rpath: Move to ...
27649         * config/config.rpath: ... here.
27650         * modules/gettext: Contains config/config.rpath, not config.rpath.
27651         * modules/iconv: Likewise.
27652
27653 2003-01-12  Paul Eggert  <eggert@twinsun.com>
27654
27655         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
27656         to avoid collisions with libcurses and libreadline.
27657
27658         * m4/getstr.m4: Remove.
27659         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
27660
27661 2003-01-12  Paul Eggert  <eggert@twinsun.com>
27662
27663         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
27664         to avoid collisions with libcurses and libreadline.
27665
27666         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
27667         * lib/getstr.h, getstr.c: Remove.
27668         * lib/getline.c: Include "getline.h", to check interface.
27669         Move body of old getstr.c here: this defines MIN_CHUNK and
27670         declares getdelim2, which is renamed from getstr.
27671         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
27672
27673         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
27674         All uses changed.
27675         * lib/linebuffer.h: Likewise.
27676         (readline): Remove backward-compatibility macro.
27677
27678 2003-01-12  Paul Eggert  <eggert@twinsun.com>
27679
27680         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
27681         to avoid collisions with libcurses and libreadline.
27682         * getstr: Remove.
27683         * MODULES.html.sh: Remove getstr.
27684         * modules/getline: Depend on unlocked-io, not getstr.
27685
27686 2003-01-12  Jim Meyering  <jim@meyering.net>
27687
27688         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
27689
27690 2003-01-10  Bruno Haible  <bruno@clisp.org>
27691
27692         * modules/alloca: Change Makefile.am requirements. Simplify Include
27693         requirements. Add lib/alloca_.h to file list.
27694
27695 2003-01-10  Bruno Haible  <bruno@clisp.org>
27696
27697         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
27698
27699 2003-01-10  Bruno Haible  <bruno@clisp.org>
27700
27701         * lib/alloca_.h: New file.
27702         * lib/getdate.y: Unconditionally include alloca.h.
27703         * lib/makepath.c: Likewise.
27704         * lib/setenv.c: Likewise.
27705         * lib/userspec.c: Likewise.
27706
27707 2003-01-09  Karl Berry  <karl@gnu.org>
27708
27709         * MODULES.html.sh: include `dirname $0` in PATH, to find
27710         gnulib-tool.
27711
27712 2003-01-09  Bruno Haible  <bruno@clisp.org>
27713
27714         * modules/stdbool: Change configure.ac, Makefile.am requirements.
27715         Simplify Include requirements. Add lib/stdbool.h.in to file list.
27716
27717 2003-01-09  Bruno Haible  <bruno@clisp.org>
27718
27719         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
27720
27721 2003-01-09  Bruno Haible  <bruno@clisp.org>
27722
27723         * lib/stdbool.h.in: New file.
27724
27725 2003-01-09  Bruno Haible  <bruno@clisp.org>
27726
27727         * gnulib-tool (func_all_modules): Ignore files ending in ~.
27728         * MODULES.html.sh: Likewise.
27729
27730 2003-01-08  Jim Meyering  <jim@meyering.net>
27731
27732         * lib/full-write.c: Undefine and define-away `const' after inclusion
27733         of errno.h, not before.  Suggestion from Bruno Haible.
27734
27735 2003-01-08  Bruno Haible  <bruno@clisp.org>
27736
27737         * modules/full-read: Depend on full-write.
27738
27739 2003-01-08  Bruno Haible  <bruno@clisp.org>
27740
27741         * lib/safe-read.c: Include specification header first, to ensure its
27742         selfcontainedness.
27743         * lib/full-write.c: Likewise.
27744
27745 2003-01-07  Jim Meyering  <jim@meyering.net>
27746
27747         * lib/full-write.c: Rework so that it may serve to define full_read,
27748         too.
27749         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
27750
27751 2003-01-07  Bruno Haible  <bruno@clisp.org>
27752
27753         * lib/strtoimax.c: Include <stdint.h> as an alternative to
27754         <inttypes.h>.
27755         * lib/xstrtol.h: Likewise.
27756         * lib/xstrtoimax.c: Likewise.
27757         * lib/xstrtoumax.c: Likewise.
27758         * lib/human.h: Likewise.
27759
27760         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
27761         on systems that have <inttypes.h> but not <stdint.h>.
27762
27763 2003-01-07  Bruno Haible  <bruno@clisp.org>
27764
27765         * MODULES.html.sh: Add copyright notice.
27766         (missed_files): Omit CVS directory entries.
27767         (func_module): Make it work with sed-3.02.
27768         * MODULES.txt: Remove file.
27769
27770 2003-01-06  Jim Meyering  <jim@meyering.net>
27771
27772         * lib/version-etc.c: Update year in translatable copyright string.
27773
27774 2003-01-03  Karl Berry  <karl@gnu.org>
27775
27776         * config/config.{guess,sub}: update from prep.
27777
27778 2003-01-02  Karl Berry  <karl@gnu.org>
27779
27780         * doc/COPYING.DOC: belatedly updated to 1.2.
27781
27782 2003-01-01  Karl Berry  <karl@gnu.org>
27783
27784         * gnulib-tool (func_verify_module): report module name $module in
27785         error message, not $1.
27786         * gnulib-tool (create-testdir): don't complain if destdir couldn't
27787         be created, only if it doesn't exist.
27788         * gnulib-tool (last_checkin_date): don't expand the $Date here.
27789
27790 2002-12-31  Paul Eggert  <eggert@twinsun.com>
27791
27792         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
27793
27794 2002-12-31  Paul Eggert  <eggert@twinsun.com>
27795
27796         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
27797         memcmp if strcoll doesn't work.
27798
27799 2002-12-31  Bruno Haible  <bruno@clisp.org>
27800
27801         * lib/utime.c (utime_null): No need to call ftruncate if the file was
27802         nonempty.
27803
27804 2002-12-31  Bruno Haible  <bruno@clisp.org>
27805
27806         * lib/memcoll.c (STRCOLL): New macro.
27807         (memcoll): Use it.
27808
27809 2002-12-31  Bruno Haible  <bruno@clisp.org>
27810
27811         * lib/localcharset.h: New file.
27812         * lib/localcharset.c: Include it.
27813         * lib/unicodeio.c: Likewise.
27814
27815 2002-12-31  Bruno Haible  <bruno@clisp.org>
27816
27817         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
27818         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
27819
27820 2002-12-31  Bruno Haible  <bruno@clisp.org>
27821
27822         * lib/getline.h: Include <stddef.h>, for size_t.
27823
27824         * lib/unicodeio.h: Include <stddef.h>, for size_t.
27825         * lib/unicodeio.c: Don't include <stddef.h>.
27826
27827 2002-12-31  Bruno Haible  <bruno@clisp.org>
27828
27829         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
27830         HAVE_TM_ZONE.
27831
27832 2002-12-24  Karl Berry  <karl@gnu.org>
27833
27834         * config/config.guess: update from prep.
27835
27836 2002-12-24  Bruno Haible  <bruno@clisp.org>
27837
27838         General infrasructure.
27839         * m4/README: Rewritten.
27840         * m4/onceonly.m4: New file.
27841         * m4/onceonly_2_57.m4: New file.
27842
27843         Module atexit.
27844         * m4/atexit.m4: New file.
27845
27846         Module strtod.
27847         * m4/strtod.m4: New file.
27848
27849         Module strtol.
27850         * m4/strtol.m4: New file.
27851
27852         Module strtoul.
27853         * m4/strtoul.m4: New file.
27854
27855         Module memchr.
27856         * m4/memchr.m4: New file.
27857
27858         Module memcmp.
27859         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
27860         (jm_FUNC_MEMCMP): Invoke it.
27861
27862         Module memcpy.
27863         * m4/memcpy.m4: New file.
27864
27865         Module memmove.
27866         * m4/memmove.m4: New file.
27867
27868         Module memset.
27869         * m4/memset.m4: New file.
27870
27871         Module strcspn.
27872         * m4/strcspn.m4: New file.
27873
27874         Module strpbrk.
27875         * m4/strpbrk.m4: New file.
27876
27877         Module strstr.
27878         * m4/strstr.m4: New file.
27879
27880         Module strerror.
27881         * m4/strerror.m4: New file.
27882
27883         Module mktime.
27884         * m4/mktime.m4: Renamed from jm-mktime.m4.
27885         (gl_PREREQ_MKTIME): New macro.
27886         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
27887
27888         Module malloc.
27889         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
27890         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
27891         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
27892
27893         Module realloc.
27894         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
27895         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
27896         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
27897
27898         Module strftime.
27899         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
27900         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
27901         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
27902         gl_TM_GMTOFF.
27903         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
27904
27905         Module xalloc.
27906         * m4/xalloc.m4: New file.
27907
27908         Module alloca.
27909         * m4/alloca.m4: New file.
27910
27911         Module putenv.
27912         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
27913         (jm_FUNC_PUTENV): Invoke it.
27914
27915         Module setenv.
27916         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
27917         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
27918         when invoked twice.
27919         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
27920         gt_FUNC_SETENV.
27921
27922         Module memrchr.
27923         * m4/memrchr.m4: New file.
27924
27925         Module stpcpy.
27926         * m4/stpcpy.m4: New file.
27927
27928         Module strcase.
27929         * m4/strcase.m4: New file.
27930
27931         Module strdup.
27932         * m4/strdup.m4: New file.
27933
27934         Module strnlen.
27935         * m4/strnlen.m4: New file.
27936
27937         Module strndup.
27938         * m4/strndup.m4: New file.
27939
27940         Module xstrtod.
27941         * m4/xstrtod.m4: New file.
27942
27943         Module xstrtol.
27944         * m4/xstrtol.m4: New file.
27945
27946         Module getdate.
27947         * m4/getdate.m4: New file.
27948
27949         Module unlocked-io.
27950         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
27951         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
27952         * m4/jm-glibc-io.m4n: Remove file.
27953
27954         Module long-options.
27955         * m4/long-options.m4: New file.
27956
27957         Module md5.
27958         * m4/md5.m4: New file.
27959
27960         Module sha.
27961         * m4/sha.m4: New file.
27962
27963         Module getstr.
27964         * m4/getstr.m4: New file.
27965
27966         Module getline.
27967         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
27968         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
27969         <sys/types.h>, for size_t. Use the function name gnu_getline, not
27970         simply getline. Infoke gl_PREREQ_GETLINE.
27971
27972         Module obstack.
27973         * m4/obstack.m4: New file.
27974
27975         Module hash.
27976         * m4/hash.m4: New file.
27977
27978         Module readtokens.
27979         * m4/readtokens.m4: New file.
27980
27981         Module strverscmp.
27982         * m4/strverscmp.m4: New file.
27983
27984         Module stdbool.
27985         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
27986         OSF/1.
27987
27988         Module strtoll.
27989         * m4/strtoll.m4: New file.
27990
27991         Module strtoull.
27992         * m4/strtoull.m4: New file.
27993
27994         Module strtoimax.
27995         * m4/strtoimax.m4: New file.
27996
27997         Module strtoumax.
27998         * m4/strtoumax.m4: New file.
27999
28000         Module xstrtoimax.
28001         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
28002         jm_AC_PREREQ_XSTRTOIMAX.
28003         Moved the strtol prerequisites to strtol.m4.
28004         Moved the strtoll prerequisites to strtoll.m4.
28005         Moved the strtoimax prerequisites to strtoimax.m4.
28006
28007         Module xstrtoumax.
28008         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
28009         jm_AC_PREREQ_XSTRTOUMAX.
28010         Moved the strtoul prerequisites to strtoul.m4.
28011         Moved the strtoull prerequisites to strtoull.m4.
28012         Moved the strtoumax prerequisites to strtoumax.m4.
28013
28014         Module chown.
28015         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
28016         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
28017
28018         Module dup2.
28019         * m4/dup2.m4: New file.
28020
28021         Module ftruncate.
28022         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
28023         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
28024
28025         Module getgroups.
28026         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
28027         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
28028
28029         Module gettimeofday.
28030         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
28031         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
28032         gl_PREREQ_GETTIMEOFDAY.
28033
28034         Module mkdir.
28035         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
28036         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
28037
28038         Module mkstemp.
28039         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
28040         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
28041         jm_AC_TYPE_UINTMAX_T.
28042         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
28043
28044         Module stat.
28045         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
28046         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
28047
28048         Module lstat.
28049         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
28050         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
28051
28052         Module timespec.
28053         * m4/timespec.m4 (gl_TIMESPEC): New macro.
28054         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
28055         * m4/st_mtim.m4: Indentation.
28056
28057         Module nanosleep.
28058         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
28059         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
28060         gl_PREREQ_NANOSLEEP.
28061
28062         Module regex.
28063         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
28064         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
28065         (gl_REGEX): New macro.
28066
28067         Module rename.
28068         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
28069         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
28070
28071         Module rmdir.
28072         * m4/rmdir.m4: New file.
28073
28074         Module utime.
28075         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
28076         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
28077         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
28078
28079         Module dirname.
28080         * m4/dirname.m4: New file.
28081
28082         Module getopt.
28083         * m4/getopt.m4: New file.
28084
28085         Module unistd-safer.
28086         * m4/unistd-safer.m4: New file.
28087
28088         Module fnmatch.
28089         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
28090         declaration.
28091         (gl_PREREQ_FNMATCH_EXTRA): New macro.
28092         (gl_FUNC_FNMATCH_POSIX): New macro.
28093         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
28094         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
28095         simply fnmatch.
28096
28097         Module exclude.
28098         * m4/exclude.m4: New file.
28099
28100         Module human.
28101         * m4/human.m4: New file.
28102
28103         Module acl.
28104         * m4/acl.m4: Nop.
28105
28106         Module backupfile.
28107         * m4/backupfile.m4: New file.
28108         * m4/d-ino.m4: Indentation.
28109
28110         Module fsusage.
28111         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
28112         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
28113         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
28114
28115         Module dirfd.
28116         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
28117         requirements.
28118
28119         Module euidaccess.
28120         * m4/euidaccess.m4: New file.
28121
28122         Module file-type.
28123         * m4/file-type.m4: New file.
28124
28125         Module fileblocks.
28126         * m4/fileblocks.m4: New file.
28127
28128         Module filemode.
28129         * m4/filemode.m4: New file.
28130
28131         Module isdir.
28132         * m4/isdir.m4: New file.
28133
28134         Module lchown.
28135         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
28136         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
28137
28138         Module makepath.
28139         * m4/makepath.m4: New file.
28140
28141         Module modechange.
28142         * m4/modechange.m4: New file.
28143
28144         Module mountlist.
28145         * m4/mountlist.m4: New file.
28146         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
28147         Indentation.
28148
28149         Module path-concat.
28150         * m4/path-concat.m4: New file.
28151
28152         Module pathmax.
28153         * m4/pathmax.m4: New file.
28154
28155         Module same.
28156         * m4/same.m4: New file.
28157
28158         Module save-cwd.
28159         * m4/save-cwd.m4: New file.
28160
28161         Module savedir.
28162         * m4/savedir.m4: New file.
28163
28164         Module xgetcwd.
28165         * m4/xgetcwd.m4: New file.
28166         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
28167
28168         Module xreadlink.
28169         * m4/xreadlink.m4: New file.
28170
28171         Module safe-read.
28172         * m4/safe-read.m4: New file.
28173
28174         Module safe-write.
28175         * m4/safe-write.m4: New file.
28176
28177         Module closeout.
28178         * m4/closeout.m4: New file.
28179
28180         Module stdio-safer.
28181         * m4/stdio-safer.m4: New file.
28182
28183         Module getpass.
28184         * m4/getpass.m4: New file.
28185
28186         Module getugroups.
28187         * m4/getugroups.m4: New file.
28188
28189         Module group-member.
28190         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
28191         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
28192
28193         Module idcache.
28194         * m4/idcache.m4: New file.
28195
28196         Module userspec.
28197         * m4/userspec.m4: New file.
28198
28199         Module gettime.
28200         * m4/clock_time.m4: New file.
28201         * m4/gettime.m4: New file.
28202
28203         Module settime.
28204         * m4/settime.m4: New file.
28205
28206         Module posixtm.
28207         * m4/posixtm.m4: New file.
28208
28209         Module gethostname.
28210         * m4/gethostname.m4: New file.
28211
28212         Module canon-host.
28213         * m4/canon-host.m4: New file.
28214
28215         Module gettext.
28216         * m4/codeset.m4: New file, from gettext-0.11.5.
28217         * m4/gettext.m4: New file, from gettext-0.11.5.
28218         * m4/glibc21.m4: New file, from gettext-0.11.5.
28219         * m4/iconv.m4: New file, from gettext-0.11.5.
28220         * m4/intdiv0.m4: New file, from gettext-0.11.5.
28221         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
28222         * m4/inttypes.m4: New file, from gettext-0.11.5.
28223         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
28224         * m4/isc-posix.m4: New file, from gettext-0.11.5.
28225         * m4/lcmessage.m4: New file, from gettext-0.11.5.
28226         * m4/lib-ld.m4: New file, from gettext-0.11.5.
28227         * m4/lib-link.m4: New file, from gettext-0.11.5.
28228         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
28229         * m4/progtest.m4: New file, from gettext-0.11.5.
28230         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
28231         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
28232         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
28233
28234         Module localcharset.
28235         * m4/localcharset.m4: New file.
28236
28237         Module hard-locale.
28238         * m4/hard-locale.m4: New file.
28239
28240         Module mbswidth.
28241         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
28242         onceonly macros.
28243         * m4/mbrtowc.m4: Add comment.
28244
28245         Module memcasecmp.
28246         * m4/memcasecmp.m4: New file.
28247
28248         Module memcoll.
28249         * m4/memcoll.m4: New file.
28250
28251         Module unicodeio.
28252         * m4/unicodeio.m4: New file.
28253
28254         Module rpmatch.
28255         * m4/rpmatch.m4: New file.
28256
28257         Module yesno.
28258         * m4/yesno.m4: New file.
28259
28260         Module exitfail.
28261         * m4/exitfail.m4: New file.
28262
28263         Module c-stack.
28264         * m4/c-stack.m4 (gl_C_STACK): New macro.
28265         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
28266
28267         Module error.
28268         * m4/error.m4 (gl_ERROR): New macro.
28269         (jm_PREREQ_ERROR): Use onceonly macros.
28270
28271         Module fatal.
28272         * m4/fatal.m4: New file.
28273
28274         Module getloadavg.
28275         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
28276         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
28277
28278         Module getpagesize.
28279         * m4/getpagesize.m4: New file.
28280
28281         Module getusershell.
28282         * m4/getusershell.m4: New file.
28283
28284         Module physmem.
28285         * m4/physmem.m4: New file.
28286
28287         Module posixver.
28288         * m4/posixver.m4: New file.
28289
28290         Module quotearg.
28291         * m4/quotearg.m4: New file.
28292
28293         Module quote.
28294         * m4/quote.m4: New file.
28295
28296         Module readutmp.
28297         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
28298
28299         Module sig2str.
28300         * m4/sig2str.m4: New file.
28301
28302         Other.
28303         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
28304         ulonglong.m4.
28305         * m4/intmax_t.m4: New file.
28306         * m4/d-type.m4: Indentation.
28307         * m4/jm-macros.m4: Update.
28308         * m4/prereq.m4 (jm_PREREQ): Update.
28309         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
28310         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
28311         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
28312         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
28313         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
28314         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
28315         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
28316         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
28317         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
28318         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
28319         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
28320         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
28321         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
28322         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
28323         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
28324         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
28325         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
28326         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
28327         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
28328
28329 2002-12-24  Bruno Haible  <bruno@clisp.org>
28330
28331         * MODULES.txt: Update according to m4/ changes.
28332
28333         Module gettext.
28334         * config.rpath: New file, from gettext-0.11.5.
28335
28336         * modules/*: New module descriptions.
28337         * gnulib-tool: New file.
28338         * MODULES.html.sh: New file.
28339
28340 2002-12-21  Karl Berry  <karl@gnu.org>
28341
28342         * doc/fdl.texi: update to version 1.2.
28343
28344 2002-12-19  Karl Berry  <karl@gnu.org>
28345
28346         * config/config.guess: update from prep.
28347
28348 2002-12-18  Bruno Haible  <bruno@clisp.org>
28349
28350         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
28351         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
28352
28353 2002-12-17  Bruno Haible  <bruno@clisp.org>
28354
28355         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
28356         stdlib.h, string.h.
28357
28358 2002-12-17  Bruno Haible  <bruno@clisp.org>
28359
28360         * lib/canon-host.c (strdup): Remove unused declaration.
28361
28362         * lib/fsusage.c: Include full_read.h.
28363         (get_fs_usage): Use full_read instead of safe_read.
28364
28365         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
28366
28367 2002-12-12  Karl Berry  <karl@gnu.org>
28368
28369         * config/config.guess: update from prep.
28370
28371 2002-12-11  Bruno Haible  <bruno@clisp.org>
28372
28373         * m4/setenv.m4: New file, from gettext-0.11.5.
28374
28375 2002-12-11  Bruno Haible  <bruno@clisp.org>
28376
28377         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
28378         not unsetenv().
28379         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
28380         modifications:
28381
28382         2002-12-11  Bruno Haible  <bruno@clisp.org>
28383
28384                 * setenv.c (alloca): Fall back to malloc.
28385                 (freea): New macro.
28386                 (setenv): Use freea() to free memory allocated with alloca().
28387
28388         2002-11-13  Bruno Haible  <bruno@clisp.org>
28389
28390                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
28391                 function declarations.
28392                 * unsetenv.c (unsetenv): Likewise.
28393
28394         2002-03-04  Bruno Haible  <bruno@clisp.org>
28395
28396                 Portability to AIX 4.3.3.
28397                 * unsetenv.c: New file, extracted from setenv.c.
28398                 * setenv.c: Move the unsetenv() function to unsetenv.c.
28399
28400         2001-12-20  Bruno Haible  <bruno@clisp.org>
28401
28402                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
28403                 use malloc instead. For SunOS 4.
28404
28405         2001-12-11  Bruno Haible  <bruno@clisp.org>
28406
28407                 * setenv.c: Declare alloca.
28408                 (compar_fn_t): New typedef.
28409                 (KNOWN_VALUE, STORE_VALUE): Use it.
28410
28411         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
28412         setenv.h.
28413
28414 2002-12-10  Paul Eggert  <eggert@twinsun.com>
28415
28416         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
28417         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
28418         Choose values that are less likely to collide with system fnmatch
28419         options.
28420         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
28421         defined (e.g., a pure POSIX system).
28422         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
28423         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
28424
28425 2002-12-06  Paul Eggert  <eggert@twinsun.com>
28426
28427         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
28428         a pain in practice to deal with generated m4 files.  This change
28429         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
28430
28431         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
28432         and jm-glibc-io.m4, as they are no longer a special case.
28433         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
28434         kludge and the auto-generation stuff.  Check only whether the
28435         functions are declared, not whether they exist, since older hosts
28436         that don't declare the functions can't use the optimization anyway.
28437
28438 2002-12-06  Jim Meyering  <jim@meyering.net>
28439
28440         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
28441
28442         Merge in changes from libc's misc/error.c, in preparation
28443         for the merge of gnulib's changes back into libc.
28444
28445         * lib/error.c (_): Define only if not already defined.
28446         Move definition to follow all #include directives.
28447         Include unlocked-io.h only if !_LIBC.
28448         [_LIBC]: Include <libio/libioP.h>.
28449         [USE_IN_LIBIO]: Include <libio/iolibio.h>
28450         (fflush): Tweak definition to use INTUSE.
28451         (putc): Define.
28452
28453 2002-12-05  Paul Eggert  <eggert@twinsun.com>
28454
28455         * lib/alloca.c [defined emacs]: Include "lisp.h".
28456         (xalloc_die) [defined emacs]: New macro.
28457         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
28458         [! defined emacs]: Include <xalloc.h>.
28459         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
28460         (pointer): Typedef to POINTER_TYPE *.
28461         (malloc): Remove decl; we now always use xmalloc.
28462         (alloca): Use old-style definition, since Emacs needs this.
28463         Check for arithmetic overflow when computing combined size.
28464
28465 2002-12-04  Paul Eggert  <eggert@twinsun.com>
28466
28467         Do not generate unlocked-io.h automatically, since it's easier to
28468         maintain it by hand.
28469
28470         * lib/unlocked-io.h: New file, from GNU diffutils,
28471         but with proper copyright notice and attribution.
28472         * lib/gen-uio: Remove.
28473         * lib/Makefile.am: Add copyright notice.
28474         (libfetish_a_SOURCES): Add unlocked-io.h.
28475         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
28476         (DISTCLEANFILES, io_functions): Remove macros.
28477         (EXTRA_DIST): Remove gen_uio.
28478         (unlocked-io.h): Remove rule.
28479
28480 2002-12-04  Jim Meyering  <jim@meyering.net>
28481
28482         Reflect the fact that stat.c and lstat.c are no longer generated.
28483         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
28484         (DISTCLEANFILES): Likewise.
28485         (EXTRA_DIST): Likewise.
28486         (all_local): Don't depend on stat.c or lstat.c.
28487         (stat.c, lstat.c): Remove rules.
28488         (EXTRA_DIST): Remove xstat.in.
28489
28490         * lib/xstat.in: Remove file.  Contents moved into stat.c.
28491         * lib/stat.c: New file.  Contents mostly from xstat.in.
28492         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
28493         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
28494
28495         * lib/safe-read.c: Rework so that it may serve to define safe_write,
28496         too.
28497         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
28498
28499 2002-12-03  Jim Meyering  <jim@meyering.net>
28500
28501         * lib/safe-read.c, safe-write.c: Change variable names and comments,
28502         but not semantics, to minimize the differences between these two files.
28503         (safe_read): Change comment to mention SAFE_READ_ERROR.
28504
28505         * lib/safe-read.c (IS_EINTR): Define.
28506         (safe_read): Use IS_EINTR in place of in-function cpp directives.
28507
28508 2002-12-02  Jim Meyering  <jim@meyering.net>
28509
28510         * lib/safe-read.c (EINTR): Define.
28511         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
28512         (INT_MAX): Provide fallback.
28513         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
28514
28515         * lib/safe-read.h (SAFE_READ_ERROR): Define.
28516
28517 2002-12-02  Bruno Haible  <bruno@clisp.org>
28518
28519         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
28520         Define, taken from safe-read.c.
28521         (INT_MAX): Provide fallback.
28522         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
28523         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
28524
28525         * lib/safe-read.c (EINTR): Remove definition.
28526         (safe_read): Don't use EINTR if it is absent.
28527
28528 2002-12-01  Jim Meyering  <jim@meyering.net>
28529
28530         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
28531         zero.
28532         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
28533
28534 2002-11-27  Paul Eggert  <eggert@twinsun.com>
28535
28536         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
28537         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
28538         with `if (! (value < limit)) abort ();', for readability.
28539
28540 2002-11-26  Karl Berry  <karl@gnu.org>
28541
28542         * lib/strdup.c: copy from libc again, with jim's ok.
28543         * lib/.cppi-disable: re-add strdup.c
28544
28545 2002-11-25  Karl Berry  <karl@gnu.org>
28546
28547         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
28548         instead of "strtol.c".
28549
28550 2002-11-25  Karl Berry  <karl@gnu.org>
28551
28552         * config/install-sh: update from automake for variable quoting, $0 in
28553         error msgs, etc.
28554
28555         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
28556         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
28557         entry.
28558
28559 2002-11-25  Jim Meyering  <jim@meyering.net>
28560
28561         * lib/mktime.c: Sync from libc, now that it has the latest fix.
28562
28563 2002-11-24  Karl Berry  <karl@gnu.org>
28564
28565         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
28566         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
28567
28568 2002-11-24  Jim Meyering  <jim@meyering.net>
28569
28570         Update from coreutils:
28571
28572         * lib/mktime.c: Merge in changes from libc.
28573
28574         Avoid a link-time failure on some Linux systems.
28575         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
28576         (otherwise).
28577         (__mon_yday): Declare with the STATIC attribute.
28578         (__mktime_internal): Likewise.
28579         Based on a report from Greg Schafer.
28580
28581 2002-11-23  Jim Meyering  <jim@meyering.net>
28582
28583         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
28584         Use `unsigned', not `int', as type of index.
28585
28586         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
28587
28588         * lib/fsusage.c: Remove unneeded parentheses around operands of
28589         `defined'.
28590
28591 2002-11-22  Paul Eggert  <eggert@twinsun.com>
28592
28593         * lib/quotearg.h: Allow multiple inclusion by surrounding with
28594         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
28595         so that we can be included first.
28596         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
28597         * lib/quotearg.c: Include quotearg.h immediately after config.h.
28598         No need to include stddef.h or sys/types.h any more.
28599         Surround local include files with "", not "<>".
28600         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
28601         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
28602         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
28603         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
28604         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
28605         (ISPRINT): Remove; no longer needed now that we assume C89.
28606
28607         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
28608         Preserve errno.
28609
28610         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
28611         quotearg_char): Use SIZE_MAX rather than
28612         (size_t) -1 when we are talking about "infinity".
28613
28614         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
28615
28616 2002-11-22  Paul Eggert  <eggert@twinsun.com>
28617
28618         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
28619         hint that one should use `if (! x) abort ();' rather than `assert
28620         (x);', and anyway it's one less thing to worry about configuring.
28621         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
28622         hash_rehash, hash_insert): Use abort rather than assert.
28623
28624 2002-11-22  Bruno Haible  <bruno@clisp.org>
28625
28626         * lib/safe-read.h: Assume C89. Add comments.
28627         (safe_read): Change return type to size_t.
28628         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
28629         byte counts > SSIZE_MAX correctly.
28630         * lib/safe-write.h: New file.
28631         * lib/safe-write.c: New file.
28632         * lib/full-read.h: New file.
28633         * lib/full-read.c: New file.
28634         * lib/full-write.h: Assume C89. Add comments.
28635         * lib/full-write.c: Include safe-write.h.
28636         (full_write): Rewritten to use safe_write.
28637         Suggested by Jim Meyering and Paul Eggert.
28638
28639 2002-11-21  Jim Meyering  <jim@meyering.net>
28640
28641         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
28642
28643         Merge in changes from the coreutils.
28644
28645         2002-09-25  Paul Eggert  <eggert@twinsun.com>
28646         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
28647         <stdint.h>.
28648         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
28649         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
28650         int.  Work more efficiently if X is the same width as uintmax_t.
28651         Do not compare X to -1, to avoid bogus compiler warning.
28652         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
28653         Don't assume that f_frsize and f_bsize are the same type.
28654
28655         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
28656         warning on FreeBSD.
28657
28658         * lib/makepath.c (make_path): Restore umask *before* creating the final
28659         component.
28660         (make_path): Minor reformatting.
28661
28662         * lib/xmalloc.c: Adjust to work with new autoconf macros,
28663         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
28664         HAVE_MALLOC/HAVE_REALLOC.
28665
28666         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
28667         dummy ones.  At least on GNU/Linux systems, `auto' means something
28668         else.
28669         From Michael Stone.
28670
28671 2002-11-21  Bruno Haible  <bruno@clisp.org>
28672
28673         Remove case insensitive option matching.
28674         * lib/argmatch.h (argcasematch): Remove declaration.
28675         (ARGCASEMATCH): Remove macro.
28676         (__xargmatch_internal): Remove case_sensitive argument.
28677         (XARGMATCH): Update.
28678         (XARGCASEMATCH): Remove macro.
28679         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
28680         case_sensitive argument.
28681         (argcasematch): Remove function.
28682         (__xargmatch_internal): Remove case_sensitive argument.
28683         (main): Use XARGMATCH instead of XARGCASEMATCH.
28684
28685         * lib/xmalloc.c: Change compile-time error message. Add comment about
28686         required autoconf version.
28687
28688 2002-11-20  Paul Eggert  <eggert@twinsun.com>
28689
28690         Merge argmatch cleanups from Bison.  Assume C89.
28691
28692         * lib/argmatch.c: Include config.h here, not in argmatch.h.
28693         Include stdlib.h, for EXIT_FAILURE.
28694         Always include <string.h>, since we assume C89.
28695         (EXIT_FAILURE): Remove pre-C89 bug workaround.
28696         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
28697         Include <stddef.h> instead, since it's all we need for size_t.
28698         (PARAMS): Remove.  All uses removed.
28699         (ARRAY_CARDINALITY): Do not bother to #undef.
28700         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
28701         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
28702         Remove unnecessary parentheses.
28703         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
28704         Insert necessary parentheses.
28705         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
28706         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
28707
28708 2002-11-19  Bruno Haible  <bruno@clisp.org>
28709
28710         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
28711         * lib/mbswidth.h: Include <stddef.h>, for size_t.
28712
28713         * lib/mbswidth.h (PARAMS): Remove macro.
28714         (mbswidth, mbsnwidth): Use ANSI C function declarations.
28715         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
28716
28717         * lib/gcd.h (PARAMS): Remove macro.
28718         (gcd): Use ANSI C function declarations.
28719         * lib/gcd.c (gcd): Likewise.
28720
28721 2002-11-15  Bruno Haible  <bruno@clisp.org>
28722
28723         * lib/strcspn.c: Include <stddef.h>.
28724         (strcspn): Use ANSI C function declaration. Change return type to
28725         size_t. Use NULL.
28726         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
28727         (strpbrk): Use NULL.
28728         * lib/strpbrk.h (PARAMS): Remove macro.
28729         (strpbrk): Use ANSI C function declaration.
28730         * lib/strstr.c: Don't include <sys/types.h>.
28731         * lib/strstr.h (PARAMS): Remove macro.
28732         (strstr): Use ANSI C function declarations.
28733
28734 2002-11-14  Karl Berry  <karl@gnu.org>
28735
28736         * config/mkinstalldirs: `do' on separate line, instead of
28737         `for var; do'.
28738
28739 2002-11-06  Bruno Haible  <bruno@clisp.org>
28740
28741         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
28742         * lib/gcd.c (gcd): Likewise.
28743
28744 2002-11-05  Bruno Haible  <bruno@clisp.org>
28745
28746         * lib/gcd.h: New file, from gettext-0.11.5.
28747         * lib/gcd.c: New file, from gettext-0.11.5.
28748
28749 2002-11-05  Bruno Haible  <bruno@clisp.org>
28750
28751         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
28752         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
28753         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
28754         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
28755
28756         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
28757         <libintl.h>.
28758         * lib/makepath.c: Include gettext.h instead of <locale.h> and
28759         <libintl.h>.
28760
28761         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
28762         * lib/human.c: Include gettext.h instead of <libintl.h>.
28763         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
28764         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
28765         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
28766         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
28767         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
28768         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
28769         (textdomain): Remove definition.
28770         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
28771
28772         * lib/long-options.c: Remove include of <libintl.h> and definition of
28773         _.
28774         * lib/same.c: Remove include of <libintl.h> and definition of _.
28775
28776 2002-11-04  Owen Taylor  <otaylor@redhat.com>
28777
28778         * lib/config.charset: A few additions for Solaris.
28779
28780 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
28781
28782         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
28783         * lib/localcharset.c (locale_charset): Declare as extern "C".
28784
28785 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
28786
28787         * lib/config.charset: msdos in uk_UA uses CP1125.
28788
28789 2002-11-04  Bruno Haible  <bruno@clisp.org>
28790
28791         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
28792         * lib/strcase.h: New file, from GNU gettext-0.11.5.
28793         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
28794         * lib/strstr.h: New file, from GNU gettext-0.11.5.
28795         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
28796
28797 2002-11-04  Bruno Haible  <bruno@clisp.org>
28798
28799         * lib/localcharset.c (locale_charset): Don't return an empty string.
28800
28801 2002-11-04  Bruno Haible  <bruno@clisp.org>
28802
28803         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
28804         aliases.
28805
28806 2002-11-04  Bruno Haible  <bruno@clisp.org>
28807
28808         * lib/config.charset: Update for newest glibc. Add canonical names
28809         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
28810
28811 2002-11-04  Bruno Haible  <bruno@clisp.org>
28812
28813         * lib/config.charset: Add support for NetBSD.
28814
28815 2002-11-04  Bruno Haible  <bruno@clisp.org>
28816
28817         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
28818
28819 2002-11-01  Bruno Haible  <bruno@clisp.org>
28820
28821         * configure.in: Add AC_CONFIG_AUX_DIR call.
28822         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
28823         test/Makefile.
28824         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
28825
28826 2002-09-28  Karl Berry  <karl@gnu.org>
28827
28828         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
28829         installed automake until the next release, since changes have been
28830         made.
28831
28832 2002-09-25  Karl Berry  <karl@gnu.org>
28833
28834         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
28835         * lib/getopt*: copy from libc/posix.
28836         * lib/gettext.h: copy from gettext.
28837         * lib/.cppi-disable: add strdup.c, gettext.h.
28838
28839 2002-09-25  Karl Berry  <karl@gnu.org>
28840
28841         * config/srclist.txt: enable gettext.h check.
28842         * config/config.{guess,sub}: update from prep.
28843         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
28844                 from automake 1.6.3.
28845         See srclist*.
28846
28847 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
28848
28849         * regex.c (PATFETCH): Remove the translating fetch.
28850         (PATFETCH_RAW): Rename to PATFETCH.
28851         (set_image_of_range): New fun.
28852         (SET_RANGE_TABLE_WORK_AREA): Use it.
28853         (regex_compile): Don't translate the pattern chars so eagerly.
28854         Only do it when inserting an `exactn' bytecode or when handling
28855         a char-range.
28856         (mutually_exclusive_p): Avoid empty statement.
28857
28858 2002-07-06  Jim Meyering  <meyering@lucent.com>
28859
28860         * m4/README: Don't mention Makefile.am.in.
28861         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
28862
28863 2002-07-01  Jim Meyering  <meyering@lucent.com>
28864
28865         * lib/c-stack.c: Include sys/time.h.
28866         From Volker Borchert.
28867
28868 2002-06-26  Paul Eggert  <eggert@twinsun.com>
28869
28870         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
28871
28872 2002-06-26  Paul Eggert  <eggert@twinsun.com>
28873
28874         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
28875         New macro.  Use it uniformly instead of
28876         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
28877         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
28878         reported by Vin Shelton.
28879
28880 2002-06-22  Paul Eggert  <eggert@twinsun.com>
28881
28882         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
28883         Do not assume SA_SIGINFO behavior.
28884         Bug reported by Jim Meyering on NetBSD 1.5.2.
28885
28886 2002-06-22  Jim Meyering  <meyering@lucent.com>
28887
28888         * m4/c-stack.m4: New file, from diffutils-2.8.2.
28889         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
28890
28891         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
28892         now that configure.ac uses AC_GNU_SOURCE.
28893         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
28894         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
28895
28896         Update to latest tools.  Suggestions from Paul Eggert.
28897         * m4/stdbool.m4: New file, from diffutils-2.8.2.
28898         * m4/gnu-source.m4: Update from diffutils-2.8.2.
28899         * m4/fnmatch.m4: Likewise.
28900         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
28901         to AC_HEADER_STDBOOL
28902
28903 2002-06-22  Jim Meyering  <meyering@lucent.com>
28904
28905         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
28906         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
28907
28908 2002-06-22  Jim Meyering  <meyering@lucent.com>
28909
28910         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
28911
28912         * lib/exitfail.c, exitfail.h: Likewise.
28913         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
28914
28915         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
28916         of fnmatch.h.
28917         (EXTRA_DIST): Add fnmatch_loop.c.
28918         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
28919
28920         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
28921         * lib/fnmatch.c: Update from diffutils-2.8.2.
28922         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
28923         * lib/fnmatch.h: Remove file.
28924
28925 2002-06-21  Jim Meyering  <meyering@lucent.com>
28926
28927         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
28928         * m4/mbrtowc.m4: Likewise.
28929
28930         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
28931         * m4/mbswidth.m4: Reflect name change:
28932         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
28933         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
28934
28935         * m4/lib-link.m4: Update from gettext-0.11.2.
28936         * m4/gettext.m4: Likewise.
28937
28938         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
28939         From Alfred M. Szmidt.
28940
28941 2002-06-18  Paul Eggert  <eggert@twinsun.com>
28942
28943         * lib/file-type.h: Report an error if neither S_ISREG nor
28944         S_IFREG is defined, instead of using a test specific to glibc
28945         2.2.  This should be safe, since POSIX requires S_ISREG and
28946         Unix Version 7 had S_IFREG.  We don't need to check for
28947         <sys/types.h> since we don't use any symbols that it defines.
28948
28949 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
28950
28951         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
28952         $@-t, so that each temporary file name is unique and valid in the first
28953         8 characters, for operation under DOS.
28954
28955 2002-06-15  Paul Eggert  <eggert@twinsun.com>
28956
28957         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
28958
28959 2002-06-15  Jim Meyering  <meyering@lucent.com>
28960
28961         Work even with DJGPP 2.03, which lacks support for symlinks.
28962         From Richard Dawe.
28963         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
28964         is defined.
28965         * lib/lchown.c (S_ISLNK): Likewise.
28966
28967 2002-06-15  Jim Meyering  <meyering@lucent.com>
28968
28969         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
28970         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
28971         have been included before this file.
28972
28973 2002-06-14  Jim Meyering  <meyering@lucent.com>
28974
28975         * lib/file-type.h: Use the version from diffutils-2.8.2.
28976         * lib/file-type.c: Likewise.
28977
28978 2002-06-07  Jim Meyering  <meyering@lucent.com>
28979
28980         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
28981         They're needed at least for NetBSD 1.5.2.
28982         ($statxfs_includes): Include those same headers.
28983         ($statxfs_includes): Include sys/vfs.h if available.
28984         ($statxfs_includes): Likewise for sys/statvfs.h.
28985         Check for the following members in both structs statfs and statvfs:
28986         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
28987
28988 2002-06-01  Jim Meyering  <meyering@lucent.com>
28989
28990         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
28991         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
28992
28993 2002-05-28  Jim Meyering  <meyering@lucent.com>
28994
28995         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
28996         Reported by Volker Borchert.
28997
28998 2002-05-27  Jim Meyering  <meyering@lucent.com>
28999
29000         Fix a problem seen only on nonconforming systems whereby ls.c's
29001         use of localtime, and then of gettimeofday would cause trouble:
29002         the localtime call used to initialize rpl_gettimeofday's save
29003         mechanism would clobber ls's current local time information so
29004         that in any long listing the first file would always be listed
29005         with date 1970-01-01.  Analysis by Volker Borchert.
29006
29007         * lib/gettimeofday.c (localtime): Undefine.
29008         (rpl_localtime): New function.
29009
29010 2002-05-27  Jim Meyering  <meyering@lucent.com>
29011
29012         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
29013         localtime.
29014
29015         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
29016         use the replacement function; it wouldn't resolve at link time.
29017         Reported by Volker Borchert.
29018
29019 2002-05-22  Jim Meyering  <meyering@lucent.com>
29020
29021         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
29022         file-type.h.
29023         * lib/file-type.h: New file.
29024         * lib/file-type.c (file_type): New file/function.  Extracted from
29025         diffutils.
29026
29027 2002-04-30  Jim Meyering  <meyering@lucent.com>
29028
29029         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
29030
29031 2002-04-29  Paul Eggert  <eggert@twinsun.com>
29032
29033         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
29034
29035 2002-04-29  Paul Eggert  <eggert@twinsun.com>
29036
29037         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
29038         Do not check for alloca.h (no longer used) or stdbool.h (was never
29039         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
29040
29041 2002-04-29  Paul Eggert  <eggert@twinsun.com>
29042
29043         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
29044
29045 2002-04-29  Jim Meyering  <meyering@lucent.com>
29046
29047         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
29048         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
29049         Use AC_FUNC_STRNLEN here instead.
29050
29051         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
29052         With autoconf-2.53a, it's part of AC_PROG_CC.
29053
29054 2002-04-28  Paul Eggert  <eggert@twinsun.com>
29055
29056         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
29057         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
29058
29059 2002-04-28  Paul Eggert  <eggert@twinsun.com>
29060
29061         * lib/sig2str.h, lib/sig2str.c: New files.
29062         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
29063
29064 2002-04-28  Paul Eggert  <eggert@twinsun.com>
29065
29066         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
29067         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
29068         of 127, since 64 is the largest conceivable number for ancient
29069         nonstandard hosts.
29070         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
29071
29072 2002-04-28  Jim Meyering  <meyering@lucent.com>
29073
29074         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
29075
29076 2002-04-24  Jim Meyering  <meyering@lucent.com>
29077
29078         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
29079         (jm_PREREQ): Use it.
29080
29081         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
29082         mach/mach.h fcntl.h.
29083         Check for this function: setlocale.
29084
29085 2002-04-24  Jim Meyering  <meyering@lucent.com>
29086
29087         * lib/gettext.h: New file, from Gettext.
29088         * lib/Makefile.am (INCLUDES): Remove -I../intl.
29089         (libfetish_a_SOURCES): Add gettext.h.
29090
29091 2002-04-16  Jim Meyering  <meyering@lucent.com>
29092
29093         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
29094         ut_pid, ut_id, ut_exit.
29095
29096 2002-04-16  Jim Meyering  <meyering@lucent.com>
29097
29098         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
29099         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
29100         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
29101
29102 2002-04-12  Jim Meyering  <meyering@lucent.com>
29103
29104         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
29105         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
29106         existence of the getmntinfo function.  Needed for Darwin 5.3.
29107
29108         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
29109         This is necessary at least on Darwin 5.3.
29110
29111         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
29112         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
29113         strnlen.o in the library, and that makes some versions of ranlib
29114         object.
29115
29116 2002-04-12  Jim Meyering  <meyering@lucent.com>
29117
29118         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
29119
29120 2002-04-09  Jim Meyering  <meyering@lucent.com>
29121
29122         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
29123         to be more precise.  Rather than saying we're checking whether the
29124         function `works', say what we're testing.
29125         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
29126         Reported by Bruno Haible.
29127
29128 2002-03-10  Jim Meyering  <meyering@lucent.com>
29129
29130         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
29131         Suggestion from Santiago Vila.
29132
29133 2002-03-08  Jim Meyering  <meyering@lucent.com>
29134
29135         * lib/rename.c: Mention that this wrapper is needed also on
29136         mips-dec-ultrix4.4 systems.
29137
29138 2002-03-02  Jim Meyering  <meyering@lucent.com>
29139
29140         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
29141         not HAVE_CLOCK_SETTIME.
29142
29143 2002-02-27  Paul Eggert  <eggert@twinsun.com>
29144
29145         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
29146         Check for clock_settime.
29147
29148 2002-02-27  Paul Eggert  <eggert@twinsun.com>
29149
29150         * lib/nanosleep.h: Rename to....
29151         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
29152
29153         * lib/gettime.c: New file.
29154         * lib/settime.c: New file.
29155         * lib/stime.c: Remove.
29156
29157         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
29158         timespec.h.  Remove nanosleep.h.
29159
29160 2002-02-25  Paul Eggert  <eggert@twinsun.com>
29161
29162         * m4/acl.m4: New file.
29163         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
29164         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
29165
29166 2002-02-25  Paul Eggert  <eggert@twinsun.com>
29167
29168         * lib/acl.c, lib/acl.h: New files.
29169         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
29170
29171 2002-02-24  Jim Meyering  <meyering@lucent.com>
29172
29173         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
29174         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
29175         cause trouble.  Reported by Nelson Beebe.
29176
29177 2002-02-23  Paul Eggert  <eggert@twinsun.com>
29178
29179         * lib/path-concat.c (xpath_concat): Reorder code to pacify
29180         compilers that don't know that xalloc_die never returns.
29181
29182 2002-02-20  Jim Meyering  <meyering@lucent.com>
29183
29184         * lib/getdate.c: Regenerate using bison-1.33.
29185
29186 2002-02-17  Jim Meyering  <meyering@lucent.com>
29187
29188         * config/config.guess (main): Don't use `head -1'; it's no longer
29189         portable. Use `sed 1q' instead.
29190
29191 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
29192
29193         * m4/codeset.m4: Upgrade to gettext-0.11.
29194         * m4/gettext.m4: Upgrade to gettext-0.11.
29195         * m4/glibc21.m4: Upgrade to gettext-0.11.
29196         * m4/iconv.m4: Upgrade to gettext-0.11.
29197         * m4/isc-posix.m4: Upgrade to gettext-0.11.
29198         * m4/lcmessage.m4: Upgrade to gettext-0.11.
29199         * m4/lib-ld.m4: New file, from gettext-0.11.
29200         * m4/lib-link.m4: New file, from gettext-0.11.
29201         * m4/lib-prefix.m4: New file, from gettext-0.11.
29202         * m4/progtest.m4: Upgrade to gettext-0.11.
29203
29204 2002-02-15  Paul Eggert  <eggert@twinsun.com>
29205
29206         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
29207         (jm_PREREQ): Use it.
29208
29209 2002-02-15  Paul Eggert  <eggert@twinsun.com>
29210
29211         * lib/posixver.c, lib/posixver.h: New files.
29212         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
29213
29214 2002-02-02  Paul Eggert  <eggert@twinsun.com>
29215             Bruno Haible  <bruno@clisp.org>
29216
29217         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
29218         (fwrite_success_callback): New declaration.
29219         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
29220         print_unicode_char. Call failure callback instead of error.
29221         (fwrite_success_callback): New function.
29222         (exit_failure_callback): New function.
29223         (fallback_failure_callback): New function.
29224         (print_unicode_char): Call unicode_to_mb.
29225
29226 2002-01-26  Jim Meyering  <meyering@lucent.com>
29227
29228         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
29229         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
29230
29231 2002-01-26  Jim Meyering  <meyering@lucent.com>
29232
29233         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
29234
29235 2002-01-22  Paul Eggert  <eggert@twinsun.com>
29236
29237         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
29238
29239 2002-01-22  Jim Meyering  <meyering@lucent.com>
29240
29241         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
29242         Otherwise, some versions of automake would omit the rule that makes
29243         Makefile from Makefile.in.
29244
29245 2002-01-21  Paul Eggert  <eggert@twinsun.com>
29246
29247         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
29248         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
29249         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
29250         (memcoll): Set errno to zero if there is no error.
29251
29252         * lib/quotearg.c (quotearg_buffer_restyled):
29253         Fix bug with quoting buffers containing NUL when backslashing escapes.
29254         This bug was exposed by the other changes in this patch.
29255         (quotearg_n_options): New arg ARGSIZE.
29256         All callers changed.
29257         (quoting_options_from_style): New function.
29258         (quotearg_n_style): Use it.
29259         (quotearg_n_style_mem): New function.
29260
29261         * lib/quotearg.h (quotearg_n_style_mem): New function.
29262
29263 2002-01-19  Jim Meyering  <meyering@lucent.com>
29264
29265         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
29266         Remove useless quotes: DF_PROG="df".
29267         * m4/strnlen.m4: New file.
29268
29269 2002-01-16  Paul Eggert  <eggert@twinsun.com>
29270
29271         * lib/backupfile.c (ISDIGIT): Comment fix.
29272         * lib/getdate.y (ISDIGIT): Likewise.
29273         * lib/posixtm.c (ISDIGIT, year): Likewise.
29274         * lib/strverscmp.c (ISDIGIT): Likewise.
29275         * lib/userspec.c (ISDIGIT): Likewise.
29276
29277 2002-01-16  Jim Meyering  <meyering@lucent.com>
29278
29279         * lib/getdate.y: Add three semicolons, each just before a closing
29280         brace. Bison (as of version 1.31) no longer papers over that mistake.
29281
29282 2002-01-05  Jim Meyering  <meyering@lucent.com>
29283
29284         * lib/version-etc.c (version_etc_copyright): Update copyright year.
29285
29286 2001-12-19  Paul Eggert  <eggert@twinsun.com>
29287
29288         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
29289         not silently exit merely because the output buffer happens to
29290         have nothing pending.
29291
29292 2001-12-18  Paul Eggert  <eggert@twinsun.com>
29293
29294         See the big note in ../ChangeLog.
29295         * lib/human.c (suffixes): Prefer K to k for 1024.
29296         (generate_suffix_backwards): New function.
29297         (human_readable_inexact): Use it.
29298         * lib/xstrtol.c (__xstrtol): If there is no number but there
29299         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
29300         Accept 'K' as well as 'k'.
29301
29302 2001-12-15  Jim Meyering  <meyering@lucent.com>
29303
29304         * lib/regex.h (__restrict_arr): Update from libc.
29305
29306         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
29307         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
29308         (STREQ): Define.
29309
29310 2001-12-14  Jim Meyering  <meyering@lucent.com>
29311
29312         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
29313         Suggestion from Bruno Haible.
29314
29315 2001-12-10  Jim Meyering  <meyering@lucent.com>
29316
29317         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
29318         xrealloc, Instead, include "xalloc.h".
29319         (initbuffer): Don't cast xmalloc return value to char*.
29320         (readline): Reword comment.
29321         Don't cast xrealloc return value to char*
29322         Return NULL, not 0.
29323
29324 2001-12-09  Jim Meyering  <meyering@lucent.com>
29325
29326         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
29327         about `signed and unsigned type in conditional expression'.
29328         * lib/posixtm.c (posix_time_parse): Likewise.
29329
29330         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
29331
29332         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
29333         to avoid a pedantic warning.
29334
29335         * lib/getstr.c: Don't include assert.h.
29336         (getstr): Remove warning-evoking assertions.
29337         Return -1 if offset parameter is out of bounds.
29338         Change the type of a local from int to size_t.
29339
29340         * lib/strftime.c (my_strftime_localtime_r): Include this function
29341         definition in the `#if ! HAVE_TM_GMTOFF' block.
29342
29343         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
29344         Include xalloc.h instead.
29345
29346 2001-12-02  Jim Meyering  <meyering@lucent.com>
29347
29348         * lib/tempname.c: Don't declare getenv, thus reverting the change of
29349         2001-11-18.  It's no longer necessary, now that stdlib.h is always
29350         included.
29351
29352         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
29353         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
29354
29355 2001-11-30  Akim Demaille  <akim@epita.fr>
29356
29357         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
29358         before being defined.
29359
29360 2001-11-27  Paul Eggert  <eggert@twinsun.com>
29361
29362         * lib/quotearg.h (quotearg_n, quotearg_n_style):
29363         First arg is int, not unsigned.
29364         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
29365         (SIZE_MAX, UINT_MAX): New macros.
29366         (quotearg_n_options): Abort if N is negative.
29367         Avoid overflow check on hosts where size_t is 64 bits and int
29368         is 32 bits, as overflow is impossible there.
29369         Fix off-by-one typo that caused unnecessary reallocation.
29370
29371 2001-11-27  Jim Meyering  <meyering@lucent.com>
29372
29373         * lib/tempname.c: Merge with version from libc.
29374         * lib/regex.c: Likewise.
29375
29376         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
29377         systems for which STDC_HEADERS is 0, it was not included, resulting in
29378         a warning about an integer-to-pointer conversion problem with getenv.
29379         Reported by Volker Borchert.
29380
29381 2001-11-26  Jim Meyering  <meyering@lucent.com>
29382
29383         * lib/gtod.h: Remove file.
29384         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
29385         * lib/gettimeofday.c: Don't include gtod.h.
29386         (GTOD_init): Remove function.
29387         (rpl_gettimeofday): Do its job here instead, rather than aborting.
29388         Suggestion from Volker Borchert.
29389
29390 2001-11-23  Jim Meyering  <meyering@lucent.com>
29391
29392         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
29393         it.
29394         * lib/hash.c (struct hash_table): Define it here instead.
29395
29396 2001-11-22  Jim Meyering  <meyering@lucent.com>
29397
29398         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
29399
29400 2001-11-20  Jim Meyering  <meyering@lucent.com>
29401
29402         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
29403         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
29404
29405 2001-11-19  Jim Meyering  <meyering@lucent.com>
29406
29407         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
29408         directory.  Use "conftestXXXXXX" as the template.
29409         Suggestion from Paul Eggert.
29410
29411         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
29412         immediately, so the test doesn't mistakenly hit the max-open-files
29413         limit.
29414
29415 2001-11-18  Paul Eggert  <eggert@twinsun.com>
29416
29417         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
29418         (TEMPORARIES): New macro.
29419         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
29420         removes an artificial limitation (e.g. HP-UX 10.20, where
29421         TMP_MAX is 17576).
29422
29423 2001-11-18  Jim Meyering  <meyering@lucent.com>
29424
29425         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
29426
29427 2001-11-18  Jim Meyering  <meyering@lucent.com>
29428
29429         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
29430         on SunOS 4.
29431
29432         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
29433         files will be created before anything else.
29434
29435 2001-11-17  Paul Eggert  <eggert@twinsun.com>
29436
29437         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
29438         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
29439
29440 2001-11-17  Jim Meyering  <meyering@lucent.com>
29441
29442         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
29443         Prompted by a report from Bob Proulx.
29444
29445         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
29446         Instead, require UTILS_FUNC_MKSTEMP.
29447
29448 2001-11-17  Jim Meyering  <meyering@lucent.com>
29449
29450         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
29451         Now, that's done as part of AC_FUNC_STRTOD.
29452
29453 2001-11-17  Jim Meyering  <meyering@lucent.com>
29454
29455         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
29456         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
29457         rather than group writable.  Patch by Juan F. Codagnone.
29458
29459         * lib/readtokens.c: Remove explicit declarations of xmalloc and
29460         xrealloc, Instead, include "xalloc.h".
29461
29462         * lib/mountlist.c: Include unlocked-io.h after all system headers.
29463         Remove explicit declarations of xmalloc, xrealloc,
29464         and xstrdup.  Instead, include "xalloc.h".
29465
29466         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
29467         unlocked-io.h.
29468         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
29469         Likewise.
29470         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
29471
29472         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
29473         Reported by Padraig Brady.
29474
29475         * lib/mkstemp.c: #undef mkstemp.
29476         Include config.h.
29477         (rpl_mkstemp): Rename from mkstemp.
29478         Protoize.
29479
29480 2001-11-16  Jim Meyering  <meyering@lucent.com>
29481
29482         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
29483         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
29484         determine the amount of total physical memory, use pstat_getstatic.
29485         HPUX-11 doesn't define _SC_PHYS_PAGES.
29486         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
29487         If sysconf couldn't be used to determine the amount of available
29488         physical memory, use both pstat_getstatic and pstat_getdynamic.
29489         Based on a patch from Bob Proulx.
29490
29491 2001-11-10  Jim Meyering  <meyering@lucent.com>
29492
29493         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
29494         (jm_PREREQ): Use it.
29495
29496 2001-11-09  Jim Meyering  <meyering@lucent.com>
29497
29498         * m4/jm-macros.m4: Require autoconf-2.52f.
29499         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
29500         Use these AC_-prefixed names, not the AM_-prefixed ones.
29501
29502         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
29503
29504 2001-11-05  Jim Meyering  <meyering@lucent.com>
29505
29506         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
29507
29508 2001-11-04  Jim Meyering  <meyering@lucent.com>
29509
29510         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
29511         $DEFS.
29512
29513 2001-11-03  Jim Meyering  <meyering@lucent.com>
29514
29515         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
29516         of AC_DEFUN.
29517
29518         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
29519         know the name of the variable in the macro definition.
29520
29521 2001-11-03  Jim Meyering  <meyering@lucent.com>
29522
29523         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
29524         in argmatch_to_argument call.
29525
29526         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
29527         argument.
29528
29529         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
29530         e.g., a fault due to an attempt to free a NULL pointer.
29531
29532 2001-11-01  Jim Meyering  <meyering@lucent.com>
29533
29534         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
29535         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
29536
29537 2001-11-01  Jim Meyering  <meyering@lucent.com>
29538
29539         * lib/dirfd.c, lib/dirfd.h: New files.
29540         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
29541
29542         * lib/hash.c (hash_print) [TESTING]: Clean up.
29543
29544 2001-10-22  Paul Eggert  <eggert@twinsun.com>
29545
29546         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
29547         to avoid a warning if -Wall.
29548
29549 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
29550
29551         * README: New file
29552         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
29553         (per RMS's instructions, this is now the canonical source)
29554         * lgpl/, gpl/: New directories.
29555
29556 2001-10-21  Paul Eggert  <eggert@twinsun.com>
29557
29558         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
29559
29560 2001-10-21  Jim Meyering  <meyering@lucent.com>
29561
29562         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
29563         this code would end up calling gettext even in packages built
29564         with --disable-nls.
29565         * lib/getopt.c (_): Likewise.
29566         * lib/regex.c (_): Likewise.
29567
29568 2001-10-20  Paul Eggert  <eggert@twinsun.com>
29569
29570         * m4/error.m4 (jm_PREREQ_ERROR):
29571         Do not invoke AC_CHECK_FUNCS with strerror_r, as
29572         AC_FUNC_STRERROR_R does that.
29573         Check for strerror declaration.
29574
29575         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
29576         are supposed to have them these days.
29577         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
29578         Merge changes from latest Autoconf CVS.
29579         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
29580         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
29581         POSIX decided to standardize on the int flavor of strerror_r.
29582
29583 2001-10-20  Paul Eggert  <eggert@twinsun.com>
29584
29585         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
29586         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
29587         Use strerror_r that is only a macro, even if it is not a function.
29588         (strerror): Check for HAVE_DECL_STRERROR before declaring.
29589         (private_strerror): Use prototypes, not old-style function definition.
29590         (print_errno_message): New function.
29591         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
29592         char*-flavored one.
29593         (error_tail, error, error_at_line): Use it.
29594
29595 2001-10-11  Jim Meyering  <meyering@lucent.com>
29596
29597         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
29598         and quote_n (1, ... to avoid clobbering a buffer.
29599
29600 2001-10-05  Jim Meyering  <meyering@lucent.com>
29601
29602         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
29603         hash-pjw.h.
29604         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
29605         * lib/hash-pjw.h: New file.
29606
29607 2001-09-30  Jim Meyering  <meyering@lucent.com>
29608
29609         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
29610         `struct fsstat' has the `f_fstypename' member.
29611         Use that to define FS_TYPE, which is now used to make
29612         the getfsstat link test tighter.
29613
29614 2001-09-30  Jim Meyering  <meyering@lucent.com>
29615
29616         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
29617         Include <sys/ucred.h>, for Apple Darwin.
29618         Include sys/mount.h and sys/fs_types.h only if available.
29619         (FS_TYPE): Define.
29620         (read_filesystem_list): Use FS_TYPE.
29621
29622 2001-09-29  Paul Eggert  <eggert@twinsun.com>
29623
29624         * lib/exclude.c (excluded_filename): 0 -> false, since it's
29625         a boolean context.
29626
29627 2001-09-29  Jim Meyering  <meyering@lucent.com>
29628
29629         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
29630         [one-argument getmntent function]): Include stdio.h before mntent.h.
29631         SunOS 4.1.x needs it for the declaration of `FILE'.
29632         Patch by Volker Borchert.
29633
29634         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
29635         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
29636         sys/fs_types.h, and make the link-test for getfsstat guard #include
29637         directives with appropriate #if HAVE_*_H tests so that we can
29638         detect getfsstat on Apple Darwin1.3.7 systems.
29639         Reported by Nelson Beebe.
29640         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
29641
29642 2001-09-28  Paul Eggert  <eggert@twinsun.com>
29643
29644         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
29645         #defines strtoimax.  Also treat the other strto* functions
29646         like strtoimax.
29647
29648         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
29649         Check for strtoul and strtoumax,
29650         as those declarations are made even in the signed case.
29651         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
29652         Likewise, for strtol and strtoimax.
29653
29654 2001-09-28  Paul Eggert  <eggert@twinsun.com>
29655
29656         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
29657         #defines strtoimax.  Also treat the other strto* functions
29658         like strtoimax.
29659
29660         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
29661         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
29662         (strtoimax, strtoumax): Do not declare if already defined as a macro.
29663
29664 2001-09-26  Jim Meyering  <meyering@lucent.com>
29665
29666         Most macros in unlocked-io.h had the wrong number of arguments.
29667         * lib/gen-uio: New script.
29668         (USE_UNLOCKED_IO): Define to 1 if not already defined.
29669         * lib/unlocked-io.hin: Remove file.
29670         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
29671         rather than trying to embed it here.
29672         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
29673         Reported by Padraig Brady.
29674
29675 2001-09-25  Volker Borchert  <bt@teknon.de>
29676
29677         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
29678         `result'.
29679
29680 2001-09-24  Jim Meyering  <meyering@lucent.com>
29681
29682         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
29683
29684 2001-09-23  Jim Meyering  <meyering@lucent.com>
29685
29686         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
29687         instead of the mere test for existence of mntent.h.  The latter
29688         would get a false-positive on AIX 3.4 systems.
29689         In the outer getmntent if-block, don't die if neither of the getmntent
29690         tests succeeds.  Instead, just fall through and continue with the
29691         remaining tests.
29692
29693 2001-09-23  Jim Meyering  <meyering@lucent.com>
29694
29695         * lib/mountlist.c: Remove useless parentheses in #if directives.
29696         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
29697         the deprecated MOUNTED symbol is no longer defined in mntent.h.
29698
29699 2001-09-22  Jim Meyering  <meyering@lucent.com>
29700
29701         * m4/gettext.m4: New file.  From gettext.
29702         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
29703         * m4/progtest.m4: Likewise
29704         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
29705         * m4/glibc21.m4: Likewise.
29706
29707         * m4/libintl.m4: Remove.  No longer used.
29708
29709 2001-09-22  Jim Meyering  <meyering@lucent.com>
29710
29711         * lib/localcharset.c: Update from latest gettext.
29712         * lib/config.charset: Likewise.
29713
29714 2001-09-20  Jim Meyering  <meyering@lucent.com>
29715
29716         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
29717         strtoimax.
29718         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
29719         strtoumax.
29720
29721 2001-09-20  Jim Meyering  <meyering@lucent.com>
29722
29723         * lib/xstrtol.c (strtoimax): Guard declaration with
29724         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
29725         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
29726         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
29727         (strtoumax): Likewise, for completeness (it wasn't necessary).
29728
29729 2001-09-17  Paul Eggert  <eggert@twinsun.com>
29730
29731         * lib/strtoimax.c (HAVE_LONG_LONG):
29732         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
29733         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
29734         to work around bug in IBM C compiler.
29735
29736 2001-09-17  Jim Meyering  <meyering@lucent.com>
29737
29738         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
29739         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
29740         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
29741         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
29742         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
29743         whenever the right hand side need not be expanded by the shell.
29744
29745 2001-09-16  Paul Eggert  <eggert@twinsun.com>
29746
29747         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
29748         library.  It's not correct, as some older glibcs are buggy.
29749         fnmatch wasn't fixed until glibc 2.2.
29750
29751         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
29752         special shell magic here.
29753
29754 2001-09-16  Jim Meyering  <meyering@lucent.com>
29755
29756         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
29757         * m4/jm-macros.m4: Require it.
29758
29759 2001-09-16  Jim Meyering  <meyering@lucent.com>
29760
29761         * lib/mkdir.c: New file.
29762
29763 2001-09-15  Jim Meyering  <meyering@lucent.com>
29764
29765         * m4/jm-macros.m4: Check for help2man.
29766
29767 2001-09-11  Jim Meyering  <meyering@lucent.com>
29768
29769         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
29770         The body, by Paul Eggert, was moved here from configure.in.
29771         * m4/jm-macros.m4: Require UTILS_HOST_OS.
29772
29773 2001-09-04  Paul Eggert  <eggert@twinsun.com>
29774
29775         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
29776         (jm_PREREQ): Use it.
29777
29778 2001-09-04  Paul Eggert  <eggert@twinsun.com>
29779
29780         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
29781         Use ssize_t, not int, to store result of readlink.
29782         Check for ssize_t overflow as well as size_t overflow,
29783         as POSIX says the result of readlink is implementation-defined
29784         when ssize_t overflows.
29785         Remove unnecessary cast to char*.
29786         Use free+malloc instead of realloc, as the storage doesn't need
29787         to be preserved and it's clearer and can be more efficient that way.
29788         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
29789         * lib/xreadlink.h (xreadlink): Update prototype.
29790
29791 2001-09-04  Paul Eggert  <eggert@twinsun.com>
29792
29793         * lib/xgetcwd.c: Revert some of the previous change; intead,
29794         fix the HAVE_GETCWD_NULL code to behave more like the
29795         !HAVE_GETCWD_NULL code used to.
29796
29797         Include "xalloc.h".
29798         (xgetcwd): Do not return NULL when memory is exhausted; instead,
29799         invoke xalloc_die.
29800
29801 2001-09-03  Paul Eggert  <eggert@twinsun.com>
29802
29803         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
29804         sys/param.h, as pathmax.h includes them.
29805
29806 2001-09-03  Paul Eggert  <eggert@twinsun.com>
29807
29808         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
29809         (jm_PREREQ_XGETCWD): New macro.
29810
29811         * m4/getcwd.m4: New file.
29812
29813 2001-09-03  Paul Eggert  <eggert@twinsun.com>
29814
29815         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
29816         like the HAVE_GETCWD_NULL code.
29817         Include pathmax.h if not HAVE_GETCWD.
29818         Do not include xalloc.h.
29819         (INITIAL_BUFFER_SIZE): New symbol.
29820         Do not use xmalloc / xrealloc, since the caller is responsible for
29821         handling errors.  Preserve errno around `free' during failure.
29822         Do not overrun buffer when using getwd.
29823
29824 2001-09-03  Paul Eggert  <eggert@twinsun.com>
29825
29826         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
29827         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
29828         getcwd (NULL, 0).
29829
29830 2001-09-03  Paul Eggert  <eggert@twinsun.com>
29831
29832         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
29833         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
29834         spotted by Jim Meyering.
29835
29836 2001-09-03  Jim Meyering  <meyering@lucent.com>
29837
29838         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
29839         failure.
29840
29841 2001-09-02  Jim Meyering  <meyering@lucent.com>
29842
29843         * lib/error.c: Update from GNU libc.
29844
29845 2001-09-01  Jim Meyering  <meyering@lucent.com>
29846
29847         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
29848         Used by df.
29849
29850 2001-09-01  Jim Meyering  <meyering@lucent.com>
29851
29852         * lib/xreadlink.c: New file.
29853         * lib/xreadlink.h: New file.
29854         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
29855         xreadlink.h.
29856
29857         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
29858         doesn't conflict with sparc Solaris 7's definition in
29859         /usr/include/sys/int_types.h.
29860
29861         * lib/exclude.c: Use `""', not `<>' to #include non-system header
29862         files.
29863         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
29864         and strncasecmp as r-values.  Unixware didn't have declarations.
29865
29866 2001-08-31  Paul Eggert  <eggert@twinsun.com>
29867
29868         * lib/xstrtol.h: Add copyright notice.
29869         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
29870         LONGINT_INVALID_SUFFIX_CHAR.
29871
29872 2001-08-31  Paul Eggert  <eggert@twinsun.com>
29873
29874         * lib/xstrtol.c (strtoimax): New decl.
29875
29876 2001-08-31  Paul Eggert  <eggert@twinsun.com>
29877
29878         * lib/xgetcwd.c: Don't include pathmax.h.
29879         Include stdlib.h and unistd.h if available.
29880         Include xalloc.h.
29881         (xmalloc, xstrdup, free): Remove decls.
29882         (xgetcwd): Don't assume sizes fit in unsigned.
29883         Check for overflow when computing sizes.
29884         Simplify reallocation code.
29885
29886 2001-08-31  Paul Eggert  <eggert@twinsun.com>
29887
29888         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
29889         a directory's st_size can have an arbitrary value, so the old
29890         usage could waste an arbitrary amount of memory.  All uses
29891         changed.
29892         * lib/savedir.h: Update prototype.
29893
29894 2001-08-31  Paul Eggert  <eggert@twinsun.com>
29895
29896         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
29897
29898         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
29899         old strtoimax.c.
29900
29901         Also, make the following further changes to make this file's
29902         configuration more similar to that of strtol.c:
29903         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
29904         (strtoumax, uintmax_t, strtoull, strtol): Remove.
29905         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
29906         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
29907         changed to signed values.
29908
29909         And make the following changes as well:
29910         Fix copyright notice, as 1999 was missing.
29911         (verify): New macro.
29912         (strtoimax): Check sizes at compile-time, not run-time.
29913         Prefer strtol to strtoll if both work.
29914         (main): Remove; it was not that useful and was a pain to maintain.
29915
29916         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
29917
29918 2001-08-31  Jim Meyering  <meyering@lucent.com>
29919
29920         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
29921         Use an initial, malloc'd, buffer of length 128 rather than
29922         a statically allocated one of length 1024.
29923
29924 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29925
29926         Simplify code, partly by assuming autoconf 2.52 semantics.
29927
29928         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
29929
29930         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
29931         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
29932         All uses removed.
29933         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
29934         Move AC_REQUIRE to next-to-top level, to avoid confusion.
29935         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
29936         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
29937         jm_AC_HEADER_INTTYPES_H.
29938         * m4/jm-macros.m4 (jm_MACROS): Likewise.
29939
29940         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
29941
29942         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
29943         Quote first arg of AC_DEFUN.
29944         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
29945         since they are needed to parse the include file even if we need
29946         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
29947         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
29948         but with opposite signedness.
29949
29950 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29951
29952         Merge 'exclude' changes from tar 1.13.22.
29953         This fixes one or two unlikely storage allocation overflow bugs,
29954         but doesn't change user-visible behavior otherwise.
29955
29956 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29957
29958         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
29959         (jm_PREREQ_EXCLUDE): New macro.
29960
29961 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29962
29963         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
29964         tm to be declared.
29965
29966 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29967
29968         * lib/hash.c: Remove '2001' from copyright notice.
29969
29970 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29971
29972         * lib/full-write.h: New file.
29973         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
29974         * lib/full-write.c: Correct credits, as cccp.c no longer
29975         exists and anyway it was so heavily changed from the old cccp
29976         code as to be unrecognizable.  Include full-write.h.
29977         (full_write) Return size_t, with short writes meaning failure.
29978         All callers changed.  This fixes a bug with large buffers
29979         on 64-bit hosts.
29980         * lib/utime.c: Include full-write.h.
29981
29982 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29983
29984         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
29985         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
29986         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
29987         Include if available.
29988         (<xalloc.h>): Include
29989         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
29990         (verify): New macro.  Use it to verify that EXCLUDE macros do not
29991         collide with FNM macros.
29992         (struct patopts): New struct.
29993         (struct exclude): Use it, as exclude patterns now come with options.
29994         (new_exclude): Support above changes.
29995         (new_exclude, add_exclude_file):
29996         Initial size must now be a power of two to simplify overflow checking.
29997         (free_exclude, fnmatch_no_wildcards): New function.
29998         (excluded_filename): No longer requires options arg, as the options
29999         are determined by add_exclude.  Now returns bool, not int.
30000         (excluded_filename, add_exclude):
30001         Add support for the fancy new exclusion options.
30002         (add_exclude, add_exclude_file): Now takes int options arg.
30003         Check for arithmetic overflow when computing sizes.
30004         (add_exclude_file): xrealloc might modify errno, so don't
30005         realloc until after errno might be used.
30006
30007         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
30008         New macros.
30009         (free_exclude): New decl.
30010         (add_exclude, add_exclude_file): Now takes int options arg.
30011         (excluded_filename): No longer requires options arg, as the options
30012         are determined by add_exclude.  Now returns bool, not int.
30013
30014 2001-08-30  Paul Eggert  <eggert@twinsun.com>
30015
30016         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
30017
30018 2001-08-27  Jim Meyering  <meyering@lucent.com>
30019
30020         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
30021
30022         * lib/version-etc.c (N_): Remove definition.
30023         Revert most of last change.
30024         Instead, simply don't mark the `Copyright...' string for translation.
30025         Based on advice from Paul Eggert.
30026
30027         * lib/strtoxmax.c: Tweak comment.
30028
30029 2001-08-26  Jim Meyering  <meyering@lucent.com>
30030
30031         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
30032
30033         * m4/xstrtoimax.m4: New file.
30034         * m4/xstrtoumax.m4: Add comments explaining why we
30035         AC_REPLACE_FUNCS(strtol).
30036
30037 2001-08-26  Jim Meyering  <meyering@lucent.com>
30038
30039         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
30040         of copyright with `%s' so translators don't get an untranslated
30041         message in 2002.
30042         (COPYRIGHT_YEAR): Define.
30043         (version_etc): Use fprintf rather than fputs.
30044         Suggestion from Ulrich Drepper.
30045
30046         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
30047
30048         * lib/strtoll.c: New file, from GNU libc.
30049         * lib/xstrtoimax.c: New file.
30050
30051         * lib/xstrtol.h: Add xstrtoimax.
30052         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
30053         * lib/strtoimax.c: New file.  Likewise, but first define
30054         STRTOUXMAX_SIGNED.
30055
30056         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
30057         ...
30058         * lib/strtoxmax.c: ... then renamed to this.
30059
30060 2001-08-18  Paul Eggert  <eggert@twinsun.com>
30061
30062         * m4/inttypes.m4: Add AC_PREREQ(2.13).
30063         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
30064         (jm_AC_TYPE_INTMAX_T): New macro.
30065         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
30066
30067         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
30068
30069         * m4/longlong.m4: Renamed from ulonglong.m4.
30070         * m4/inttypes.m4: Renamed from inttypes_h.m4.
30071         * m4/uintmax_t.m4: Removed.
30072
30073 2001-08-13  Paul Eggert  <eggert@twinsun.com>
30074
30075         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
30076         Port to Solaris 8, where 'sed' requires a space after the 'r'
30077         command, and where sh dislikes "$/".  Clean up the spacing a bit.
30078         Redirect output to $tmp just once.
30079
30080 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
30081
30082         * lib/addext.c (<errno.h>): Include.
30083         (errno): Declare if not defined.
30084         (addext): Work correctly when pathconf returns -1 and leaves
30085         errno alone because there is no limit.  Also, work even if
30086         pathconf returns a value greater than SIZE_MAX.
30087
30088 2001-08-12  Jim Meyering  <meyering@lucent.com>
30089
30090         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
30091         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
30092         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
30093         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
30094         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
30095         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
30096         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
30097         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
30098         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
30099         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
30100         utime.m4, utimes.m4, xstrtoumax.m4:
30101         Quote the first argument in each use of AC_DEFUN.
30102
30103 2001-08-12  Jim Meyering  <meyering@lucent.com>
30104
30105         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
30106         Simply `return getcwd (NULL, 0);'.
30107         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
30108         Use 1300 as initial value for length, not PATH_MAX.
30109
30110         * lib/pathmax.h: Clean up cpp syntax.
30111
30112 2001-08-12  Jim Meyering  <meyering@lucent.com>
30113
30114         * lib/gettimeofday.c: New file.
30115         * lib/gtod.h: New file.
30116         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
30117
30118 2001-08-05  Jim Meyering  <meyering@lucent.com>
30119
30120         * m4/jm-macros.m4: Require autoconf-2.52.
30121
30122 2001-08-04  Jim Meyering  <meyering@lucent.com>
30123
30124         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
30125         stmt, to get in sync with glibc.
30126
30127 2001-08-03  Paul Eggert  <eggert@twinsun.com>
30128
30129         The following changes are from gettext 0.10.39 as maintained by
30130         Bruno Haible.
30131
30132         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
30133         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
30134         with inverted sense.  All uses changed.
30135
30136         * lib/mbswidth.c: Don't include <limits.h>.
30137         Include <stdlib.h> and <string.h> unconditionally.
30138         (iswcntrl, mbsinit, ISCNTRL): New macros.
30139         (mbsnwidth): Use K&R style function declarations.
30140         Don't bother checking for MB_LEN_MAX == 1, since the compiler
30141         can optimize it when MB_CUR_MAX == 1.
30142         The width of control characters is zero, not 1.
30143
30144 2001-08-03  Paul Eggert  <eggert@twinsun.com>
30145
30146         The following changes are from gettext 0.10.39 as maintained by
30147         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
30148
30149         * m4/codeset.m4: Upgrade to serial AM1.
30150         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
30151         all uses changed.  Quote first arg of AC_DEFUN.
30152         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
30153
30154         * m4/iconv.m4: Upgrade to serial AM2.
30155         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
30156         Add --with-libconv-prefix.
30157         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
30158         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
30159         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
30160         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
30161         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
30162
30163         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
30164         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
30165         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
30166         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
30167         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
30168         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
30169         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
30170         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
30171         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
30172
30173         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
30174         string.h any more.
30175
30176         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
30177         not the default value.
30178
30179         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
30180         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
30181         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
30182         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
30183         Also check for iswcntrl, used for wcwidth fallback.
30184         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
30185         to Autoconf 2.13.
30186
30187 2001-08-03  Jim Meyering  <meyering@lucent.com>
30188
30189         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
30190         as it was in the original.  Reported by Paul Eggert.
30191
30192 2001-07-16  Jim Meyering  <meyering@lucent.com>
30193
30194         * m4/gettimeofday.m4: New file.
30195         Prompted by a report from Bernhard Baehr.
30196
30197 2001-07-15  Jim Meyering  <meyering@lucent.com>
30198
30199         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
30200         stuff. Now it's in ../Makefile.cfg.
30201
30202 2001-07-15  Jim Meyering  <meyering@lucent.com>
30203
30204         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
30205         (BUILT_SOURCES): Add unlocked-io.h.
30206         (io_functions): Define.
30207         (unlocked-io.h): New rule.
30208         (DISTCLEANFILES): Add unlocked-io.h.
30209         (all-local): Depend on unlocked-io.h, to ensure it is created.
30210
30211         * lib/unlocked-io.hin: New file
30212
30213         * lib/regex.c: Update from glibc.
30214
30215 2001-07-05  Jim Meyering  <meyering@lucent.com>
30216
30217         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
30218         recommendation.
30219         (libfetish_a_SOURCES): Put all .h files here instead.
30220         Remove a thus-exposed (better checks in automake) duplicate and
30221         two unnecessary .h files.
30222
30223 2001-07-04  Jim Meyering  <meyering@lucent.com>
30224
30225         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
30226         that generates jm-glibc-io.m4 so that it doesn't trigger any make
30227         distcheck failure.
30228
30229 2001-07-02  Jim Meyering  <meyering@lucent.com>
30230
30231         The following changes were prompted by suggestions from Bruno Haible.
30232
30233         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
30234         is now generated.
30235         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
30236         definition of EXTRA_DIST.
30237         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
30238         ensure that the generated file is created/updated whenever the list
30239         of $(unlocked_functions) is changed.
30240         (jm-glibc-io.m4): New rule.
30241         (unlocked-io.h): New rule -- currently unused.
30242
30243 2001-06-24  Jim Meyering  <meyering@lucent.com>
30244
30245         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
30246         unmatched right bracket, rather than kludging it with an extra,
30247         falsely-matching quote in a comment.  Patch by Akim Demaille.
30248
30249 2001-06-11  Jim Meyering  <meyering@lucent.com>
30250
30251         * lib/regex.c: Update from GNU libc.
30252
30253 2001-05-27  Jim Meyering  <meyering@lucent.com>
30254
30255         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
30256         Check for ut_type in struct utmp.
30257
30258 2001-05-27  Jim Meyering  <meyering@lucent.com>
30259
30260         * lib/readutmp.h (UT_TYPE): Define.
30261
30262 2001-05-24  Jim Meyering  <meyering@lucent.com>
30263
30264         * lib/argmatch.c: Include "quote.h".
30265         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
30266         quote function.  Reported by Göran Uddeborg.
30267
30268 2001-05-22  Jim Meyering  <meyering@lucent.com>
30269
30270         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
30271         now that we use the package-supplied version unconditionally.
30272         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
30273
30274 2001-05-21  Jim Meyering  <meyering@lucent.com>
30275
30276         * m4/regex.m4: Change a couple backticks to single quotes to avoid
30277         shell syntax errors.
30278
30279 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
30280
30281         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
30282
30283 2001-05-20  Paul Eggert  <eggert@twinsun.com>
30284
30285         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
30286         Don't bother to check library strftime, since
30287         we'll be using our own my_strftime function anyway.
30288         Define my_strftime instead of strftime.
30289
30290 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
30291
30292         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
30293         which is not yet declared.
30294
30295 2001-05-15  Jim Meyering  <meyering@lucent.com>
30296
30297         * m4/regex.m4: Use proper quoting so brackets appear in the test
30298         program.
30299         Reported by, and with help from, Bruno Haible.
30300
30301 2001-05-13  Jim Meyering  <meyering@lucent.com>
30302
30303         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
30304         undefined.
30305
30306 2001-05-11  Paul Eggert  <eggert@twinsun.com>
30307
30308         dirname code cleanup.  base_name now behaves more compatibly
30309         with POSIX basename when given file names that have trailing
30310         slashes, and similarly for dir_name.  Add new primitives
30311         base_len and dir_len.  Put the directory-name-related decls
30312         into dirname.h.
30313
30314         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
30315         * lib/backupfile.c (base_name): Likewise.
30316         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
30317         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
30318         * lib/makepath.c (strip_trailing_slashes): Likewise.
30319         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
30320         ISSLASH): Likewise.
30321         * lib/rename.c (strip_trailing_slashes): Likewise.
30322         * lib/same.c (base_name): Likewise.
30323         * lib/stripslash.c (ISSLASH): Likewise.
30324
30325         * lib/addext.c: Include <dirname.h> after size_t is defined.
30326         * lib/backupfile.c: Likewise.
30327
30328         * lib/addext.c (addext): Use base_len to trim redundant
30329         trailing slashes instead of doing it ourselves.
30330         But do not trim the last slash if it is not redundant.
30331
30332         * lib/backupfile.c (find_backup_file_name,
30333         max_backup_version): Use base_len instead of rolling it ourselves.
30334         Handle the case of "" and (on DOS) "C:" correctly.
30335
30336         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
30337         needed. Include <string.h>, <dirname.h>.
30338         (base_name): Allow file names ending in slashes, other than names
30339         that are all slashes.  In this case, return the basename followed
30340         by the slashes.  This is more general, and can be used in places
30341         where the original base_name purposely had an assertion failure.
30342         (base_len): New function.
30343
30344         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
30345         Do not include <assert.h>; no longer needed.
30346         Include xalloc.h.
30347         (memrchr): Remove decl.
30348         (dir_name_r): Remove.
30349         (dir_len): Renamed from dirlen.  All callers changed.
30350         Rewrite in terms of base_name, for simplicity and consistency.
30351         (dir_name): Never return NULL.  All callers changed.
30352         Do not include <stdlib.h> in test program; no longer needed.
30353         return 0; is fine for test program.
30354
30355         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
30356         New macros.
30357         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
30358
30359         * lib/path-concat.c (path_concat): Use base_len to compute
30360         base length, not strlen; this means we cannot rely on memcpy
30361         to null-terminate.
30362
30363         * lib/same.c (STREQ): Remove.
30364         (same_name): Handle the case where the basename ends in trailing '/'.
30365
30366         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
30367         a slash was stripped.  Do not strip the last slash after a
30368         file system prefix.
30369
30370 2001-05-11  Paul Eggert  <eggert@twinsun.com>
30371
30372         * lib/Makefile.am (libfetish_a_SOURCES):
30373         Add strftime.c, since we now compile it on all hosts.
30374
30375         * lib/strftime.c (my_strftime):
30376         Define to nstrftime if emacs, but only if my_strftime is not defined.
30377         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
30378         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
30379         Add one more extra argument: a nanoseconds value.
30380         All uses changed.
30381         (ns): New macro.
30382         (my_strftime function): Add %N format.
30383         (emacs_strftimeu): Renamed from emacs_strftime,
30384         with extra ut argument.
30385
30386 2001-05-09  Paul Eggert  <eggert@twinsun.com>
30387
30388         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
30389
30390 2001-04-21  Jim Meyering  <meyering@lucent.com>
30391
30392         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
30393         doesn't interfere.
30394
30395 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
30396
30397         * m4/ftruncate.m4: Check for chsize.
30398         Link with ftruncate.o unconditionally if ftruncate is missing.
30399         This was required when cross-compiling to i586-mingw32msvc.
30400
30401 2001-04-08  Jim Meyering  <meyering@lucent.com>
30402
30403         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
30404         recomputed; that's necessary when the offset spans a DST transition.
30405         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
30406
30407 2001-04-02  Jim Meyering  <meyering@lucent.com>
30408
30409         * lib/regex.h, regex.c: Update from GNU libc.
30410
30411 2001-03-24  Jim Meyering  <meyering@lucent.com>
30412
30413         * m4/jm-macros.m4: Require autoconf-2.49d.
30414
30415 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
30416
30417         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
30418
30419 2001-03-19  Paul Eggert  <eggert@twinsun.com>
30420
30421         * lib/version-etc.c (version_etc_copyright): Update to 2001.
30422
30423 2001-03-17  Jim Meyering  <meyering@lucent.com>
30424
30425         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
30426         now that the version in autoconf is equivalent.
30427         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
30428
30429         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
30430         Suggestion from Akim Demaille.
30431
30432         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
30433         (jm_PREREQ_TEMPNAME): New function.
30434
30435 2001-03-16  Paul Eggert  <eggert@twinsun.com>
30436
30437         * lib/tempname.c (uint64_t): Define to uintmax_t if
30438         not defined, and if UINT64_MAX is not defined.
30439         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
30440         Reported by John David Anglin.
30441
30442 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
30443
30444         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
30445         resolve alias if codeset is empty.
30446         * lib/config.charset (BeOS): Use wildcard syntax.
30447
30448 2001-03-13  Jim Meyering  <meyering@lucent.com>
30449
30450         * lib/path-concat.c (path_concat)
30451         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
30452         concatenating e.g., `C:' and `foo'.
30453         From Bruno Haible.
30454
30455 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
30456
30457         * lib/localcharset.c (locale_charset): Don't use
30458         setlocale(LC_CTYPE,NULL). Don't return NULL.
30459         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
30460
30461 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
30462
30463         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
30464         support for DOS/DJGPP.
30465
30466 2001-03-01  Paul Eggert  <eggert@twinsun.com>
30467
30468         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
30469         lacks mkstemp.  Compile our own tempname.c if we compile our own
30470         mkstemp.c, as mkstemp relies on tempname.
30471
30472 2001-03-01  Jim Meyering  <meyering@lucent.com>
30473
30474         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
30475         AH_VERBATIM really does output its argument verbatim.
30476
30477 2001-02-28  Paul Eggert  <eggert@twinsun.com>
30478
30479         * lib/Makefile.am (libfetish_a_SOURCES):
30480         Add dup-safer.c, fopen-safer.c.
30481         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
30482
30483         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
30484         * lib/unistd-safer.h: New files.
30485
30486 2001-02-25  Paul Eggert  <eggert@twinsun.com>
30487
30488         The mkstemp replacement is taken from glibc 2.2.2, with some
30489         portability fixes for use outside glibc, as follows:
30490
30491         * lib/tempname.c (struct_stat64): New macro.
30492         (direxists, __gen_tempname): Use it.
30493         This avoids a portability problem with Solaris 8.
30494
30495         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
30496         (<stddef.h>, <stdint.h>, <string.h>):
30497         Include only if STDC_HEADERS || _LIBC.
30498         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
30499         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
30500         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
30501         (__set_errno): Define this macro if <errno.h> doesn't.
30502         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
30503         Define these macros if <stdio.h> doesn't.
30504         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
30505         Define these macros if <sys/stat.h>
30506         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
30507         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
30508         __xstat64): Define if not _LIBC.
30509         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
30510         (__gen_tempname): Invoke gettimeofday only if
30511         HAVE_GETTIMEOFDAY || _LIBC;
30512         otherwise, fall back on plain "time".
30513         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
30514
30515         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
30516
30517         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
30518
30519 2001-02-18  Paul Eggert  <eggert@twinsun.com>
30520
30521         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
30522
30523 2001-02-17  Paul Eggert  <eggert@twinsun.com>
30524
30525         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
30526         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
30527         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
30528         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
30529
30530 2001-02-17  Paul Eggert  <eggert@twinsun.com>
30531
30532         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
30533         Remove workaround macros for hosts that have mbrtowc but not
30534         mbstate_t, as we now insist on proper declarations for both
30535         before using mbrtowc.
30536
30537 2001-02-17  Jim Meyering  <meyering@lucent.com>
30538
30539         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
30540         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
30541         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
30542         UnixWare 7.1.1.
30543
30544         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
30545         rather than AC_CACHE_VAL.
30546
30547 2001-02-17  Jim Meyering  <meyering@lucent.com>
30548
30549         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
30550         around included file name.
30551
30552         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
30553
30554         * lib/strftime.c: Update from GNU libc (the only changes were to
30555         comments).
30556
30557 2001-02-17  Jim Meyering  <meyering@lucent.com>
30558
30559         * lib/regex.c: Update from libc.
30560
30561 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
30562
30563         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
30564         clash.
30565
30566 2001-02-16  Paul Eggert  <eggert@twinsun.com>
30567
30568         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
30569         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
30570         Reported by Mark Hounschell via Paul Eggert.
30571
30572 2001-02-07  Jim Meyering  <meyering@lucent.com>
30573
30574         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
30575
30576 2001-02-05  Jim Meyering  <meyering@lucent.com>
30577
30578         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
30579         it includes the patch required for `large file' support with at least
30580         HP-UX's 10.20 /bin/cc.
30581
30582 2001-02-03  Jim Meyering  <meyering@lucent.com>
30583
30584         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
30585         AS_IF, now that it works once again (mysteriously).
30586         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
30587
30588 2001-01-30  Jim Meyering  <meyering@lucent.com>
30589
30590         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
30591         * m4/chown.m4: Rename conftestchown to conftest.chown.
30592         * m4/rename.m4: s/conftestdir/conftest.d1/ and
30593         s/conftestdir2/conftest.d2/.
30594         * m4/utimes.m4: s/conftestdata/conftest.data/
30595         Inspired by Pavel Roskin's change in autoconf.
30596
30597 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
30598
30599         * lib/config.charset: Update for FreeBSD 4.2.
30600
30601 2001-01-27  Jim Meyering  <meyering@lucent.com>
30602
30603         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
30604         a use of AS_IF.
30605         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
30606
30607 2001-01-26  Jim Meyering  <meyering@lucent.com>
30608
30609         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
30610         quotearg.c includes it.
30611
30612 2001-01-26  Jim Meyering  <meyering@lucent.com>
30613
30614         * lib/quotearg.c: Include stddef.h.
30615         * lib/quote.c: Include stddef.h.
30616         Reported by Axel Kittenberger.
30617
30618         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
30619         line in double quotes so that it evokes a better diagnostic.
30620         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
30621         Reported by Axel Kittenberger.
30622
30623 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
30624
30625         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
30626         as if it was a `charset'.
30627
30628 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
30629
30630         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
30631         has const.
30632
30633 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
30634
30635         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
30636         to avoid a warning.  Add back 'const' to inptr.
30637
30638 2001-01-20  Jim Meyering  <meyering@lucent.com>
30639
30640         Be sure that headers are checked before used in code compiled
30641         for the type checks.
30642         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
30643         In place of that, invoke jm_CHECK_ALL_TYPES.
30644         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
30645         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
30646         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
30647         The check for ssize_t was mistakenly run before the test for unistd.h.
30648
30649         The configure-time check for stdbool.h was missing.
30650         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
30651         (jm_PREREQ_HASH): New function.
30652
30653 2001-01-17  Jim Meyering  <meyering@lucent.com>
30654
30655         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
30656         for autoconf-2.49c.
30657         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
30658
30659 2001-01-16  Jim Meyering  <meyering@lucent.com>
30660
30661         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
30662         From Bruno Haible.
30663
30664 2001-01-14  Jim Meyering  <meyering@lucent.com>
30665
30666         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
30667         foo and bar.  Create conftestdir/ in the script, not in the C code.
30668         Remove directories in the script, not in the C code.
30669         Remove conftestdir{,2} before trying to create the directory.
30670         Make the entire configure script fail if the mkdir fails.
30671
30672 2001-01-14  Jim Meyering  <meyering@lucent.com>
30673
30674         * lib/rename.c: New file.  From Volker Borchert.
30675         Include stdlib.h, string.h or strings.h, and xalloc.h.
30676         Use strip_trailing_slashes rather than open-coding it.
30677
30678 2001-01-03  Paul Eggert  <eggert@twinsun.com>
30679
30680         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
30681
30682 2001-01-03  Jim Meyering  <meyering@lucent.com>
30683
30684         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
30685         of local `inptr' to avoid warning with some system declarations of
30686         iconv.
30687
30688 2001-01-02  Volker Borchert  <bt@teknon.de>
30689
30690         * m4/rename.m4: New file.
30691         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
30692
30693 2001-01-01  Jim Meyering  <meyering@lucent.com>
30694
30695         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
30696         even on systems with utmpx.h.  It's necessary for the declaration of
30697         utmp's ut_user member.  Reported by Andreas Jaeger.
30698
30699         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
30700         available. They are required for the declarations of getgrgid and
30701         getpwuid resp.
30702         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
30703         Reported by Andreas Jaeger.
30704
30705 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
30706
30707         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
30708         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
30709         so `make install' also works in VPATH builds.
30710
30711 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
30712
30713         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
30714         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
30715         can be used in subdirectories.
30716
30717 2000-12-29  Paul Eggert  <eggert@twinsun.com>
30718
30719         * lib/modechange.c: Do not assume that mode_t uses the
30720         traditional octal encoding.  E.g. "chmod 1 FOO" should set
30721         the other-execute bit of FOO even if S_IXOTH != 1.
30722
30723         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
30724         WOTH, XOTH, ALLM): New macros.
30725         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
30726          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
30727         Use them.
30728         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
30729         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
30730         (mode_compile):
30731         No need to use uintmax_t; unsigned long is long enough.
30732         Don't bother to get suffix since we don't use it.
30733
30734 2000-12-26  Jim Meyering  <meyering@lucent.com>
30735
30736         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
30737         better with autoheader.
30738
30739 2000-12-24  Jim Meyering  <meyering@lucent.com>
30740
30741         * lib/hash.c (is_prime): Return explicit boolean values.
30742         (hash_get_first): Return NULL to appease Irix5.6's 89.
30743         Reported by Nelson Beebe.
30744
30745 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
30746
30747         * lib/localcharset.c (locale_charset): Add support for Win32.
30748
30749 2000-12-18  Paul Eggert  <eggert@twinsun.com>
30750
30751         * lib/physmem.h, lib/physmem.c: New files.
30752
30753         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
30754         (noinst_HEADERS): Add physmem.h.
30755
30756         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
30757         't' for compatibility with Solaris 8 sort.
30758
30759 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
30760
30761         * lib/config.charset: Add support for BeOS.
30762
30763 2000-12-17  Jim Meyering  <meyering@lucent.com>
30764
30765         * m4/dos.m4 (jm_AC_DOS): New file and macro.
30766         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
30767
30768 2000-12-16  Jim Meyering  <meyering@lucent.com>
30769
30770         This bug had a serious impact on chown: `chown N:M FILE' (for integer
30771         N and M) would have treated it like `chown N:N FILE'.
30772
30773         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
30774
30775 2000-12-16  Jim Meyering  <meyering@lucent.com>
30776
30777         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
30778         SHELLS_FILE to a file name that's useful on djgpp systems.
30779         Include stdlib.h.
30780         (ADDITIONAL_DEFAULT_SHELLS): Define.
30781         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
30782         Based mostly on a patch from Prashant TR.
30783
30784 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
30785
30786         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
30787         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
30788         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
30789
30790 2000-12-08  Andreas Schwab  <schwab@suse.de>
30791
30792         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
30793         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
30794
30795 2000-12-07  Jim Meyering  <meyering@lucent.com>
30796
30797         * lib/stripslash.c (ISSLASH): Define.
30798         (strip_trailing_slashes): Use ISSLASH rather than comparing against
30799         `/'.
30800         From Prashant TR.
30801
30802         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
30803         (dir_name_r): Declare this function as static.
30804         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
30805         manifest itself on a name containing a mix of slashes and
30806         backslashes.
30807         Make this function work with names starting with a DOS-style
30808         drive letter and colon prefix.
30809         (dir_name): Append `.' if necessary.
30810         Based mostly on patches from Prashant TR and Eli Zaretskii.
30811
30812         * lib/dirname.h (dir_name_r): Remove prototype.
30813
30814 2000-12-06  Paul Eggert  <eggert@twinsun.com>
30815
30816         * m4/off_t-format.m4: Remove this file.
30817         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
30818
30819 2000-12-06  Jim Meyering  <meyering@lucent.com>
30820
30821         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
30822         replacement strtoull, we may well need the replacement strtoul, too.
30823         Check for declarations of strtoul and strtoull.
30824         Check for strtol.  Mainly as a cue to cause automake to include
30825         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
30826         Check for limits.h -- strtol.c needs it.
30827
30828 2000-12-05  Jim Meyering  <meyering@lucent.com>
30829
30830         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
30831
30832 2000-12-04  Jim Meyering  <meyering@lucent.com>
30833
30834         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
30835         Also include memory.h, stdlib.h, unistd.h if appropriate.
30836         Reported by Andreas Jaeger (conflicting declaration of malloc).
30837
30838 2000-12-02  Jim Meyering  <meyering@lucent.com>
30839
30840         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
30841         * m4/jm-macros.m4 (jm_MACROS): require it.
30842
30843 2000-12-02  Jim Meyering  <meyering@lucent.com>
30844
30845         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
30846
30847 2000-12-01  Paul Eggert  <eggert@twinsun.com>
30848
30849         * lib/memrchr.c: Include <config.h> before any system include file.
30850
30851 2000-11-30  Jim Meyering  <meyering@lucent.com>
30852
30853         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
30854
30855 2000-11-30  Jim Meyering  <meyering@lucent.com>
30856
30857         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
30858
30859 2000-11-29  Paul Eggert  <eggert@twinsun.com>
30860
30861         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
30862
30863 2000-11-26  Jim Meyering  <meyering@lucent.com>
30864
30865         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
30866
30867 2000-11-22  Paul Eggert  <eggert@twinsun.com>
30868
30869         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
30870         size of (size_t) -1; it's not portable.
30871
30872 2000-11-17  Jim Meyering  <meyering@lucent.com>
30873
30874         * lib/strstr.c: Update from GNU libc.
30875
30876 2000-11-17  Akim Demaille  <akim@epita.fr>
30877
30878         * lib/obstack.h: Formatting changes.
30879         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
30880         prevent type checking.
30881         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
30882         cast the value to (void *): assigning a `foo *' to a `void *'
30883         variable is valid.
30884         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
30885
30886 2000-11-16  Jim Meyering  <meyering@lucent.com>
30887
30888         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
30889
30890 2000-11-11  Jim Meyering  <meyering@lucent.com>
30891
30892         * lib/error.c: Add a couple #includes, merging from GNU libc version.
30893
30894 2000-11-10  Jim Meyering  <meyering@lucent.com>
30895
30896         * lib/obstack.h: Update from GNU libc.
30897         * lib/obstack.c: Likewise.
30898
30899 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
30900
30901         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
30902
30903 2000-11-06  Paul Eggert  <eggert@twinsun.com>
30904
30905         * lib/getusershell.c (setusershell): Use rewind rather than
30906         fseek/fseeko, to avoid configuration hassles with fseeko.
30907         Don't bother opening SHELLS_FILE if shellstream is NULL;
30908         it's not necessary.
30909
30910 2000-11-05  Jim Meyering  <meyering@lucent.com>
30911
30912         * lib/makepath.h (make_dir): Declare.
30913         * lib/makepath.c (make_dir): Remove `static' attribute.
30914         Tweak a comment.
30915
30916 2000-11-04  Jim Meyering  <meyering@lucent.com>
30917
30918         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
30919
30920 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
30921
30922         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
30923         last one in a bucket, advance to the next bucket.
30924
30925 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
30926
30927         * lib/fnmatch.c: Do not comment out all the code if we are using
30928         the GNU C library, because in some cases we are replacing buggy
30929         code in the GNU C library itself.
30930
30931 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
30932
30933         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
30934         (regex_compile): Catch bogus \(\1\).
30935
30936 2000-10-30  Paul Eggert  <eggert@twinsun.com>
30937
30938         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
30939         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
30940         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
30941
30942 2000-10-30  Paul Eggert  <eggert@twinsun.com>
30943
30944         * lib/error.h, getline.h, modechange.h:
30945         Remove "2000" from Copyright line, as the file hasn't been
30946         changed this year other than in the copyright notice.
30947
30948         * lib/xalloc.h: Add "2000" to Copyright line, as this file
30949         was changed this year.
30950
30951 2000-10-29  Jim Meyering  <meyering@lucent.com>
30952
30953         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
30954         renaming.
30955         * m4/ls-mntd-fs.m4: Likewise
30956
30957 2000-10-29  Jim Meyering  <meyering@lucent.com>
30958
30959         * lib/xstat.in: Fix grammar in comment.
30960
30961 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
30962
30963         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
30964         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
30965         doesn't define __restrict_arr.
30966
30967 2000-10-28  Jim Meyering  <meyering@lucent.com>
30968
30969         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
30970         (jm_PREREQ_MEMCHR): New function.
30971
30972 2000-10-28  Jim Meyering  <meyering@lucent.com>
30973
30974         * lib/memchr.c: Update from libc.
30975         Adjust for portability:
30976         [HAVE_STDLIB_H]: Include stdlib.h.
30977         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
30978         Undef __memchr, too.
30979         [!weak_alias]: Define __memchr to memchr.
30980
30981         * lib/regex.c: Update from libc.
30982         * lib/regex.h: Likewise.
30983         * lib/getopt1.c: Likewise.
30984         * lib/memcmp.c: Likewise.
30985
30986         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
30987         Avoid using fseek, when possible -- it's broken by design.
30988         Patch by Ulrich Drepper.
30989
30990 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
30991
30992         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
30993         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
30994         Giving in to popular pressure to shut up the compiler with casts.
30995
30996 2000-10-26  Jim Meyering  <meyering@lucent.com>
30997
30998         * lib/strftime.c: Update from libc.
30999
31000 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
31001
31002         * regex.c: More `unsigned char' -> `re_char' changes.
31003         Also change several `int' into `re_wchar_t'.
31004         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
31005         (PUSH_FAILURE_POINTER): Don't cast any more.
31006         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
31007         We want GCC to complain, since this piece of code makes
31008         re_match non-reentrant, which *should* be fixed.
31009         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
31010         (EXTEND_BUFFER): Use RETALLOC.
31011         (SET_LIST_BIT): Don't cast.
31012         (re_wchar_t): New type.
31013         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
31014         that those two functions will always properly return.
31015         (IMMEDIATE_QUIT_CHECK): Cast to void.
31016         (analyse_first): Use recursion rather than an explicit stack.
31017         (re_compile_fastmap): Can't fail anymore.
31018         (re_search_2): Don't check re_compile_fastmap for failure.
31019         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
31020         Now also sets the new value (passed in a new argument).
31021         (re_match_2_internal): Use it.
31022         Also, use a new var `reg' of type size_t when looping through regs
31023         rather than reuse the inappropriate `mcnt'.
31024
31025 2000-10-25  Jim Meyering  <meyering@lucent.com>
31026
31027         * lib/obstack.c: Update from libc.
31028
31029 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
31030
31031         * regex.c (regex_compile): Change the way of handling a range from
31032         a char less than 256 to a char not less than 256.
31033
31034 2000-10-24  Andrew Innes  <andrewi@gnu.org>
31035
31036         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
31037         NT-Emacs only.
31038         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
31039         so that re_search functions only quit when callers expect them to.
31040
31041 2000-10-23  Jim Meyering  <meyering@lucent.com>
31042
31043         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
31044         wrong.  That set_locale call must not have any side effects.
31045         From Paul Eggert.
31046
31047 2000-10-22  Jim Meyering  <meyering@lucent.com>
31048
31049         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
31050         [CYCLIC]: Remove now-unused definition.
31051
31052         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
31053         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
31054         Suggestion from Ulrich Drepper.
31055
31056 2000-10-21  Jim Meyering  <meyering@lucent.com>
31057
31058         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
31059         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
31060         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
31061
31062 2000-10-21  Jim Meyering  <meyering@lucent.com>
31063
31064         * lib/dirname.c (memrchr): Declare if necessary.
31065         (dir_name): Remove the restriction that there be no
31066         trailing slashes.  Now, this code skips past them, effectively
31067         ignoring them.
31068         [TEST_DIRNAME] (main): New unit tests.
31069
31070         * lib/memrchr.c: New file from GNU libc.
31071         Undef __memrchr, too.
31072         [!weak_alias]: Define __memrchr to memrchr.
31073         Guard weak_alias use with `#ifdef weak_alias'.
31074
31075 2000-10-21  Jim Meyering  <meyering@lucent.com>
31076
31077         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
31078         (dir_name): Use dir_name_r.
31079         * lib/dirname.h (dir_name_r): Declare it.
31080
31081 2000-10-17  Jim Meyering  <meyering@lucent.com>
31082
31083         * lib/quote.h (PARAMS): Define and use.
31084         Reported by Akim Demaille.
31085
31086         * lib/getopt.c: Update from libc.
31087
31088 2000-10-16  Jim Meyering  <meyering@lucent.com>
31089
31090         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
31091         setlocale.
31092         From Jan Fedak.
31093
31094 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
31095
31096         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
31097
31098 2000-09-25  Jim Meyering  <meyering@lucent.com>
31099
31100         * lib/md5.h (rol): Define (from GnuPG).
31101
31102         * lib/sha.c: Give credit (GnuPG) where due.
31103         (M): Use rol rather than open-coding it.
31104         Add a FIXME comment.
31105
31106 2000-09-21  Jim Meyering  <meyering@lucent.com>
31107
31108         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
31109         Reported by Michael Stone.
31110
31111 2000-09-20  Jim Meyering  <meyering@lucent.com>
31112
31113         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
31114         (noinst_HEADERS): Add sha.h.
31115         Based on code from Scott G. Miller and from GnuPG.
31116
31117 2000-09-18  Jim Meyering  <meyering@lucent.com>
31118
31119         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
31120         LIBS. Otherwise, everyone ends up linking with -lelf for some
31121         configurations.
31122         Reported by Mike Stone.
31123
31124 2000-09-15  Jim Meyering  <meyering@lucent.com>
31125
31126         * lib/regex.c: Update from libc.
31127
31128 2000-09-10  Jim Meyering  <meyering@lucent.com>
31129
31130         * lib/getopt.c (_getopt_internal): Update from glibc.
31131
31132 2000-09-09  Jim Meyering  <meyering@lucent.com>
31133
31134         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
31135         think it should be used as a general replacement for isascii.
31136         * lib/fnmatch.c: Likewise.
31137         * lib/mbswidth.c: Likewise
31138         * lib/regex.c: Likewise.
31139
31140         Don't use atoi.
31141         * lib/userspec.c: Include sys/param.h and limits.h.
31142         Include xstrtol.h.
31143         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
31144         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
31145         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
31146         UID, GID.  Check range.
31147
31148 2000-09-06  Jim Meyering  <meyering@lucent.com>
31149
31150         * lib/getopt.c (_getopt_internal): Update from glibc.
31151
31152 2000-08-30  Jim Meyering  <meyering@lucent.com>
31153
31154         * lib/strftime.c: Merge in changes from GNU libc.
31155
31156 2000-08-26  Jim Meyering  <meyering@lucent.com>
31157
31158         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
31159         * m4/fpending.m4: New file.
31160
31161 2000-08-26  Jim Meyering  <meyering@lucent.com>
31162
31163         * lib/closeout.c: Include "__fpending.h".
31164         (close_stdout_status): Return right away if there's nothing to flush.
31165
31166         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
31167         * lib/__fpending.c: New file.
31168         * lib/__fpending.h: New file.
31169
31170 2000-08-20  Jim Meyering  <meyering@lucent.com>
31171
31172         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
31173         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
31174         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
31175
31176 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
31177
31178         Improve fileutils installation on systems where running
31179         programs (like install) can't be unlinked.
31180         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
31181         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
31182
31183 2000-08-07  Paul Eggert  <eggert@twinsun.com>
31184
31185         Standardize on "memory exhausted" instead of "Memory exhausted"
31186         or "virtual memory exhausted".
31187         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
31188         "virtual memory exhausted".
31189         * lib/same.c (same_name): Invoke xalloc_die instead of printing
31190         our own message.
31191         * lib/userspec.c (parse_user_spec): Likewise.
31192         * lib/bumpalloc.h: comment fix
31193         * lib/same.c, userspec.c: Include xalloc.h.
31194
31195         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
31196         not char *const and pointing to a constant array.
31197         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
31198         (xrealloc): Comment fix.
31199
31200         * lib/userspec.c (parse_user_spec):
31201         Don't translate a message until just before returning,
31202         to avoid unnecessary translation.
31203
31204 2000-08-07  Jim Meyering  <meyering@lucent.com>
31205
31206         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
31207         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
31208         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
31209         getgroups.c, gethostname.c, getopt.h, group-member.c,
31210         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
31211         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
31212         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
31213         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
31214         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
31215         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
31216         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
31217         yesno.c: Back out Copyright date changes for each file with no change
31218         this year.  This eases coordination with other programs using the same
31219         source code modules.  From Paul Eggert.
31220
31221 2000-08-06  Paul Eggert  <eggert@twinsun.com>
31222
31223         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
31224         not char, for compatibility with glibc 2.1.3 strftime.c.
31225
31226 2000-08-03  Greg McGary  <greg@mcgary.org>
31227
31228         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
31229         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
31230         (EXTEND_BUFFER): Use them.
31231
31232 2000-08-01  Jim Meyering  <meyering@lucent.com>
31233
31234         * lib/dirname.c (ISSLASH): Define.
31235         (BACKSLASH_IS_PATH_SEPARATOR): Define.
31236         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
31237         both `\' and `/' may be use as path separators.
31238         Based on a patch from Prashant TR.
31239
31240 2000-07-31  Paul Eggert  <eggert@twinsun.com>
31241
31242         * lib/quotearg.c (quotearg_n_options): Don't make the initial
31243         slot vector a constant, since it might get modified.
31244
31245 2000-07-31  Jim Meyering  <meyering@lucent.com>
31246
31247         * lib/xmalloc.c: Use `virtual memory exhausted', not
31248         `Memory exhausted'.
31249         * lib/obstack.c (print_and_abort): Likewise.
31250
31251 2000-07-30  Paul Eggert  <eggert@twinsun.com>
31252
31253         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
31254         buffer, so that the caller can always quote one small
31255         component of a "memory exhausted" message in slot 0.
31256         From a suggestion by Jim Meyering.
31257
31258 2000-07-30  Jim Meyering  <meyering@lucent.com>
31259
31260         * lib/makepath.c (make_path): Quote the other instance, too.
31261
31262         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
31263         (STATIC_BUF_SIZE): Define.
31264         (quotearg_n_options): Use only statically allocated storage when
31265         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
31266         than STATIC_BUF_SIZE.
31267
31268 2000-07-29  Jim Meyering  <meyering@lucent.com>
31269
31270         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
31271         * lib/dirname.c (dir_name): Likewise.
31272
31273         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
31274         `/'.
31275
31276         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
31277         (dir_name): Assert that there are no trailing slashes.
31278
31279 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
31280
31281         * lib/mbswidth.h (mbswidth): Add a flags argument.
31282         (mbswidth): New declaration.
31283         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
31284         * lib/mbswidth.c (mbswidth): Add a flags argument.
31285         (mbsnwidth): New function.
31286
31287 2000-07-24  Jim Meyering  <meyering@lucent.com>
31288
31289         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
31290
31291 2000-07-23  Paul Eggert  <eggert@twinsun.com>
31292
31293         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
31294
31295 2000-07-23  Paul Eggert  <eggert@twinsun.com>
31296
31297         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
31298         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
31299         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
31300         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
31301         invoke multibyte primitives.
31302
31303 2000-07-23  Paul Eggert  <eggert@twinsun.com>
31304
31305         * lib/quotearg.c:
31306         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
31307         so that mbstate_t is always defined.
31308
31309         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
31310         be 1 in at least one GCC installation, and this configuration
31311         error is likely to be common.  Ignoring MB_LEN_MAX hurts
31312         performance on hosts that have mbrtowc but have only unibyte
31313         locales, but I assume these hosts are rare.
31314
31315 2000-07-23  Paul Eggert  <eggert@twinsun.com>
31316
31317         * lib/mbswidth.c (_XOPEN_SOURCE):
31318         Don't define; this causes problems on Solaris 7.
31319         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
31320
31321 2000-07-23  Jim Meyering  <meyering@lucent.com>
31322
31323         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
31324         too: getgrgid, getpwuid, getuid.
31325
31326 2000-07-23  Jim Meyering  <meyering@lucent.com>
31327
31328         * lib/basename.c (base_name): Add an assertion.
31329
31330 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
31331
31332         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
31333         shadow its mbsinit function.
31334
31335 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
31336
31337         * lib/mbswidth.h: New file.
31338         * lib/mbswidth.c: New file.
31339         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
31340         (noinst_HEADERS): Add mbswidth.h.
31341
31342 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
31343
31344         * lib/config.charset: Add support for FreeBSD. Improve support for
31345         HP-UX and IRIX 6.
31346
31347 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
31348
31349         * m4/mbswidth.m4: New file.
31350         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
31351
31352 2000-07-15  Jim Meyering  <meyering@lucent.com>
31353
31354         * lib/makepath.c: Include quote.h.
31355         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
31356         corresponding argument in a `quote (...)' call.
31357         Give better diagnostics.
31358
31359         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
31360         (noinst_HEADERS): Add quote.h.
31361
31362         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
31363         from tar's src/misc.c.
31364         * lib/quote.h: New file.  Prototypes for same.
31365
31366 2000-07-14  Paul Eggert  <eggert@twinsun.com>
31367
31368         From a suggestion by Bruno Haible.
31369         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
31370         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
31371         to decide whether to define the BeOS workaround macro;
31372         this adjusts to the change to AC_MBSTATE_T.
31373
31374 2000-07-14  Jim Meyering  <meyering@lucent.com>
31375
31376         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
31377         jm_AC_TYPE_UINTMAX_T.
31378
31379 2000-07-13  Paul Eggert  <eggert@twinsun.com>
31380
31381         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
31382
31383         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
31384         quotearg_buffer_restyled): Add support for
31385         clocale_quoting_style.  Undo previous change to
31386         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
31387         and "{RIGHT QUOTATION MARK}" msgids.
31388
31389 2000-07-10  Paul Eggert  <eggert@twinsun.com>
31390
31391         From a suggestion by Bruno Haible.
31392         * m4/mbstate_t.m4 (AC_MBSTATE_T):
31393         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
31394         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
31395         and mbstate_t, to a single-part test that simply defines mbstate_t.
31396         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
31397         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
31398
31399 2000-07-10  Jim Meyering  <meyering@lucent.com>
31400
31401         * m4/strerror_r.m4: Mirror the correction made in autoconf.
31402
31403         * m4/gnu-source.m4: Output to confdefs.h directly.
31404         Suggestion from Akim Demaille.
31405
31406 2000-07-09  Paul Eggert  <eggert@twinsun.com>
31407
31408         The old behavior of quoting `like this' doesn't look good with
31409         newer, ISO-style fonts.  See:
31410         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
31411
31412         Instead, quote "like this" by default.  Let the translator
31413         tailor the locale-specific quoting behavior by providing
31414         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
31415
31416         * lib/quotearg.c (N_): New macro.
31417         (gettext_default): New function.
31418         (quotearg_buffer_restyled): Use
31419         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
31420         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
31421
31422 2000-07-09  Jim Meyering  <meyering@lucent.com>
31423
31424         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
31425         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
31426
31427         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
31428         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
31429
31430 2000-07-09  Jim Meyering  <meyering@lucent.com>
31431
31432         * lib/Most files: Update copyright dates to include 2000.
31433
31434 2000-07-08  Jim Meyering  <meyering@lucent.com>
31435
31436         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
31437         if not defined.
31438         (xgethostname): Remove now-unnecessary #ifdef.
31439         Move declaration of `err' into loop where it's used.
31440
31441 2000-07-05  Paul Eggert  <eggert@twinsun.com>
31442         and Bruno Haible  <haible@clisp.cons.org>
31443
31444         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
31445         only if the test for an object-type mbstate_t fails.  This
31446         prevents us from mistakenly reporting that mbstate_t is a
31447         system object type after we "#define mbstate_t int" to work
31448         around its lack.
31449
31450 2000-07-05  Paul Eggert  <eggert@twinsun.com>
31451         and Bruno Haible  <haible@clisp.cons.org>
31452
31453         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
31454
31455 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
31456
31457         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
31458         to strerror_r.
31459         Include <ctype.h> for use of isalpha.
31460
31461 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
31462
31463         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
31464         by allocating a larger buffer. Test the gethostname return value for
31465         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
31466         returns an error and ENAMETOOLONG isn't defined.
31467
31468 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
31469
31470         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
31471         dimension.
31472
31473 2000-07-04  Jim Meyering  <meyering@lucent.com>
31474
31475         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
31476         of the deprecated AC_CHECKING.
31477
31478 2000-07-04  Jim Meyering  <meyering@lucent.com>
31479
31480         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
31481         Reported by Bruno Haible.
31482
31483 2000-07-04  Jim Meyering  <meyering@lucent.com>
31484
31485         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
31486         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
31487         lacks mbrtowc.
31488
31489 2000-07-03  Paul Eggert  <eggert@twinsun.com>
31490
31491         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
31492         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
31493
31494 2000-07-03  Paul Eggert  <eggert@twinsun.com>
31495         and Bruno Haible  <haible@clisp.cons.org>
31496
31497         * lib/quotearg.c (mbrtowc):
31498         Assign to *pwc, and return 1 only if result is nonzero.
31499         (iswprint): Use ISPRINT when substituting our own mbrtowc.
31500
31501 2000-07-03  Jim Meyering  <meyering@lucent.com>
31502
31503         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
31504
31505 2000-07-03  Jim Meyering  <meyering@lucent.com>
31506
31507         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
31508         This is necessary to get a definition of e.g., UTMP_FILE on
31509         HP-UX 10.20.
31510         From Bob Proulx.
31511
31512 2000-07-02  Jim Meyering  <meyering@lucent.com>
31513
31514         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
31515
31516         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
31517         AC_LIBOBJ(function_name).
31518         * m4/chown.m4: Likewise.
31519         * m4/fnmatch.m4: Likewise.
31520         * m4/ftruncate.m4: Likewise.
31521         * m4/getgroups.m4: Likewise.
31522         * m4/getline.m4: Likewise.
31523         * m4/group-member.m4: Likewise.
31524         * m4/jm-macros.m4: Likewise.
31525         * m4/lstat.m4: Likewise.
31526         * m4/malloc.m4: Likewise.
31527         * m4/memcmp.m4: Likewise.
31528         * m4/nanosleep.m4: Likewise.
31529         * m4/putenv.m4: Likewise.
31530         * m4/realloc.m4: Likewise.
31531         * m4/regex.m4: Likewise.
31532         * m4/stat.m4: Likewise.
31533         * m4/strftime.m4: Likewise.
31534
31535 2000-07-02  Jim Meyering  <meyering@lucent.com>
31536
31537         * lib/quotearg.c (mbstate_t): Don't define here.
31538
31539 2000-07-02  Jim Meyering  <meyering@lucent.com>
31540
31541         * lib/nanosleep.c (SIGCONT): Define if not already defined.
31542
31543 2000-07-01  Jim Meyering  <meyering@lucent.com>
31544
31545         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
31546
31547 2000-07-01  Jim Meyering  <meyering@lucent.com>
31548
31549         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
31550         problem.
31551
31552 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
31553
31554         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
31555         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
31556
31557 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
31558
31559         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
31560         per change in ../m4/ls-mntd-fs.m4.
31561         (read_filesystem_list): Ignore symbolic links.
31562
31563 2000-06-29  Jim Meyering  <meyering@lucent.com>
31564
31565         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
31566         for declaration of strcmp.
31567
31568         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
31569
31570         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
31571         Avoid warning by casting result to `char *' to remove `const'.
31572
31573 2000-06-28  Jim Meyering  <meyering@lucent.com>
31574
31575         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
31576         included by quotearg.c, for which we perform this test.  From
31577         Bruno Haible.
31578
31579 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
31580
31581         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
31582         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
31583         <utmpx.h> exists, put readutmp.o into LIBOBJS.
31584
31585 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
31586
31587         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
31588
31589 2000-06-26  Paul Eggert  <eggert@twinsun.com>
31590
31591         savedir now sets errno on failure and invokes xmalloc to get memory.
31592         Fix a couple of other minor bugs while we're at it.
31593
31594         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
31595         (NAMLEN): Remove macro.
31596         (malloc, realloc): Remove decls.
31597         (stpcpy): Likewise.
31598         ("xalloc.h"): Include.
31599         (NAME_SIZE_DEFAULT): New macro.
31600         (savedir): Use xmalloc / xrealloc to allocate memory.
31601         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
31602         Skip "" directory entries.
31603         Use strlen to calculate directory entry length, since the old method
31604         is rarely used these days and isn't worth supporting.
31605         Don't use a pointer after freeing it.
31606         Check for integer overflow when calculating allocation size.
31607         Use memcpy to copy entries, instead of stpcpy.
31608         Set errno properly when returning NULL.
31609         Check for readdir error.
31610
31611 2000-06-26  Jim Meyering  <meyering@lucent.com>
31612
31613         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
31614
31615 2000-06-25  Jim Meyering  <meyering@lucent.com>
31616
31617         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
31618         Linux header bug when _XOPEN_SOURCE is defined to 500.
31619
31620 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
31621
31622         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
31623         deficiency.
31624
31625 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
31626
31627         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
31628         Include xalloc.h.
31629         Don't include <stdlib.h>.  Don't declare malloc, realloc.
31630
31631 2000-06-24  Jim Meyering  <meyering@lucent.com>
31632
31633         * m4/strerror_r.m4: Revive this file -- to try out an experimental
31634         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
31635         for which strerror does return char*, but which lacks a conveniently
31636         accessible declaration of the function.  If the compile-test says
31637         strerror_r doesn't work, then resort to a `run'-test that works on
31638         BeOS and segfaults on DEC Unix.
31639
31640 2000-06-24  Jim Meyering  <meyering@lucent.com>
31641
31642         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
31643
31644 2000-06-23  Paul Eggert  <eggert@twinsun.com>
31645
31646         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
31647         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
31648
31649 2000-06-23  Paul Eggert  <eggert@twinsun.com>
31650
31651         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
31652         (mbrtowc, mbstate_t): Define substitutes if
31653         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
31654         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
31655         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
31656
31657 2000-06-23  Jim Meyering  <meyering@lucent.com>
31658
31659         * m4/afs.m4: Add missing AC_MSG_RESULT.
31660         Reported by Bruno Haible.
31661
31662         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
31663         Suggestion from Bruno Haible.
31664
31665 2000-06-23  Jim Meyering  <meyering@lucent.com>
31666
31667         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
31668
31669 2000-06-21  Jim Meyering  <meyering@lucent.com>
31670
31671         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
31672
31673 2000-06-21  Jim Meyering  <meyering@lucent.com>
31674
31675         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
31676         (noinst_HEADERS): Add getstr.h.
31677
31678         * lib/getline.c (getstr): Move into a separate file.
31679         * lib/getstr.c (getstr): New file, extracted from getline.c, with
31680         the following changes: new parameter, delim2; both delim[12]
31681         parameters have type `int', not `char'.  The latter would lose
31682         with 8-bit delimiters.
31683         * lib/getstr.h: New file.
31684
31685 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
31686
31687         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
31688         than 1024, return a memory chunk of least possible size, instead
31689         of size PATH_MAX + 2. In the loop, increment the size proportionally.
31690         Use free/xmalloc instead of xrealloc to avoid copying for very long
31691         paths.
31692
31693 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
31694
31695         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
31696         the empty string.
31697
31698 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
31699
31700         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
31701         address, not strdup.  Include <stdlib.h> and don't declare free().
31702
31703 2000-06-19  Jim Meyering  <meyering@lucent.com>
31704
31705         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
31706
31707 2000-06-18  Jim Meyering  <meyering@lucent.com>
31708
31709         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
31710
31711         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
31712         `checking whether...' message to be consistent with that of the
31713         lstat test.
31714
31715 2000-06-18  Jim Meyering  <meyering@lucent.com>
31716
31717         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
31718         Besides, these days every porting target provides a mkdir function.
31719
31720         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
31721         needed. (this snippet comes from src/system.h).
31722
31723 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
31724
31725         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
31726
31727 2000-06-15  Paul Eggert  <eggert@twinsun.com>
31728
31729         * lib/human.c (adjust_value): New function.
31730         (human_readable_inexact): Apply rounding style even when
31731         printing approximate values.
31732
31733 2000-06-14  Paul Eggert  <eggert@twinsun.com>
31734
31735         * lib/human.c (human_readable_inexact): Allow an input block
31736         size that is not a multiple of the output block size, and vice versa.
31737         Reported by Piergiorgio Sartor.
31738
31739 2000-06-14  Paul Eggert  <eggert@twinsun.com>
31740
31741         * lib/getdate.y (get_date): Apply relative times after time
31742         zone indicator, not before.  Reported by Todd A. Jacobs.
31743
31744 2000-06-13  Jim Meyering  <meyering@lucent.com>
31745
31746         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
31747
31748         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
31749
31750 2000-06-12  Paul Eggert  <eggert@twinsun.com>
31751
31752         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
31753
31754 2000-06-12  Jim Meyering  <meyering@lucent.com>
31755
31756         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
31757         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
31758         optional argument.
31759         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
31760         the optional argument, `lib'.
31761
31762 2000-06-08  Jim Meyering  <meyering@lucent.com>
31763
31764         * m4/largefile.m4: Remove file (now that it's part of autoconf).
31765
31766 2000-06-04  Paul Eggert  <eggert@twinsun.com>
31767
31768         Rewrite largefile configuration so that we don't need to run
31769         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
31770         AC_CANONICAL_HOST in configure.in -- jmm]
31771
31772         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
31773         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
31774         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
31775         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
31776         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
31777         All uses changed.
31778         Instead of inspecting the output of getconf, try to compile the
31779         test program without and with the macro definition.
31780         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
31781         for getconf.  Instead, check for the needed flags by compiling
31782         test programs.
31783
31784 2000-06-04  Paul Eggert  <eggert@twinsun.com>
31785
31786         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
31787
31788 2000-06-04  Jim Meyering  <meyering@lucent.com>
31789
31790         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
31791         SunOS 4.1.4 for which gid_t is an unsigned type.
31792
31793 2000-06-03  Jim Meyering  <meyering@lucent.com>
31794
31795         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
31796         now that autoconf requires that.
31797
31798         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
31799         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
31800         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
31801
31802 2000-06-03  Jim Meyering  <meyering@lucent.com>
31803
31804         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
31805
31806 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
31807
31808         * m4/glibc21.m4: New file.
31809         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
31810
31811 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
31812
31813         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
31814         newer, don't install charset.alias.
31815         * lib/config.charset: Change the Linux/glibc rules so they become empty
31816         on glibc-2.1 or newer.
31817
31818 2000-06-02  Jim Meyering  <meyering@lucent.com>
31819
31820         * lib/mountlist.c: Back out last change.  Instead, do this...
31821         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
31822         me_dummy member using the same `ignore'-testing code.
31823         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
31824         fs_type strings.
31825         From Mark D. Roth.
31826
31827 2000-05-29  Jim Meyering  <meyering@lucent.com>
31828
31829         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
31830         mounts with the `ignore' attribute.  Based on a patch from
31831         Mark D. Roth.
31832
31833 2000-05-28  Jim Meyering  <meyering@lucent.com>
31834
31835         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
31836         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
31837         * m4/stat.m4: Likewise.
31838         * m4/lstat.m4: Likewise.
31839         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
31840
31841         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
31842         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
31843
31844 2000-05-26  Jim Meyering  <meyering@lucent.com>
31845
31846         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
31847
31848 2000-05-24  Jim Meyering  <meyering@lucent.com>
31849
31850         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
31851         autoconf requires that.
31852         * m4/lib-check.m4: Likewise.
31853         * m4/jm-macros.m4: Likewise.
31854         * m4/strftime.m4: Likewise.
31855
31856         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
31857         AC_CHECK_DECLS, now that autoconf requires that.
31858
31859 2000-05-22  Jim Meyering  <meyering@lucent.com>
31860
31861         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
31862         * m4/lstat.m4: Likewise.
31863
31864 2000-05-22  Jim Meyering  <meyering@lucent.com>
31865
31866         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
31867
31868 2000-05-20  Jim Meyering  <meyering@lucent.com>
31869
31870         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
31871         (jm_PREREQ): Use it.
31872
31873 2000-05-18  Jim Meyering  <meyering@lucent.com>
31874
31875         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
31876         back, too, since it may have been modified by allocate_entry.
31877         (hash_delete): Rewrite to use neither the assignment operator
31878         nor the comma operator in an if-expression.
31879
31880 2000-05-15  Paul Eggert  <eggert@twinsun.com>
31881
31882         * lib/closeout.c:
31883         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
31884         Remove; no longer needed.
31885         "quotearg.h": Add include.
31886         (file_name): Do not bother to explicitly initialize to NULL; it's less
31887         efficient on some hosts.
31888         (close_stdout_status): Remove test as to whether stdout was already
31889         closed; it breaks for the case "echo x | sort >&-".
31890         Quote file name colons.
31891         Do not assume that _("write error") lacks format strings.
31892
31893 2000-05-15  Jim Meyering  <meyering@lucent.com>
31894
31895         * lib/version-etc.c (version_etc_copyright): Update the copyright
31896         string used in all --version output.
31897
31898 2000-05-14  Jim Meyering  <meyering@lucent.com>
31899
31900         * lib/closeout.c (close_stdout_set_file_name): New function.
31901         (close_stdout_status): Use new file-scoped global.
31902         Return right away if fstat says the stdout file descriptor is invalid.
31903         * lib/closeout.h (close_stdout_set_file_name): Declare.
31904
31905 2000-05-10  Jim Meyering  <meyering@lucent.com>
31906
31907         * lib/closeout.c [default_exit_status]: New file-scoped variable.
31908         (close_stdout_set_status): New function.
31909         * lib/closeout.h (close_stdout_set_status): Declare.
31910
31911 2000-05-09  Jim Meyering  <meyering@lucent.com>
31912
31913         * m4/gettext.m4: Rename this...
31914         * m4/libintl.m4: ...to this.
31915
31916 2000-05-08  Jim Meyering  <meyering@lucent.com>
31917
31918         * lib/long-options.c: Don't include closeout.h.
31919         (parse_long_options): Don't call close_stdout for --version.
31920
31921 2000-05-06  Paul Eggert  <eggert@twinsun.com>
31922
31923         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
31924         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
31925         2.1.3 bug.  This avoids a clash when files like regex.c define
31926         _GNU_SOURCE.
31927
31928 2000-05-06  Jim Meyering  <meyering@lucent.com>
31929
31930         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
31931         (AC_REPLACE_FUNCS): Add strnlen.
31932
31933         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
31934         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
31935
31936         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
31937         AC_SEARCH_LIBS call for nanosleep.
31938         (LIB_NANOSLEEP): Set and AC_SUBST.
31939
31940 2000-05-06  Jim Meyering  <meyering@lucent.com>
31941
31942         * lib/strnlen.c: Undefine __strnlen and strnlen.
31943         [!weak_alias]: Define __strnlen to strnlen.
31944
31945         * lib/atexit.c: New file, from libiberty.
31946
31947 2000-05-06  Jim Meyering  <meyering@lucent.com>
31948
31949         * lib/closeout.c (close_stdout_status): Also check for errors on the
31950         stderr stream.
31951
31952 2000-05-05  Jim Meyering  <meyering@lucent.com>
31953
31954         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
31955         AC_SEARCH_LIBS call for clock_gettime.
31956         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
31957
31958         * m4/search-libs.m4: Update from autoconf.
31959
31960         su doesn't work on Solaris 2.6.
31961         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
31962         <shadow.h>.  Reported by Dragos Harabor.
31963
31964 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
31965
31966         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
31967         memcpy instead of xmalloc, xrealloc, path_concat.
31968         (locale_charset): Treat empty environment variables as absent.
31969         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
31970
31971 2000-05-04  Jim Meyering  <meyering@lucent.com>
31972
31973         * lib/getopt.c: Update from glibc.
31974         * lib/obstack.c: Likewise.
31975         * lib/obstack.h: Likewise.
31976         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
31977         file
31978
31979         * lib/regex.h: Likewise.
31980         * lib/strndup.c: Likewise.
31981         * lib/strnlen.c: New file, from glibc.
31982
31983 2000-05-03  Jim Meyering  <meyering@lucent.com>
31984
31985         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
31986
31987 2000-05-02  Paul Eggert  <eggert@twinsun.com>
31988
31989         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
31990         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
31991         compile-time test, rather than inspecting host and OS, to
31992         decide whether to define _LARGEFILE_SOURCE.
31993
31994 2000-05-01  Jim Meyering  <meyering@lucent.com>
31995
31996         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
31997
31998         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
31999         Based on a patch from Bruno Haible.
32000
32001 2000-05-01  Jim Meyering  <meyering@lucent.com>
32002
32003         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
32004
32005 2000-04-29  Jim Meyering  <meyering@lucent.com>
32006
32007         * lib/path-concat.c: Declare strdup only if it's not defined.
32008         * lib/canon-host.c: Likewise.
32009
32010 2000-04-28  Jim Meyering  <meyering@lucent.com>
32011
32012         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
32013         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
32014         is included first, then limits.h is included by locale.h by libintl.h.
32015         From John David Anglin.
32016
32017 2000-04-25  Jim Meyering  <meyering@lucent.com>
32018
32019         * lib/makepath.c (S_IRWXUGO): Define.
32020         (make_path): Always perform explicit chmod if MODE specifies any
32021         of the `special' permission bits.  Prompted by a bug report against
32022         install from Mate Wierdl and Joost van Baal.
32023
32024 2000-04-18  Jim Meyering  <meyering@lucent.com>
32025
32026         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
32027         (jm_PREREQ): Use it.
32028
32029 2000-04-18  Jim Meyering  <meyering@lucent.com>
32030
32031         * lib/README: New file.
32032
32033         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
32034         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
32035
32036 2000-04-17  Jim Meyering  <meyering@lucent.com>
32037
32038         Get it right :-)
32039         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
32040         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
32041         Suggestion from Akim Demaille.
32042
32043 2000-04-17  Jim Meyering  <meyering@lucent.com>
32044
32045         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
32046         the definition of it to rpl_strftime also defined-away the system's
32047         declaration.
32048
32049 2000-04-15  Jim Meyering  <meyering@lucent.com>
32050
32051         Use `C' to denote so-called `contiguous' files, the same way
32052         that tar does.
32053         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
32054         (ftypelet): Use S_ISCTG.
32055         From Michael Deutschmann.
32056
32057 2000-04-14  Jim Meyering  <meyering@lucent.com>
32058
32059         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
32060         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
32061         clobbered.
32062
32063 2000-04-14  Jim Meyering  <meyering@lucent.com>
32064
32065         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
32066
32067 2000-04-13  Jim Meyering  <meyering@lucent.com>
32068
32069         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
32070         AH_VERBATIM to insert required #ifndef into config.h.in.
32071         Suggestion from Akim Demaille.
32072
32073 2000-04-12  Jim Meyering  <meyering@lucent.com>
32074
32075         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
32076         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
32077         Christian Krackowizer.
32078
32079         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
32080         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
32081         (AC_SYS_LARGEFILE): Require.
32082         (AM_C_PROTOTYPES): Require.
32083
32084 2000-04-08  Jim Meyering  <meyering@lucent.com>
32085
32086         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
32087         names don't conflict.  Reported by Eli Zaretskii.
32088
32089 2000-04-07  Jim Meyering  <meyering@lucent.com>
32090
32091         * lib/putenv.c: Move inclusion of errno.h so it follows that of
32092         sys/types.h, to work around system header problems on AIX 3.2.5.
32093         From Bruno Haible.
32094
32095 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
32096
32097         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
32098         bug.  Deal with the different error behavior of Irix iconv.
32099
32100 2000-04-05  Paul Eggert  <eggert@twinsun.com>
32101
32102         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
32103         IRIX if the installer said otherwise.
32104
32105 2000-04-05  Jim Meyering  <meyering@lucent.com>
32106
32107         Portability tweaks required for ultrix4.3.
32108         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
32109         (jm_CHECK_DECLS): Add getutent to the list of functions.
32110         (_jm_DECL_HEADERS): Add utmpx.h.
32111         From John David Anglin.
32112
32113         * m4/strftime.m4: Back out the 2000-04-02 change.
32114         Instead of that change, simply undefine putenv in the test program.
32115
32116 2000-04-05  Jim Meyering  <meyering@lucent.com>
32117
32118         Portability tweaks required for ultrix4.3.
32119         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
32120         getutent.
32121         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
32122         * lib/canon-host.c: Declare strdup.
32123         * lib/path-concat.c: Likewise.
32124         From John David Anglin.
32125
32126 2000-04-04  Jim Meyering  <meyering@lucent.com>
32127
32128         Be more DOS 8.3-friendly.
32129         * lib/ref-add.sin: Renamed from ref-add.sed.in.
32130         * lib/ref-del.sin: Renamed from ref-del.sed.in.
32131         * lib/Makefile.am: Reflect renaming.
32132         Reported by Eli Zaretskii.
32133
32134         Use a temporary file name that won't clash with `charset.alias'
32135         in the DOS 8.3 name space.
32136         * lib/Makefile.am (charset_tmp): Define.
32137         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
32138         (uninstall-local): Likewise.
32139         Reported by Eli Zaretskii.
32140
32141 2000-04-03  Jim Meyering  <meyering@lucent.com>
32142
32143         * m4/gettext.m4: Fix typo in comment.
32144
32145         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
32146         textutils/configure.in).  Suggestion from Paul Eggert.
32147         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
32148
32149 2000-04-02  Paul Eggert  <eggert@twinsun.com>
32150
32151         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
32152         variable in the shell rather than using putenv, which isn't
32153         portable.  This avoids the configure-time inter-test dependency
32154         on the potentially-renamed putenv function.
32155
32156 2000-03-30  Paul Eggert  <eggert@twinsun.com>
32157
32158         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
32159         before checking struct stat.st_blksize, so that
32160         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
32161
32162 2000-03-29  Paul Eggert  <eggert@twinsun.com>
32163
32164         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
32165         since strftime.c uses HAVE_STRFTIME to decide whether to use
32166         the underlying strftime.
32167
32168 2000-03-29  Paul Eggert  <eggert@twinsun.com>
32169
32170         * lib/time/strftime.c (my_strftime): Make sure we call the system
32171         strftime, not ourselves, when invoking the underlying strftime.
32172
32173 2000-03-24  Jim Meyering  <meyering@lucent.com>
32174
32175         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
32176         (charset_alias): Define.
32177         (install-exec-local): Factor out common code.
32178         (uninstall-local): Split lines longer than 80.
32179         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
32180         (SUFFIXES): Define.
32181         (.sed.in.sed): New rule.  Don't redirect directly to $@.
32182         (CLEANFILES): Add ref-add.sed and ref-del.sed.
32183
32184 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
32185
32186         * lib/config.charset: Output a line containing "Packages using this
32187         file".
32188         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
32189         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
32190         ref-del.sed): New rules.
32191
32192 2000-03-17  Jim Meyering  <meyering@lucent.com>
32193
32194         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
32195         Otherwise, include <strings.h>
32196
32197 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
32198
32199         * lib/unicodeio.c (utf8_wctomb): New function.
32200         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
32201         format instead of in UCS-4 with platform dependent endianness.
32202
32203 2000-03-10  Jim Meyering  <meyering@lucent.com>
32204
32205         * m4/lib-check.m4: Look for getspnam in -lgen, too.
32206         From Marco Franzen.
32207
32208 2000-03-07  Paul Eggert  <eggert@twinsun.com>
32209
32210         * lib/savedir.c (savedir): Work even if directory size is
32211         negative; this can happen with some screwy NFS configurations.
32212
32213 2000-03-06  Jim Meyering  <meyering@lucent.com>
32214
32215         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
32216         if it's NULL (because we ran out of memory).  From Bruno Haible.
32217
32218 2000-03-05  Jim Meyering  <meyering@lucent.com>
32219
32220         * lib/localcharset.c ("path-concat.h"): Include.
32221         (get_charset_aliases): Use path_concat instead of ANSI string
32222         concatenation.
32223
32224         * lib/unicodeio.h (PARAMS): Define.
32225         Use it to guard prototype.
32226
32227 2000-03-04  Jim Meyering  <meyering@lucent.com>
32228
32229         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
32230         for lib/localcharset.c.
32231
32232 2000-03-04  Jim Meyering  <meyering@lucent.com>
32233
32234         * lib/Makefile.am (install-exec-local): Create $(libdir) before
32235         installing into it.
32236         (uninstall-local): Uncomment this rule so `make distcheck' works
32237         once again.
32238
32239         * lib/unicodeio.c (<errno.h>): Include it.
32240         (errno): Declare if not defined.
32241
32242         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
32243
32244         * lib/config.charset: New version, incorporating remarks from a linux
32245         i18n mailing list.  From Bruno Haible.
32246
32247 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
32248
32249         * m4/codeset.m4: New file.
32250         * m4/iconv.m4: New file.
32251         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
32252
32253 2000-03-03  Jim Meyering  <meyering@lucent.com>
32254
32255         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
32256
32257 2000-03-02  Jim Meyering  <meyering@lucent.com>
32258
32259         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
32260         the messages come out on separate lines.
32261
32262         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
32263         rather than jm_CHECK_DECLARATIONS.
32264         * m4/decl.m4: Remove now-unused file.
32265
32266         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
32267         geteuid.
32268
32269 2000-03-02  Jim Meyering  <meyering@lucent.com>
32270
32271         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
32272
32273 2000-03-01  Jim Meyering  <meyering@lucent.com>
32274
32275         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
32276         * lib/unicodeio.c: Likewise.
32277
32278 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
32279
32280         * lib/config.charset: New file.
32281         * lib/localcharset.c: New file.
32282         * lib/unicodeio.h, lib/unicodeio.c: New files.
32283         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
32284         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
32285         (noinst_HEADERS): Add unicodeio.h.
32286         (all-local, install-exec-local, charset.alias): New targets.
32287
32288 2000-02-28  Paul Eggert  <eggert@twinsun.com>
32289
32290         * lib/quotearg.c (ALERT_CHAR): New macro.
32291         (quotearg_buffer_restyled): Use it.
32292
32293 2000-02-27  Jim Meyering  <meyering@lucent.com>
32294
32295         * m4/check-decl.m4: Add getenv to the list.
32296
32297 2000-02-27  Jim Meyering  <meyering@lucent.com>
32298
32299         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
32300         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
32301
32302         * lib/backupfile.c: Guard inclusion of stdlib.h with
32303         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
32304         Declare malloc if needed.
32305
32306         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
32307         `#ifndef HAVE_DECL..'
32308         now that autoconf always defines the HAVE_DECL_ symbols.
32309         * lib/human.c: Likewise.
32310         * lib/same.c: Likewise.
32311         * lib/strtoumax.c: Likewise.
32312
32313         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
32314         declaration check was not run.
32315         * lib/hash.c: Likewise.
32316         * lib/human.c: Likewise.
32317         * lib/same.c: Likewise.
32318         * lib/strtoumax.c: Likewise.
32319
32320         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
32321         `.', then first look up the entire `.'-containing string as a login
32322         name.
32323
32324 2000-02-23  Jim Meyering  <meyering@lucent.com>
32325
32326         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
32327         in place of my hack.
32328
32329 2000-02-18  Paul Eggert  <eggert@twinsun.com>
32330
32331         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
32332         (textint): New typedef.
32333         (parser_control): Member year changed from int to textint.
32334         All uses changed.
32335         (YYSTYPE): Removed; replaced by %union with int and textint members.
32336         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
32337         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
32338         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
32339         (tSNUMBER, tUNUMBER): Now of type <textintval>.
32340         (date, number, to_year): Use width of number in digits, not its value,
32341         to determine whether it's a 2-digit year, or a 2-digit time.
32342         (yylex): Store number of digits of numeric tokens.
32343         Reported by John Kendall.
32344
32345         (parser_control): Changed from struct parser_control to typedef (for
32346         consistency).  All uses changed.
32347
32348         (tID): Removed; not used.
32349         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
32350
32351 2000-02-14  Paul Eggert  <eggert@twinsun.com>
32352
32353         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
32354         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
32355
32356 2000-02-12  Jim Meyering  <meyering@lucent.com>
32357
32358         * lib/userspec.c (ISDIGIT): Define it.
32359         (isdigit): Remove definition.
32360         (is_number): Use ISDIGIT, not isdigit.
32361         <libintl.h>: Include.
32362         (_ and N_): Define.
32363         (parse_user_spec): Mark translatable strings.
32364
32365 2000-02-10  Jim Meyering  <meyering@lucent.com>
32366
32367         With these changes, nanosleep.[ch] are finally enough like the other
32368         lib/* replacement files to compile on a few more losing systems.
32369
32370         * lib/nanosleep.h: Don't include config.h.
32371         Remove prototype from declaration of nanosleep.
32372         (PARAMS): Remove now-unneeded definition.
32373         * lib/nanosleep.c: #undef nanosleep.
32374         (rpl_nanosleep): Rename from nanosleep.
32375
32376 2000-02-10  Jim Meyering  <meyering@lucent.com>
32377
32378         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
32379         gnu_nanosleep to rpl_nanosleep.
32380
32381 2000-02-09  Jim Meyering  <meyering@lucent.com>
32382
32383         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
32384         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
32385
32386 2000-02-08  Akim Demaille  <akim@epita.fr>
32387
32388         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
32389         `[' and `]' and remove uses of `changequote'.
32390         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
32391         (AC_SYS_LARGEFILE): Likewise.
32392         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
32393         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
32394         of changequote.
32395         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
32396         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
32397         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
32398         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
32399
32400 2000-02-05  Jim Meyering  <meyering@lucent.com>
32401
32402         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
32403         Remove explicit use of AC_HEADER_TIME.  It is required by
32404         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
32405         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
32406         in autoconf whereby the expansion of the latter ended up preceding
32407         the expansion of its prerequisite, AC_HEADER_TIME.
32408         Reported by Volker Borchert.
32409
32410 2000-02-03  Jim Meyering  <meyering@lucent.com>
32411
32412         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
32413
32414 2000-02-03  Jim Meyering  <meyering@lucent.com>
32415
32416         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
32417         rather than with `#if HAVE_UTMPNAME'.
32418
32419 2000-02-02  Jim Meyering  <meyering@lucent.com>
32420
32421         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
32422         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
32423         Reported by Eli Zaretskii.
32424
32425 2000-02-01  Jim Meyering  <meyering@lucent.com>
32426
32427         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
32428
32429 2000-01-31  Jim Meyering  <meyering@lucent.com>
32430
32431         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
32432         functions.  Add the time.h and sys/time.h headers along with the
32433         AC_REQUIRE'ment of AC_HEADER_TIME.
32434
32435 2000-01-31  Jim Meyering  <meyering@lucent.com>
32436
32437         * lib/nanosleep.h (nanosleep): Guard declaration with
32438         `#if ! HAVE_DECL_NANOSLEEP'.
32439         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
32440         the declaration in that vendor's sys/timers.h.
32441         Reported by Christian Krackowizer.
32442
32443         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
32444         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
32445         (ISPRINT): Likewise.
32446         Reported by Tom Tromey.
32447
32448 2000-01-30  Jim Meyering  <meyering@lucent.com>
32449
32450         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
32451
32452         * m4/prereq.m4 (utmp_includes): Define.
32453         Check for ut_user and ut_name members in both struct utmpx
32454         and struct utmp.
32455
32456 2000-01-30  Jim Meyering  <meyering@lucent.com>
32457
32458         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
32459         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
32460         header files where only utmpx.ut_user is declared.
32461
32462         * lib/readutmp.h (UT_USER): Define.
32463
32464 2000-01-29  Jim Meyering  <meyering@lucent.com>
32465
32466         * m4/lib-check.m4: New file containing library-related checks from
32467         fileutils and sh-utils (textutils had none).
32468
32469 2000-01-28  Jim Meyering  <meyering@lucent.com>
32470
32471         * m4/perl.m4: Change format of warning message to look more like that
32472         from the missing script.  Suggestion from François Pinard.
32473
32474 2000-01-25  Jim Meyering  <meyering@lucent.com>
32475
32476         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
32477         well as time.h in the compile check.
32478         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
32479         Fix typo in cross-compiling case: s/yes/no/.
32480
32481 2000-01-23  Jim Meyering  <meyering@lucent.com>
32482
32483         * m4/jm-macros.m4: Move df-related tests here from
32484         fileutils/configure.in
32485
32486         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
32487         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
32488
32489         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
32490         s/space/ac_fsusage_space/.
32491         (jm_FILE_SYSTEM_USAGE): Take two parameters.
32492
32493         * m4/ftruncate.m4: New file (derived from part of
32494         fileutils/configure.in).
32495         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
32496         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
32497
32498         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
32499         AC_SUBST these here, rather than just in sh-util/configure.in, so
32500         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
32501         all the same.
32502         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
32503         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
32504         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
32505         (AC_SUBST(POW_LIBM)): Likewise.
32506         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
32507
32508 2000-01-23  Jim Meyering  <meyering@lucent.com>
32509
32510         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
32511         obstack.c.
32512
32513 2000-01-22  Jim Meyering  <meyering@lucent.com>
32514
32515         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
32516
32517         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
32518
32519         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
32520         configure.in
32521         (AC_CHECK_HEADERS): Likewise for sh-utils.
32522         (AC_CHECK_HEADERS): Likewise for textutils.
32523         Merge the three lists of headers.
32524
32525         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
32526         from fileutils' configure.in.
32527
32528         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
32529         code. Moved tests into their own function (_jm_DECL_HEADERS) in
32530         check-decl.m4.
32531
32532         * m4/check-decl.m4: Use #if rather than #ifdef.
32533         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
32534         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
32535         (_jm_DECL_HEADERS): Define new function.
32536         (jm_CHECK_DECLARATIONS): Require it.
32537
32538 2000-01-22  Jim Meyering  <meyering@lucent.com>
32539
32540         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
32541         [! HAVE_DECL_STRTOULL]: Declare strtoull.
32542         Required for some AIX systems.  Reported by Christian Krackowizer.
32543         [TESTING] (main): New function.
32544
32545         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
32546         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
32547         letters.
32548
32549         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
32550         iswprint.
32551
32552         * lib/strverscmp.c (ISDIGIT): Define.
32553         (strverscmp): Use ISDIGIT, not isdigit.
32554
32555 2000-01-19  Jim Meyering  <meyering@lucent.com>
32556
32557         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
32558         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
32559         defines `struct timespec' in <sys/time.h>
32560
32561         * m4/c-bs-a.m4: Remove uses of changequote altogether.
32562         Thanks to Akim for explaining.
32563
32564 2000-01-17  Paul Eggert  <eggert@twinsun.com>
32565
32566         * lib/nanosleep.c (nanosleep):
32567         Don't use SA_INTERRUPT to decide whether to call sigaction, as
32568         POSIX.1 doesn't require SA_INTERRUPT and some systems
32569         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
32570         it's been part of POSIX.1 since day 1 (in 1988).
32571
32572 2000-01-17  Jim Meyering  <meyering@lucent.com>
32573
32574         * lib/interlock: Remove unused file.  Reported by François Pinard.
32575
32576 2000-01-16  Paul Eggert  <eggert@twinsun.com>
32577
32578         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
32579         alert, backslash, formfeed, and vertical tab unnecessarily in
32580         shell quoting style.
32581
32582 2000-01-16  Jim Meyering  <meyering@lucent.com>
32583
32584         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
32585         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
32586         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
32587         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
32588
32589 2000-01-16  Jim Meyering  <meyering@lucent.com>
32590
32591         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
32592         because the latter didn't work.
32593
32594 2000-01-15  Jim Meyering  <meyering@lucent.com>
32595
32596         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
32597         (AC_REPLACE_FUNCS): Add memcpy and memset.
32598         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
32599         Add strpbrk.
32600         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
32601
32602 2000-01-12  Jim Meyering  <meyering@lucent.com>
32603
32604         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
32605         (jm_PREREQ): Use it.
32606         (jm_PREREQ_READUTMP): New macro.
32607         (jm_PREREQ): Use it.
32608
32609 2000-01-11  Paul Eggert  <eggert@twinsun.com>
32610
32611         Quote multibyte characters correctly.
32612         * m4/c-bs-a.m4: New file.
32613         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
32614         (jm_PREREQ): Use it.
32615
32616 2000-01-11  Paul Eggert  <eggert@twinsun.com>
32617
32618         * m4/uintmax_t.m4: Port to autoconf 2.13.
32619
32620 2000-01-08  Jim Meyering  <meyering@ascend.com>
32621
32622         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
32623         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
32624
32625 2000-01-04  Jim Meyering  <meyering@ascend.com>
32626
32627         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
32628         jm_STRUCT_DIRENT_D_TYPE.
32629         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
32630         jm_STRUCT_DIRENT_D_INO.
32631         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
32632         jm_STRUCT_UTIMBUF.
32633         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
32634         renamings.
32635         * m4/utime.m4: Likewise.
32636
32637         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
32638         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
32639
32640 2000-01-03  Paul Eggert  <eggert@twinsun.com>
32641
32642         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
32643         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
32644
32645 2000-01-02  Jim Meyering  <meyering@ascend.com>
32646
32647         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
32648         remember if this is necessary.
32649
32650 1999-12-26  Jim Meyering  <meyering@ascend.com>
32651
32652         * m4/jm-macros.m4: Use it here.
32653         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
32654
32655 1999-12-23  Jim Meyering  <meyering@ascend.com>
32656
32657         * m4/jm-macros.m4: Check for clock_gettime (moved from
32658         fileutils/configure.in)
32659         Check for gettimeofday.
32660
32661 1999-12-20  Jim Meyering  <meyering@ascend.com>
32662
32663         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
32664         autoconf-2.14a-1999-12-20.
32665
32666 1999-12-19  Jim Meyering  <meyering@ascend.com>
32667
32668         * m4/lstat-slash.m4: New file.
32669         * m4/jm-macros.m4: Use the new macro:
32670         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
32671
32672 1999-12-07  Jim Meyering  <meyering@ascend.com>
32673
32674         * m4/perl.m4: Require that File::Compare be available, too.
32675         Too many systems seem to lack it.
32676
32677         * m4/strftime.m4: Add checks for most of the cpp macros tested in
32678         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
32679
32680 1999-11-18  Paul Eggert  <eggert@twinsun.com>
32681
32682         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
32683         problem with the QNX 4.25 shell, which doesn't propagate exit
32684         status of failed commands inside shell assignments.
32685
32686 1999-11-17  Jim Meyering  <meyering@ascend.com>
32687
32688         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
32689
32690 1999-11-07  Jim Meyering  <meyering@ascend.com>
32691
32692         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
32693
32694 1999-11-06  Jim Meyering  <meyering@ascend.com>
32695
32696         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
32697         * m4/jm-macros.m4 (jm_MACROS): Use it here.
32698
32699 1999-11-05  Jim Meyering  <meyering@ascend.com>
32700
32701         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
32702         configure.in of textutils, fileutils, and sh-utils into this one
32703         (shared between those packages) file.
32704         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
32705         AC_STRUCT_ST_BLKSIZE.
32706
32707 1999-11-03  Jim Meyering  <meyering@ascend.com>
32708
32709         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
32710         of AC_CHECK_TYPE checks includes unistd.h.
32711         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
32712         Suggestion from Akim Demaille.
32713
32714 1999-10-30  Jim Meyering  <meyering@ascend.com>
32715
32716         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
32717         m4-quoted string.
32718         * m4/ls-mntd-fs.m4: Likewise.
32719         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
32720         * m4/jm-winsz1.m4: Likewise.
32721
32722         * m4/const.m4: Remove file, since the fix made it into the experimental
32723         version of autoconf.
32724         * m4/mktime.m4: Likewise.
32725
32726         * m4/check-type.m4: Remove file, now that the latest version of
32727         AC_CHECK_TYPE takes a third arg to specify additional #includes.
32728
32729         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
32730         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
32731         AC_CHECK_TYPE.
32732
32733 1999-10-04  Jim Meyering  <meyering@ascend.com>
32734
32735         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
32736
32737 1999-09-22  Paul Eggert  <eggert@twinsun.com>
32738
32739         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
32740         2.95.1 bug with HP-UX 10.20.
32741
32742 1999-09-17  Jim Meyering  <meyering@ascend.com>
32743
32744         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
32745         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
32746         due to missing strdup (against sh-utils-2.0).
32747
32748 1999-08-29  Jim Meyering  <meyering@ascend.com>
32749
32750         * m4/jm-macros.m4: Require jm_BISON.
32751         * m4/bison.m4: New file.
32752
32753 1999-08-17  Paul Eggert  <eggert@twinsun.com>
32754
32755         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
32756         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
32757
32758 1999-08-05  Jim Meyering  <meyering@ascend.com>
32759
32760         * m4/getline.m4: Rename test file from conftestdata to conftest.data
32761         to avoid conflicts with `conftest' on 8+3 filesystems.
32762         Suggestion from Eli Zaretskii.
32763
32764 1999-08-04  Jim Meyering  <meyering@ascend.com>
32765
32766         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
32767         fileutils and sh-utils (textutils's getline test was inadequate).
32768         (AM_FUNC_GETLINE): Run this test.
32769         (AC_CHECK_FUNCS): Check for getdelim.
32770         Reported by Bob Proulx.
32771
32772 1999-08-02  Jim Meyering  <meyering@ascend.com>
32773
32774         * m4/jm-macros.m4: Add a comment.
32775
32776 1999-08-01  Paul Eggert  <eggert@twinsun.com>
32777
32778         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
32779         <inttypes.h> defines strtoumax as a macro (and not as a
32780         function).
32781
32782 1999-08-01  Paul Eggert  <eggert@twinsun.com>
32783
32784         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
32785         that we can shift, multiply and divide unsigned long long
32786         values; Ultrix cc can't do it.
32787
32788 1999-08-01  Paul Eggert  <eggert@twinsun.com>
32789
32790         * m4/mktime.m4: New file, which is a preview of what should appear
32791         in the next public autoconf release.
32792
32793 1999-08-01  Paul Eggert  <eggert@twinsun.com>
32794
32795         * m4/lfs.m4: Remove this file.
32796         * m4/largefile.m4: New file.  It contains the old contents of
32797         lfs.m4, except that all names with prefix AC_LFS have been
32798         changed to use the prefix AC_SYS_LARGEFILE instead, to be
32799         compatible with future autoconf versions.  Also, some minor m4
32800         quoting problems have been fixed.
32801
32802 1999-08-01  Paul Eggert  <eggert@twinsun.com>
32803
32804         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
32805         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
32806         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
32807         and simplify the shell code.
32808
32809 1999-08-01  Jim Meyering  <meyering@ascend.com>
32810
32811         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
32812         m4.
32813
32814 1999-07-20  Jim Meyering  <meyering@ascend.com>
32815
32816         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
32817
32818 1999-07-15  Jim Meyering  <meyering@ascend.com>
32819
32820         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
32821
32822 1999-05-22  Jim Meyering  <meyering@ascend.com>
32823
32824         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
32825
32826 1999-05-20  Jim Meyering  <meyering@ascend.com>
32827
32828         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
32829         Add a colon after each `then' in case $4 is empty.
32830
32831 1999-05-16  Jim Meyering  <meyering@ascend.com>
32832
32833         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
32834
32835 1999-05-10  Jim Meyering  <meyering@ascend.com>
32836
32837         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
32838
32839         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
32840         AC_FUNC_MKTIME.
32841
32842 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
32843
32844         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
32845
32846 1999-05-04  Paul Eggert  <eggert@twinsun.com>
32847
32848         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
32849         not CPPFLAGS, so that linking works correctly in IRIX.
32850
32851 1999-04-30  Paul Eggert  <eggert@twinsun.com>
32852
32853         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
32854
32855 1999-04-20  Paul Eggert  <eggert@twinsun.com>
32856
32857         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
32858         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
32859         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
32860         jm_AC_TYPE_UNSIGNED_LONG_LONG.
32861         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
32862
32863         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
32864
32865 1999-04-20  Jim Meyering  <meyering@ascend.com>
32866
32867         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
32868         AC_REPLACE xstroull if necessary.  From Paul Eggert.
32869         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
32870
32871 1999-04-18  Jim Meyering  <meyering@ascend.com>
32872
32873         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
32874         * m4/jm-macros.m4: Use it.
32875
32876 1999-04-06  Jim Meyering  <meyering@ascend.com>
32877
32878         * m4/strftime.m4: Remove test for %f.
32879
32880 1999-03-29  Jim Meyering  <meyering@ascend.com>
32881
32882         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
32883         superset of the AC_TYPE_* checks in the textutils, fileutils,
32884         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
32885         AC_TYPE_PID_T.
32886
32887 1999-03-28  Jim Meyering  <meyering@ascend.com>
32888
32889         * m4/jm-macros.m4: Define GNU_PACKAGE here.
32890         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
32891         replaced e.g., in the *.sh files of the sh-utils.
32892
32893 1999-03-20  Jim Meyering  <meyering@ascend.com>
32894
32895         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
32896         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
32897         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
32898
32899 1999-03-19  Jim Meyering  <meyering@ascend.com>
32900
32901         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
32902
32903 1999-03-12  Jim Meyering  <meyering@ascend.com>
32904
32905         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
32906
32907 1999-03-07  Jim Meyering  <meyering@ascend.com>
32908
32909         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
32910         declared.
32911
32912 1999-02-17  Jim Meyering  <meyering@ascend.com>
32913
32914         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
32915         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
32916
32917 1999-02-07  Jim Meyering  <meyering@ascend.com>
32918
32919         * m4/group-member.m4: New file -- extracted from sh-utils'
32920         configure.in.
32921
32922         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
32923         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
32924
32925 1999-02-06  Jim Meyering  <meyering@ascend.com>
32926
32927         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
32928         * m4/fnmatch.m4: Likewise.
32929         * m4/getgroups.m4: Likewise.
32930         * m4/lstat.m4: Likewise.
32931         * m4/malloc.m4: Likewise.
32932         * m4/putenv.m4: Likewise.
32933         * m4/realloc.m4: Likewise.
32934         * m4/regex.m4: Likewise.
32935         * m4/stat.m4: Likewise.
32936         * m4/strftime.m4: Likewise.
32937         Suggestion from Alain Magloire.
32938
32939         * m4/chown.m4: Use `.$ac_objext', not `.o'.
32940         * m4/fnmatch.m4: Likewise.
32941         * m4/getgroups.m4: Likewise.
32942         * m4/getline.m4: Likewise.
32943         * m4/lstat.m4: Likewise.
32944         * m4/malloc.m4: Likewise.
32945         * m4/memcmp.m4: Likewise.
32946         * m4/putenv.m4: Likewise.
32947         * m4/realloc.m4: Likewise.
32948         * m4/regex.m4: Likewise.
32949         * m4/stat.m4: Likewise.
32950         * m4/strftime.m4: Likewise.
32951         Suggestion from Alain Magloire.
32952
32953         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
32954         an argument.
32955
32956         * m4/regex.m4: Add a run-time Test for proper operation of
32957         re_compile_pattern.
32958
32959 1999-01-31  Jim Meyering  <meyering@ascend.com>
32960
32961         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
32962
32963 1999-01-30  Jim Meyering  <meyering@ascend.com>
32964
32965         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
32966
32967         * m4/jm-mktime.m4: Make this a wrapper around the official
32968         AM_FUNC_MKTIME rather than my private copy, now that the official one
32969         is up to date.
32970         * m4/mktime.m4: Remove file.
32971
32972         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
32973         * m4/uptime.m4: Likewise.
32974         * m4/uintmax_t.m4: Likewise.
32975
32976 1999-01-28  Jim Meyering  <meyering@ascend.com>
32977
32978         * m4/jm-macros.m4: Use jm_AFS.
32979         * m4/afs.m4: New file (from fileutils' configure.in).
32980
32981         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
32982         * m4/chown.m4: Likewise.
32983         * m4/d-ino.m4: Likewise.
32984         * m4/d-type.m4: Likewise.
32985         * m4/fnmatch.m4: Likewise.
32986         * m4/getgroups.m4: Likewise.
32987         * m4/gettext.m4: Likewise.
32988         * m4/jm-mktime.m4: Likewise.
32989         * m4/jm-winsz2.m4: Likewise.
32990         * m4/lcmessage.m4: Likewise.
32991         * m4/ls-mntd-fs.m4: Likewise.
32992         * m4/malloc.m4: Likewise.
32993         * m4/memcmp.m4: Likewise.
32994         * m4/putenv.m4: Likewise.
32995         * m4/realloc.m4: Likewise.
32996         * m4/st_mtim.m4: Likewise.
32997         * m4/strftime.m4: Likewise.
32998
32999 1999-01-16  Jim Meyering  <meyering@ascend.com>
33000
33001         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
33002         (ARGMATCH_DIE_DECL): Define.
33003
33004 1999-01-12  Jim Meyering  <meyering@ascend.com>
33005
33006         * m4/Makefile.am.in: Rewrite to avoid using fmt.
33007         Reported by Lars Hecking.
33008
33009 1999-01-10  Jim Meyering  <meyering@ascend.com>
33010
33011         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
33012         gross kludge.
33013         * m4/inttypes_h.m4: Likewise.
33014         * m4/lstat.m4: Likewise.
33015         * m4/malloc.m4: Likewise.
33016         * m4/readdir.m4: Likewise.
33017         * m4/realloc.m4: Likewise.
33018         * m4/st_dm_mode.m4: Likewise.
33019         * m4/stat.m4: Likewise.
33020         * m4/utimbuf.m4: Likewise.
33021         * m4/utimes.m4: Likewise.
33022
33023         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
33024         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
33025         comments in config.h.in are meaningful.
33026
33027         * m4/jm-macros.m4: Require autoconf-2.13 here.
33028
33029         * m4/regex.m4: By default, don't use the included regex.c on systems
33030         with glibc 2.  Suggestion from Uli Drepper.
33031
33032 1999-01-02  Jim Meyering  <meyering@ascend.com>
33033
33034         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
33035
33036 1998-12-18  Jim Meyering  <meyering@ascend.com>
33037
33038         * m4/Makefile.am.in (Makefile.am): Simplify rule.
33039         Based on a suggestion from Lars Hecking.
33040
33041 1998-11-16  Paul Eggert  <eggert@twinsun.com>
33042
33043         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
33044
33045 1998-11-16  Jim Meyering  <meyering@ascend.com>
33046
33047         * m4/lfs.m4: Double-quote the `uname...` expression.
33048
33049 1998-11-14  Jim Meyering  <meyering@ascend.com>
33050
33051         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
33052         * m4/stat.m4: Likewise.
33053
33054 1998-11-03  Jim Meyering  <meyering@ascend.com>
33055
33056         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
33057         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
33058
33059 1998-10-18  Jim Meyering  <meyering@ascend.com>
33060
33061         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
33062
33063 1998-10-17  Jim Meyering  <meyering@ascend.com>
33064
33065         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
33066         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
33067         calls for those previously hard-coded headers.  Instead, take a new
33068         parameter.
33069         (jm_CHECK_DECLARATIONS): Reflect interface change.
33070         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
33071         (jm_CHECK_DECL_LOCALTIME_R): New macro.
33072
33073         * m4/mktime.m4: Test for spring-forward gap before long-running test.
33074
33075 1998-10-14  Jim Meyering  <meyering@ascend.com>
33076
33077         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
33078         instead of "TZ=America/Vancouver".  From Paul Eggert.
33079
33080 1998-10-11  Jim Meyering  <meyering@ascend.com>
33081
33082         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
33083         This adds a test for a recently added compatibility fix for mktime.c.
33084         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
33085
33086 1998-09-27  Jim Meyering  <meyering@ascend.com>
33087
33088         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
33089
33090         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
33091         ../configure.in, including a change from Gordon Matzigkeit to allow
33092         cross-compiling for the Hurd.
33093
33094         * m4/glibc.m4: New file/macro to test for the GNU C Library
33095         versions 1 and 2.  From Gordon Matzigkeit.
33096         Indent.
33097
33098 1998-09-21  Jim Meyering  <meyering@ascend.com>
33099
33100         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
33101
33102 1998-08-18  Paul Eggert  <eggert@twinsun.com>
33103
33104         Port nanosecond-resolution times to UnixWare 2.1.2 and
33105         pedantic Solaris 2.6.
33106
33107         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
33108         AC_STRUCT_ST_MTIM.
33109         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
33110         Generate name of ns member, instead of just 1 or undef.
33111         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
33112
33113 1998-08-15  Jim Meyering  <meyering@ascend.com>
33114
33115         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
33116         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
33117         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
33118         instead of jm_TYPE_SSIZE_T.
33119
33120 1998-08-12  Jim Meyering  <meyering@ascend.com>
33121
33122         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
33123
33124 1998-08-02  Jim Meyering  <meyering@ascend.com>
33125
33126         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
33127         in acconfig.h manually.
33128
33129 1998-07-31  Paul Eggert  <eggert@twinsun.com>
33130
33131         * m4/st_mtim.m4: New file.
33132
33133 1998-07-28  Jim Meyering  <meyering@ascend.com>
33134
33135         * m4/utimes.m4: Undef stat.
33136
33137 1998-07-25  Jim Meyering  <meyering@ascend.com>
33138
33139         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
33140         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
33141
33142 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
33143
33144         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
33145         uid and gid actually remain unchanged.
33146
33147 1998-07-07  Jim Meyering  <meyering@ascend.com>
33148
33149         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
33150
33151 1998-07-04  Jim Meyering  <meyering@ascend.com>
33152
33153         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
33154         to prove that this macro can be used in packages without regex.c.
33155
33156 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
33157
33158         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
33159         is to be used.
33160
33161 1998-07-03  Jim Meyering  <meyering@ascend.com>
33162
33163         * m4/gettext.m4: Add -lintl if it's found to be necessary.
33164
33165         * m4/gettext.m4: New file -- from gettext-0.10.35.
33166         * m4/lcmessage.m4: Likewise.
33167         * m4/progtest.m4: Likewise.
33168
33169         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
33170         * m4/jm-macros.m4: Require the new macro.
33171
33172 1998-06-29  Jim Meyering  <meyering@ascend.com>
33173
33174         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
33175         for the definition of NGROUPS (used in a system header included
33176         by sys/mount.h).
33177
33178 1998-06-28  Jim Meyering  <meyering@ascend.com>
33179
33180         * m4/ls-mntd-fs.m4: New file.
33181         * m4/fstypename.m4: New file.
33182
33183         * m4/jm-macros.m4: Require the new macro.
33184         * m4/jm-glibc-io.m4: New file.
33185
33186 1998-05-19  Jim Meyering  <meyering@ascend.com>
33187
33188         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
33189         * m4/lchown.m4: New file.
33190
33191         * m4/Makefile.am.in: New file.
33192         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
33193
33194 1998-05-14  Jim Meyering  <meyering@ascend.com>
33195
33196         * m4/Makefile.am (EXTRA_DIST): Add them.
33197         * m4/jm-macros.m4: New file.
33198         * m4/utimbuf.m4: New file.
33199
33200 1998-05-12  Jim Meyering  <meyering@ascend.com>
33201
33202         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
33203
33204 1998-05-11  Jim Meyering  <meyering@ascend.com>
33205
33206         * m4/isc-posix.m4: New file.
33207
33208 1998-05-10  Jim Meyering  <meyering@ascend.com>
33209
33210         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
33211
33212 1998-05-09  Jim Meyering  <meyering@ascend.com>
33213
33214         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
33215         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
33216         with automake.
33217
33218         * m4/ssize_t.m4: New file.
33219         * m4/mktime.m4: Remove file -- the new automake has this now.
33220
33221 1998-04-26  Jim Meyering  <meyering@ascend.com>
33222
33223         * m4/assert.m4: New file.
33224         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
33225
33226 1998-04-05  Jim Meyering  <meyering@ascend.com>
33227
33228         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
33229         (jm_PREREQ): Use it here.
33230
33231 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
33232
33233         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
33234         in acconfig.h.
33235
33236 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
33237
33238         * m4/prereq.m4: New file.
33239         * m4/error.m4: New file.
33240         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
33241
33242 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
33243
33244         * m4/getline.m4: Don't set am_cv_func_working_getline before the
33245         cache-check for the same variable -- that defeated the purpose of
33246         the test; the test program was never run.  This was a problem only
33247         on systems with losing getline functions -- HP-UX 10.20 is one.
33248         Reported by Bjorn Helgaas.
33249
33250 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
33251
33252         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
33253
33254 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
33255
33256         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
33257
33258         * m4/const.m4: New file.  Use an initializer in this declaration
33259         typedef int charset[2]; const charset x;
33260         Reported by Bob Glickstein.
33261
33262 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
33263
33264         * m4/chown.m4: Fix reversed types on -1 args to chown.
33265         From Kaveh Ghazi.
33266
33267 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
33268
33269         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
33270         Add lseek and memchr.
33271
33272         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
33273         T.E.Dickey <dickey@clark.net> said that some older preprocessors
33274         have a 20-character limit on names.
33275
33276 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
33277
33278         * m4/inttypes_h.m4: New file.
33279         * m4/uintmax_t.m4: New file.
33280         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
33281
33282 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
33283   Free Software Foundation, Inc.
33284 Copying and distribution of this file, with or without modification,
33285 are permitted provided the copyright notice and this notice are preserved.