Rename sysexits_.h to sysexits.in.h.
[pspp] / ChangeLog
1 2007-09-30  Bruno Haible  <bruno@clisp.org>
2
3         * lib/alloca.in.h: Renamed from lib/alloca_.h.
4         * modules/alloca-opt (Files, Makefile.am): Use alloca.in.h instead of
5         alloca_.h.
6         * lib/argz.in.h: Renamed from lib/argz_.h.
7         * modules/argz (Files, Makefile.am): Use argz.in.h instead of argz_.h.
8         * lib/byteswap.in.h: Renamed from lib/byteswap_.h.
9         * modules/byteswap (Files, Makefile.am): Use byteswap.in.h instead of
10         byteswap_.h.
11         * lib/dirent.in.h: Renamed from lib/dirent_.h.
12         * modules/fchdir (Files, Makefile.am): Use dirent.in.h instead of
13         dirent_.h.
14         * lib/fcntl.in.h: Renamed from lib/fcntl_.h.
15         * modules/fcntl (Files, Makefile.am): Use fcntl.in.h instead of
16         fcntl_.h.
17         * lib/float.in.h: Renamed from lib/float_.h.
18         * modules/float (Files, Makefile.am): Use float.in.h instead of
19         float_.h.
20         * 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         * lib/locale.in.h: Renamed from lib/locale_.h.
35         * modules/locale (Files, Makefile.am): Use locale.in.h instead of
36         locale_.h.
37         * lib/math.in.h: Renamed from lib/math_.h.
38         * modules/math (Files, Makefile.am): Use math.in.h instead of math_.h.
39         * lib/netinet_in.in.h: Renamed from lib/netinet_in_.h.
40         * modules/netinet_in (Files, Makefile.am): Use netinet_in.in.h instead
41         of netinet_in_.h. Add dependency.
42         * lib/poll.in.h: Renamed from lib/poll_.h.
43         * modules/poll (Files, Makefile.am): Use poll.in.h instead of poll_.h.
44         * lib/search.in.h: Renamed from lib/search_.h.
45         * modules/search (Files, Makefile.am): Use search.in.h instead of
46         search_.h.
47         * lib/signal.in.h: Renamed from lib/signal_.h.
48         * modules/signal (Files, Makefile.am): Use signal.in.h instead of
49         _signal.h.
50         * lib/stdbool.in.h: Renamed from lib/stdbool_.h.
51         * modules/stdbool (Files, Makefile.am): Use stdbool.in.h instead of
52         stdbool_.h.
53         * lib/stdint.in.h: Renamed from lib/stdint_.h.
54         * modules/stdint (Files, Makefile.am): Use stdint.in.h instead of
55         stdint_.h.
56         * lib/stdio.in.h: Renamed from lib/stdio_.h.
57         * modules/stdio (Files, Makefile.am): Use stdio.in.h instead of
58         stdio_.h.
59         * lib/stdlib.in.h: Renamed from lib/stdlib_.h.
60         * modules/stdlib (Files, Makefile.am): Use stdlib.in.h instead of
61         stdlib_.h.
62         * lib/string.in.h: Renamed from lib/string_.h.
63         * modules/string (Files, Makefile.am): Use string.in.h instead of
64         string_.h.
65         * doc/gnulib-tool.texi (Initial import): Update.
66         * lib/sys_select.in.h: Renamed from lib/sys_select_.h.
67         * modules/sys_select (Files, Makefile.am): Use sys_select.in.h instead
68         of sys_select_.h. Add dependency.
69         * lib/sys_socket.in.h: Renamed from lib/sys_socket_.h.
70         * modules/sys_socket (Files, Makefile.am): Use sys_socket.in.h instead
71         of sys_socket_.h.
72         * lib/sys_stat.in.h: Renamed from lib/sys_stat_.h.
73         * modules/sys_stat (Files, Makefile.am): Use sys_stat.in.h instead of
74         sys_stat_.h.
75         * lib/sys_time.in.h: Renamed from lib/sys_time_.h.
76         * modules/sys_time (Files, Makefile.am): Use sys_time.in.h instead of
77         sys_time_.h.
78         * lib/sysexits.in.h: Renamed from lib/sysexits_.h.
79         * modules/sysexits (Files, Makefile.am): Use sysexits.in.h instead of
80         sysexits_.h.
81
82 2007-09-30  Bruno Haible  <bruno@clisp.org>
83
84         * tests/test-getaddrinfo.c (AF_UNSPEC): Provide a fallback definition.
85         Needed on BeOS.
86
87 2007-09-30  Bruno Haible  <bruno@clisp.org>
88
89         * modules/dirname-tests (check_PROGRAMS): Renamed from noinst_PROGRAMS.
90
91 2007-09-29  Bruno Haible  <bruno@clisp.org>
92
93         * lib/stdio_.h (getdelim, getline): Add identifiers. Doc tweak.
94
95 2007-09-29  Bruno Haible  <bruno@clisp.org>
96
97         * lib/xreadlink.c (xreadlink): Simplify to a wrapper around areadlink.
98         * modules/xreadlink (Depends-on): Add areadlink, remove readlink etc.
99         * build-aux/install-reloc: Compile also areadlink.c.
100         * modules/relocatable-prog-wrapper (Files): Add lib/areadlink.[hc].
101
102 2007-09-29  Bruno Haible  <bruno@clisp.org>
103
104         * gnulib-tool (func_emit_initmacro_done): Indentation.
105
106 2007-09-29  Bruno Haible  <bruno@clisp.org>
107
108         * README: Add CVS checkout update instructions.
109         Info from Bob Proulx <bob@proulx.com>.
110
111 2007-09-28  Eric Blake  <ebb9@byu.net>
112
113         Provide move-if-change.
114         * build-aux/move-if-change: New file, based on best practice
115         rather than any canonical upstream location.
116
117 2007-09-28  Jim Meyering  <jim@meyering.net>
118
119         Fix canonicalize loop-detection corner case.
120         Do not attempt to stat the symlink values stored via seen_triple.
121         Without this, coreutils' tests/misc/readlink-fp-loop test would fail
122         on linux-2.6.18, (but not 2.6.22).
123         * lib/canonicalize.c (seen_triple): Use triple_compare_ino_str, not
124         triple_compare.  The former compares dev,ino,filename, while the latter
125         would actually stat dirname(filename) when dev and ino were equal.
126         * lib/hash-triple.c: Install <string.h>.
127         (STREQ): Define.
128         (triple_compare_ino_str): New function.
129         * lib/hash-triple.h (triple_compare_ino_str): Declare it.
130
131 2007-09-28  Eric Blake  <ebb9@byu.net>
132
133         Enforce that AC_REPLACE_FUNCS files exist.
134         * gnulib-tool (func_emit_initmacro_done): Make AC_LIBSOURCES
135         override check for typos.
136
137         Fix test-closein on Solaris 10.
138         * tests/test-closein.c (main): Don't assume stdin can be inherited
139         closed on all systems.
140         * tests/test-closein.sh: Likewise.
141         Reported by Piotr Tarnowski.
142
143 2007-09-28  Jim Meyering  <jim@meyering.net>
144
145         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Fix typo in comment.
146
147 2007-09-27  Jim Meyering  <jim@meyering.net>
148
149         canonicalize: Avoid a false-positive cycle failure.
150         * modules/canonicalize (Depends-on): Add file-set and hash-triple.
151         Sort.  Remove cycle-check.
152         * lib/canonicalize.c: Include file-set.h and hash-triple.h,
153         not cycle-check.h.
154         (seen_triple): New function.
155         (canonicalize_filename_mode): Use it instead of cycle-check.
156         * tests/test-canonicalize.c: Add a test for this bug.
157         * tests/test-canonicalize.sh: Set up and run the test.
158
159         New module, file-set, from coreutils.
160         * modules/file-set: Define it.
161         * lib/file-set.c, lib/file-set.h: Implement.
162
163         New module, hash-triple, from coreutils.
164         * modules/hash-triple: Define it.
165         * lib/hash-triple.c, lib/hash-triple.h: Implement.
166
167 2007-09-25  Eric Blake  <ebb9@byu.net>
168
169         Fix strerror on Interix.
170         * lib/string_.h (strerror): Declare replacement.
171         * doc/functions/strerror.texi (strerror): Document the Interix
172         shortcoming.
173         * modules/string (Makefile.am): Support new hooks.
174         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Add new hooks.
175         * m4/strerror.m4 (gl_FUNC_STRERROR): Defer to
176         gl_FUNC_STRERROR_SEPARATE.
177         (gl_FUNC_STRERROR_SEPARATE): Check for Interix bug.
178         * lib/strerror.c (rpl_strerror): Provide replacement.
179         * modules/strerror (Depends-on): Add string.
180         (configure.ac): Detect use of module.
181         * tests/test-strerror.c: New file.
182         * modules/strerror-tests: New test module.
183         * modules/argp (Depends-on): Add strerror.
184         * modules/error (Depends-on): Likewise.
185         Reported by Martin Koeppe.
186
187 2007-09-24  Bruno Haible  <bruno@clisp.org>
188
189         * README: Update git instructions.
190
191 2007-09-24  Eric Blake  <ebb9@byu.net>
192
193         Revert fpending breakage from 2007-09-08.
194         * m4/fpending.m4 (gl_FUNC_FPENDING): Don't require existence of
195         __fpending.c.
196
197 2007-09-24  Jim Meyering  <jim@meyering.net>
198
199         filenamecat.c: Add a test.
200         * lib/filenamecat.c (main) [TEST_FILE_NAME_CONCAT]: Add a test
201         showing how the function works when DIR is the empty string.
202
203 2007-09-21  Simon Josefsson  <simon@josefsson.org>
204
205         * tests/test-canonicalize.sh: Turn on executable bit.
206
207 2007-09-19  Eric Blake  <ebb9@byu.net>
208
209         * README: Update CVS instructions.
210
211 2007-09-18  Bruno Haible  <bruno@clisp.org>
212
213         * modules/areadlink: New file.
214         * lib/areadlink.h (areadlink): New declaration.
215         * lib/areadlink.c: New file, based on lib/xreadlink.c.
216
217 2007-09-17  Jim Meyering  <jim@meyering.net>
218
219         * lib/savewd.c (ESTALE) [!defined]: Define.
220         Reported to be required on Interix by Martin Koeppe.
221
222 2007-09-17  Bruno Haible  <bruno@clisp.org>
223
224         * gnulib-tool (func_version): Use $version.
225
226 2007-09-16  Bruno Haible  <bruno@clisp.org>
227
228         * m4/printf.m4 (gl_PRINTF_LONG_DOUBLE, gl_PRINTF_INFINITE,
229         gl_PRINTF_INFINITE_LONG_DOUBLE): Increase buf's size from 100 to 10000.
230         Needed on glibc-2.6.1 with -fstack-protector -D_FORTIFY_SOURCE=2.
231         Reported by Greg Schafer <gschafer@zip.com.au>.
232
233 2007-09-15  Bruno Haible  <bruno@clisp.org>
234
235         * gnulib-tool (sed): Try a little harder to make bash understand the
236         alias.
237         Reported by Bruce Korb <bruce.korb@gmail.com>.
238
239 2007-09-13  Eric Blake  <ebb9@byu.net>
240
241         * ChangeLog: Remove conflict markers.
242
243 2007-09-13  Simon Josefsson  <simon@josefsson.org>
244
245         * lib/gc-gnulib.c (gc_hash_open): Catch NULL calloc return value.
246         Reported by Bruno Haible <bruno@clisp.org>.
247
248 2007-09-12  Bruno Haible  <bruno@clisp.org>
249
250         * m4/lock.m4: Don't provide an AC_USE_SYSTEM_EXTENSIONS definition.
251         (gl_LOCK_EARLY_BODY): Use AC_GNU_SOURCE when AC_USE_SYSTEM_EXTENSIONS
252         is not defined.
253
254 2007-09-12  Eric Blake  <ebb9@byu.net>
255
256         Track CVS Autoconf on AC_USE_SYSTEM_EXTENSIONS.
257         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Update to CVS
258         Autoconf definition.
259         * modules/euidaccess (Depends-on): Add extensions, for
260         AC_USE_SYSTEM_EXTENSIONS with autoconf <= 2.59.
261         * modules/fnmatch (Depends-on): Likewise.
262         * modules/getaddrinfo (Depends-on): Likewise.
263         * modules/getdelim (Depends-on): Likewise.
264         * modules/getline (Depends-on): Likewise.
265         * modules/getsubopt (Depends-on): Likewise.
266         * modules/gettext (Depends-on): Likewise.
267         * modules/group-member (Depends-on): Likewise.
268         * modules/mbchar (Depends-on): Likewise.
269         * modules/memmem (Depends-on): Likewise.
270         * modules/mempcpy (Depends-on): Likewise.
271         * modules/memrchr (Depends-on): Likewise.
272         * modules/pagealign_alloc (Depends-on): Likewise.
273         * modules/readutmp (Depends-on): Likewise.
274         * modules/stpcpy (Depends-on): Likewise.
275         * modules/stpncpy (Depends-on): Likewise.
276         * modules/strchrnul (Depends-on): Likewise.
277         * modules/strndup (Depends-on): Likewise.
278         * modules/strsep (Depends-on): Likewise.
279         * modules/strverscmp (Depends-on): Likewise.
280         * modules/vasprintf (Depends-on): Likewise.
281         * modules/wcwidth (Depends-on): Likewise.
282         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): AC_GNU_SOURCE will be
283         obsolete in Autoconf 2.62; use AC_USE_SYSTEM_EXTENSIONS instead.
284         * m4/fnmatch.m4 (gl_FUNC_FNMATCH_GNU): Likewise.
285         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDR_INFO): Likewise.
286         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Likewise.
287         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise.
288         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Likewise.
289         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
290         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER): Likewise.
291         * m4/mbchar.m4 (gl_MBCHAR): Likewise.
292         * m4/memmem.m4 (gl_FUNC_MEMMEM): Likewise.
293         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
294         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
295         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Likewise.
296         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC): Likewise.
297         * m4/readutmp.m4 (gl_READUTMP): Likewise.
298         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
299         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
300         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
301         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
302         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
303         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
304         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
305         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP): Likewise.
306         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): Likewise.
307         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
308         * m4/lock.m4 (gl_LOCK_EARLY_BODY): Likewise, but provide fallback,
309         so that lock.m4 can be used in gettext without extensions module.
310
311 2007-09-11  Bruno Haible  <bruno@clisp.org>
312
313         * m4/isc-posix.m4: Remove file.
314         Suggested by Eric Blake.
315
316 2007-09-11  Eric Blake  <ebb9@byu.net>
317
318         * ChangeLog: Restore lines accidentally truncated 2007-04-06.
319
320 2007-09-10  Bruno Haible  <bruno@clisp.org>
321
322         * posix-modules: Fix typo in error message.
323         Reported by Matt <mkraai@beckman.com>.
324
325 2007-09-09  Bruno Haible  <bruno@clisp.org>
326
327         * doc/functions/getdelim.texi: Update list of platforms lacking the
328         function.
329         * doc/functions/getline.texi: Likewise.
330
331 2007-09-09  Jim Meyering  <jim@meyering.net>
332
333         * lib/hash.c (hash_initialize): Detect calloc failure.
334         Reported by Bruno Haible.
335
336 2007-09-09  Bruno Haible  <bruno@clisp.org>
337
338         * lib/canonicalize-lgpl.c (__realpath): Set errno to ENOMEM when
339         malloc or realloc fails.
340
341 2007-09-09  Bruno Haible  <bruno@clisp.org>
342
343         * modules/getcwd (Depends-on): Add malloc-posix.
344         * modules/glob (Depends-on): Likewise.
345         * modules/putenv (Depends-on): Likewise.
346         * modules/strdup (Depends-on): Likewise.
347         * modules/getdelim (Depends-on): Add realloc-posix.
348         * modules/read-file (Depends-on): Likewise.
349
350 2007-09-09  Bruno Haible  <bruno@clisp.org>
351
352         * m4/malloc.m4 (gl_CHECK_MALLOC_POSIX): New macro.
353         (gl_FUNC_MALLOC_POSIX): Require it.
354         * m4/realloc.m4 (gl_FUNC_REALLOC_POSIX): Likewise.
355         * m4/calloc.m4 (gl_FUNC_CALLOC_POSIX): Likewise.
356         * modules/realloc (Files): Add m4/malloc.m4.
357         * modules/calloc (Files): Likewise.
358
359 2007-09-09  Bruno Haible  <bruno@clisp.org>
360
361         * modules/malloc-posix: New file.
362         * modules/malloc (Depends-on): Add malloc-posix.
363         * lib/malloc.c: Include errno.h.
364         (rpl_malloc): Merge the requirements of a glibc-compatible malloc
365         and a POSIX-compatible malloc into a single function. Set ENOMEM
366         when returning NULL.
367         * m4/malloc.m4: New file.
368         * doc/functions/malloc.texi: Mention the malloc-posix module.
369         * lib/stdlib_.h (malloc): New declaration.
370         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize
371         GNULIB_MALLOC_POSIX and HAVE_MALLOC_POSIX.
372         * modules/stdlib (stdlib.h): Substitute also GNULIB_MALLOC_POSIX
373         and HAVE_MALLOC_POSIX.
374
375 2007-09-09  Bruno Haible  <bruno@clisp.org>
376
377         * modules/realloc-posix: New file.
378         * modules/realloc (Depends-on): Add realloc-posix.
379         * lib/realloc.c: Include errno.h.
380         (rpl_realloc): Merge the requirements of a glibc-compatible realloc
381         and a POSIX-compatible realloc into a single function. Set ENOMEM
382         when returning NULL.
383         * m4/realloc.m4: New file.
384         * doc/functions/realloc.texi: Mention the realloc-posix module.
385         * lib/stdlib_.h (realloc): New declaration.
386         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize
387         GNULIB_REALLOC_POSIX and HAVE_REALLOC_POSIX.
388         * modules/stdlib (stdlib.h): Substitute also GNULIB_REALLOC_POSIX
389         and HAVE_REALLOC_POSIX.
390
391 2007-09-09  Bruno Haible  <bruno@clisp.org>
392
393         * modules/calloc-posix: New file.
394         * modules/calloc (Depends-on): Add calloc-posix.
395         * lib/calloc.c: Include errno.h.
396         (rpl_calloc): Merge the requirements of a glibc-compatible calloc
397         and a POSIX-compatible calloc into a single function. Set ENOMEM
398         when returning NULL.
399         * m4/calloc.m4 (gl_FUNC_CALLOC_POSIX): New macro.
400         * doc/functions/calloc.texi: Mention the calloc-posix module.
401         * lib/stdlib_.h (calloc): New declaration.
402         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize
403         GNULIB_CALLOC_POSIX and HAVE_CALLOC_POSIX.
404         * modules/stdlib (stdlib.h): Substitute also GNULIB_CALLOC_POSIX
405         and HAVE_CALLOC_POSIX.
406
407 2007-09-09  Bruno Haible  <bruno@clisp.org>
408
409         Allow for modules to show an arbitrary notice.
410         * modules/TEMPLATE-EXTENDED: Add 'Notice' field.
411         * gnulib-tool: New option --extract-notice.
412         (func_usage): Document it.
413         (sed_extract_prog): Update.
414         (func_get_notice): New function.
415         (func_modules_notice): New function.
416         (func_import, func_create_testdir): Invoke it.
417         Suggested by Jim Meyering.
418
419 2007-09-09  Bruno Haible  <bruno@clisp.org>
420
421         * gnulib-tool: New options --verbose, --quiet.
422         (func_usage): Document them.
423         (verbose): New variable.
424         (func_execute_command): New function.
425         (func_import): Don't show the module list and the file list if
426         $verbose < 0.
427         (func_create_testdir): Likewise. Use func_execute_command.
428         (func_create_megatestdir): Use func_execute_command.
429
430 2007-09-08  Bruno Haible  <bruno@clisp.org>
431
432         * gnulib-tool (func_import): Prefer rsync over wget when available,
433         for fetching the PO files.
434
435 2007-09-08  Bruno Haible  <bruno@clisp.org>
436
437         * posix-modules: New file. Portions copied from gnulib-tool.
438         * doc/gnulib.texi (POSIX Substitutes Library): New chapter.
439
440 2007-09-08  Jim Meyering  <jim@meyering.net>
441
442         Rename __fpending.c -> fpending.c and __fpending.h -> fpending.h
443         * lib/fpending.h: Rename from __fpending.h.
444         * lib/fpending.c: Rename from __fpending.c.
445         Include "fpending.h", not "__fpending.h".
446         * lib/__fpending.h, lib/__fpending.c: Remove files.
447         * modules/fpending (Files): Reflect new file names.
448         * lib/close-stream.c: Include "fpending.h", not "__fpending.h".
449
450 2007-09-08  Bruno Haible  <bruno@clisp.org>
451
452         * m4/inttypes-h.m4: Remove stub file.
453
454 2007-09-07  Simon Josefsson  <simon@josefsson.org>
455
456         * doc/headers/stdint.texi: Discuss #include_next issue.
457
458 2007-09-06  Paul Eggert  <eggert@cs.ucla.edu>
459
460         * build-aux/bootstrap: Remove obsolete comment about wget --help.
461
462 2007-09-06  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
463
464         * m4/time_h.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Fix misspelling
465         in variable name.
466
467 2007-09-03  Jim Meyering  <jim@meyering.net>
468
469         New module: git-version-gen.
470         * modules/git-version-gen: New file.
471
472         Import changes from coreutils for bootstrap script.
473
474         * build-aux/bootstrap (WGET_COMMAND): Remove code to set this variable.
475
476         bootstrap: uses rsync to download the .po files
477         * build-aux/bootstrap (po_download_command_format): New global.
478         (download_po_files): Use rsync.
479         (update_po_files): Don't remove .po files after download,
480         so future rsync runs can take advantage of the copies.
481
482         * build-aux/bootstrap (gnulib_tool): Make sha1sum check quietly.
483
484         Solve the unnecessary-.po-file-regeneration problem once and for all.
485         * build-aux/bootstrap (download_po_files): New function, renamed from
486         get_translations.  Now, downloads, but doesn't update LINGUAS.
487         (update_po_files): New function.
488
489         bootstrap: Ignore more.
490         * build-aux/bootstrap (symlink_to_dir): Add a directory name like
491         uniwidth to e.g., lib/.gitignore.
492         (slurp): Handle the sys_stat_.h -> sys mapping, too.
493
494         * build-aux/bootstrap: New setting: vc_ignore.
495         (insert_sorted_if_absent): Create $file if absent.
496         Adapt to new, possibly empty, list: $vc_ignore.
497
498         bootstrap: generate more ignorable names
499         * build-aux/bootstrap (slurp): When generating ignorable names,
500         also map .sin to .sed, .gperf to .c, and .y to .c.
501
502 2007-09-03  Jim Meyering  <jim@meyering.net>
503
504         * build-aux/git-version-gen: New file, from coreutils.  For details, see
505         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=bfe49f506
506
507 2007-09-02  Bruno Haible  <bruno@clisp.org>
508
509         Fix mis-recognition of 'mcs' on QNX 6.
510         * m4/csharpcomp.m4 (gt_CSHARPCOMP): Test whether the "mcs --version"
511         output contains the string "Mono".
512         * lib/csharpcomp.c (compile_csharp_using_mono): Likewise.
513         Reported by <kraai@ftbfs.org> at <https://savannah.gnu.org/bugs/?18337>.
514
515 2007-09-01  Bruno Haible  <bruno@clisp.org>
516
517         Fix collision between uniwidth/* and linebreak modules.
518         * lib/linebreak.h (locale_charset, uc_width, u8_width, u16_width,
519         u32_width): Remove declarations.
520         * lib/linebreak.c: Include uniwidth.h, uniwidth/cjk.h, streq.h.
521         (u32_mbtouc_unsafe, streq9, streq8, streq7, streq6, streq5, streq4,
522         streq3, streq2, streq1, streq0): Remove functions.
523         (STREQ): Remove macro.
524         (is_cjk_encoding): Remove function.
525         (nonspacing_table_data, nonspacing_table_ind): Remove constants.
526         (uc_width, u8_width, u16_width, u32_width): Remove functions.
527         * modules/linebreak (Depends-on): Add streq, uniwidth/width.
528         * NEWS: Document the change.
529
530 2007-09-01  Bruno Haible  <bruno@clisp.org>
531
532         * lib/streq.h: Add double-inclusion guard.
533
534 2007-09-01  Karl Berry  <karl@gnu.org>
535
536         * MODULES.html.sh: Rename mreadlink_with_size to areadlink_with_size.
537
538 2007-08-28  Jim Meyering  <jim@meyering.net>
539
540         Rename mreadlink_with_size to areadlink_with_size.
541         * NEWS: Document the change.
542         * lib/mreadlink-with-size.c (mreadlink_with_size): Rename this to...
543         * lib/areadlink-with-size.c (areadlink_with_size): ...this.
544         * lib/mreadlink.h: Rename this to...
545         * lib/areadlink.h: ...this.
546         * modules/mreadlink-with-size: Rename this to...
547         * modules/areadlink-with-size: ...this.
548         * lib/canonicalize.c: Reflect the renaming.
549         * modules/canonicalize: Likewise.
550
551 2007-08-26  Bruno Haible  <bruno@clisp.org>
552
553         * gnulib-tool (func_import): When deciding which files to remove,
554         consider also dangling symbolic links.
555         Reported by Eric Blake.
556
557 2007-08-26  Bruno Haible  <bruno@clisp.org>
558
559         * gnulib-tool (func_ln_if_changed): Use "test -h", not "test -L".
560
561 2007-08-23  Simon Josefsson  <simon@josefsson.org>
562
563         * lib/readline.c: Don't include getline.h, the prototype is now
564         found in stdio.h.
565
566 2007-08-23  Jim Meyering  <jim@meyering.net>
567
568         Getdelim touchup.
569         * lib/getdelim.c (getdelim): Don't bother to save/restore errno
570         around the funlockfile call, since funlockfile never sets errno.
571         Don't set errno upon failed realloc.
572
573 2007-08-22  Eric Blake  <ebb9@byu.net>
574
575         Getline touchups.
576         * lib/getdelim.c (getdelim): Revert regression that required *n to
577         be 0 when *lineptr is NULL.  Preserve errno across funlockfile.
578         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Check for declaration of
579         getdelim, rather than whether implementation is missing.
580         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise for getline.
581         * lib/stdio_.h (getline): Also declare if replacement is
582         required.
583         * doc/functions/getdelim.texi: New file.
584         * doc/functions/getline.texi: Likewise.
585         * doc/gnulib.texi (Function Substitutes): Add new files.
586         Reported by Bruno Haible.
587
588 2007-08-22  Ludovic Courtès  <ludo@gnu.org>
589
590         * users.txt: Add Guile.
591
592 2007-08-22  Eric Blake  <ebb9@byu.net>
593
594         * tests/test-getdelim.c (main): Use remove, not unlink.
595         * tests/test-getline.c (main): Likewise.
596
597         Move getline and getdelim into stdio.h, per POSIX 200x.
598         * modules/getline (Files): Remove getline.h.
599         (Depends-on): Add stdio.
600         (configure.ac): Add module indicator.
601         * modules/getdelim (Files): Remove getdelim.h.
602         (Depends-on): Add stdio.
603         (configure.ac): Add module indicator.
604         * modules/stdio (Makefile.am): Work with new indicators.
605         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Add new defaults.
606         * m4/getdelim.m4 (gl_FUNC_GETDELIM): Work with stdio needs.
607         * m4/getline.m4 (gl_FUNC_GETLINE): Likewise.
608         * lib/getdelim.h: Delete.
609         * lib/getline.h: Delete.
610         * lib/stdio_.h (getdelim, getline): Declare.
611         * modules/getdelim-tests: New module.
612         * modules/getline-tests: Likewise.
613         * tests/test-getdelim.c: New file.
614         * tests/test-getline.c: Likewise.
615         * NEWS: Document the change.
616         * lib/getline.c: Update choice of header.
617         * lib/csharpcomp.c: Likewise.
618         * lib/getpass.c: Likewise.
619         * lib/javacomp.c: Likewise.
620         * lib/javaversion.c: Likewise.
621         * lib/yesno.c: Likewise.
622         * lib/getdelim.c: Likewise.
623         (getdelim): Set errno on failure, and avoid memory leak.
624
625 2007-08-19  Bruno Haible  <bruno@clisp.org>
626
627         * modules/closein (Depends-on): Add freadahead.
628         * lib/closein.c: Include freadahead.h.
629         (close_stdin): Skip the fseeko and fflush calls if freadahead(stdin)
630         is zero.
631
632 2007-08-19  Bruno Haible  <bruno@clisp.org>
633
634         * modules/freadahead-tests: New file.
635         * tests/test-freadahead.sh: New file.
636         * tests/test-freadahead.c: New file.
637
638         * modules/freadahead: New file.
639         * lib/freadahead.h: New file.
640         * lib/freadahead.c: New file.
641         * MODULES.html.sh (File stream based Input/Output): Add freadahead,
642         fbufmode, fpurge, freadable, fwritable.
643
644 2007-08-19  Eric Blake  <ebb9@byu.net>
645
646         Test yesno in combination with closein.
647         * lib/yesno.c (yesno): Document use of stdin.
648         * modules/yesno-tests (Files): New module.
649         * tests/test-yesno.c (main): New file.
650         * tests/test-yesno.sh: Likewise.
651
652 2007-08-19  Bruno Haible  <bruno@clisp.org>
653
654         * lib/fbufmode.c (fbufmode): Add tentative support for Solaris/AMD64.
655         * lib/fseeko.c (rpl_fseeko): Likewise.
656         * lib/fseterr.c (fseterr): Likewise.
657
658 2007-08-19  Bruno Haible  <bruno@clisp.org>
659
660         * tests/test-lseek.c (main): Disable a test for BeOS.
661         * doc/functions/lseek.texi: Document the BeOS bug.
662
663 2007-08-19  Bruno Haible  <bruno@clisp.org>
664             Eric Blake  <ebb9@byu.net>
665
666         * lib/lseek.c: Include <sys/stat.h>.
667         (rpl_lseek): Add workaround code also for Unix platforms.
668         Needed for BeOS.
669         * m4/lseek.m4 (gl_FUNC_LSEEK): When cross-compiling, fail on BeOS.
670         * doc/functions/lseek.texi: Document BeOS definiency.
671
672 2007-08-18  Bruno Haible  <bruno@clisp.org>
673
674         * modules/fstrcmp-tests: New file.
675         * tests/test-fstrcmp.c: New file.
676
677 2007-08-18  Bruno Haible  <bruno@clisp.org>
678
679         * modules/fstrcmp: New file, from GNU gettext with modifications.
680         * lib/fstrcmp.h: New file, from GNU gettext.
681         * lib/fstrcmp.c: New file, from GNU gettext.
682         * MODULES.html.sh (String handling): Add fstrcmp.
683
684 2007-08-18  Bruno Haible  <bruno@clisp.org>
685
686         * lib/diffseq.h (struct context): Change type of 'heuristic' field to
687         'bool'.
688         (diag, compareseq): Remove const from the ctxt argument.
689         (USE_HEURISTIC): Undefine at the end.
690
691 2007-08-18  Jim Meyering  <jim@meyering.net>
692
693         New file: lib/idcache.h
694         * NEWS: Mention the addition.
695         * modules/idcache (Files): Add lib/idcache.h
696         * lib/idcache.c: Include "idcache.h".
697         Don't include <sys/types.h>.
698         Add a FIXME comment.
699         Move file-scoped "static" declarations to the top.
700         * lib/idcache.h: New file.  Include <sys/types.h> here, instead.
701
702 2007-08-17  Bruno Haible  <bruno@clisp.org>
703         and Paul Eggert  <eggert@cs.ucla.edu>
704
705         * MODULES.html.sh: Add diffseq.
706         * modules/diffseq: New file.
707         * lib/diffseq.h: New file, from GNU gettext with a few minor changes,
708         extracted from GNU gettext's fstrcmp.c and GNU diff's analyze.c.
709
710 2007-08-15  Paul Eggert  <eggert@cs.ucla.edu>
711
712         Import changes from coreutils for bootstrap script.
713
714         2007-07-21  Paul Eggert  <eggert@cs.ucla.edu>
715
716         * build-aux/bootstrap (slurp): Work even in environments where
717         "ls" defaults to "ls -A".  Put in a FIXME, though, since the
718         current code does not slurp files whose names start with ".", and
719         this looks like it might be a troublesome area.
720
721         2007-07-11  Jim Meyering  <jim@meyering.net>
722
723         If there's a GPL vN copyright comment, require that N == 3.
724
725         2007-07-08  Jim Meyering  <jim@meyering.net>
726
727         Run the coreutils-specific code only if tests/Makefile.am.in exists.
728         * build-aux/bootstrap (mam_template): Move definition out of loop.
729
730         Create symlinks for gl/{lib,m4}/*, just as for gnulib/{lib,m4}/*.
731
732         * build-aux/bootstrap (symlink_to_dir): Rename function from
733         symlink_to_gnulib.  Add a directory parameter.  Update all
734         callers.
735         (cp_mark_as_generated): Also check for -- and link to -- files in
736         gl/.
737
738         2007-07-08  Jim Meyering  <jim@meyering.net>
739
740         Adapt to deeper hierarchy in gnulib.
741         * build-aux/bootstrap (symlink_to_dir): If the destination
742         directory doesn't exist, create it. This is required at least for
743         "lib/uniwidth/cjk.h".
744
745         2007-05-15  Jim Meyering  <jim@meyering.net>
746
747         * build-aux/bootstrap: Now that generated Makefile.am files
748         are no longer under version control, they must be created at
749         bootstrap time.
750
751 2007-08-14  Ben Pfaff  <blp@gnu.org>
752
753         * lib/count-one-bits.h: Add comments.  From Bruno Haible.
754
755 2007-08-14  Paul Eggert  <eggert@cs.ucla.edu>
756
757         * lib/count-one-bits.h: Don't include <limits.h>; no longer needed
758         given the changes below.
759         (COUNT_ONE_BITS): Use 'verify' rather than 'verify_true'.  Work
760         even on hosts that have padding bits beyond the supported 64.
761
762 2007-08-10  Paul Eggert  <eggert@cs.ucla.edu>
763
764         * NEWS: In xstrtol, remove STRTOL_FATAL_ERROR and add xstrtol_fatal.
765         * lib/xstrtol.h: Don't include exitfail.h; that's now internal to
766         xstrtol.c.  Include getopt.h, since xstrtol_fatal's signature
767         depends on it.
768         (xstrtol_error): Remove.
769         (xstrtol_fatal): New decl, replacing the functionality of xstrtol_error
770         but with a different signature.
771         (ATTRIBUTE_NORETURN, __attribute__): New macros.
772         * lib/xstrtol-error.c: Include exitfail.h.
773         (xstrtol_fatal): New function, with a different signature from the
774         old xstrtol_error, so that the caller need not worry about passing
775         in an exit status, or about storage management of the option argument.
776         (xstrtol_error): Now a static function.  Redo signature to
777         implement xstrtol_fatal.  Output the correct number of hyphens in
778         front of the option so that the caller need not worry about
779         storage management.
780         (N_): New macro.
781         (_): Remove; not used now.
782         * modules/xstrtol: Depend on getopt.
783         * tests/test-xstrtol.c (main): Use new xstrtol_error function instead
784         of old STRTOL_FATAL_ERROR macro.
785         * tests/test-xstrtol.sh (t-xstrtol.xo): Adjust to match new behavior
786         of test program.
787         * tests/test-xstrtoimax.sh (t-xstrtoimax.xo): Likewise.
788         * tests/test-xstrtoumax.sh (t-xstrtoumax.xo): Likewise.
789
790 2007-08-08  Eric Blake  <ebb9@byu.net>
791
792         * lib/xstrtol-error.c: Add missing include.
793
794         Move xstrtol messages into gnulib domain, when --pobase is used.
795         * lib/xstrtol.h (_STRTOL_ERROR): Move messages out of macro...
796         * lib/xstrtol-error.c (xstrtol_error): ...into new file.
797         * modules/xstrtol (Files): Distribute new file.
798         * m4/xstrtol.m4 (gl_XSTRTOL): Build new file.
799         * lib/xstrtol.c (TESTING_XSTRTO): Move tests...
800         * tests/test-xstrtol.c: ...into new file.
801         * tests/test-xstrtoul.c: Also test xstrtoul.
802         * tests/test-xstrtoimax.c: Also test xstrtoimax.
803         * tests/test-xstrtoumax.c: Also test xstrtoumax.
804         * tests/test-xstrtol.sh: Drive the tests.
805         * tests/test-xstrtoimax.sh: Likewise.
806         * tests/test-xstrtoumax.sh: Likewise.
807         * modules/xstrtol-tests: New module.
808         * modules/xstrtoimax-tests: Likewise.
809         * modules/xstrtoumax-tests: Likewise.
810
811 2007-08-08  Jim Meyering  <jim@meyering.net>
812
813         New function: mfile_name_concat.
814         * lib/filenamecat.c (mfile_name_concat): New function, just like
815         file_name_concat, but return NULL upon failure rather than exiting
816         with a diagnostic.
817         * lib/filenamecat.h: Declare it.
818
819 2007-08-07  Bruno Haible  <bruno@clisp.org>
820
821         * m4/inttypes.m4 (gl_INTTYPES_H): Use GL_TRIGGER_STDC_LIMIT_MACROS
822         instead of __STDC_LIMIT_MACROS_TRIGGER. This avoids a redefinition
823         warning from gcc.
824         Reported by Eric Blake.
825
826 2007-08-07  Simon Josefsson  <simon@josefsson.org>
827
828         * modules/crypto/arctwo (License): Use the synonymous term "LGPLv2+".
829         * modules/crypto/arcfour (License): Likewise.
830         * modules/crypto/des-tests (License): Likewise.
831         * modules/crypto/gc-arctwo-tests (License): Likewise.
832         * modules/crypto/gc-des-tests (License): Likewise.
833         * modules/crypto/gc-hmac-md5-tests (License): Likewise.
834         * modules/crypto/gc-hmac-sha1-tests (License): Likewise.
835         * modules/crypto/gc-md2-tests (License): Likewise.
836         * modules/crypto/gc-md4-tests (License): Likewise.
837         * modules/crypto/gc-md5-tests (License): Likewise.
838         * modules/crypto/gc-pbkdf2-sha1-tests (License): Likewise.
839         * modules/crypto/gc-rijndael-tests (License): Likewise.
840         * modules/crypto/gc-sha1-tests (License): Likewise.
841         * modules/crypto/gc-tests (License): Likewise.
842         * modules/crypto/hmac-md5 (License): Likewise.
843         * modules/crypto/hmac-sha1 (License): Likewise.
844         * modules/crypto/md2-tests (License): Likewise.
845         * modules/crypto/md4-tests (License): Likewise.
846         * modules/crypto/md5 (License): Likewise.
847         * modules/crypto/rijndael (License): Likewise.
848         * modules/crypto/sha1 (License): Likewise.
849         * modules/memxor (License): Likewise.
850
851 2007-08-06  Paul Eggert  <eggert@cs.ucla.edu>
852         and Bruno Haible  <bruno@clisp.org>
853
854         * NEWS: Describe interface changes to human, xstrtol.
855         * lib/human.h: Include <xstrtol.h>.
856         (human_options): Return enum strtol_error, not int.  Remove
857         bool arg; take int * instead.
858         * lib/human.c: Don't include "gettext.h".
859         (_): Remove; no longer used.
860         Don't include <xstrtol.h>, since human.h does it.
861         (human_options): Adjust to abovementioned interface changes.
862         Do not report error to stderr; that's now the caller's
863         responsibility.
864         * lib/xstrtol.c (main) [defined TESTING_XSTRTO]: Adjust to
865         interface change.
866         * lib/xstrtol.h (_STRTOL_ERROR): Take Option, Arg rather than
867         Str, Argument_type_string.  All uses changed.  Put " argument"
868         in diagnostics to make them clearer.  Change wording of suffix
869         message for clarity.
870         (STRTOL_FATAL_ERROR): Take Option, Arg rather than Str,
871         Argument_type_string.
872         (STRTOL_FATAL_WARN): Remove; no longer used.
873         * modules/human (Depends-on): Remove gettext-h.
874
875 2007-08-06  Simon Josefsson  <simon@josefsson.org>
876
877         * build-aux/maint.mk, build-aux/GNUmakefile: Relicense to GPLv3+.
878
879 2007-07-31  Bruno Haible  <bruno@clisp.org>
880
881         * m4/stdint.m4 (gl_STDINT_H): Test whether WCHAR_MIN and WCHAR_MAX
882         are defined by <stdint.h> (as opposed to <wchar.h>, as on Dragonfly).
883         Reported by Joerg Sonnenberger <joerg@britannica.bec.de>.
884
885 2007-07-31  Bruno Haible  <bruno@clisp.org>
886
887         * lib/fflush.c (rpl_fflush): On BSD systems, use the __SNPT flag.
888         Suggested by Joerg Sonnenberger <joerg@britannica.bec.de>.
889
890 2007-07-30  Bruno Haible  <bruno@clisp.org>
891
892         * modules/base64 (License): Use the synonymous term "LGPLv2+".
893         * modules/c-ctype (License): Likewise.
894         * modules/c-strcase (License): Likewise.
895         * modules/check-version (License): Likewise.
896         * modules/iconv (License): Likewise.
897         * modules/iconv_open (License): Likewise.
898         * modules/read-file (License): Likewise.
899         * modules/striconv (License): Likewise.
900         * modules/strverscmp (License): Likewise.
901         * modules/vasprintf (License): Likewise.
902         * modules/crypto/des (License): Likewise.
903         * modules/crypto/gc (License): Likewise.
904         * modules/crypto/gc-arcfour (License): Likewise.
905         * modules/crypto/gc-arctwo (License): Likewise.
906         * modules/crypto/gc-des (License): Likewise.
907         * modules/crypto/gc-hmac-md5 (License): Likewise.
908         * modules/crypto/gc-hmac-sha1 (License): Likewise.
909         * modules/crypto/gc-md2 (License): Likewise.
910         * modules/crypto/gc-md4 (License): Likewise.
911         * modules/crypto/gc-md5 (License): Likewise.
912         * modules/crypto/gc-pbkdf2-sha1 (License): Likewise.
913         * modules/crypto/gc-random (License): Likewise.
914         * modules/crypto/gc-rijndael (License): Likewise.
915         * modules/crypto/gc-sha1 (License): Likewise.
916         * modules/crypto/md2 (License): Likewise.
917         * modules/crypto/md4 (License): Likewise.
918
919 2007-07-30  Jim Meyering  <jim@meyering.net>
920
921         * lib/fts.c (fts_read): Upon failure to chdir into a subdirectory,
922         set fts_info to FTS_DNR, not to FTS_ERR, so that the caller knows
923         it has valid stat data.  This bug would cause du not to count the
924         sizes of inaccessible directories.
925         Patch by Bryan Mason <bmason@redhat.com>, via Jose Maria Plans
926         in <http://bugzilla.redhat.com/250077>.
927
928 2007-07-25  Peter O'Gorman  <peter@pogma.com>
929             Bruno Haible  <bruno@clisp.org>
930
931         * m4/include_next.m4 (gl_INCLUDE_NEXT): Test whether #include_next
932         really works. Needed because AIX 4.3 "xlc -E" doesn't understand
933         #include_next, gives a diagnostic about it, but reports no error in
934         the exit code.
935         Reported by Gary V. Vaughan <gary@thewrittenword.com>.
936
937 2007-07-24  Ben Pfaff  <blp@gnu.org>
938
939         Improve name: "count-one-bits" is better than "popcount".
940         * MODULES.html.sh: Update name.
941         * lib/popcount.h: Renamed lib/count-one-bits.h.
942         (popcount): Renamed count_one_bits.
943         (popcountl): Renamed count_one_bits_l.
944         (popcountll): Renamed count_one_bits_ll.
945         * m4/popcount.m4: Renamed m4/count-one-bits.m4.
946         * modules/popcount: Renamed module/count-one-bits.
947         * modules/popcount-tests: Renamed module/count-one-bits-tests.
948         * tests/test-popcount.c: Renamed tests/test-count-one-bits.c.
949
950 2007-07-23  Ben Pfaff  <blp@gnu.org>
951
952         * lib/popcount.h (popcount32): Reduce size of constants, to allow
953         better code generation, and add U to large constants to avoid
954         warnings, in non-GCC case.
955         Suggested by Bruno Haible.
956
957 2007-07-23  Ben Pfaff  <blp@gnu.org>
958
959         * lib/popcount.h: Use verify_true instead of if...abort.
960         * modules/popcount: Depend on verify module.
961         Suggested by Jim Meyering.
962
963 2007-07-23  Bruno Haible  <bruno@clisp.org>
964
965         * gnulib-tool (func_import): Create a .cvsignore file also when the
966         directory is not yet in CVS but the toplevel directory is. When
967         creating a .cvsignore file, add ".deps" and ".dirstamp" to it.
968         Reported by Karl Berry.
969
970 2007-07-22  Ben Pfaff  <blp@gnu.org>
971
972         * lib/popcount.h: Use faster, branchless algorithm for non-GCC
973         case.
974         Suggested by Eric Blake.
975
976 2007-07-22  Ben Pfaff  <blp@gnu.org>
977
978         New module: popcount.
979         * MODULES.html.sh: Add popcount.
980         * modules/popcount: New file.
981         * modules/popcount-tests: New file.
982         * tests/test-popcount.c: New file.
983         * lib/popcount.h: New file.
984         * m4/popcount.m4: New file.
985
986 2007-07-22  Paul Eggert  <eggert@cs.ucla.edu>
987
988         * build-aux/announce-gen: Update to GPLv3.
989
990         * build-aux/config.guess: Update from config.
991
992 2007-07-21  Bruno Haible  <bruno@clisp.org>
993
994         * lib/error.c (_) [ENABLE_NLS]: Define to gettext.
995         * lib/verror.c (_) [ENABLE_NLS]: Likewise.
996
997 2007-07-20  Jim Meyering  <jim@meyering.net>
998
999         * check-module: Diagnose a self-dependency.
1000
1001 2007-07-19  Bruno Haible  <bruno@clisp.org>
1002
1003         * gnulib-tool (func_import): Don't abort if pobase or po_domain is
1004         empty.
1005         Reported by Eric Blake.
1006
1007 2007-07-18  Bruno Haible  <bruno@clisp.org>
1008
1009         * gnulib-tool: New options --po-base, --po-domain.
1010         (func_usage): Document them.
1011         (pobase, po_domain): New variables.
1012         (func_emit_lib_Makefile_am): Augment AM_CPPFLAGS, defining
1013         DEFAULT_TEXT_DOMAIN.
1014         (func_emit_po_Makevars, func_emit_po_POTFILES_in): New functions.
1015         (func_import): Consider pobase and po_domain. Create a po/ directory.
1016         (func_create_testdir): Set pobase and po_domain to empty.
1017         * build-aux/po/Makefile.in.in: New file, from GNU gettext 0.16.1.
1018         * build-aux/po/remove-potcdate.sin: New file, from GNU gettext 0.16.1.
1019
1020 2007-07-18  Bruno Haible  <bruno@clisp.org>
1021
1022         * gnulib-tool (func_get_automake_snippet): Synthesize also an
1023         EXTRA_DIST augmentation for files in build-aux/.
1024
1025 2007-07-16  Bruno Haible  <bruno@clisp.org>
1026
1027         * modules/lseek (License): Use the synonymous term "LGPLv2+".
1028         * modules/getdelim (License): Likewise.
1029
1030 2007-07-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
1031
1032         * modules/arpa_inet (License): Use the synonymous term LGPLv2+.
1033         * modules/d-type (License): Likewise.
1034         * modules/extensions (License): Likewise.
1035         * modules/fnmatch (License): Likewise.
1036         * modules/fseeko (License): Likewise.
1037         * modules/getaddrinfo (License): Likewise.
1038         * modules/getline (License): Likewise.
1039         * modules/getlogin_r (License): Likewise.
1040         * modules/getpass (License): Likewise.
1041         * modules/gettimeofday (License): Likewise.
1042         * modules/glob (License): Likewise.
1043         * modules/inet_ntop (License): Likewise.
1044         * modules/malloc (License): Likewise.
1045         * modules/malloca (License): Likewise.
1046         * modules/memmem (License): Likewise.
1047         * modules/mempcpy (License): Likewise.
1048         * modules/memset (License): Likewise.
1049         * modules/minmax (License): Likewise.
1050         * modules/mktime (License): Likewise.
1051         * modules/netinet_in (License): Likewise.
1052         * modules/pathmax (License): Likewise.
1053         * modules/poll (License): Likewise.
1054         * modules/regex (License): Likewise.
1055         * modules/snprintf (License): Likewise.
1056         * modules/stdbool (License): Likewise.
1057         * modules/stdint (License): Likewise.
1058         * modules/stdio (License): Likewise.
1059         * modules/strcase (License): Likewise.
1060         * modules/strcasestr (License): Likewise.
1061         * modules/strdup (License): Likewise.
1062         * modules/string (License): Likewise.
1063         * modules/strndup (License): Likewise.
1064         * modules/strnlen (License): Likewise.
1065         * modules/strpbrk (License): Likewise.
1066         * modules/strptime (License): Likewise.
1067         * modules/strsep (License): Likewise.
1068         * modules/sys_select (License): Likewise.
1069         * modules/sys_socket (License): Likewise.
1070         * modules/sys_stat (License): Likewise.
1071         * modules/sys_time (License): Likewise.
1072         * modules/time (License): Likewise.
1073         * modules/time_r (License): Likewise.
1074         * modules/timegm (License): Likewise.
1075         * modules/unistd (License): Likewise.
1076         * modules/vsnprintf (License): Likewise.
1077         * modules/wctype (License): Likewise.
1078
1079 2007-07-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1080
1081         * modules/argz (License): LGPLv2+.
1082
1083 2007-07-15  Karl Berry  <karl@gnu.org>
1084
1085         * doc/gnulib.texi: revise node structure per new fdl.texi.
1086
1087 2007-07-14  Bruno Haible  <bruno@clisp.org>
1088
1089         * lib/uniname/gen-uninames.lisp (main): Emit a "do not edit" line to
1090         the output file.
1091         * lib/uniname/uninames.h: Regenerated.
1092
1093 2007-07-14  Karl Berry  <karl@gnu.org>
1094
1095         * doc/*gpl*.texi, doc/fdl.texi: new versions, consistently
1096         omitting sectioning and index commands.
1097
1098 2007-07-13  Bruno Haible  <bruno@clisp.org>
1099
1100         New gnulib-tool option --more-symlinks.
1101         * gnulib-tool (func_usage): Document --more-symlinks.
1102         (do_copyrights): New variable.
1103         Recognize option --more-symlinks.
1104         (func_import): Don't add a copyright notice transform to
1105         sed_transform_lib_file if do_copyrights is empty.
1106
1107 2007-07-13  Bruno Haible  <bruno@clisp.org>
1108
1109         * lib/vasnprintf.c (decimal_point_char): Define also if
1110         (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE)
1111         && !NEED_PRINTF_DIRECTIVE_A.
1112         Reported by Clemens Koller <clemens.koller@anagramm.de> via
1113         Gary V. Vaughan <gary@gnu.org>.
1114
1115 2007-07-13  Paul Eggert  <eggert@cs.ucla.edu>
1116
1117         * lib/inttypes_.h: Undo previous change, since it was fixed
1118         in a different way in the 2007-07-02 fix to m4/inttypes.m4.
1119
1120 2007-07-13  Bruno Haible  <bruno@clisp.org>
1121
1122         * lib/stdint_.h: Fix typo: _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H was
1123         misspelled as _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H.
1124
1125 2007-07-13  Jim Meyering  <jim@meyering.net>
1126
1127         df: Don't fail for Tru64's "file-on-file mount".
1128         * m4/fsusage.m4 (gl_FSUSAGE): Reject Tru64's buggy statvfs,
1129         so we fall through and use statfs instead.  Details here:
1130         <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/10878>
1131         Reported by Albert Chin.
1132
1133 2007-07-13  Bruno Haible  <bruno@clisp.org>
1134
1135         * modules/alloca-opt (License): Use the synonymous term "LGPLv2+".
1136         * modules/configmake (License): Likewise.
1137         * modules/gettext (License): Likewise.
1138         * modules/gettext-h (License): Likewise.
1139         * modules/include_next (License): Likewise.
1140         * modules/link-warning (License): Likewise.
1141         * modules/localcharset (License): Likewise.
1142         * modules/localename (License): Likewise.
1143         * modules/lock (License): Likewise.
1144         * modules/relocatable-lib-lgpl (License): Likewise.
1145         * modules/size_max (License): Likewise.
1146         * modules/vasnprintf (License): Likewise.
1147         * modules/wchar (License): Likewise.
1148         * modules/xsize (License): Likewise.
1149
1150 2007-07-13  Bruno Haible  <bruno@clisp.org>
1151
1152         * gnulib-tool (func_import): Treat LGPLv2 as synonymous to LGPL.
1153         (func_create_testdir): Handle copying terms "GPLv2+" and "LGPLv2+".
1154
1155 2007-07-12  Bruno Haible  <bruno@clisp.org>
1156
1157         * doc/gnulib-intro.texi (Copyright): Clarify the license abbreviations
1158         in the modules files.
1159
1160 2007-07-11  Karl Berry  <karl@gnu.org>
1161
1162         * MODULES.html.sh (func_module): use
1163          sed -e '\|^'"${includefile}"'$|d'
1164          instead of /.../d, to avoid errors on $includefile's containing /.
1165
1166 2007-07-10  Sergey Poznyakoff  <gray@gnu.org.ua>
1167
1168         * gnulib-tool (func_import): Avoid duplication of --avoid
1169         statements
1170         (func_dest_tmpfilename,func_create_testdir): Translate `-' in file
1171         names to `_' in variable names.
1172
1173 2007-07-10  Eric Blake  <ebb9@byu.net>
1174
1175         * lib/version-etc.c (version_etc_va): Default to GPLv3+.
1176         * NEWS: Document this change.
1177
1178 2007-07-08  Bruno Haible  <bruno@clisp.org>
1179
1180         Update to Unicode 5.0.
1181         * lib/uniwidth/width.c (nonspacing_table_data): Add U+00AD,
1182         U+0350..U+035F, U+05A2, U+05BA, U+05C5, U+05C7, U+0600..U+0603,
1183         U+0610..U+0615, U+0656..U+065E, U+07EB..U+07F3, U+0A01, U+0AE2..U+0AE3,
1184         U+0CBC. Remove U+0CBF, U+0CC6. Add U+0CE2..U+0CE3, U+135F,
1185         U+17B4..U+17B5, U+17DD. Remove U+180E. Add U+1920..U+1922,
1186         U+1927..U+192B, U+1932, U+1939..U+193B, U+1A17..U+1A18, U+1B00..U+1B03,
1187         U+1B34, U+1B36..U+1B3A, U+1B3C, U+1B42, U+1B6B..U+1B73, U+1DC0..U+1DCA,
1188         U+1DFE..U+1DFF, U+20EB..U+20EF, U+A802, U+A806, U+A80B, U+A825..U+A826,
1189         U+10A01..U+10A03, U+10A05..U+10A06, U+10A0C..U+10A0F, U+10A38..U+10A3A,
1190         U+10A3F, U+1D242..U+1D244.
1191         (nonspacing_table_ind): Update.
1192         (uc_width): Assign width 0 to U+E0100..U+E01EF. Assign width 1 to
1193         U+4DC0..U+4DFF. Assign width 2 to U+2329..U+232A, U+FE10..U+FE1F.
1194
1195 2007-07-08  Bruno Haible  <bruno@clisp.org>
1196
1197         Update to Unicode 5.0.
1198         * lib/uniname/gen-uninames.lisp (main): Add the range 0x12xxx to the
1199         code transform. Extend the name index field of unicode_name_to_code and
1200         unicode_code_to_name from 16 to 24 bits.
1201         * lib/uniname/uniname.c (unicode_character_name,
1202         unicode_name_character): Add the range 0x12xxx to the code transform.
1203         * lib/uniname/uninames.h: Regenerated.
1204         * tests/uniname/UnicodeDataNames.txt: Update to Unicode 5.0.
1205
1206 2007-07-07  Bruno Haible  <bruno@clisp.org>
1207
1208         * modules/wcwidth-tests: New file.
1209         * tests/test-wcwidth.c: New file.
1210
1211         Work around MacOS X wcwidth() bug.
1212         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Test against MacOS X 10.3 bug.
1213         * lib/wcwidth.c: Include localcharset.h, streq.h, uniwidth.h.
1214         (rpl_wcwidth): Special-case the UTF-8 locales. Fall back to the
1215         original wcwidth in non-UTF-8 locales.
1216         * modules/wcwidth (Depends-on): Add localcharset, streq,
1217         uniwidth/width.
1218         * doc/functions/wcwidth.texi: Update.
1219
1220 2007-07-07  Bruno Haible  <bruno@clisp.org>
1221
1222         * lib/wchar_.h: Include the GL_LINK_WARNING macro.
1223         (wcwidth): New declaration.
1224         * m4/wchar.m4 (gl_WCHAR_MODULE_INDICATOR, gl_WCHAR_H_DEFAULTS): New
1225         macros.
1226         (gl_WCHAR_H): Require gl_WCHAR_H_DEFAULTS. Don't set WCHAR_H to empty
1227         here. Prepare for creating <wchar.h> unconditionally.
1228         * modules/wchar (Depends-on): Add link-warning.
1229         (Makefile.am): Substitute also GNULIB_WCWIDTH, HAVE_DECL_WCWIDTH,
1230         REPLACE_WCWIDTH, and GL_LINK_WARNING.
1231         * lib/wcwidth.h: Remove file.
1232         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gl_WCHAR_H_DEFAULTS. Set
1233         HAVE_DECL_WCWIDTH, REPLACE_WCWIDTH, WCHAR_H.
1234         * modules/wcwidth (Files): Remove lib/wcwidth.h.
1235         (configure.ac): Invoke gl_WCHAR_MODULE_INDICATOR.
1236         (Include): Replace wcwidth.h with <wchar.h>.
1237         * lib/wcwidth.c: Include <wchar.h> instead of wcwidth.h.
1238         * lib/mbchar.h: Don't include wcwidth.h.
1239         * lib/mbswidth.c: Likewise.
1240         * NEWS: Mention the change.
1241
1242 2007-07-07  Bruno Haible  <bruno@clisp.org>
1243
1244         * lib/wcwidth.c: New file, extracted from lib/wcwidth.h.
1245         * lib/wcwidth.h: Don't include wctype.h. Replace inline function
1246         definition with an external declaration.
1247         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Use wcwidth.c when wcwidth is not
1248         defined as a function. Remove AC_C_INLINE requirement.
1249         * modules/wcwidth (Files): Add lib/wcwidth.c.
1250         (Makefile.am): Remove redundant statement.
1251
1252 2007-07-07  Bruno Haible  <bruno@clisp.org>
1253
1254         * MODULES.html.sh (Unicode string functions): Add the new modules.
1255
1256         * tests/uniwidth/test-u32-strwidth.c: New file.
1257         * modules/uniwidth/u32-strwidth-tests: New file.
1258
1259         * lib/uniwidth/u32-strwidth.c: New file.
1260         * modules/uniwidth/u32-strwidth: New file.
1261
1262         * tests/uniwidth/test-u16-strwidth.c: New file.
1263         * modules/uniwidth/u16-strwidth-tests: New file.
1264
1265         * lib/uniwidth/u16-strwidth.c: New file.
1266         * modules/uniwidth/u16-strwidth: New file.
1267
1268         * tests/uniwidth/test-u8-strwidth.c: New file.
1269         * modules/uniwidth/u8-strwidth-tests: New file.
1270
1271         * lib/uniwidth/u8-strwidth.c: New file.
1272         * modules/uniwidth/u8-strwidth: New file.
1273
1274         * tests/uniwidth/test-u32-width.c: New file.
1275         * modules/uniwidth/u32-width-tests: New file.
1276
1277         * lib/uniwidth/u32-width.c: New file.
1278         * modules/uniwidth/u32-width: New file.
1279
1280         * tests/uniwidth/test-u16-width.c: New file.
1281         * modules/uniwidth/u16-width-tests: New file.
1282
1283         * lib/uniwidth/u16-width.c: New file.
1284         * modules/uniwidth/u16-width: New file.
1285
1286         * tests/uniwidth/test-u8-width.c: New file.
1287         * modules/uniwidth/u8-width-tests: New file.
1288
1289         * lib/uniwidth/u8-width.c: New file.
1290         * modules/uniwidth/u8-width: New file.
1291
1292         * tests/uniwidth/test-uc_width.c: New file.
1293         * modules/uniwidth/width-tests: New file.
1294
1295         * lib/uniwidth/width.c: New file, from GNU libiconv.
1296         * lib/uniwidth/cjk.h: New file, from GNU libiconv.
1297         * modules/uniwidth/width: New file.
1298
1299         * lib/uniwidth.h: New file, from GNU libiconv.
1300         * modules/uniwidth/base: New file.
1301
1302 2007-07-07  Bruno Haible  <bruno@clisp.org>
1303
1304         * lib/uniname.h: New file, from GNU gettext.
1305         * lib/uniname/gen-uninames.lisp: New file, from GNU gettext.
1306         * lib/uniname/uninames.h: New file, from GNU gettext.
1307         * lib/uniname/uniname.c: New file, from GNU gettext.
1308         * tests/uniname/test-uninames.sh: New file.
1309         * tests/uniname/test-uninames.c: New file, from GNU gettext.
1310         * tests/uniname/UnicodeDataNames.txt: New file, from GNU gettext.
1311         * modules/uniname/base: New file.
1312         * modules/uniname/uniname: New file.
1313         * modules/uniname/uniname-tests: New file.
1314         * MODULES.html.sh (Unicode string functions): Add the new modules.
1315
1316 2007-07-06  Bruno Haible  <bruno@clisp.org>
1317
1318         * doc/Makefile (TEXI2HTML): Specify a --reference-limit.
1319
1320 2007-07-06  Bruno Haible  <bruno@clisp.org>
1321
1322         * lib/sys_time_.h: Use a recursion-safe inclusion guard rather than
1323         a split double-inclusion guard. Needed for cygwin, where <sys/time.h>
1324         includes <cygwin/sys_time.h> which includes <sys/select.h> which
1325         include <sys/time.h>.
1326         Reported by Eric Blake.
1327
1328 2007-07-06  Eric Blake  <ebb9@byu.net>
1329
1330         Fix testing canonicalize on cygwin.
1331         * modules/canonicalize-lgpl-tests (test_canonicalize_lgpl_LDADD):
1332         Revert patch from 2007-06-19.
1333         * tests/test-canonicalize-lgpl.c (main): Instead, skip test when
1334         canonicalize module is also in use.
1335         * tests/test-canonicalize.c: New file.
1336         * tests/test-canonicalize.sh: Likewise.
1337         * modules/canonicalize-tests: Likewise.
1338
1339 2007-07-06  Jim Meyering  <jim@meyering.net>
1340
1341         * lib/getugroups.c (getugroups): Detect getgrent failure.
1342         Adjust comment to reflect reality: this function may return -1.
1343
1344 2007-07-05  Sergey Poznyakoff  <gray@gnu.org.ua>
1345
1346         * build-aux/bootstrap (TP_URL,get_translations): Update to use
1347         the new TP address.
1348         (usage): Fix typo
1349         (gnulib_mk): New variable.
1350
1351 2007-07-05  Jim Meyering  <jim@meyering.net>
1352
1353         Don't let endgrent clobber errno, no matter how improbable.
1354         * lib/getugroups.c (getugroups): Save and restore errno around
1355         endgrent call.
1356
1357         Close the group DB even when failing with 2^31 or more members.
1358         * lib/getugroups.c (getugroups): Don't return without calling endgrent.
1359
1360 2007-07-04  Jim Meyering  <jim@meyering.net>
1361
1362         * lib/getugroups.h: New file.
1363         * lib/getugroups.c: Include "getugroups.h".
1364         Remove uses of "register" keyword.
1365         Move local variable, "cp", down into scope where used.
1366         Give "username" parameter the "const" attribute.
1367         * modules/getugroups (Files): Add lib/getugroups.h
1368
1369 2007-07-04  Karl Berry  <karl@gnu.org>
1370
1371         * MODULES.html.sh (func_all_modules): Complete rename of
1372         gpl/lgpl to gpl-2.0 and lgpl-2.1, and add gpl-3.0.
1373
1374 2007-07-02  Bruno Haible  <bruno@clisp.org>
1375
1376         * m4/inttypes.m4 (gl_INTTYPES_H): Define __STDC_LIMIT_MACROS in C++
1377         mode, when inttypes.h comes from gnulib.
1378         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
1379
1380 2007-07-02  Simon Josefsson  <simon@josefsson.org>
1381
1382         * NEWS: Mention lgpl module name change.
1383
1384         * modules/lgpl-2.1: Renamed from lgpl.
1385
1386         * NEWS: Mention gpl module name change.
1387
1388         * modules/gpl-3.0: New file, based on gpl-2.0.
1389
1390         * modules/gpl-2.0: Renamed from gpl.
1391
1392         * modules/gpl: Fix filename, doc/gpl.texi is now found at
1393         doc/gpl-2.0.texi.
1394
1395 2007-07-02  Paul Eggert  <eggert@cs.ucla.edu>
1396
1397         * lib/inttypes_.h [defined __cplusplus&&!defined __STDC_LIMIT_MACROS]:
1398         #define __STDC_LIMIT_MACROS temporarily while including
1399         <stdint.h>, so that __STDC_LIMIT_MACROS is defined.
1400         Problem reported by Joel E. Denny in
1401         <http://lists.gnu.org/archive/html/bug-gnulib/2007-07/msg00008.html>.
1402
1403 2007-07-01  Bruno Haible  <bruno@clisp.org>
1404
1405         * lib/unistdio.h: New file.
1406         * lib/unistdio/u-asnprintf.h: New file.
1407         * lib/unistdio/u-asprintf.h: New file.
1408         * lib/unistdio/u-printf-args.c: New file.
1409         * lib/unistdio/u-printf-args.h: New file.
1410         * lib/unistdio/u-printf-parse.h: New file.
1411         * lib/unistdio/u-snprintf.h: New file.
1412         * lib/unistdio/u-sprintf.h: New file.
1413         * lib/unistdio/u-vasprintf.h: New file.
1414         * lib/unistdio/u-vsnprintf.h: New file.
1415         * lib/unistdio/u-vsprintf.h: New file.
1416         * lib/unistdio/ulc-asnprintf.c: New file.
1417         * lib/unistdio/ulc-asprintf.c: New file.
1418         * lib/unistdio/ulc-fprintf.c: New file, based on lib/fprintf.c.
1419         * lib/unistdio/ulc-printf-parse.c: New file.
1420         * lib/unistdio/ulc-snprintf.c: New file.
1421         * lib/unistdio/ulc-sprintf.c: New file.
1422         * lib/unistdio/ulc-vasnprintf.c: New file.
1423         * lib/unistdio/ulc-vasprintf.c: New file.
1424         * lib/unistdio/ulc-vfprintf.c: New file, based on lib/vfprintf.c.
1425         * lib/unistdio/ulc-vsnprintf.c: New file.
1426         * lib/unistdio/ulc-vsprintf.c: New file.
1427         * lib/unistdio/u8-asnprintf.c: New file.
1428         * lib/unistdio/u8-asprintf.c: New file.
1429         * lib/unistdio/u8-printf-parse.c: New file.
1430         * lib/unistdio/u8-snprintf.c: New file.
1431         * lib/unistdio/u8-sprintf.c: New file.
1432         * lib/unistdio/u8-vasnprintf.c: New file.
1433         * lib/unistdio/u8-vasprintf.c: New file.
1434         * lib/unistdio/u8-vsnprintf.c: New file.
1435         * lib/unistdio/u8-vsprintf.c: New file.
1436         * lib/unistdio/u8-u8-asnprintf.c: New file.
1437         * lib/unistdio/u8-u8-asprintf.c: New file.
1438         * lib/unistdio/u8-u8-snprintf.c: New file.
1439         * lib/unistdio/u8-u8-sprintf.c: New file.
1440         * lib/unistdio/u8-u8-vasnprintf.c: New file.
1441         * lib/unistdio/u8-u8-vasprintf.c: New file.
1442         * lib/unistdio/u8-u8-vsnprintf.c: New file.
1443         * lib/unistdio/u8-u8-vsprintf.c: New file.
1444         * lib/unistdio/u16-asnprintf.c: New file.
1445         * lib/unistdio/u16-asprintf.c: New file.
1446         * lib/unistdio/u16-printf-parse.c: New file.
1447         * lib/unistdio/u16-snprintf.c: New file.
1448         * lib/unistdio/u16-sprintf.c: New file.
1449         * lib/unistdio/u16-vasnprintf.c: New file.
1450         * lib/unistdio/u16-vasprintf.c: New file.
1451         * lib/unistdio/u16-vsnprintf.c: New file.
1452         * lib/unistdio/u16-vsprintf.c: New file.
1453         * lib/unistdio/u16-u16-asnprintf.c: New file.
1454         * lib/unistdio/u16-u16-asprintf.c: New file.
1455         * lib/unistdio/u16-u16-snprintf.c: New file.
1456         * lib/unistdio/u16-u16-sprintf.c: New file.
1457         * lib/unistdio/u16-u16-vasnprintf.c: New file.
1458         * lib/unistdio/u16-u16-vasprintf.c: New file.
1459         * lib/unistdio/u16-u16-vsnprintf.c: New file.
1460         * lib/unistdio/u16-u16-vsprintf.c: New file.
1461         * lib/unistdio/u32-asnprintf.c: New file.
1462         * lib/unistdio/u32-asprintf.c: New file.
1463         * lib/unistdio/u32-printf-parse.c: New file.
1464         * lib/unistdio/u32-snprintf.c: New file.
1465         * lib/unistdio/u32-sprintf.c: New file.
1466         * lib/unistdio/u32-vasnprintf.c: New file.
1467         * lib/unistdio/u32-vasprintf.c: New file.
1468         * lib/unistdio/u32-vsnprintf.c: New file.
1469         * lib/unistdio/u32-vsprintf.c: New file.
1470         * lib/unistdio/u32-u32-asnprintf.c: New file.
1471         * lib/unistdio/u32-u32-asprintf.c: New file.
1472         * lib/unistdio/u32-u32-snprintf.c: New file.
1473         * lib/unistdio/u32-u32-sprintf.c: New file.
1474         * lib/unistdio/u32-u32-vasnprintf.c: New file.
1475         * lib/unistdio/u32-u32-vasprintf.c: New file.
1476         * lib/unistdio/u32-u32-vsnprintf.c: New file.
1477         * lib/unistdio/u32-u32-vsprintf.c: New file.
1478         * tests/unistdio/test-ulc-asnprintf1.c: New file.
1479         * tests/unistdio/test-ulc-asnprintf1.h: New file.
1480         * tests/unistdio/test-ulc-printf1.h: New file.
1481         * tests/unistdio/test-ulc-vasnprintf1.c: New file.
1482         * tests/unistdio/test-ulc-vasnprintf2.c: New file.
1483         * tests/unistdio/test-ulc-vasnprintf2.sh: New file.
1484         * tests/unistdio/test-ulc-vasnprintf3.c: New file.
1485         * tests/unistdio/test-ulc-vasnprintf3.sh: New file.
1486         * tests/unistdio/test-ulc-vasprintf1.c: New file.
1487         * tests/unistdio/test-ulc-vsnprintf1.c: New file.
1488         * tests/unistdio/test-ulc-vsprintf1.c: New file.
1489         * tests/unistdio/test-u8-asnprintf1.c: New file.
1490         * tests/unistdio/test-u8-asnprintf1.h: New file.
1491         * tests/unistdio/test-u8-printf1.h: New file.
1492         * tests/unistdio/test-u8-vasnprintf1.c: New file.
1493         * tests/unistdio/test-u8-vasnprintf2.c: New file.
1494         * tests/unistdio/test-u8-vasnprintf2.sh: New file.
1495         * tests/unistdio/test-u8-vasnprintf3.c: New file.
1496         * tests/unistdio/test-u8-vasnprintf3.sh: New file.
1497         * tests/unistdio/test-u8-vasprintf1.c: New file.
1498         * tests/unistdio/test-u8-vsnprintf1.c: New file.
1499         * tests/unistdio/test-u8-vsprintf1.c: New file.
1500         * tests/unistdio/test-u16-asnprintf1.c: New file.
1501         * tests/unistdio/test-u16-asnprintf1.h: New file.
1502         * tests/unistdio/test-u16-printf1.h: New file.
1503         * tests/unistdio/test-u16-vasnprintf1.c: New file.
1504         * tests/unistdio/test-u16-vasnprintf2.c: New file.
1505         * tests/unistdio/test-u16-vasnprintf2.sh: New file.
1506         * tests/unistdio/test-u16-vasnprintf3.c: New file.
1507         * tests/unistdio/test-u16-vasnprintf3.sh: New file.
1508         * tests/unistdio/test-u16-vasprintf1.c: New file.
1509         * tests/unistdio/test-u16-vsnprintf1.c: New file.
1510         * tests/unistdio/test-u16-vsprintf1.c: New file.
1511         * tests/unistdio/test-u32-asnprintf1.c: New file.
1512         * tests/unistdio/test-u32-asnprintf1.h: New file.
1513         * tests/unistdio/test-u32-printf1.h: New file.
1514         * tests/unistdio/test-u32-vasnprintf1.c: New file.
1515         * tests/unistdio/test-u32-vasnprintf2.c: New file.
1516         * tests/unistdio/test-u32-vasnprintf2.sh: New file.
1517         * tests/unistdio/test-u32-vasnprintf3.c: New file.
1518         * tests/unistdio/test-u32-vasnprintf3.sh: New file.
1519         * tests/unistdio/test-u32-vasprintf1.c: New file.
1520         * tests/unistdio/test-u32-vsnprintf1.c: New file.
1521         * tests/unistdio/test-u32-vsprintf1.c: New file.
1522         * modules/unistdio/base: New file.
1523         * modules/unistdio/u-printf-args: New file.
1524         * modules/unistdio/ulc-asnprintf: New file.
1525         * modules/unistdio/ulc-asprintf: New file.
1526         * modules/unistdio/ulc-fprintf: New file.
1527         * modules/unistdio/ulc-printf-parse: New file.
1528         * modules/unistdio/ulc-snprintf: New file.
1529         * modules/unistdio/ulc-sprintf: New file.
1530         * modules/unistdio/ulc-vasnprintf: New file.
1531         * modules/unistdio/ulc-vasprintf: New file.
1532         * modules/unistdio/ulc-vfprintf: New file.
1533         * modules/unistdio/ulc-vsnprintf: New file.
1534         * modules/unistdio/ulc-vsprintf: New file.
1535         * modules/unistdio/u8-asnprintf: New file.
1536         * modules/unistdio/u8-asprintf: New file.
1537         * modules/unistdio/u8-printf-parse: New file.
1538         * modules/unistdio/u8-snprintf: New file.
1539         * modules/unistdio/u8-sprintf: New file.
1540         * modules/unistdio/u8-vasnprintf: New file.
1541         * modules/unistdio/u8-vasprintf: New file.
1542         * modules/unistdio/u8-vsnprintf: New file.
1543         * modules/unistdio/u8-vsprintf: New file.
1544         * modules/unistdio/u8-u8-asnprintf: New file.
1545         * modules/unistdio/u8-u8-asprintf: New file.
1546         * modules/unistdio/u8-u8-snprintf: New file.
1547         * modules/unistdio/u8-u8-sprintf: New file.
1548         * modules/unistdio/u8-u8-vasnprintf: New file.
1549         * modules/unistdio/u8-u8-vasprintf: New file.
1550         * modules/unistdio/u8-u8-vsnprintf: New file.
1551         * modules/unistdio/u8-u8-vsprintf: New file.
1552         * modules/unistdio/u16-asnprintf: New file.
1553         * modules/unistdio/u16-asprintf: New file.
1554         * modules/unistdio/u16-printf-parse: New file.
1555         * modules/unistdio/u16-snprintf: New file.
1556         * modules/unistdio/u16-sprintf: New file.
1557         * modules/unistdio/u16-vasnprintf: New file.
1558         * modules/unistdio/u16-vasprintf: New file.
1559         * modules/unistdio/u16-vsnprintf: New file.
1560         * modules/unistdio/u16-vsprintf: New file.
1561         * modules/unistdio/u16-u16-asnprintf: New file.
1562         * modules/unistdio/u16-u16-asprintf: New file.
1563         * modules/unistdio/u16-u16-snprintf: New file.
1564         * modules/unistdio/u16-u16-sprintf: New file.
1565         * modules/unistdio/u16-u16-vasnprintf: New file.
1566         * modules/unistdio/u16-u16-vasprintf: New file.
1567         * modules/unistdio/u16-u16-vsnprintf: New file.
1568         * modules/unistdio/u16-u16-vsprintf: New file.
1569         * modules/unistdio/u32-asnprintf: New file.
1570         * modules/unistdio/u32-asprintf: New file.
1571         * modules/unistdio/u32-printf-parse: New file.
1572         * modules/unistdio/u32-snprintf: New file.
1573         * modules/unistdio/u32-sprintf: New file.
1574         * modules/unistdio/u32-vasnprintf: New file.
1575         * modules/unistdio/u32-vasprintf: New file.
1576         * modules/unistdio/u32-vsnprintf: New file.
1577         * modules/unistdio/u32-vsprintf: New file.
1578         * modules/unistdio/u32-u32-asnprintf: New file.
1579         * modules/unistdio/u32-u32-asprintf: New file.
1580         * modules/unistdio/u32-u32-snprintf: New file.
1581         * modules/unistdio/u32-u32-sprintf: New file.
1582         * modules/unistdio/u32-u32-vasnprintf: New file.
1583         * modules/unistdio/u32-u32-vasprintf: New file.
1584         * modules/unistdio/u32-u32-vsnprintf: New file.
1585         * modules/unistdio/u32-u32-vsprintf: New file.
1586         * modules/unistdio/ulc-asnprintf-tests: New file.
1587         * modules/unistdio/ulc-vasnprintf-tests: New file.
1588         * modules/unistdio/ulc-vasprintf-tests: New file.
1589         * modules/unistdio/ulc-vsnprintf-tests: New file.
1590         * modules/unistdio/ulc-vsprintf-tests: New file.
1591         * modules/unistdio/u8-asnprintf-tests: New file.
1592         * modules/unistdio/u8-vasnprintf-tests: New file.
1593         * modules/unistdio/u8-vasprintf-tests: New file.
1594         * modules/unistdio/u8-vsnprintf-tests: New file.
1595         * modules/unistdio/u8-vsprintf-tests: New file.
1596         * modules/unistdio/u16-asnprintf-tests: New file.
1597         * modules/unistdio/u16-vasnprintf-tests: New file.
1598         * modules/unistdio/u16-vasprintf-tests: New file.
1599         * modules/unistdio/u16-vsnprintf-tests: New file.
1600         * modules/unistdio/u16-vsprintf-tests: New file.
1601         * modules/unistdio/u32-asnprintf-tests: New file.
1602         * modules/unistdio/u32-vasnprintf-tests: New file.
1603         * modules/unistdio/u32-vasprintf-tests: New file.
1604         * modules/unistdio/u32-vsnprintf-tests: New file.
1605         * modules/unistdio/u32-vsprintf-tests: New file.
1606         * MODULES.html.sh (Unicode string functions): Add the new modules.
1607
1608 2007-07-01  Bruno Haible  <bruno@clisp.org>
1609
1610         * lib/sprintf.c (sprintf): Limit the available length estimation,
1611         to avoid address wraparound.
1612         * lib/vsprintf.c (vsprintf): Likewise.
1613         * modules/sprintf-posix (Dependencies): Add stdint.
1614         * modules/vsprintf-posix (Dependencies): Likewise.
1615
1616 2007-07-01  Bruno Haible  <bruno@clisp.org>
1617
1618         * gnulib-tool (self_abspathname): Determine PATH_SEPARATOR and handle
1619         Windows PATH as well. Conservative double-quoting. Comments.
1620
1621 2007-07-01  Bruno Haible  <bruno@clisp.org>
1622             Eric Blake  <ebb9@byu.net>
1623             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1624
1625         * gnulib-tool (self_abspathname): Fix algorithm to cope with
1626         empty components in $PATH, denoting '.'.
1627
1628 2007-07-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1629
1630         * gnulib-tool: Fix indentation.
1631         (func_create_megatestdir): Likewise.
1632         Report by Bruno Haible.
1633
1634 2007-06-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1635
1636         Sync from Automake.
1637         * build-aux/gnupload: Fix shell portability issues with for loops.
1638         Report by Karl Berry.
1639
1640 2007-06-29  Simon Josefsson  <simon@josefsson.org>
1641
1642         * build-aux/maint.mk (POURL): Use translationproject.org.
1643
1644 2007-06-27  Simon Josefsson  <simon@josefsson.org>
1645             Bruno Haible  <bruno@clisp.org>
1646
1647         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Require gl_HEADER_SYS_SOCKET
1648         before using HAVE_WS2TCPIP_H. Check for gai_strerror through an
1649         explicit link test, rather than AC_REPLACE_FUNCS - for mingw.
1650         (gl_PREREQ_GETADDRINFO): Require gl_HEADER_SYS_SOCKET before using
1651         HAVE_SYS_SOCKET_H and HAVE_WS2TCPIP_H.
1652
1653 2007-06-27  Bruno Haible  <bruno@clisp.org>
1654
1655         * build-aux/config.rpath: Upgrade to libtool-1.5.24.
1656         * build-aux/config.libpath: Upgrade to libtool-1.5.24.
1657
1658 2007-06-26  Karl Berry  <karl@gnu.org>
1659
1660         * MODULES.html.sh: remove xreadlink-with-size.
1661
1662 2007-06-23  Paul Eggert  <eggert@cs.ucla.edu>
1663
1664         * lib/time_.h: Port to Solaris 8 with Sun Studio 11, using a
1665         method that I hope also handles the double-include problem noted
1666         by Bruno Haible in
1667         <http://lists.gnu.org/archive/html/bug-gnulib/2007-05/msg00186.html>.
1668
1669 2007-06-23  Bruno Haible  <bruno@clisp.org>
1670
1671         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
1672         Don't let the 'mostlyclean' target fail if the last subdirectory could
1673         not be removed.
1674         Reported by Karl Berry.
1675
1676 2007-06-23  Bruno Haible  <bruno@clisp.org>
1677
1678         * gnulib-tool (echo): Add a speedier workaround for ksh.
1679         * tests/test-echo.sh: Likewise.
1680
1681 2007-06-23  Bruno Haible  <bruno@clisp.org>
1682
1683         * gnulib-tool (echo): Add workarounds also for bash versions < 2.04.
1684         * tests/test-echo.sh: Likewise.
1685
1686 2007-06-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1687
1688         * gnulib-tool (IFS): Initialize early, so we don't set it to
1689         empty later.
1690         (self_abspathname): Rewrite algorithm to set it, reindent.
1691         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am)
1692         (func_create_megatestdir): Merge some sed scripts.
1693
1694 2007-06-23  Paul Eggert  <eggert@cs.ucla.edu>
1695
1696         * m4/include_next.m4 (gl_CHECK_NEXT_HEADERS): Check some typos
1697         exposed by Sun Studio 11 cc on Solaris 8.
1698
1699 2007-06-22  Bruno Haible  <bruno@clisp.org>
1700
1701         * gnulib-tool (echo): Ensure the echo primitive does not interpret
1702         backslashes.
1703         * tests/test-echo.sh: New file.
1704
1705 2007-06-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1706
1707         * gnulib-tool (func_add_or_update, func_create_testdir): Do not
1708         simplify `sed_replace_build_aux' scripts, they are portable but
1709         echoing them with `echo' is not.
1710         Report and analysis by Fernando Ferreira <fernando.prog@netcabo.pt>.
1711
1712 2007-06-21  Karl Berry  <karl@gnu.org>
1713
1714         * config/srclist.txt: guess we can't handle the licenses via
1715         srclist at the moment.
1716
1717 2007-06-21  Paul Eggert  <eggert@cs.ucla.edu>
1718
1719         * MODULES.html.sh: Add include_next.
1720         * modules/include_next: New file.
1721
1722 2007-06-20  Paul Eggert  <eggert@cs.ucla.edu>
1723
1724         * m4/include_next.m4 (gl_INCLUDE_NEXT): Define and AC_SUBST
1725         INCLUDE_NEXT.
1726         (gl_CHECK_NEXT_HEADERS): New macro.
1727         * m4/fcntl_h.m4 (gl_FCNTL_H): use gl_CHECK_NEXT_HEADERS instead of
1728         the obsolescent gl_ABSOLUTE_HEADER.
1729         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Likewise.
1730         * m4/float_h.m4 (gl_FLOAT_H): Likewise.
1731         * m4/iconv_h.m4 (gl_ICONV_H): Likewise.
1732         * m4/inttypes.m4 (gl_INTTYPES_H): Likewise.
1733         * m4/locale_h.m4 (gl_LOCALE_H): Likewise.
1734         * m4/math_h.m4 (gl_MATH_H): Likewise.
1735         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Likewise.
1736         * m4/search_h.m4 (gl_SEARCH_H): Likewise.
1737         * m4/signal_h.m4 (gl_SIGNAL_H): Likewise.
1738         * m4/stdint.m4 (gl_STDINT_H): Likewise.
1739         * m4/stdio_h.m4 (gl_STDIO_H): Likewise.
1740         * m4/stdlib_h.m4 (gl_STDLIB_H): Likewise.
1741         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Likewise.
1742         * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise.
1743         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Likewise.
1744         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Likewise.
1745         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Likewise.
1746         * m4/sysexits.m4 (gl_SYSEXITS): Likewise.
1747         * m4/time_h.m4 (gl_HEADER_TIME_H_BODY): Likewise.
1748         * m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
1749         * m4/wchar.m4 (gl_WCHAR_H): Likewise.
1750         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
1751         * m4/inttypes.m4 (gl_INTTYPES_H): Define
1752         _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H to avoid the problem of unclean
1753         builds, since ABSOLUTE_INTTYPES_H is no longer being defined.
1754         * m4/stdint.m4 (gl_STDINT_H): Likewise, for
1755         _GL_JUST_INCLUDE_SYSTEM_STDINT_H.
1756         * lib/fcntl_.h: Use @INCLUDE_NEXT@ @NEXT_foo_H@
1757         rather than @HAVE_INCLUDE_NEXT@ and @ABSOLUTE_foo_H@.
1758         * lib/float_.h: Likewise.
1759         * lib/inttypes_.h: Likewise.
1760         * lib/math_.h: Likewise.
1761         * lib/search_.h: Likewise.
1762         * lib/signal_.h: Likewise.
1763         * lib/stdint_.h: Likewise.
1764         * lib/stdio_.h: Likewise.
1765         * lib/stdlib_.h: Likewise.
1766         * lib/string_.h: Likewise.
1767         * lib/sys_stat_.h: Likewise.
1768         * lib/sys_time_.h: Likewise.
1769         * lib/time_.h: Likewise.
1770         * lib/unistd_.h: Likewise.
1771         * lib/wchar_.h: Likewise.
1772         * lib/wctype_.h: Likewise.
1773         * lib/dirent_.h: Likewise.
1774         * lib/iconv_.h: Likewise.
1775         * lib/locale_.h: Likewise.
1776         * lib/netinet_in_.h: Likewise.
1777         * lib/sys_select_.h: Likewise.
1778         * lib/sys_socket_.h: Likewise.
1779         * lib/sysexits_.h: Likewise.
1780         * modules/fcntl (Depends-on): Depend on include_next, not
1781         absolute_header.
1782         (Makefile): Substitute INCLUDE_NEXT and NEXT_foo_H, not
1783         HAVE_INCLUDE_NEXT and ABSOLUTE_foo_H.
1784         * modules/fchdir: Likewise.
1785         * modules/float: Likewise.
1786         * modules/iconv_open: Likewise.
1787         * modules/inttypes: Likewise.
1788         * modules/locale: Likewise.
1789         * modules/math: Likewise.
1790         * modules/netinet_in: Likewise.
1791         * modules/search: Likewise.
1792         * modules/signal: Likewise.
1793         * modules/stdint: Likewise.
1794         * modules/stdio: Likewise.
1795         * modules/stdlib: Likewise.
1796         * modules/string: Likewise.
1797         * modules/sys_select: Likewise.
1798         * modules/sys_socket: Likewise.
1799         * modules/sys_stat: Likewise.
1800         * modules/sys_time: Likewise.
1801         * modules/sysexits: Likewise.
1802         * modules/time: Likewise.
1803         * modules/unistd: Likewise.
1804         * modules/wchar: Likewise.
1805         * modules/wctype: Likewise.
1806         * modules/sys_stat: Change maintainer to "all".
1807         * modules/unistd: Likewise.
1808
1809 2007-06-20  Karl Berry  <karl@gnu.org>
1810
1811         * config/srclist.txt: track www changes in license files.
1812
1813 2007-06-20  Sergey Poznyakoff  <gray@gnu.org.ua>
1814
1815         * build-aux/bootstrap: Remove stray dot.
1816         Make sure build_aux settings are honored when linking
1817         gnulib_extra_files.
1818
1819 2007-06-19  Eric Blake  <ebb9@byu.net>
1820
1821         * modules/canonicalize-lgpl-tests (test_canonicalize_lgpl_LDADD):
1822         Allow compilation on cygwin.
1823
1824 2007-06-19  Jim Meyering  <jim@meyering.net>
1825
1826         xreadlink-with-size: Remove module.  No longer used.
1827         Ex-callers now use xreadlink or mreadlink-with-size.
1828         * modules/xreadlink-with-size: Remove module.
1829         * lib/xreadlink-with-size.c: Remove file.
1830         * lib/xreadlink.h (xreadlink_with_size): Remove prototype.
1831         (xreadlink): Remove inaccurate comment.  The one in xreadlink.c,
1832         just before the function definition *is* accurate.
1833
1834         Eliminate one way canonicalize_filename_mode could exit.
1835         * lib/canonicalize.c (canonicalize_filename_mode):
1836         Use mreadlink_with_size, not xreadlink_with_size.
1837
1838 2007-06-18  Paul Eggert  <eggert@cs.ucla.edu>
1839
1840         Detect porting problems to FreeBSD/arm, which has time_t wider than
1841         long int.  Original problem reported for GNU diff by Xin Li in
1842         <http://lists.gnu.org/archive/html/bug-gnu-utils/2007-06/msg00091.html>.
1843         * modules/getdate (Depends-on): Add intprops, verify.
1844         * lib/getdate.y: Include intprops.h, verify.h.  Verify that time_t
1845         is an integer type no wider than long int.
1846
1847 2007-06-18  Jim Meyering  <jim@meyering.net>
1848
1849         New module: mreadlink-with-size.
1850         * MODULES.html.sh: Add mreadlink-with-size.
1851         * modules/mreadlink-with-size: New module
1852         * modules/canonicalize (Depends-on): Depend on mreadlink-with-size,
1853         not xreadlink-with-size.
1854         * lib/mreadlink-with-size.c, lib/mreadlink.h: New files.
1855
1856 2007-06-16  Bruno Haible  <bruno@clisp.org>
1857
1858         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Catch the MacOS X 10.4 bug.
1859         * doc/functions/frexpl.texi: Document the MacOS X 10.4 bug.
1860         Reported by Gary V. Vaughan <gary@gnu.org>.
1861
1862 2007-06-15  Paul Eggert  <eggert@cs.ucla.edu>
1863
1864         Revamp lchown so that it lives in unistd.h where it belongs.
1865         * lib/lchown.h: Remove.
1866         * lib/dirchownmod.c: Don't include lib/lchown.h.
1867         * lib/fchownat.c: Likewise.
1868         * lib/openat.c: Likewise.
1869         * lib/lchown.c (REPLACE_CHOWN): Define to 0 if the system chown
1870         does not follow symlinks.
1871         (EOPNOTSUPP): Define if not defined.
1872         * lib/unistd_.h (chown): Do not replace if REPLADE_CHOWN
1873         is defined to 0.
1874         (lchown): New decl.
1875         * m4/lchown.m4 (gl_FUNC_LCHOWN): Require gl_UNISTD_H_DEFAULTS.
1876         Do not check for lchown decl.
1877         Set REPLACE_LCHOWN.
1878         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Set GNULIB_LCHOWN,
1879         REPLACE_LCHOWN.
1880         * modules/chown: Make it clear it follows symlinks.
1881         * modules/lchown: Make it clear it doesn't follow symlinks.
1882         (Files): Remove lib/lchown.h
1883         (Depends-on): Add unistd.
1884         (configure.ac): Add gl_UNISTD_MODULE_INDICATOR([lchown]).
1885         (Include): Include <unistd.h>, not "lchown.h".
1886         * modules/unistd (unistd.h): Substitude GNULIB_LCHOWN and
1887         REPLACE_LCHOWN.
1888
1889 2007-06-15  Jim Meyering  <jim@meyering.net>
1890
1891         Change license (GPL to LGPL) of fsusage and dependents.
1892         * modules/fsusage (License): Change to LGPL.
1893         * modules/full-read (License): Likewise.
1894         * modules/full-write (License): Likewise.
1895         * modules/safe-read (License): Likewise.
1896         * modules/safe-write (License): Likewise.
1897
1898 2007-06-14  Ben Pfaff  <blp@gnu.org>
1899
1900         Missing part of allocsa -> malloca transition.
1901         * modules/relocatable-prog-wrapper: gl_ALLOCSA should be
1902         gl_MALLOCA.
1903
1904 2007-06-12  Bruno Haible  <bruno@clisp.org>
1905
1906         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Guess no when cross-compiling
1907         to ia64, x86_64, i386.
1908         Reported by Eric Blake.
1909
1910 2007-06-12  Bruno Haible  <bruno@clisp.org>
1911
1912         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Guess no also when
1913         cross-compiling to x86_64.
1914
1915 2007-06-12  Paul Eggert  <eggert@cs.ucla.edu>
1916
1917         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Fix POSIX sed portability
1918         glitch reported by Ralf Wildenhues in
1919         <http://lists.gnu.org/archive/html/bug-gnulib/2007-06/msg00114.html>.
1920
1921         * m4/regex.m4 (gl_REGEX): Catch a bug with [[:alnum:]_-] reported by
1922         Vin Shelton.
1923
1924 2007-06-11  Bruno Haible  <bruno@clisp.org>
1925
1926         * lib/printf-args.c (PRINTF_FETCHARGS) [ENABLE_UNISTDIO]: Fix NULL
1927         replacement string.
1928         Reported by Eric Blake.
1929
1930 2007-06-10  Bruno Haible  <bruno@clisp.org>
1931
1932         Prepare vasnprintf code for use with Unicode strings.
1933         * lib/printf-args.h (PRINTF_FETCHARGS): New macro.
1934         (arg_type) [ENABLE_UNISTDIO]: Define TYPE_U8_STRING, TYPE_U16_STRING,
1935         TYPE_U32_STRING.
1936         (argument) [ENABLE_UNISTDIO]: Add a_u8_string, a_u16_string,
1937         a_u32_string variants.
1938         (PRINTF_FETCHARGS): Renamed from printf_fetchargs.
1939         * lib/printf-args.c: Don't include config.h and the specification
1940         header if PRINTF_FETCHARGS is already defined.
1941         (PRINTF_FETCHARGS): Renamed from printf_fetchargs.
1942         (PRINTF_FETCHARGS) [ENABLE_UNISTDIO]: Add code for TYPE_U8_STRING,
1943         TYPE_U16_STRING, TYPE_U32_STRING.
1944         * lib/printf-parse.h [ENABLE_UNISTDIO] (u8_directive, u8_directives,
1945         u16_directive, u16_directives, u32_directive, u32_directives): New
1946         types.
1947         (ulc_printf_parse, u8_printf_parse, u16_printf_parse, u32_printf_parse):
1948         New declarations.
1949         * lib/printf-parse.c: Don't include config.h and the specification
1950         header if PRINTF_PARSE is already defined. Eliminate the set of
1951         parameters for WIDE_CHAR_VERSION; the user of this file must provide
1952         them now. Include c-ctype.h.
1953         (PRINTF_PARSE) [ENABLE_UNISTDIO]: Add code implementing the 'U'
1954         directive and CHAR_T_ONLY_ASCII.
1955         * lib/vasnprintf.c: Don't include config.h and the specification header
1956         if VASNPRINTF is already defined.
1957         (DCHAR_IS_TCHAR, DCHAR_CPY): New macros.
1958         (VASNPRINTF): Use PRINTF_FETCHARGS instead of printf_fetchargs. Use
1959         DCHAR_CPY. Handle the case that DCHAR_T and FCHAR_T are not the same
1960         type. Handle the case that TCHAR_T and FCHAR_T are not of the same
1961         size. Handle the case that DCHAR_T and TCHAR_T are not the same type,
1962         add a conversion from TCHAR_T[] to DCHAR_T[], and rework the padding
1963         code accordingly.
1964         (VASNPRINTF) [ENABLE_UNISTDIO]: Implement the 'U' directive. Enable
1965         pad_ourselves also in this case, with the 'c' and 's' directives, and
1966         with a different notion of "width".
1967         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_WITH_EXTRAS): New macros.
1968
1969 2007-06-10  Bruno Haible  <bruno@clisp.org>
1970
1971         * modules/unistr/u32-mbsnlen: New file.
1972         * lib/unistr/u32-mbsnlen.c: New file.
1973
1974         * modules/unistr/u16-mbsnlen: New file.
1975         * lib/unistr/u16-mbsnlen.c: New file.
1976
1977         * modules/unistr/u8-mbsnlen: New file.
1978         * lib/unistr/u8-mbsnlen.c: New file.
1979
1980         * lib/unistr.h (u8_mbsnlen, u16_mbsnlen, u32_mbsnlen): New
1981         declarations.
1982
1983 2007-06-10  Bruno Haible  <bruno@clisp.org>
1984
1985         * lib/string_.h (mbsnlen): New declaration.
1986         * lib/mbsnlen.c: New file.
1987         * m4/mbsnlen.m4: New file.
1988         * modules/mbsnlen: New file.
1989         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Set GNULIB_MBSNLEN.
1990         * modules/string (string.h): Substitute GNULIB_MBSNLEN.
1991         * MODULES.html.sh (Internationalization functions): Add mbsnlen.
1992
1993 2007-06-10  Bruno Haible  <bruno@clisp.org>
1994
1995         * lib/mbslen.c: Include <stdlib.h>, needed for MB_CUR_MAX.
1996
1997 2007-06-10  Bruno Haible  <bruno@clisp.org>
1998
1999         * lib/mbiter.h: Include <stddef.h>, needed for ptrdiff_t.
2000         * lib/mbuiter.h: Likewise.
2001
2002 2007-06-10  Bruno Haible  <bruno@clisp.org>
2003
2004         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Check for _snprintf
2005         declaration.
2006
2007 2007-06-10  Karl Berry  <karl@gnu.org>
2008
2009         * config/srclist.txt: remove gettext entries, Bruno prefers
2010         to update individually.
2011
2012 2007-06-10  Bruno Haible  <bruno@clisp.org>
2013
2014         * lib/vasnprintf.c (VASNPRINTF) [!USE_SNPRINTF]: Remove variable
2015         'maxlen'. Ensure only length + width bytes are allocated, not
2016         length + 1 + width.
2017
2018 2007-06-09  Bruno Haible  <bruno@clisp.org>
2019
2020         * lib/vasnprintf.c (FCHAR_T, DCHAR_T, TCHAR_T): New macros.
2021         (CHAR_T): Remove macro.
2022         (VASNPRINTF): Update.
2023
2024 2007-06-09  Bruno Haible  <bruno@clisp.org>
2025
2026         * MODULES.html.sh (Unicode string functions): Add the new modules.
2027
2028         * modules/uniconv/u32-conv-to-enc: New file.
2029         * lib/uniconv/u32-conv-to-enc.c: New file.
2030         * modules/uniconv/u32-conv-to-enc-tests: New file.
2031         * tests/uniconv/test-u32-conv-to-enc.c: New file.
2032
2033         * modules/uniconv/u16-conv-to-enc: New file.
2034         * lib/uniconv/u16-conv-to-enc.c: New file.
2035         * lib/uniconv/u-conv-to-enc.h: New file.
2036         * modules/uniconv/u16-conv-to-enc-tests: New file.
2037         * tests/uniconv/test-u16-conv-to-enc.c: New file.
2038
2039         * modules/uniconv/u8-conv-to-enc: New file.
2040         * lib/uniconv/u8-conv-to-enc.c: New file.
2041         * modules/uniconv/u8-conv-to-enc-tests: New file.
2042         * tests/uniconv/test-u8-conv-to-enc.c: New file.
2043
2044         * lib/uniconv.h (u8_conv_to_encoding, u16_conv_to_encoding,
2045         u32_conv_to_encoding): New declarations.
2046
2047 2007-06-09  Bruno Haible  <bruno@clisp.org>
2048
2049         * tests/uniconv/test-u32-strconv-to-enc.c (main): Remove unused code.
2050
2051 2007-06-09  Bruno Haible  <bruno@clisp.org>
2052
2053         Rename 'allocsa' -> 'malloca', 'freesa' -> 'freea'.
2054         * modules/malloca: Renamed from modules/allocsa, updated.
2055         * lib/malloca.h: Renamed from lib/allocsa.h, updated.
2056         * lib/malloca.c: Renamed from lib/allocsa.c, updated.
2057         * lib/malloca.valgrind: Renamed from lib/allocsa.valgrind, updated.
2058         * m4/malloca.m4: Renamed from m4/allocsa.m4, updated.
2059         * modules/malloca-tests: Renamed from modules/allocsa-tests, updated.
2060         * tests/test-malloca.c: Renamed from tests/test-allocsa.c, updated.
2061         * modules/xmalloca: Renamed from modules/xallocsa, updated.
2062         * lib/xmalloca.h: Renamed from lib/xallocsa.h, updated.
2063         * lib/xmalloca.c: Renamed from lib/xallocsa.c, updated.
2064         * modules/c-strcasestr (Depends-on): Update.
2065         * lib/c-strcasestr.c: Update.
2066         * modules/c-strstr (Depends-on): Update.
2067         * lib/c-strstr.c: Update.
2068         * modules/canonicalize-lgpl (Depends-on): Update.
2069         * lib/canonicalize-lgpl.c: Update.
2070         * modules/clean-temp (Depends-on): Update.
2071         * lib/clean-temp.c: Update.
2072         * modules/csharpcomp (Depends-on): Update.
2073         * lib/csharpcomp.c: Update.
2074         * modules/csharpexec (Depends-on): Update.
2075         * lib/csharpexec.c: Update.
2076         * modules/javacomp (Depends-on): Update.
2077         * lib/javacomp.c: Update.
2078         * modules/javaexec (Depends-on): Update.
2079         * lib/javaexec.c: Update.
2080         * modules/mbscasestr (Depends-on): Update.
2081         * lib/mbscasestr.c: Update.
2082         * modules/mbsstr (Depends-on): Update.
2083         * lib/mbsstr.c: Update.
2084         * modules/setenv (Depends-on): Update.
2085         * lib/setenv.c: Update.
2086         * modules/strcasestr (Depends-on): Update.
2087         * lib/strcasestr.c: Update.
2088         * modules/striconveha (Depends-on): Update.
2089         * lib/striconveha.c: Update.
2090         * modules/relocatable-prog-wrapper (Files): Update.
2091         * lib/relocwrapper.c: Update.
2092         * build-aux/install-reloc: Update.
2093         * MODULES.html.sh (Memory management functions <stdlib.h>): Update.
2094
2095 2007-06-08  Bruno Haible  <bruno@clisp.org>
2096
2097         Port to uClibc.
2098         * lib/fbufmode.c (fbufmode): Add special code for uClibc.
2099         * lib/fpurge.c (fpurge): Likewise.
2100         * lib/freading.c (freading): Likewise.
2101         * lib/fseeko.c (rpl_fseeko): Likewise.
2102         * lib/fseterr.c (fseterr): Likewise.
2103         * lib/fwriting.c (fwriting): Likewise.
2104         * tests/test-fflush.c (main): Avoid a failure on uClibc.
2105
2106 2007-06-08  Bruno Haible  <bruno@clisp.org>
2107
2108         * m4/intlmacosx.m4: New file, extracted from gettext.m4.
2109         * m4/gettext.m4 (gt_INTL_MACOSX): Remove macro, moved to intlmacosx.m4.
2110         * modules/gettext (Files): Add m4/intlmacosx.m4.
2111
2112 2007-06-07  Bruno Haible  <bruno@clisp.org>
2113
2114         * modules/localename-tests: New file.
2115         * tests/test-localename.c: New file.
2116
2117         New module 'localename'.
2118         * lib/localename.h: New file.
2119         * lib/localename.c: New file, from GNU gettext.
2120         * m4/localename.m4: New file.
2121         * modules/localename: New file.
2122
2123 2007-06-07  Bruno Haible  <bruno@clisp.org>
2124
2125         Work around the lack of <wchar.h> on some builds of uClibc.
2126         * doc/headers/wchar.texi: Update.
2127         * lib/wchar_.h: Include <wchar.h> only if it exists.
2128         * m4/wchar.m4 (gl_WCHAR_H): Check for <wchar.h>. Set HAVE_WCHAR_H.
2129         * m4/stdint.m4 (gl_STDINT_H): Check for <wchar.h>.
2130         (gl_STDINT_TYPE_PROPERTIES): Don't try to include <wchar.h> if it
2131         doesn't exist.
2132         * modules/wchar (wchar.h): Substitute HAVE_WCHAR_H.
2133         * modules/mbfile (Depends-on): Add wchar.
2134         * modules/mbiter (Depends-on): Likewise.
2135         * modules/mbuiter (Depends-on): Likewise.
2136         Reported by Simon Josefsson.
2137
2138 2007-06-06  Paul Eggert  <eggert@cs.ucla.edu>
2139
2140         Work around problem reported by Steven M. Schweda in
2141         <http://lists.gnu.org/archive/html/bug-tar/2007-06/msg00002.html>:
2142         Tru64 5.1B with the Compaq compiler environment installed declares
2143         an 'isblank' function but does not define it in the C library.
2144         * lib/fnmatch.c (isblank): Check for HAVE_ISBLANK, too.
2145         * lib/regex_internal.h (isblank): Likewise.
2146         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for isblank existence.
2147         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
2148
2149 2007-06-05  Bruno Haible  <bruno@clisp.org>
2150
2151         Fix *printf so that it recognizes non-IEEE numbers on i386, x86_64,
2152         ia64.
2153         * modules/printf-safe: New file.
2154         * modules/fprintf-posix (Depends-on): Add printf-safe.
2155         * modules/printf-posix (Depends-on): Likewise.
2156         * modules/snprintf-posix (Depends-on): Likewise.
2157         * modules/sprintf-posix (Depends-on): Likewise.
2158         * modules/vasnprintf-posix (Depends-on): Likewise.
2159         * modules/vasprintf-posix (Depends-on): Likewise.
2160         * modules/vfprintf-posix (Depends-on): Likewise.
2161         * modules/vprintf-posix (Depends-on): Likewise.
2162         * modules/vsnprintf-posix (Depends-on): Likewise.
2163         * modules/vsprintf-posix (Depends-on): Likewise.
2164         * m4/printf.m4 (gl_PRINTF_INFINITE_LONG_DOUBLE): Require
2165         AC_C_BIGENDIAN. Define CHECK_PRINTF_SAFE if printf-safe is used. Test
2166         non-IEEE numbers on i386, x86_64, ia64. When cross-compiling, guess
2167         "no" on i386, x86_64, ia64.
2168         * tests/test-snprintf-posix.h (LDBL80_WORDS): New macro.
2169         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
2170         on i386, x86_64, ia64.
2171         * tests/test-sprintf-posix.h (LDBL80_WORDS): New macro.
2172         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
2173         on i386, x86_64, ia64.
2174         * tests/test-vasnprintf-posix.c: Include float.h.
2175         (LDBL80_WORDS): New macro.
2176         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
2177         on i386, x86_64, ia64.
2178         * tests/test-vasprintf-posix.c: Include float.h.
2179         (LDBL80_WORDS): New macro.
2180         (test_function): Check result of %La, %Lf, %Le, %Lg on non-IEEE numbers
2181         on i386, x86_64, ia64.
2182         * tests/test-snprintf-posix.c: Include float.h.
2183         * tests/test-sprintf-posix.c: Likewise.
2184         * tests/test-vsnprintf-posix.c: Likewise.
2185         * tests/test-vsprintf-posix.c: Likewise.
2186
2187 2007-06-05  Bruno Haible  <bruno@clisp.org>
2188
2189         Fix isnanl so that it recognizes non-IEEE numbers on i386, x86_64, ia64.
2190         * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Require AC_C_BIGENDIAN. Test
2191         non-IEEE numbers on i386, x86_64, ia64.
2192         (gl_LONG_DOUBLE_EXPONENT_LOCATION): Require AC_C_BIGENDIAN.
2193         * lib/isnan.c (FUNC): Add special code for i386, x86_64, ia64.
2194         * tests/test-isnanl.h: Include float.h.
2195         (main): Check also non-IEEE numbers on i386, x86_64, ia64.
2196
2197 2007-06-05  Bruno Haible  <bruno@clisp.org>
2198
2199         * lib/vasnprintf.c (VASNPRINTF): Do the extra handling of NaN and Inf
2200         also the %a / %A. Handle the %a / %A code before this extra handling.
2201
2202 2007-06-05  Bruno Haible  <bruno@clisp.org>
2203
2204         * lib/vasnprintf.c [NEED_PRINTF_LONG_DOUBLE ||
2205         NEED_PRINTF_INFINITE_LONG_DOUBLE]: Include fpucw.h.
2206
2207 2007-06-05  Bruno Haible  <bruno@clisp.org>
2208
2209         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE): Fix
2210         typo in variable name.
2211
2212 2007-06-05  Eric Blake  <ebb9@byu.net>
2213
2214         * m4/lseek.m4 (gl_FUNC_LSEEK): Work when cross-compiling.
2215         Reported by Simon Josefsson.
2216
2217 2007-06-04  Bruno Haible  <bruno@clisp.org>
2218
2219         Avoid test failures on some PowerPC platforms.
2220         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP):
2221         Define differently for PowerPC.
2222         * tests/test-frexpl.c (MIN_NORMAL_EXP): Likewise.
2223         Reported by Gary V. Vaughan <gary@gnu.org>.
2224
2225 2007-06-02  Bruno Haible  <bruno@clisp.org>
2226
2227         Fix test-stdint failure on FreeBSD/ia64.
2228         * m4/stdint.m4 (gl_STDINT_H): Check the values of PTRDIFF_MIN,
2229         PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN,
2230         WCHAR_MAX, WINT_MIN, WINT_MAX entirely, not only for plausibility.
2231         * doc/headers/stdint.texi: Update.
2232
2233 2007-06-01  Bruno Haible  <bruno@clisp.org>
2234
2235         * tests/test-binary-io.c (main): Pass a third argument to open().
2236         Reported by Gary V. Vaughan <gary@gnu.org>.
2237
2238 2007-06-01  Bruno Haible  <bruno@clisp.org>
2239
2240         * doc/functions/frexpl.texi: Update for mingw.
2241
2242 2007-06-01  Bruno Haible  <bruno@clisp.org>
2243
2244         * tests/test-lseek.c (main): Disable test of errno for invalid third
2245         argument.
2246         * doc/functions/lseek.texi: Update.
2247         Reported by Gary V. Vaughan <gary@gnu.org>.
2248
2249 2007-05-28  Bruno Haible  <bruno@clisp.org>
2250
2251         * m4/intl.m4 (AM_INTL_SUBDIR): Substitute variables WOE32, WINDRES.
2252
2253 2007-05-31  Eric Blake  <ebb9@byu.net>
2254
2255         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Guess no on mingw when
2256         cross compiling.
2257
2258 2007-05-30  Eric Blake  <ebb9@byu.net>
2259         and Bruno Haible  <bruno@clisp.org>
2260
2261         Work around mingw test failures exposed by m4-1.4.9b.
2262         * m4/stdint.m4 (gl_STDINT_H): Detect mingw bug.
2263         * tests/test-unistd.c: Disable uid_t and git_t tests for the
2264         moment.
2265
2266 2007-05-30  Bruno Haible  <bruno@clisp.org>
2267
2268         * tests/test-lseek.c: Explicitly close file descriptors 0 and 1 before
2269         assuming that they are closed. Needed on HP-UX 11.
2270
2271 2007-05-29  Bruno Haible  <bruno@clisp.org>
2272
2273         Fix a problem with #include_next.
2274         * lib/dirent_.h: Split the double-inclusion guard.
2275         * lib/fcntl_.h: Likewise.
2276         * lib/float_.h: Likewise.
2277         * lib/iconv_.h: Likewise.
2278         * lib/inttypes_.h: Likewise.
2279         * lib/locale_.h: Likewise.
2280         * lib/math_.h: Likewise.
2281         * lib/netinet_in_.h: Likewise.
2282         * lib/search_.h: Likewise.
2283         * lib/signal_.h: Likewise.
2284         * lib/stdint_.h: Likewise.
2285         * lib/stdio_.h: Likewise.
2286         * lib/stdlib_.h: Likewise.
2287         * lib/string_.h: Likewise.
2288         * lib/sys_select_.h: Likewise.
2289         * lib/sys_socket_.h: Likewise.
2290         * lib/sys_stat_.h: Likewise.
2291         * lib/sys_time_.h: Likewise.
2292         * lib/sysexits_.h: Likewise.
2293         * lib/time_.h: Likewise.
2294         * lib/unistd_.h: Likewise.
2295         * lib/wchar_.h: Likewise.
2296         * lib/wctype_.h: Likewise.
2297
2298 2007-05-29  Bruno Haible  <bruno@clisp.org>
2299
2300         * tests/test-unistd.c: Disable the tests for useconds_t and intptr_t
2301         for the moment.
2302
2303 2007-05-29  Bruno Haible  <bruno@clisp.org>
2304
2305         * m4/isnan.m4 (gl_DOUBLE_EXPONENT_LOCATION): Silence the AC_C_BIGENDIAN
2306         invocation.
2307         Reported by Eric Blake.
2308
2309 2007-05-29  Bruno Haible  <bruno@clisp.org>
2310
2311         * m4/isnanf.m4 (gl_FLOAT_EXPONENT_LOCATION): Fix typo in cross-
2312         compiling case.
2313
2314 2007-05-29  Eric Blake  <ebb9@byu.net>
2315             Bruno Haible  <bruno@clisp.org>
2316
2317         * m4/isnanf.m4 (gl_FUNC_ISNANF_NO_LIBM): Avoid syntax error on
2318         cross compiles.
2319
2320 2007-05-28  Eric Blake  <ebb9@byu.net>
2321
2322         * modules/closein-tests (test_closein_LDADD): Support test on
2323         cygwin with libtool.
2324
2325 2007-05-28  Bruno Haible  <bruno@clisp.org>
2326
2327         * tests/uniconv/test-u16-conv-from-enc.c: Remove #ifdef HAVE_CONFIG_H.
2328         * tests/uniconv/test-u16-strconv-from-enc.c: Likewise.
2329         * tests/uniconv/test-u16-strconv-to-enc.c: Likewise.
2330         * tests/uniconv/test-u32-conv-from-enc.c: Likewise.
2331         * tests/uniconv/test-u32-strconv-from-enc.c: Likewise.
2332         * tests/uniconv/test-u32-strconv-to-enc.c: Likewise.
2333         * tests/uniconv/test-u8-conv-from-enc.c: Likewise.
2334         * tests/uniconv/test-u8-strconv-from-enc.c: Likewise.
2335         * tests/uniconv/test-u8-strconv-to-enc.c: Likewise.
2336
2337 2007-05-28  Eric Blake  <ebb9@byu.net>
2338
2339         Unconditionally include <config.h> in unit tests.
2340         * tests/test-alloca-opt.c: Remove #ifdef HAVE_CONFIG_H.
2341         * tests/test-allocsa.c, tests/test-arcfour.c,
2342         tests/test-arctwo.c, tests/test-argmatch.c, tests/test-argp.c,
2343         tests/test-array_list.c, tests/test-array_oset.c,
2344         tests/test-atexit.c, test-avltree_list.c, test-avltree_oset.c,
2345         test-avltreehash_list.c, test-base64.c, test-binary-io.c,
2346         test-c-ctype.c, test-c-strcasecmp.c, test-c-strcasestr.c,
2347         test-c-strncasecmp.c, test-c-strstr.c, test-canonicalize-lgpl.c,
2348         test-carray_list.c, test-crc.c, test-des.c, test-dirname.c,
2349         test-fflush.c, test-fprintf-posix.c, test-gc-arcfour.c,
2350         test-gc-arctwo.c, test-gc-des.c, test-gc-hmac-md5.c,
2351         test-gc-hmac-sha1.c, test-gc-md2.c, test-gc-md4.c, test-gc-md5.c,
2352         test-gc-pbkdf2-sha1.c, test-gc-rijndael.c, test-gc-sha1.c,
2353         test-gc.c, test-getpass.c, test-hmac-md5.c, test-hmac-sha1.c,
2354         test-iconv.c, test-linked_list.c, test-linkedhash_list.c,
2355         test-lock.c, test-mbscasecmp.c, test-mbscasestr1.c,
2356         test-mbscasestr2.c, test-mbscasestr3.c, test-mbscasestr4.c,
2357         test-mbschr.c, test-mbscspn.c, test-mbsncasecmp.c, test-mbspbrk.c,
2358         test-mbspcasecmp.c, test-mbsrchr.c, test-mbsspn.c, test-mbsstr1.c,
2359         test-mbsstr2.c, test-mbsstr3.c, test-md2.c, test-md4.c,
2360         test-md5.c, test-memmem.c, test-printf-posix.c,
2361         test-rbtree_list.c, test-rbtree_oset.c, test-rbtreehash_list.c,
2362         test-read-file.c, test-rijndael.c, test-snprintf-posix.c,
2363         test-snprintf.c, test-sprintf-posix.c, test-stdint.c,
2364         test-strcasestr.c, test-striconv.c, test-striconveh.c,
2365         test-striconveha.c, test-tls.c, test-vasnprintf-posix.c,
2366         test-vasnprintf-posix2.c, test-vasnprintf.c,
2367         test-vasprintf-posix.c, test-vasprintf.c, test-verify.c,
2368         test-vfprintf-posix.c, test-vprintf-posix.c,
2369         test-vsnprintf-posix.c, test-vsnprintf.c, test-vsprintf-posix.c,
2370         test-xvasprintf.c: Likewise.
2371
2372 2007-05-28  Bruno Haible  <bruno@clisp.org>
2373
2374         * gnulib-tool (func_import): Remember the --with-tests command-line
2375         option through the macro gl_WITH_TESTS in the gnulib-cache.m4.
2376         Reported by Eric Blake.
2377
2378 2007-05-28  Bruno Haible  <bruno@clisp.org>
2379
2380         * modules/ftell-tests: New file.
2381         * tests/test-ftell.c: New file, based on tests/test-ftello.c.
2382         * tests/test-ftell.sh: New file, based on tests/test-ftello.sh.
2383
2384         * lib/ftell.c: New file.
2385         * modules/ftell: New file.
2386         * m4/ftell.m4: New file.
2387         * doc/functions/ftell.texi: Update.
2388         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FTELL,
2389         REPLACE_FTELL.
2390         * lib/stdio_.h (rpl_ftell): New declaration.
2391         * modules/stdio (Makefile.am): Substitute also GNULIB_FTELL,
2392         REPLACE_FTELL.
2393
2394 2007-05-28  Eric Blake  <ebb9@byu.net>
2395
2396         * lib/allocsa.h (safe_alloca): Avoid compiler warning.
2397
2398 2007-05-28  Bruno Haible  <bruno@clisp.org>
2399
2400         * modules/fseek-tests: New file.
2401         * tests/test-fseek.c: New file, based on tests/test-fseeko.c.
2402         * tests/test-fseek.sh: New file, based on tests/test-fseeko.sh.
2403
2404         * lib/fseek.c: New file.
2405         * modules/fseek: New file.
2406         * m4/fseek.m4: New file.
2407         * doc/functions/fseek.texi: Update.
2408         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FSEEK,
2409         REPLACE_FSEEK.
2410         * lib/stdio_.h (rpl_fseek): New declaration.
2411         * modules/stdio (Makefile.am): Substitute also GNULIB_FSEEK,
2412         REPLACE_FSEEK.
2413
2414 2007-05-28  Bruno Haible  <bruno@clisp.org>
2415
2416         * lib/stdio_.h (fflush): More comments.
2417
2418 2007-05-28  Bruno Haible  <bruno@clisp.org>
2419
2420         * m4/lseek.m4 (gl_FUNC_LSEEK): When not cross-compiling, perform a real
2421         runtime test.
2422
2423 2007-05-28  Eric Blake  <ebb9@byu.net>
2424
2425         Improve lseek module.
2426         * lib/lseek.c (rpl_lseek): Detect EBADF on mingw.
2427         * lib/unistd_.h (lseek): Scale back link warning message.
2428         * tests/test-lseek.c: Beef up test.
2429         * tests/test-lseek.sh: Exercise more facets of lseek.
2430         Reported by Bruno Haible.
2431
2432 2007-05-28  Bruno Haible  <bruno@clisp.org>
2433
2434         * tests/test-unistd.c: Test all the types that <unistd.h> is expected
2435         to define.
2436
2437 2007-05-27  Bruno Haible  <bruno@clisp.org>
2438
2439         * m4/iconv.m4 (AM_ICONV_LINK): Fix 2007-03-31 patch.
2440
2441 2007-05-27  Bruno Haible  <bruno@clisp.org>
2442
2443         * modules/openmp: New file.
2444         * m4/openmp.m4: New file, taken from autoconf's CVS with changes by
2445         Noah Misch.
2446
2447 2007-05-26  Bruno Haible  <bruno@clisp.org>
2448
2449         * modules/chdir-long (Depends-on): Add fchdir.
2450         * modules/chdir-safer (Depends-on): Likewise.
2451         * modules/fts (Depends-on): Likewise.
2452         * modules/fts-lgpl (Depends-on): Likewise.
2453         * modules/openat (Depends-on): Likewise.
2454         * modules/savewd (Depends-on): Likewise.
2455
2456 2007-05-24  Eric Blake  <ebb9@byu.net>
2457
2458         Fix lseek on mingw.
2459         * modules/lseek: New module.
2460         * m4/lseek.m4: New file.
2461         * lib/lseek.c: New file.
2462         * modules/lseek-tests: New file.
2463         * tests/test-lseek.c: New file.
2464         * tests/test-lseek.sh: New file.
2465         * MODULES.html.sh: Document lseek module.
2466         * modules/fflush (Depends-on): Add lseek, fseeko.
2467         * modules/fseeko (Depends-on): Likewise.
2468         * modules/ftello (Depends-on): Likewise.
2469         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Replace fseek[o] if lseek is
2470         broken.
2471         * m4/ftello.m4 (gl_FUNC_FTELLO): Replace ftell[o] if lseek is
2472         broken.
2473         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Trigger fseeko module.
2474         * lib/fseeko.c (rpl_fseeko): Quit early on non-seekable files.
2475         * lib/ftello.c (rpl_ftello): Likewise.
2476         * tests/test-fseeko.c (main): Test this.
2477         * tests/test-fseeko.sh: Likewise.
2478         * tests/test-ftello.c (main): Likewise.
2479         * tests/test-ftello.sh: Likewise.
2480         * lib/stdio_.h (fseek, ftell): Simplify, since missing fseeko now
2481         implies replacing fseek.
2482         * modules/stdio (Makefile.am): No longer need HAVE_FSEEKO,
2483         HAVE_FTELLO.
2484         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add lseek info.
2485         * modules/unistd (Makefile.am): Likewise.
2486         * lib/unistd_.h (lseek): Declare a replacement.
2487         * doc/functions/lseek.texi (lseek): Document this fix.
2488         * doc/functions/fseek.texi (fseek): Likewise.
2489         * doc/functions/ftell.texi (ftell): Likewise.
2490
2491 2007-05-24  Bruno Haible  <bruno@clisp.org>
2492
2493         * tests/test-vasnprintf-posix.c (test_function): Allow up to 50 bytes
2494         in the printed representation of a NaN.
2495         * tests/test-vasprintf-posix.c (test_function): Likewise.
2496         * tests/test-snprintf-posix.h (test_function): Likewise.
2497         * tests/test-sprintf-posix.h (test_function): Likewise.
2498         Reported by Eric Blake.
2499
2500 2007-05-23  Eric Blake  <ebb9@byu.net>
2501
2502         Fix fseeko/ftello on cygwin 1.5.24.
2503         * doc/functions/fseeko.texi (fseeko): Document the fix.
2504         * doc/functions/ftello.texi (ftello): Document the fix.
2505         * doc/functions/stdin.texi (stdin): Document the cygwin bug.
2506         * doc/functions/stdout.text (stdout): New file.
2507         * doc/functions/stderr.text (stderr): New file.
2508         * doc/gnulib.texi (Function Substitutes): Use new files.
2509         * tests/test-fseeko.c (main): Check for broken fseeko on cygwin
2510         prior to 1.7.0.
2511         * tests/test-ftello.c (main): Likewise for ftello.
2512         * tests/test-fseeko.sh: New file.
2513         * tests/test-ftello.sh: New file.
2514         * modules/fseeko-tests (Makefile.am): Ensure test-fseeko is run
2515         with seekable stdin.
2516         * modules/ftello-tests (Makefile.am): Likewise for test-ftello.
2517         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Detect the cygwin bug.
2518         (gl_REPLACE_FSEEKO): New macro.
2519         * m4/ftello.m4 (gl_FUNC_FTELLO, gl_REPLACE_FTELLO): Likewise.
2520         * modules/fseeko (Files): Distribute fseeko.c.
2521         * modules/ftello (Files): Distribute ftello.c.
2522         * lib/fseeko.c (rpl_fseeko) [__CYGWIN__]: Convert stdin to 64-bit
2523         mode.
2524         * lib/ftello.c (rpl_ftello): New file.
2525         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Allow replacement of
2526         fseeko, ftello.
2527         (gl_STDIN_LARGE_OFFSET): New macro.
2528         * modules/stdio (Makefile.am): Perform the replacement.
2529         * lib/stdio_.h (rpl_fseeko, rpl_ftello): Define when needed.
2530
2531 2007-05-23  Bruno Haible  <bruno@clisp.org>
2532
2533         * lib/stdio_.h (fseeko, ftello): Provide a link warning only if
2534         GNULIB_POSIXCHECK is defined.
2535
2536 2007-05-21  Bruno Haible  <bruno@clisp.org>
2537
2538         * m4/printf.m4 (gl_PRINTF_INFINITE, gl_PRINTF_INFINITE_LONG_DOUBLE):
2539         Check also the output for NaN arguments. When cross-compiling, guess
2540         no on IRIX.
2541         * lib/vasnprintf.c: Update comments.
2542         * tests/test-vasnprintf-posix.c (strisnan): New function.
2543         (test_function): Use it.
2544         * tests/test-vasprintf-posix.c (strisnan): New function.
2545         (test_function): Use it.
2546         * tests/test-snprintf-posix.h (strisnan): New function.
2547         (test_function): Use it.
2548         * tests/test-sprintf-posix.h (strisnan): New function.
2549         (test_function): Use it.
2550         Reported by Eric Blake.
2551
2552 2007-05-20  Bruno Haible  <bruno@clisp.org>
2553
2554         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Add test for large finite
2555         numbers that fails on BeOS.
2556         * doc/functions/frexpl.texi: Update.
2557
2558 2007-05-20  Jim Meyering  <jim@meyering.net>
2559
2560         * NEWS: Mention the incompatible change (s/futimens/gl_futimens/)
2561         forced upon us by glibc-2.6.
2562
2563 2007-05-20  Bruno Haible  <bruno@clisp.org>
2564
2565         Fix *printf result for NaN, Inf on AIX, Solaris, OSF/1.
2566         * m4/printf.m4 (gl_PRINTF_INFINITE): Update cross-compiling guesses.
2567         (gl_PRINTF_INFINITE_LONG_DOUBLE): New macro.
2568         * lib/vasnprintf.c: Use NEED_PRINTF_INFINITE_DOUBLE instead of
2569         NEED_PRINTF_INFINITE.
2570         (is_infinitel): New function.
2571         (VASNPRINTF): Handle NEED_PRINTF_INFINITE_LONG_DOUBLE case.
2572         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE): Renamed from
2573         gl_PREREQ_VASNPRINTF_INFINITE.
2574         (gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE): New macro.
2575         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
2576         gl_PRINTF_INFINITE_LONG_DOUBLE and test its result. Invoke
2577         gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE and
2578         gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE instead of
2579         gl_PREREQ_VASNPRINTF_INFINITE.
2580         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
2581         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
2582         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
2583         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
2584         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
2585         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2586         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
2587         * doc/functions/fprintf.texi: Update.
2588         * doc/functions/printf.texi: Update.
2589         * doc/functions/snprintf.texi: Update.
2590         * doc/functions/sprintf.texi: Update.
2591         * doc/functions/vfprintf.texi: Update.
2592         * doc/functions/vprintf.texi: Update.
2593         * doc/functions/vsnprintf.texi: Update.
2594         * doc/functions/vsprintf.texi: Update.
2595
2596 2007-05-20  Bruno Haible  <bruno@clisp.org>
2597
2598         * m4/frexpl.m4 (gl_FUNC_FREXPL_NO_LIBM): Set REPLACE_FREXPL if frexpl
2599         was not found in libc.
2600         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Likewise.
2601
2602 2007-05-20  Bruno Haible  <bruno@clisp.org>
2603
2604         * tests/test-vasnprintf-posix.c (test_function): Allow NaN to be
2605         printed as "-nan" instead of "nan".
2606         * tests/test-vasprintf-posix.c (test_function): Likewise.
2607         * tests/test-snprintf-posix.h (test_function): Likewise.
2608         * tests/test-sprintf-posix.h (test_function): Likewise.
2609         Needed for HP-UX 11.
2610
2611 2007-05-20  Jim Meyering  <jim@meyering.net>
2612
2613         Fix buggy test for the fchownat-deref bug.
2614         * m4/openat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): Create the dangling
2615         symlink required for the run-test.  Without it, this test would
2616         always declare that fchownat doesn't work, and client code would
2617         unnecessarily use the replacement function with fixed libc.
2618         (gl_FUNC_FCHOWNAT): Eliminate a variable that wasn't initialized.
2619         Reported by Greg Schafer.
2620
2621 2007-05-19  Bruno Haible  <bruno@clisp.org>
2622
2623         * m4/isnanf.m4 (gl_ISNANF_WORKS): New macro.
2624         (gl_FUNC_ISNANF_NO_LIBM): Invoke it.
2625         * lib/isnan.c (FUNC): Use run-time expressions for SGI compiler.
2626         Needed for IRIX 6.5 and Solaris 2.5.1.
2627
2628 2007-05-19  Bruno Haible  <bruno@clisp.org>
2629
2630         * tests/test-vasnprintf-posix.c (have_minus_zero): New function.
2631         (test_function): Skip tests involving -0.0 on platforms where
2632         -0.0 = 0.0.
2633         * tests/test-vasprintf-posix.c (have_minus_zero): New function.
2634         (test_function): Skip tests involving -0.0 on platforms where
2635         -0.0 = 0.0.
2636         * tests/test-snprintf-posix.h (have_minus_zero): New function.
2637         (test_function): Skip tests involving -0.0 on platforms where
2638         -0.0 = 0.0.
2639         * tests/test-sprintf-posix.h (have_minus_zero): New function.
2640         (test_function): Skip tests involving -0.0 on platforms where
2641         -0.0 = 0.0.
2642         * tests/test-fprintf-posix.h (test_function): Remove all -0.0 related
2643         tests.
2644         * tests/test-printf-posix.h (test_function): Likewise.
2645         * tests/test-printf-posix.output: Remove all -0.0 related results.
2646         Needed for IRIX 6.5.
2647
2648 2007-05-19  Bruno Haible  <bruno@clisp.org>
2649
2650         * tests/test-vasnprintf-posix.c (test_function): Allow NaN to be
2651         printed as "nan0x7fffffff" instead of "nan".
2652         * tests/test-vasprintf-posix.c (test_function): Likewise.
2653         * tests/test-snprintf-posix.h (test_function): Likewise.
2654         * tests/test-sprintf-posix.h (test_function): Likewise.
2655         * tests/test-fprintf-posix.h (NaN): Remove macro.
2656         (test_function): Remove all NaN related tests.
2657         * tests/test-printf-posix.h (NaN): Remove macro.
2658         (test_function): Remove all NaN related tests.
2659         * tests/test-printf-posix.output: Remove all NaN related results.
2660         Needed for IRIX 6.5.
2661
2662 2007-05-19  Bruno Haible  <bruno@clisp.org>
2663
2664         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Fix C89 syntax error in test code.
2665         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Likewise.
2666
2667 2007-05-19  Bruno Haible  <bruno@clisp.org>
2668
2669         * lib/float_.h: New file.
2670         * m4/float_h.m4: New file.
2671         * modules/float: New file.
2672         * modules/isnanl (Dependencies): Add float.
2673         * modules/isnanl-nolibm (Dependencies): Likewise.
2674         * modules/mathl (Dependencies): Likewise.
2675         * modules/printf-frexpl (Dependencies): Likewise.
2676         * modules/signbit (Dependencies): Likewise.
2677         * modules/vasnprintf (Dependencies): Likewise.
2678         * doc/headers/float.texi: Update.
2679
2680 2007-05-19  Jim Meyering  <jim@meyering.net>
2681
2682         * lib/utimens.c (gl_futimens): Rename from futimens,
2683         now that glibc-2.6 declares futimens.
2684         * lib/utimens.h: Likewise.
2685
2686 2007-05-19  Bruno Haible  <bruno@clisp.org>
2687
2688         Avoid test failures on mingw.
2689         * tests/test-fprintf-posix.sh: Convert CR/LF to LF in output.
2690         * tests/test-printf-posix.sh: Likewise.
2691         * tests/test-vfprintf-posix.sh: Likewise.
2692         * tests/test-vprintf-posix.sh: Likewise.
2693
2694 2007-05-19  Bruno Haible  <bruno@clisp.org>
2695
2696         Fix *printf result for NaN, Inf, -0.0 on mingw.
2697         * m4/printf.m4 (gl_PRINTF_INFINITE): New macro.
2698         * lib/vasnprintf.c: Include math.h and isnan.h.
2699         (is_infinite_or_zero): New function.
2700         (VASNPRINTF): Fix also the handling of infinite or zero 'double'
2701         values in the %f, %F, %e, %E, %g, %G directives.
2702         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_INFINITE): New macro.
2703         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
2704         gl_PRINTF_INFINITE and test its result. Invoke
2705         gl_PREREQ_VASNPRINTF_INFINITE.
2706         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
2707         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
2708         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
2709         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
2710         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
2711         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2712         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
2713         * doc/functions/fprintf.texi: Update.
2714         * doc/functions/printf.texi: Update.
2715         * doc/functions/snprintf.texi: Update.
2716         * doc/functions/sprintf.texi: Update.
2717         * doc/functions/vfprintf.texi: Update.
2718         * doc/functions/vprintf.texi: Update.
2719         * doc/functions/vsnprintf.texi: Update.
2720         * doc/functions/vsprintf.texi: Update.
2721
2722 2007-05-19  Bruno Haible  <bruno@clisp.org>
2723
2724         * lib/vasnprintf.c (convert_to_decimal): Add an extra_zeroes argument.
2725         (scale10_round_decimal_long_double): Inline scale10_round_long_double.
2726         Instead of multiplying with 10^k, set extra_zeroes to k.
2727         (scale10_round_long_double): Remove function.
2728
2729 2007-05-18  Bruno Haible  <bruno@clisp.org>
2730
2731         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_ZERO]: Fix logic bug
2732         introduced on 2007-05-06.
2733
2734 2007-05-18  Bruno Haible  <bruno@clisp.org>
2735
2736         * tests/test-vasnprintf-posix.c (test_function): Also test the %e and
2737         %g directives.
2738         * tests/test-vasprintf-posix.c (test_function): Likewise.
2739         * tests/test-snprintf-posix.h (test_function): Likewise.
2740         * tests/test-sprintf-posix.h (test_function): Likewise.
2741
2742 2007-05-18  Bruno Haible  <bruno@clisp.org>
2743
2744         * tests/test-vasnprintf-posix.c (SIZEOF): New macro.
2745         (strmatch): New function.
2746         (test_function): Test the %f directive on numbers of various exponents.
2747         * tests/test-vasprintf-posix.c (SIZEOF): New macro.
2748         (strmatch): New function.
2749         (test_function): Test the %f directive on numbers of various exponents.
2750         * tests/test-snprintf-posix.h (strmatch): New function.
2751         (test_function): Test the %f directive on numbers of various exponents.
2752         * tests/test-sprintf-posix.h (strmatch): New function.
2753         (test_function): Test the %f directive on numbers of various exponents.
2754         * tests/test-snprintf-posix.c (SIZEOF): New macro.
2755         * tests/test-sprintf-posix.c (SIZEOF): New macro.
2756         * tests/test-vsnprintf-posix.c (SIZEOF): New macro.
2757         * tests/test-vsprintf-posix.c (SIZEOF): New macro.
2758
2759 2007-05-18  Bruno Haible  <bruno@clisp.org>
2760
2761         Add support for 'long double' number output.
2762         * m4/printf.m4 (gl_PRINTF_LONG_DOUBLE): New macro.
2763         * lib/vasnprintf.c: Include math.h and float+.h.
2764         (mp_limb_t): New type.
2765         (GMP_LIMB_BITS): New macro.
2766         (mp_twolimb_t): New type.
2767         (GMP_TWOLIMB_BITS): New macro.
2768         (mpn_t): New type.
2769         (multiply, divide, convert_to_decimal, decode_long_double,
2770         scale10_round_long_double, scale10_round_decimal_long_double,
2771         floorlog10l): New functions.
2772         (VASNPRINTF) [NEED_PRINTF_LONG_DOUBLE]: Implement 'long double' support
2773         for the %f, %F, %e, %E, %g, %G directives.
2774         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_LONG_DOUBLE): New macro.
2775         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
2776         gl_PRINTF_LONG_DOUBLE and test its result. Invoke
2777         gl_PREREQ_VASNPRINTF_LONG_DOUBLE.
2778         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
2779         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
2780         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
2781         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
2782         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
2783         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2784         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
2785         * modules/fprintf-posix (Depends-on): Add frexpl-nolibm.
2786         * modules/snprintf-posix (Depends-on): Likewise.
2787         * modules/sprintf-posix (Depends-on): Likewise.
2788         * modules/vasnprintf-posix (Depends-on): Likewise.
2789         * modules/vasprintf-posix (Depends-on): Likewise.
2790         * modules/vfprintf-posix (Depends-on): Likewise.
2791         * modules/vsnprintf-posix (Depends-on): Likewise.
2792         * modules/vsprintf-posix (Depends-on): Likewise.
2793         * modules/vasnprintf (Files): Add lib/float+.h.
2794         * doc/functions/fprintf.texi: Update.
2795         * doc/functions/printf.texi: Update.
2796         * doc/functions/snprintf.texi: Update.
2797         * doc/functions/sprintf.texi: Update.
2798         * doc/functions/vfprintf.texi: Update.
2799         * doc/functions/vprintf.texi: Update.
2800         * doc/functions/vsnprintf.texi: Update.
2801         * doc/functions/vsprintf.texi: Update.
2802
2803 2007-05-18  Bruno Haible  <bruno@clisp.org>
2804
2805         * lib/vasnprintf.c (USE_SNPRINTF): Define to 0 on BeOS.
2806
2807 2007-05-18  Bruno Haible  <bruno@clisp.org>
2808
2809         * lib/vasnprintf.c (VASNPRINTF) [WIN32]: Use %I64d instead of %lld
2810         for printing 64-bit integers. Needed for mingw.
2811
2812 2007-05-18  Bruno Haible  <bruno@clisp.org>
2813
2814         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Invoke
2815         gl_FUNC_FREXPL_WORKS.
2816         * modules/printf-frexpl (Files): Add m4/frexpl.m4.
2817
2818 2007-05-18  Bruno Haible  <bruno@clisp.org>
2819
2820         * modules/frexpl-nolibm-tests: New file.
2821
2822         * modules/frexpl-nolibm: New file.
2823         * m4/frexpl.m4 (gl_FUNC_FREXPL_NO_LIBM): New macro.
2824
2825 2007-05-17  Paul Eggert  <eggert@cs.ucla.edu>
2826
2827         * lib/dirent_.h: Prefer #include_next <foo.h> to #include
2828         @ABSOLUTE_FOO_H@ if @HAVE_INCLUDE_NEXT@.  This works better with
2829         GCC 4.2, which otherwise issues a lot of warnings.
2830         * lib/iconv_.h, lib/locale_.h, lib/netinet_in_.h, lib/sys_select_.h:
2831         * lib/sys_socket_.h, lib/sys_stat_.h, lib/sysexits_.h, lib/unistd_.h:
2832         Likewise.
2833         * modules/fchdir (dirent.h): Substitute @HAVE_INCLUDE_NEXT@.
2834         * modules/iconv_open (iconv.h): Likewise.
2835         * modules/locale (locale.h): Likewise.
2836         * modules/netinet_in (netinet/in.h): Likewise.
2837         * modules/sys_select (sys_select.h): Likewise.
2838         * modules/sys_socket (sys/socket.h): Likewise.
2839         * modules/sys_stat (sys/stat.h): Likewise.
2840         * modules/sysexits (sysexits.h): Likewise.
2841         * modules/unistd (unistd.h): Likewise.
2842
2843 2007-05-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2844
2845         * modules/closein-tests (Makefile.am): Distribute
2846         `test-closein.sh'.
2847
2848 2007-05-17  Bruno Haible  <bruno@clisp.org>
2849
2850         * tests/test-printf-posix.output: Renamed from
2851         tests/test-fprintf-posix.out.
2852         * modules/fprintf-posix-tests: Update.
2853         * modules/printf-posix-tests: Update.
2854         * modules/vfprintf-posix-tests: Update.
2855         * modules/vprintf-posix-tests: Update.
2856         * tests/test-fprintf-posix.sh: Update.
2857         * tests/test-printf-posix.sh: Update.
2858         * tests/test-vfprintf-posix.sh: Update.
2859         * tests/test-vprintf-posix.sh: Update.
2860         Reported by Ralf Wildenhues.
2861
2862 2007-05-16  Paul Eggert  <eggert@cs.ucla.edu>
2863
2864         * lib/fcntl_.h: Prefer #include_next <foo.h> to #include
2865         @ABSOLUTE_FOO_H@ if @HAVE_INCLUDE_NEXT@.  This works better with
2866         GCC 4.2, which otherwise issues a lot of warnings.
2867         * lib/inttypes_.h, lib/math_.h, lib/search_.h, lib/signal_.h:
2868         * lib/stdint_.h, lib/stdio_.h, lib/stdlib_.h, lib/string_.h:
2869         * lib/sys_time_.h, lib/time_.h, lib/wchar_.h, lib/wctype_.h: Likewise.
2870         * lib/stdlib_.h: Don't bother with #pragma GCC system_header, as
2871         it should no longer be needed.
2872         * lib/string_.h: Likewise.
2873         * modules/absolute-header (HAVE_INCLUDE_NEXT): New 'make' define.
2874         * modules/fcntl (fcntl.h): Substitute @HAVE_INCLUDE_NEXT@.
2875         * modules/inttypes (inttypes.h): Likewise.
2876         * modules/math (math.h): Likewise.
2877         * modules/search (search.h): Likewise.
2878         * modules/signal (signal.h): Likewise.
2879         * modules/stdint (stdint.h): Likewise.
2880         * modules/stdio (stdio.h): Likewise.
2881         * modules/stdlib (stdlib.h): Likewise.
2882         * modules/string (string.h): Likewise.
2883         * modules/sys_time (sys/time.h): Likewise.
2884         * modules/time (time.h): Likewise.
2885         * modules/wchar (wchar.h): Likewise.
2886         * modules/wctype (wtype.h): Likewise.
2887
2888 2007-05-16  Thien-Thi Nguyen  <ttn@gnuvola.org>  (tiny change)
2889
2890         * doc/gnulib-tool.texi (CVS Issues): Fix typo.
2891
2892 2007-05-13  Bruno Haible  <bruno@clisp.org>
2893
2894         * stpcpy.m4 (gl_FUNC_STPCPY): Require AC_C_RESTRICT.
2895         * stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
2896         * strsep.m4 (gl_FUNC_STRSEP): Likewise.
2897         * strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
2898         (gl_PREREQ_STRTOK_R): Don't require it here.
2899
2900 2007-05-13  Bruno Haible  <bruno@clisp.org>
2901
2902         * lib/stdlib_.h (mkdtemp, mkstemp): Comment out argument name. Needed
2903         when used in C++ mode.
2904
2905 2007-05-12  Bruno Haible  <bruno@clisp.org>
2906
2907         * lib/linebuffer.h: Tweak doc.
2908         * lib/linebuffer.c: Likewise.
2909
2910 2007-05-12  James Youngman  <jay@gnu.org>
2911
2912         * lib/linebuffer.c (readlinebuffer_delim): New function,
2913         like readlinebuffer, but use a caller-specified delimiter.
2914         (readlinebuffer): Just call readlinebuffer_delim with '\n'
2915         as the delimiter.
2916         * lib/linebuffer.h (readlinebuffer_delim): Declare it.
2917
2918 2007-05-12  Sergey Poznyakoff  <gray@gnu.org.ua>
2919
2920         * m4/openat.m4 (gl_FUNC_OPENAT): Do not require openat-die.
2921         * modules/openat (Files): Remove openat-die.c.
2922         (Depends-on): Add openat-die.
2923         * modules/openat-die: New module.
2924
2925 2007-05-06  Bruno Haible  <bruno@clisp.org>
2926
2927         * m4/printf.m4 (gl_PRINTF_FLAG_GROUPING, gl_VSNPRINTF_ZEROSIZE_C99):
2928         Update with info about Cygwin.
2929         * doc/functions/fprintf.texi: Update.
2930         * doc/functions/printf.texi: Update.
2931         * doc/functions/snprintf.texi: Update.
2932         * doc/functions/sprintf.texi: Update.
2933         * doc/functions/vfprintf.texi: Update.
2934         * doc/functions/vprintf.texi: Update.
2935         * doc/functions/vsnprintf.texi: Update.
2936         * doc/functions/vsprintf.texi: Update.
2937         Reported by Eric Blake.
2938
2939 2007-05-06  Bruno Haible  <bruno@clisp.org>
2940
2941         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_ZERO]: Perform the
2942         padding ourselves for the floating-point directives.
2943         * m4/printf.m4 (gl_PRINTF_FLAG_ZERO): New macro.
2944         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_ZERO): New macro.
2945         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
2946         gl_PRINTF_FLAG_ZERO and test its result. Invoke
2947         gl_PREREQ_VASNPRINTF_FLAG_ZERO.
2948         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
2949         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
2950         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
2951         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
2952         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
2953         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2954         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
2955         * tests/test-snprintf-posix.h (test_function): Also check the width
2956         and some flags in the %f directive.
2957         * tests/test-sprintf-posix.h (test_function): Likewise.
2958         * tests/test-vasnprintf-posix.c (test_function): Likewise.
2959         * tests/test-vasprintf-posix.c (test_function): Likewise.
2960         * doc/functions/fprintf.texi: Update.
2961         * doc/functions/printf.texi: Update.
2962         * doc/functions/snprintf.texi: Update.
2963         * doc/functions/sprintf.texi: Update.
2964         * doc/functions/vfprintf.texi: Update.
2965         * doc/functions/vprintf.texi: Update.
2966         * doc/functions/vsnprintf.texi: Update.
2967         * doc/functions/vsprintf.texi: Update.
2968
2969 2007-05-06  Bruno Haible  <bruno@clisp.org>
2970
2971         * lib/vasnprintf.c (VASNPRINTF) [NEED_PRINTF_FLAG_GROUPING]: Don't
2972         pass the ' flag character to sprintf or snprintf.
2973         * m4/printf.m4 (gl_PRINTF_FLAG_GROUPING): New macro.
2974         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_FLAG_GROUPING): New macro.
2975         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
2976         gl_PRINTF_FLAG_GROUPING and test its result. Invoke
2977         gl_PREREQ_VASNPRINTF_FLAG_GROUPING.
2978         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
2979         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
2980         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
2981         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
2982         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
2983         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
2984         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
2985         * tests/test-snprintf-posix.h (test_function): Also check the grouping
2986         flag.
2987         * tests/test-sprintf-posix.h (test_function): Likewise.
2988         * tests/test-vasnprintf-posix.c (test_function): Likewise.
2989         * tests/test-vasprintf-posix.c (test_function): Likewise.
2990         * doc/functions/fprintf.texi: Update.
2991         * doc/functions/printf.texi: Update.
2992         * doc/functions/snprintf.texi: Update.
2993         * doc/functions/sprintf.texi: Update.
2994         * doc/functions/vfprintf.texi: Update.
2995         * doc/functions/vprintf.texi: Update.
2996         * doc/functions/vsnprintf.texi: Update.
2997         * doc/functions/vsprintf.texi: Update.
2998
2999 2007-05-01  Bruno Haible  <bruno@clisp.org>
3000
3001         * tests/test-argp-2.sh (func_compare): Drop .exe suffix.
3002
3003 2007-05-03  Paul Eggert  <eggert@cs.ucla.edu>
3004
3005         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Use better
3006         comment for D_INO_IN_DIRENT.  Problem reported by James Youngman.
3007
3008 2007-05-02  Paul Eggert  <eggert@cs.ucla.edu>
3009
3010         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Test whether
3011         readdir returns garbage in d_ino.  Problem reported by Kaz Sasayama in
3012         <http://lists.gnu.org/archive/html/bug-gnulib/2007-05/msg00021.html>.
3013
3014 2007-05-02  Sergey Poznyakoff  <gray@gnu.org.ua>
3015
3016         * lib/argp-help.c (struct hol_entry): New member `ord'.
3017         (HOL_ENTRY_PTRCMP): Use ord for comparison
3018         (hol_sort): Initialize ord.
3019
3020 2007-05-01  Bruno Haible  <bruno@clisp.org>
3021
3022         * doc/functions/_Exit_C99.texi: Renamed from doc/functions/_Exit.texi.
3023         Reported by Eric Blake.
3024         * doc/gnulib.texi (Function Substitutes): Update.
3025
3026 2007-05-01  Bruno Haible  <bruno@clisp.org>
3027
3028         * doc/functions.texi: Remove file, now redundant through
3029         doc/functions/*.texi.
3030
3031 2007-05-01  Bruno Haible  <bruno@clisp.org>
3032
3033         * modules/argp (Depends-on): Add sleep.
3034
3035 2007-05-01  Bruno Haible  <bruno@clisp.org>
3036
3037         * modules/sleep-tests: New file.
3038         * tests/test-sleep.c: New file.
3039
3040         * modules/sleep: New file.
3041         * lib/sleep.c: New file.
3042         * m4/sleep.m4: New file.
3043         * lib/unistd_.h (sleep): New declaration.
3044         * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize GNULIB_SLEEP,
3045         HAVE_SLEEP.
3046         * modules/unistd (Makefile.am): Substitute GNULIB_SLEEP, HAVE_SLEEP.
3047         * doc/functions/sleep.texi: Document the sleep module.
3048
3049 2007-05-01  Bruno Haible  <bruno@clisp.org>
3050
3051         * lib/sigprocmask.h: Remove file.
3052         * lib/signal_.h: Incorporate the previous contents of sigprocmask.h.
3053         * lib/sigprocmask.c: Include <signal.h> instead of sigprocmask.h.
3054         * m4/signal_h.m4 (gl_SIGNAL_H_DEFAULTS): Substitute GNULIB_SIGPROCMASK,
3055         HAVE_POSIX_SIGNALBLOCKING, HAVE_SIGSET_T.
3056         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Require
3057         gl_SIGNAL_H_DEFAULTS. Set HAVE_POSIX_SIGNALBLOCKING as a shell variable.
3058         (gl_PREREQ_SIGPROCMASK): Require gl_SIGNAL_H_DEFAULTS. Set
3059         HAVE_SIGSET_T as a shell variable.
3060         * modules/signal (Makefile.am): Substitute GNULIB_SIGPROCMASK,
3061         HAVE_POSIX_SIGNALBLOCKING, HAVE_SIGSET_T into signal.h.
3062         * modules/sigprocmask (Files): Remove lib/sigprocmask.h.
3063         (Depends-on): Add signal. Remove verify.
3064         (configure.ac): Invoke gl_SIGNAL_MODULE_INDICATOR.
3065         (Include): Mention <signal.h> instead of sigprocmask.h.
3066         * NEWS: Mention the change.
3067         * lib/fatal-signal.c: Don't include sigprocmask.h.
3068
3069 2007-05-01  Bruno Haible  <bruno@clisp.org>
3070
3071         * modules/signal: New file.
3072         * lib/signal_.h: New file.
3073         * m4/signal_h.m4: New file.
3074
3075 2007-05-01  Bruno Haible  <bruno@clisp.org>
3076
3077         * lib/wctype_.h: Test HAVE_ISWCNTRL at configure time.
3078         * m4/wctype.m4 (gl_WCTYPE_H): Substitute HAVE_ISWCNTRL.
3079         * modules/wctype (Makefile.am): Substitute HAVE_ISWCNTRL instead of
3080         HAVE_WCTYPE_CTMP_BUG into wctype.h.
3081
3082 2007-05-01  Bruno Haible  <bruno@clisp.org>
3083
3084         * lib/sys_stat_.h: Test HAVE_LSTAT, HAVE_DECL_MKDIR, HAVE_IO_H at
3085         configure time.
3086         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Substitute HAVE_LSTAT,
3087         HAVE_DECL_MKDIR, HAVE_IO_H via AC_SUBST.
3088         * modules/sys_stat (Makefile.am): Substitute their values into
3089         sys/stat.h.
3090
3091 2007-05-01  Bruno Haible  <bruno@clisp.org>
3092
3093         * lib/glob_.h: Test HAVE_SYS_CDEFS_H at configure time.
3094         * m4/glob.m4 (gl_PREREQ_GLOB): Substitute HAVE_SYS_CDEFS_H via AC_SUBST.
3095         * modules/glob (Makefile.am): Put HAVE_SYS_CDEFS_H value into glob.h.
3096
3097 2007-05-01  Bruno Haible  <bruno@clisp.org>
3098
3099         * doc/header/assert.texi: Undo last change: don't mention the gnulib
3100         'assert' module here.
3101
3102 2007-05-01  Bruno Haible  <bruno@clisp.org>
3103
3104         * doc/functions/*.texi: New files.
3105         * doc/functions/google-ranking.txt: New file.
3106         * doc/gnulib.texi (Function Substitutes): New chapter.
3107         (ctime, inet_ntoa): Remove sections.
3108         * doc/ctime.texi: Remove file.
3109         * doc/inet_ntoa.texi: Remove file.
3110         * doc/Makefile (gnulib.info, gnulib.html, gnulib.dvi): Update
3111         dependencies.
3112         (%.info): New rule, specifying a --reference-limit.
3113
3114 2007-05-01  Bruno Haible  <bruno@clisp.org>
3115
3116         * MODULES.html.sh (posix_functions): Remove 'exec', 'toc'.
3117
3118 2007-05-01  Bruno Haible  <bruno@clisp.org>
3119
3120         * modules/mkdir (Depends-on): Add sys_stat, because sys_stat provides
3121         the portability of 'mkdir' to mingw systems.
3122
3123 2007-05-01  Bruno Haible  <bruno@clisp.org>
3124
3125         * doc/headers/google-ranking.txt: New file.
3126
3127 2007-04-30  Eric Blake  <ebb9@byu.net>
3128
3129         Prefer fseeko to fseek.
3130         * modules/getpass (Depends-on): Add fseeko.
3131         * lib/getpass.c (getpass): Use fseeko, not fseek.
3132
3133 2007-04-30  Sergey Poznyakoff  <gray@gnu.org.ua>
3134
3135         * lib/argp-help.c (hol_entry_cmp): Option sorting algorithm
3136         assumes the sorting is stable, while most qsort implementations
3137         are not.  Use argument addresses to ensure they never compare as
3138         equal.
3139
3140         * tests/test-argp-2.sh (usage-indent test): Fix output
3141         (func_compare): Restore diff options
3142         * tests/test-argp.c: Restore #include "progname.h"
3143
3144 2007-04-29  Bruno Haible  <bruno@clisp.org>
3145
3146         * m4/printf.m4 (gl_VSNPRINTF_ZEROSIZE_C99): New macro.
3147         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
3148         gl_VSNPRINTF_ZEROSIZE_C99. Test gl_cv_func_vsnprintf_zerosize_c99.
3149         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
3150         * modules/snprintf-posix-tests (Files): Add tests/test-snprintf.c.
3151         (configure.ac): Define CHECK_SNPRINTF_POSIX.
3152         (TESTS, check_PROGRAMS): Add test-snprintf.
3153         * modules/vsnprintf-posix-tests (Files): Add tests/test-vsnprintf.c.
3154         (configure.ac): Define CHECK_VSNPRINTF_POSIX.
3155         (TESTS, check_PROGRAMS): Add test-vsnprintf.
3156         * tests/test-snprintf.c (main) [!CHECK_SNPRINTF_POSIX]: Disable
3157         assertions that fail on HP-UX, OSF/1, or IRIX.
3158         * tests/test-vsnprintf.c (main) [!CHECK_VSNPRINTF_POSIX]: Likewise.
3159
3160 2007-04-29  Bruno Haible  <bruno@clisp.org>
3161
3162         * MODULES.html.sh (posix_functions): Remove 'contents'.
3163
3164 2007-04-29  Karl Berry  <karl@gnu.org>
3165
3166         * config/srclist.txt (gendocs_template_min): new entry.
3167
3168 2007-04-29  Bruno Haible  <bruno@clisp.org>
3169
3170         Work around fpurge bug on BSD systems.
3171         * modules/fpurge (Makefile.am): Compile fpurge.c unconditionally.
3172         * m4/fpurge.m4 (gl_FUNC_FPURGE): Don't invoke AC_LIBOBJ.
3173         * lib/fpurge.h (fpurge): Don't handle __fpurge wrapper here. Define
3174         fpurge to rpl_fpurge if the system already has this function.
3175         * lib/fpurge.c (fpurge): Handle also the __fpurge wrapper case and
3176         the case where the system already has this function. Correct invariants
3177         on BSD systems.
3178         * lib/fseeko.c (rpl_fseeko): Update recognition of preceding fflush on
3179         BSD systems.
3180
3181 2007-04-29  Sergey Poznyakoff  <gray@gnu.org.ua>
3182
3183         * lib/argp-help.c (hol_cluster_cmp): Reverse comparison.  Change
3184         proposed by Sven Verdoolaege.
3185
3186         * tests/test-argp.c: Fix option ordering.  Test deeply clustered
3187         options.
3188         * tests/test-argp-2.sh (func_compare): Use diff instead of cmp.
3189         (usage and help tests): Update
3190
3191 2007-04-29  Bruno Haible  <bruno@clisp.org>
3192
3193         * tests/test-fflush.c (main): Use a file of size 17, not 10.
3194         Print more information in case of failure. Disable a test on BeOS.
3195
3196 2007-04-29  Bruno Haible  <bruno@clisp.org>
3197
3198         * tests/**/test-*.[hc] (ASSERT): Use fprintf to show the line number.
3199         This helps debugging on systems on which no gdb is available.
3200
3201 2007-04-29  Bruno Haible  <bruno@clisp.org>
3202
3203         * lib/freading.h: Improve comments.
3204         * lib/fwriting.h: Likewise.
3205         * tests/test-freading.c (main): Don't check freading immediately after
3206         repositioning. Needed for glibc.
3207
3208 2007-04-29  Bruno Haible  <bruno@clisp.org>
3209
3210         * lib/freading.c (freading): Trivial simplification.
3211
3212 2007-04-28  Bruno Haible  <bruno@clisp.org>
3213
3214         * tests/test-fwriting.c (main): Also test the interaction between
3215         fflush and fwriting.
3216         * modules/fwriting-tests (Depends-on): Add fflush.
3217
3218         * tests/test-freading.c (main): Also test the interaction between
3219         fflush and freading.
3220         * modules/freading-tests (Depends-on): Add fflush.
3221
3222 2007-04-28  Bruno Haible  <bruno@clisp.org>
3223
3224         * lib/stdio_.h (fseek, ftell): Provide link warnings suggesting to use
3225         fseeko and ftello.
3226         Suggested by Eric Blake.
3227
3228 2007-04-28  Jim Meyering  <jim@meyering.net>
3229
3230         Avoid false-negative in gl_STDINT_H's C99 conformance test.
3231         * m4/stdint.m4 (gl_STDINT_H): When checking whether stdint.h conforms
3232         to C99, include all of gl_STDINT_INCLUDES, not just <stddef.h>.
3233
3234 2007-04-27  Eric Blake  <ebb9@byu.net>
3235
3236         * doc/headers/assert.texi (assert.h): Document assert module use.
3237
3238 2007-04-27  Bruno Haible  <bruno@clisp.org>
3239
3240         * doc/headers/*.texi: New files.
3241         * doc/gnulib.texi (Header File Substitutes): New chapter.
3242         * doc/Makefile (gnulib.info, gnulib.html, gnulib.dvi): Specify
3243         dependencies.
3244         (standards.info ,standards.html, standards.dvi): Update dependencies.
3245         (mostlyclean, clean): New targets.
3246
3247 2007-04-27  Bruno Haible  <bruno@clisp.org>
3248
3249         * lib/sysexits_.h: Renamed from lib/sysexit_.h.
3250         * modules/sysexits (Files, Makefile.am): Update.
3251
3252         * lib/sys_socket_.h: Renamed from lib/socket_.h.
3253         * modules/sys_socket (Files, Makefile.am): Update.
3254
3255         * lib/sys_stat_.h: Renamed from lib/stat_.h.
3256         * modules/sys_stat (Files, Makefile.am): Update.
3257
3258 2007-04-27  Eric Blake  <ebb9@byu.net>
3259
3260         * lib/freading.h: Improve comments.
3261         * lib/fwriting.h: Likewise.
3262         * lib/fflush.c: Likewise.
3263
3264         Fix closein for mingw.
3265         * modules/closein-tests: Add tests for closein.
3266         * tests/test-closein.c: New file.
3267         * tests/test-closein.sh: Likewise.
3268         * lib/unistd_.h [!SEEK_CUR]: Mingw also needs stdlib.h for _exit.
3269         * lib/closein.c (close_stdin): Don't fflush non-seekable streams.
3270
3271 2007-04-27  Bruno Haible  <bruno@clisp.org>
3272
3273         * lib/inttypes_.h [_DECC]: Don't use #include_next if the compiler
3274         version is < 6.
3275         * lib/math_.h [__DECC]: Likewise.
3276         * lib/stdio_.h [__DECC]: Likewise.
3277         * lib/stdlib_.h [__DECC]: Likewise.
3278         * lib/string_.h [__DECC]: Likewise.
3279         * lib/time_.h [__DECC]: Likewise.
3280         * lib/wchar_.h [__DECC]: Likewise.
3281         * lib/wctype_.h [__DECC]: Likewise.
3282
3283 2007-04-27  Bruno Haible  <bruno@clisp.org>
3284
3285         * tests/test-fbufmode.c (main): Relax test, to avoid failure on mingw.
3286
3287 2007-04-27  Bruno Haible  <bruno@clisp.org>
3288
3289         * lib/fflush.c: Add comments.
3290         * modules/fpurge-tests (Depends-on): Add fflush.
3291         * modules/freadable-tests (Depends-on): Likewise.
3292         * modules/fwritable-tests (Depends-on): Likewise.
3293
3294 2007-04-27  Charles Wilson  <libtool@cwilson.fastmail.fm>
3295
3296         * m4/argz.m4 (gl_FUNC_ARGZ): Use !HAVE_WORKING_ARGZ instead of
3297         SYSTEM_ARGZ_IS_BROKEN.  Also, minor stylistic improvements.
3298         Report by Bruno Haible <bruno@clisp.org>.
3299
3300 2007-04-26  Eric Blake  <ebb9@byu.net>
3301
3302         Fix fflush on mingw.
3303         * modules/fflush (Depends-on): Add freading.
3304         * lib/fflush.c (rpl_fflush): Use freading to avoid losing buffered
3305         but unread data.
3306
3307 2007-04-26  Eric Blake  <ebb9@byu.net>
3308         and Bruno Haible  <bruno@clisp.org>
3309
3310         Implement freading and fwriting.
3311         * lib/freading.c: New file.
3312         * lib/freading.h: Likewise.
3313         * m4/freading.m4: Likewise.
3314         * modules/freading: Likewise.
3315         * modules/freading-tests: Likewise.
3316         * tests/test-freading.c: Likewise.
3317         * lib/fwriting.c: New file.
3318         * lib/fwriting.h: Likewise.
3319         * m4/fwriting.m4: Likewise.
3320         * modules/fwriting: Likewise.
3321         * modules/fwriting-tests: Likewise.
3322         * tests/test-fwriting.c: Likewise.
3323         * MODULES.html.sh (File stream based Input/Output): Mention them.
3324
3325 2007-04-26  Bruno Haible  <bruno@clisp.org>
3326
3327         * lib/stdio_.h (fseeko, ftello): Check that off_t has the same size as
3328         'long' when we assume it.
3329         Suggested by Eric Blake.
3330
3331 2007-04-26  Bruno Haible  <bruno@clisp.org>
3332
3333         Ensure fseeko, ftello are declared on glibc systems.
3334         * modules/fflush (configure.ac-early): Require AC_FUNC_FSEEKO.
3335         * modules/fseeko (configure.ac-early): Likewise.
3336         * modules/ftello (configure.ac-early): Likewise.
3337         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Don't define HAVE_FSEEKO, rely on
3338         AC_FUNC_FSEEKO for this.
3339         * m4/fseeko.m4 (gl_FUNC_FSEEKO): Inline gl_CHECK_FSEEKO.
3340         (gl_CHECK_FSEEKO): Remove macro.
3341
3342 2007-04-26  Bruno Haible  <bruno@clisp.org>
3343
3344         * tests/test-fflush.c (main): Also check the ftell result after
3345         fflush and fseek/fseeko.
3346         * lib/fflush.c (rpl_fflush): For BSD implementations, update the
3347         file descriptor position cache in the stream.
3348         * lib/fseeko.c (rpl_fseeko): Likewise.
3349
3350 2007-04-26  Bruno Haible  <bruno@clisp.org>
3351
3352         * modules/fflush-tests (Depends-on): Add fseeko.
3353
3354 2007-04-25  Charles Wilson  <libtool@cwilson.fastmail.fm>
3355             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3356
3357         * lib/argz_.h: ensure error_t definition is obtained in same
3358         mechanism system argz.h would have.
3359         * m4/argz.m4 (gl_FUNC_ARGZ): add new test to check if $host's
3360         argz facilities are known bad.  Err on the side of caution if
3361         cross-compiling.
3362
3363 2007-04-25  Eric Blake  <ebb9@byu.net>
3364
3365         * lib/fpurge.c (includes): Use stdlib.h for free.
3366         * tests/test-fflush.c (main): Also test fflush-fseeko.
3367
3368 2007-04-25  Bruno Haible  <bruno@clisp.org>
3369
3370         Make fflush+fseek POSIX-compliant on FreeBSD and MacOS X.
3371         * lib/fseeko.c: New file.
3372         * lib/stdio_.h: Include <sys/types.h> when off_t is needed.
3373         (fseeko, fseek): Define to replacements if REPLACE_FFLUSH.
3374         * m4/fseeko.m4 (gl_CHECK_FSEEKO): New macro, extracted from
3375         gl_FUNC_FSEEKO.
3376         (gl_FUNC_FSEEKO): Invoke it.
3377         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Arrange to compile fseeko.c. Invoke
3378         gl_CHECK_FSEEKO. Define HAVE_FSEEKO.
3379         * modules/fflush (Files): Add lib/fseeko.c, m4/fseeko.m4.
3380
3381 2007-04-25  Bruno Haible  <bruno@clisp.org>
3382
3383         * modules/fflush (Depends-on): Add ftello.
3384
3385 2007-04-25  Bruno Haible  <bruno@clisp.org>
3386
3387         * modules/ftello-tests: New file.
3388         * tests/test-ftello.c: New file.
3389
3390         * modules/ftello: New file.
3391         * m4/ftello.m4: New file.
3392         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FTELLO,
3393         HAVE_FTELLO.
3394         * lib/stdio_.h (ftello): New declaration.
3395         * modules/stdio (Makefile.am): Substitute also GNULIB_FTELLO,
3396         HAVE_FTELLO.
3397
3398 2007-04-25  Bruno Haible  <bruno@clisp.org>
3399
3400         * modules/fseeko-tests: New file.
3401         * tests/test-fseeko.c: New file.
3402
3403         * modules/fseeko: New file.
3404         * m4/fseeko.m4: New file.
3405         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FSEEKO,
3406         HAVE_FSEEKO.
3407         * lib/stdio_.h (fseeko): New declaration.
3408         * modules/stdio (Makefile.am): Substitute also GNULIB_FSEEKO,
3409         HAVE_FSEEKO.
3410
3411 2007-04-25  Bruno Haible  <bruno@clisp.org>
3412
3413         * lib/stdio_.h (fflush): Add support for GNULIB_POSIXCHECK.
3414
3415 2007-04-25  Bruno Haible  <bruno@clisp.org>
3416
3417         * lib/unistd_.h: Include <stdio.h> if needed to get the SEEK_* macros.
3418         * tests/test-stdio.c: Check that the various SEEK_* macros are defined.
3419         * tests/test-unistd.c: Likewise.
3420         * tests/test-fcntl.c: Likewise.
3421
3422 2007-04-23  Eric Blake  <ebb9@byu.net>
3423
3424         * lib/fflush.c: Fix missing include.
3425         Reported by Bruno Haible.
3426
3427 2007-04-23  Bruno Haible  <bruno@clisp.org>
3428
3429         * lib/fpurge.c (fpurge) [glibc, BSD]: Free a malloc()ed ungetc buffer.
3430         Reported by Eric Blake.
3431
3432 2007-04-23  Bruno Haible  <bruno@clisp.org>
3433
3434         * lib/fbufmode.c (fbufmode): Port to Solaris/SPARC64.
3435
3436 2007-04-23  Bruno Haible  <bruno@clisp.org>
3437
3438         * lib/fseterr.c (fseterr): Don't hardcode the value of _IOERR.
3439
3440 2007-04-23  Bruno Haible  <bruno@clisp.org>
3441
3442         * tests/test-fbufmode.c (main): Be prepared to a failure of setvbuf.
3443         Needed on HP-UX 11.
3444
3445 2007-04-16  Eric Blake  <ebb9@byu.net>
3446
3447         Make fflush rely on fpurge.
3448         * lib/fflush.c (rpl_fflush): Rely on fpurge module, rather than
3449         open coding all variants.
3450         * modules/fflush (Depends-on): Add fpurge and unistd.
3451         * modules/fflush-tests (Depends-on): Unistd is no longer extra.
3452         * m4/fflush.m4 (gl_REPLACE_FFLUSH): Simplify.
3453
3454         Fix --with-tests compilation on cygwin.
3455         * modules/argmatch-tests (Makefile.am): List gnulib library first
3456         in LDADD.
3457         * modules/argp-tests (Makefile.am): Likewise.
3458         * modules/array-list-tests (Makefile.am): Likewise.
3459         * modules/array-oset-tests (Makefile.am): Likewise.
3460         * modules/avltree-list-tests (Makefile.am): Likewise.
3461         * modules/avltree-oset-tests (Makefile.am): Likewise.
3462         * modules/avltreehash-list-tests (Makefile.am): Likewise.
3463         * modules/carray-list-tests (Makefile.am): Likewise.
3464         * modules/dirname-tests (Makefile.am): Likewise.
3465         * modules/frexp-tests (Makefile.am): Likewise.
3466         * modules/isnanl-tests (Makefile.am): Likewise.
3467         * modules/linked-list-tests (Makefile.am): Likewise.
3468         * modules/linkedhash-list-tests (Makefile.am): Likewise.
3469         * modules/lock-tests (Makefile.am): Likewise.
3470         * modules/rbtree-list-tests (Makefile.am): Likewise.
3471         * modules/rbtree-oset-tests (Makefile.am): Likewise.
3472         * modules/rbtreehash-list-tests (Makefile.am): Likewise.
3473         * modules/tls-tests (Makefile.am): Likewise.
3474         * modules/tsearch-tests (Makefile.am): Likewise.
3475         * modules/xvasprintf-tests (Makefile.am): Likewise.
3476
3477         Fix fpurge for cygwin.
3478         * lib/fpurge.c (fpurge): Fix order of operation flub, and return a
3479         value.
3480         * modules/fpurge-tests (Depends-on): Clean up trash.
3481
3482 2007-04-16  Simon Josefsson  <simon@josefsson.org>
3483
3484         * lib/gc-libgcrypt.c (gc_hash_open): Shut up compiler warnings.
3485
3486         * m4/autobuild.m4: Re-indent.
3487
3488 2007-04-13  Bruno Haible  <bruno@clisp.org>
3489
3490         * modules/fpurge-tests: New file.
3491         * tests/test-fpurge.c: New file.
3492
3493         * modules/fpurge: New file.
3494         * lib/fpurge.h: New file.
3495         * lib/fpurge.c: New file.
3496         * m4/fpurge.m4: New file.
3497
3498 2007-04-13  Bruno Haible  <bruno@clisp.org>
3499
3500         * modules/fbufmode-tests: New file.
3501         * tests/test-fbufmode.c: New file.
3502
3503         * modules/fbufmode: New file.
3504         * lib/fbufmode.h: New file.
3505         * lib/fbufmode.c: New file.
3506         * m4/fbufmode.m4: New file.
3507
3508 2007-04-13  Bruno Haible  <bruno@clisp.org>
3509
3510         * modules/fwritable-tests: New file.
3511         * tests/test-fwritable.c: New file.
3512
3513         * modules/fwritable: New file.
3514         * lib/fwritable.h: New file.
3515         * lib/fwritable.c: New file.
3516         * m4/fwritable.m4: New file.
3517
3518 2007-04-13  Bruno Haible  <bruno@clisp.org>
3519
3520         * modules/freadable-tests: New file.
3521         * tests/test-freadable.c: New file.
3522
3523         * modules/freadable: New file.
3524         * lib/freadable.h: New file.
3525         * lib/freadable.c: New file.
3526         * m4/freadable.m4: New file.
3527
3528 2007-04-13  Bruno Haible  <bruno@clisp.org>
3529
3530         * modules/fflush-tests (Makefile.am): Remove EXTRA_DIST. Augment
3531         MOSTLYCLEANFILES.
3532
3533 2007-04-13  Paul Eggert  <eggert@cs.ucla.edu>
3534
3535         * build-aux/bootstrap (gnulib_tool_option_extras): New var, used by
3536         gzip bootstrap.conf to avoid dragging in i18n machinery.
3537         (gnulib_tool_option): Use it.
3538
3539 2007-04-13  Bruno Haible  <bruno@clisp.org>
3540
3541         * tests/test-vasnprintf-posix.c (test_function): Add tests for %f and
3542         %F directives.
3543         * tests/test-vasprintf-posix.c (test_function): Likewise.
3544         * tests/test-snprintf-posix.h (test_function): Likewise.
3545         * tests/test-sprintf-posix.h (test_function): Likewise.
3546         * tests/test-fprintf-posix.h (test_function): Likewise.
3547         * tests/test-printf-posix.h (test_function): Likewise.
3548         * tests/test-fprintf-posix.out: Likewise.
3549
3550 2007-04-13  Bruno Haible  <bruno@clisp.org>
3551
3552         * modules/lock-tests (configure.ac): For LIBSCHED, try also -lposix4.
3553         * modules/tls-tests (configure.ac): Likewise.
3554         Reported by Arto C. Nirkko <anirkko@insel.ch>.
3555
3556 2007-04-13  Bruno Haible  <bruno@clisp.org>
3557
3558         * lib/tls.c (glthread_tls_get): Fix return type.
3559         Patch by Arto C. Nirkko <anirkko@insel.ch>.
3560
3561 2007-04-12  Eric Blake  <ebb9@byu.net>
3562
3563         * modules/gettime (Depends-on): Remove gettime.
3564         Reported by Dmitry V. Levin.
3565
3566 2007-04-12  Bruno Haible  <bruno@clisp.org>
3567
3568         * modules/fflush (Include): Mention <stdio.h>.
3569         * modules/strtoimax (Include): Mention <inttypes.h>.
3570         * modules/strtoumax (Include): Likewise.
3571
3572 2007-04-12  Eric Blake  <ebb9@byu.net>
3573
3574         * .cvsignore: New file.
3575         * .gitignore: Likewise.
3576
3577 2007-04-12  Bruno Haible  <bruno@clisp.org>
3578
3579         * modules/iconv-tests (test_iconv_LDADD): Mention -liconv after LDADD,
3580         not before, since $(LDADD) often contains libgnu.a.
3581         * modules/striconv-tests (test_striconv_LDADD): Likewise.
3582         * modules/striconveh-tests (test_striconveh_LDADD): Likewise.
3583         * modules/striconveha-tests (test_striconveha_LDADD): Likewise.
3584         Needed on Cygwin.
3585
3586 2007-04-12  Eric Blake  <ebb9@byu.net>
3587
3588         Work around glibc's failure to flush stdin on fclose.
3589         * lib/closein.c (close_stdin): Flush stdin before closing.
3590
3591         Work around glibc's failure to reset seekable stdin on exit.
3592         * modules/closein: New module.
3593         * lib/closein.c: New file.
3594         * lib/closein.h: Likewise.
3595         * m4/closein.m4: Likewise.
3596         * MODULES.html.sh (File stream based Input/Output): Document it.
3597
3598 2007-04-12  Simon Josefsson  <simon@josefsson.org>
3599
3600         * gnulib-tool: Rename generated 'autobuild' script to
3601         'do-autobuild' in --create-megatestdir output.
3602
3603         * doc/gnulib.texi (Build robot for gnulib): Fix.
3604
3605 2007-04-12  Simon Josefsson  <simon@josefsson.org>
3606
3607         * modules/sysexits (Depends-on): Add absolute-header.
3608
3609 2007-04-12  Eric Blake  <ebb9@byu.net>
3610
3611         No need to preserve errno on success.
3612         * lib/fflush.c (rpl_fflush): Simplify errno tracking.
3613         Reported by Bruno Haible.
3614
3615 2007-04-12  Simon Josefsson  <simon@josefsson.org>
3616
3617         * MODULES.html.sh (Support for maintaining and releasing
3618         projects): Add autobuild.  Suggested by Eric Blake <ebb9@byu.net>.
3619
3620 2007-04-12  Simon Josefsson  <simon@josefsson.org>
3621
3622         * gnulib-tool (func_modules_add_dummy): Respect --avoid=dummy.
3623
3624 2007-04-12  Simon Josefsson  <simon@josefsson.org>
3625
3626         * modules/autobuild: New module.
3627
3628         * m4/autobuild.m4: New file.
3629
3630 2007-04-11  Bruno Haible  <bruno@clisp.org>
3631
3632         * lib/vasnprintf.c (VASNPRINTF): Implement the %F directive using the
3633         %f directive, if NEED_PRINTF_DIRECTIVE_F is defined.
3634         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_F): New macro.
3635         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_F): New macro.
3636         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke
3637         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3638         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3639         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Invoke
3640         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3641         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3642         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Invoke
3643         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3644         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3645         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Invoke
3646         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3647         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3648         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Invoke
3649         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3650         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3651         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Invoke
3652         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3653         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3654         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Invoke
3655         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3656         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3657         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Invoke
3658         gl_PRINTF_DIRECTIVE_F. Test gl_cv_func_printf_directive_f. Invoke
3659         gl_PREREQ_VASNPRINTF_DIRECTIVE_F for the replacement.
3660         Reported by Eric Blake.
3661
3662 2007-04-11  Bruno Haible  <bruno@clisp.org>
3663
3664         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Fix test. It always failed.
3665
3666 2007-04-10  Bruno Haible  <bruno@clisp.org>
3667
3668         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct result
3669         for NaN and Infinity. Needed on FreeBSD 6.1.
3670         * tests/test-vasnprintf-posix.c (test_function): Undo last change
3671         regarding results for "%010a" of Infinity and NaN.
3672         * tests/test-vasprintf-posix.c (test_function): Likewise.
3673         * tests/test-snprintf-posix.h (test_function): Likewise.
3674         * tests/test-sprintf-posix.h (test_function): Likewise.
3675         * tests/test-fprintf-posix.h (test_function): Likewise.
3676         * tests/test-printf-posix.h (test_function): Likewise.
3677         * tests/test-fprintf-posix.out: Likewise.
3678
3679 2007-04-10  Bruno Haible  <bruno@clisp.org>
3680
3681         * modules/locale-tests: New file.
3682         * tests/test-locale.c: New file.
3683
3684         * modules/locale: New file.
3685         * lib/locale_.h: New file.
3686         * m4/locale_h.m4: New file.
3687
3688 2007-04-10  Paul Eggert  <eggert@cs.ucla.edu>
3689             Bruno Haible  <bruno@clisp.org>
3690
3691         * m4/signbit.m4 (gl_SIGNBIT): When the sign bit position could not
3692         be determined, test for availability of the copysignf, copysign,
3693         copysignl functions.
3694         * lib/signbitf.c (gl_signbitf): Use copysignf if available in libc.
3695         * lib/signbitd.c (gl_signbitd): Use copysign if available in libc.
3696         * lib/signbitl.c (gl_signbitl): Use copysignl if available in libc.
3697
3698 2007-04-09  Eric Blake  <ebb9@byu.net>
3699
3700         * lib/stdio_.h [REPLACE_FFLUSH]: Declare rpl_fflush.
3701         * modules/stdio (Makefile.am): Support fflush.
3702         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Likewise.
3703         * modules/fflush: New file.
3704         * lib/fflush.c: Likewise.
3705         * m4/fflush.m4: Likewise.
3706         * modules/fflush-tests: New test.
3707         * tests/test-fflush.c: Likewise.
3708         * MODULES.html.sh (Input/output <stdio.h>): Document new module.
3709
3710 2007-04-06  Bruno Haible  <bruno@clisp.org>
3711
3712         * lib/vasnprintf.c: Include <math.h>. Don't include float+.h.
3713         (VASNPRINTF): Use signbit for faster determination whether to print a
3714         minus sign.
3715         * modules/vasnprintf (Files): Remove lib/float+.h.
3716         * modules/fprintf-posix (Depends-on): Add signbit.
3717         * modules/snprintf-posix (Depends-on): Likewise.
3718         * modules/sprintf-posix (Depends-on): Likewise.
3719         * modules/vasnprintf-posix (Depends-on): Likewise.
3720         * modules/vasprintf-posix (Depends-on): Likewise.
3721         * modules/vfprintf-posix (Depends-on): Likewise.
3722         * modules/vsnprintf-posix (Depends-on): Likewise.
3723         * modules/vsprintf-posix (Depends-on): Likewise.
3724
3725 2007-04-06  Bruno Haible  <bruno@clisp.org>
3726
3727         * tests/test-frexp.c (main): Test also the sign bit of zero results.
3728         * tests/test-frexpl.c (main): Likewise.
3729         * tests/test-ldexpl.c (main): Likewise.
3730         * modules/frexp-tests (Depends-on): Add signbit.
3731         * modules/frexpl-tests (Depdends-on): Likewise.
3732         * modules/ldexpl-tests (Depdends-on): Likewise.
3733
3734 2007-04-06  Bruno Haible  <bruno@clisp.org>
3735
3736         * modules/signbit-tests: New file.
3737         * tests/test-signbit.c: New file.
3738
3739         * modules/signbit: New file.
3740         * lib/signbitf.c: New file.
3741         * lib/signbitd.c: New file.
3742         * lib/signbitl.c: New file.
3743         * m4/signbit.m4: New file.
3744         * lib/math_.h (gl_signbitf, gl_signbitd, gl_signbitl): New declarations.
3745         (signbit): New macro.
3746         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_SIGNBIT and
3747         REPLACE_SIGNBIT.
3748         * modules/math (Makefile.am) Substibute also GNULIB_SIGNBIT and
3749         REPLACE_FREXPL into math.h.
3750
3751 2007-04-06  Bruno Haible  <bruno@clisp.org>
3752
3753         * modules/isnanf-nolibm-tests: New file.
3754         * tests/test-isnanf.c: New file.
3755
3756         * modules/isnanf-nolibm: New file.
3757         * lib/isnanf.h: New file.
3758         * lib/isnanf.c: New file.
3759         * lib/isnan.c: Consider the USE_FLOAT macro.
3760         * m4/isnanf.m4: New file.
3761
3762 2007-04-06  Bruno Haible  <bruno@clisp.org>
3763
3764         * modules/gettext-h (configure.ac): AC_SUBST LIBINTL and LTLIBINTL.
3765         (Link): New section.
3766
3767         * modules/canonicalize-lgpl-tests (Makefile.am): Undo last change.
3768
3769 2007-04-06  Bruno Haible  <bruno@clisp.org>
3770
3771         Assume the 'long double' type.
3772         * m4/longdouble.m4: Remove file.
3773         * config/srclist.txt: Don't mention longdouble.m4.
3774         * lib/allocsa.h: Assume HAVE_LONG_DOUBLE to be true.
3775         * lib/float+.h: Likewise.
3776         * lib/frexp.c: Likewise.
3777         * lib/printf-args.h: Likewise.
3778         * lib/printf-args.c: Likewise.
3779         * lib/printf-frexp.c: Likewise.
3780         * lib/printf-parse.c: Likewise.
3781         * lib/vasnprintf.c: Likewise.
3782         * m4/allocsa.m4: Remove gt_TYPE_LONGDOUBLE invocation.
3783         * m4/intl.m4: Likewise.
3784         * m4/isnanl.m4: Likewise.
3785         * m4/printf.m4: Likewise.
3786         * m4/printf-frexpl.m4: Likewise.
3787         * m4/vasnprintf.m4: Likewise.
3788         * modules/allocsa (Files): Remove m4/longdouble.m4.
3789         * modules/gettext (Files): Likewise.
3790         * modules/relocatable-prog-wrapper (Files): Likewise.
3791         * modules/vasnprintf (Files): Likewise.
3792         * modules/isnanl (Files): Likewise.
3793         (Include): Simplify.
3794         * modules/isnanl-nolibm (Files): Remove m4/longdouble.m4.
3795         (Include): Simplify.
3796         * modules/printf-frexpl (Files): Remove m4/longdouble.m4.
3797         (Include): Simplify.
3798         * modules/snprintf-posix-tests (Files): Remove m4/longdouble.m4.
3799         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3800         * modules/sprintf-posix-tests (Files): Remove m4/longdouble.m4.
3801         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3802         * modules/vasnprintf-posix-tests (Files): Remove m4/longdouble.m4.
3803         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3804         * modules/vasprintf-posix-tests (Files): Remove m4/longdouble.m4.
3805         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3806         * modules/vsnprintf-posix-tests (Files): Remove m4/longdouble.m4.
3807         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3808         * modules/vsprintf-posix-tests (Files): Remove m4/longdouble.m4.
3809         (configure.ac): Remove gt_TYPE_LONGDOUBLE invocation.
3810         * tests/test-isnanl-nolibm.c: Assume HAVE_LONG_DOUBLE to be true.
3811         * tests/test-isnanl.c: Likewise.
3812         * tests/test-snprintf-posix.h: Likewise.
3813         * tests/test-sprintf-posix.h: Likewise.
3814         * tests/test-vasnprintf-posix.c: Likewise.
3815         * tests/test-vasnprintf-posix2.c: Likewise.
3816         * tests/test-vasprintf-posix.c: Likewise.
3817
3818 2007-04-06  Bruno Haible  <bruno@clisp.org>
3819
3820         Fix problem with Compaq (ex-DEC) Desktop C compiler on Tru64.
3821         * lib/math_.h [__DECC]: Include the overridden include file through
3822         #include_next, outside the double-inclusion guard.
3823         * lib/stdio_.h [__DECC]: Likewise.
3824         * lib/stdlib_.h [__DECC]: Likewise.
3825         * lib/string_.h [__DECC]: Likewise.
3826         * lib/time_.h [__DECC]: Likewise.
3827         * lib/wchar_.h [__DECC]: Likewise.
3828         * lib/wctype_.h [__DECC]: Likewise.
3829         * lib/inttypes_.h [__DECC]: Likewise.
3830         Reported by Albert Chin <china@thewrittenword.com> in
3831         <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00088.html>.
3832
3833 2007-04-04  Eric Blake  <ebb9@byu.net>
3834
3835         * m4/stdint.m4 (gl_STDINT_H): Detect WINT_MAX bug in cygwin
3836         1.5.x.
3837
3838 2007-04-04  Bruno Haible  <bruno@clisp.org>
3839
3840         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct
3841         rounding. Don't assume that FreeBSD 6 and NetBSD 4 pass this test.
3842
3843 2007-04-04  Bruno Haible  <bruno@clisp.org>
3844
3845         * tests/test-vasnprintf-posix.c (test_function): Allow two possible
3846         results for "%010a" of Infinity and NaN.
3847         * tests/test-vasprintf-posix.c (test_function): Likewise.
3848         * tests/test-snprintf-posix.h (test_function): Likewise.
3849         * tests/test-sprintf-posix.h (test_function): Likewise.
3850         * tests/test-fprintf-posix.h (test_function): Remove these tests.
3851         * tests/test-printf-posix.h (test_function): Likewise.
3852         * tests/test-fprintf-posix.out: Update.
3853         Needed for FreeBSD 6.1.
3854
3855 2007-04-04  Bruno Haible  <bruno@clisp.org>
3856
3857         * DEPENDENCIES: Remove mentions of tar and gzip, since they are not
3858         directly used by the gnulib modules nor by gnulib-tool.
3859
3860 2007-04-04  Paul Eggert  <eggert@cs.ucla.edu>
3861
3862         * DEPENDENCIES: Give overall description of version dependency
3863         desirability.  Use more-typical names for apps.
3864         Add shell, coreutils, diffutils, grep, tar, gzip.
3865
3866 2007-04-04  Simon Josefsson  <simon@josefsson.org>
3867
3868         * MODULES.html.sh: Rename crypto modules.  Remove iconvme.
3869
3870 2007-04-04  Karl Berry  <karl@gnu.org>
3871
3872         * MODULES.html.sh (func_module): missing '.
3873
3874 2007-04-03  Bruno Haible  <bruno@clisp.org>
3875
3876         * modules/argmatch-tests (Makefile.am): New variable
3877         test_argmatch_LDADD.
3878         * modules/argp-tests (Makefile.am): New variable test_argp_LDADD.
3879         * modules/array-list-tests (Makefile.am): New variable
3880         test_array_list_LDADD.
3881         * modules/array-oset-tests (Makefile.am): New variable
3882         test_array_oset_LDADD.
3883         * modules/avltree-list-tests (Makefile.am): New variable
3884         test_avltree_list_LDADD.
3885         * modules/avltree-oset-tests (Makefile.am): New variable
3886         test_avltree_oset_LDADD.
3887         * modules/avltreehash-list-tests (Makefile.am): New variable
3888         test_avltreehash_list_LDADD.
3889         * modules/canonicalize-lgpl-tests (Makefile.am): New variable
3890         test_canonicalize_lgpl_LDADD.
3891         * modules/carray-list-tests (Makefile.am): New variable
3892         test_carray_list_LDADD.
3893         * modules/dirname-tests (Makefile.am): New variable
3894         test_dirname_LDADD.
3895         * modules/linked-list-tests (Makefile.am): New variable
3896         test_linked_list_LDADD.
3897         * modules/linkedhash-list-tests (Makefile.am): New variable
3898         test_linkedhash_list_LDADD.
3899         * modules/rbtree-list-tests (Makefile.am): New variable
3900         test_rbtree_list_LDADD.
3901         * modules/rbtree-oset-tests (Makefile.am): New variable
3902         test_rbtree_oset_LDADD.
3903         * modules/rbtreehash-list-tests (Makefile.am): New variable
3904         test_rbtreehash_list_LDADD.
3905         * modules/xvasprintf-tests (Makefile.am): New variable
3906         test_xvasprintf_LDADD.
3907         Reported by Eric Blake.
3908
3909 2007-04-03  Eric Blake  <ebb9@byu.net>
3910
3911         * DEPENDENCIES: Weaken m4 requirements.
3912
3913 2007-04-03  Bruno Haible  <bruno@clisp.org>
3914
3915         * modules/frexp-tests (configure.ac): Remove AC_SUBST.
3916         * modules/isnanl-tests (configure.ac): Likewise.
3917
3918 2007-04-03  Ben Pfaff  <blp@gnu.org>
3919
3920         * modules/iconv_open: Add $(srcdir)/ to source directory
3921         references in Makefile fragments that call gperf, to fix VPATH
3922         builds.
3923
3924 2007-04-03  Bruno Haible  <bruno@clisp.org>
3925
3926         * modules/ldexpl (Depends-on): Add isnanl, remove isnanl-nolibm.
3927         * lib/ldexpl.c: Undo last change.
3928
3929 2007-04-03  Bruno Haible  <bruno@clisp.org>
3930
3931         * modules/printf-frexpl (Depends-on): Undo last change.
3932         (Files): Add m4/ldexpl.m4.
3933
3934 2007-04-03  Bruno Haible  <bruno@clisp.org>
3935
3936         * m4/isnanl.m4 (gl_FUNC_ISNANL): Substitute ISNANL_LIBM.
3937         * modules/isnanl (Link): New section.
3938
3939         * m4/frexp.m4 (gl_FUNC_FREXP): Substitute FREXP_LIBM.
3940         * modules/frexp (Link): New section.
3941
3942         * m4/frexpl.m4 (gl_FUNC_FREXPL): Substitute FREXPL_LIBM.
3943         * modules/frexpl (Link): New section.
3944
3945         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Substitute LDEXPL_LIBM.
3946         * modules/ldexpl (Link): New section.
3947
3948 2007-04-03  Bruno Haible  <bruno@clisp.org>
3949
3950         * modules/TEMPLATE-EXTENDED: New file.
3951         * gnulib-tool (func_all_modules, func_verify_module): Exclude it.
3952
3953 2007-04-03  Bruno Haible  <bruno@clisp.org>
3954
3955         * DEPENDENCIES: New file.
3956         Suggested by Simon Josefsson.
3957
3958 2007-04-03  Bruno Haible  <bruno@clisp.org>
3959
3960         * doc/gnulib.texi: Escape @.
3961
3962 2007-04-03  James Youngman  <jay@gnu.org>
3963         and Paul Eggert  <eggert@cs.ucla.edu>
3964
3965         * lib/stat-time.h (get_stat_birthtime): Check for zero-valued
3966         birthtime on all systems that have birthtime, not just those which
3967         use st_birthtimensec rather than st_birthtim.  Putting zero in
3968         st_birthtim.tv_sec is how (for example) FreeBSD/x86 6.1 indicates
3969         that the birth time is not available for files on an NFS mount.
3970
3971 2007-04-03  Simon Josefsson  <simon@josefsson.org>
3972
3973         * modules/memxor: Move back from crypto/, suggested by Bruno.
3974         * modules/crypto/hmac-sha1: Fix memxor dependency.
3975
3976         * modules/crypto/gc: Moved from ../.
3977
3978 2007-04-02  Eric Blake  <ebb9@byu.net>
3979
3980         * lib/ldexpl.c (includes): Avoid libm.
3981
3982         * modules/printf-frexpl (Depends-on): Depend on ldexpl.
3983
3984 2007-04-02  Bruno Haible  <bruno@clisp.org>
3985
3986         * lib/sysexit_.h (EX_OK): Disable the EX_OK definition from <unistd.h>
3987         on IRIX.
3988
3989 2007-04-02  Bruno Haible  <bruno@clisp.org>
3990
3991         * m4/intdiv0.m4 (gt_INTDIV0): Avoid performing the test for real on
3992         x86 or x86_64 platforms running MacOS X.
3993         Reported by Ryan Schmidt <@ryandesign.com>.
3994
3995 2007-04-02  Bruno Haible  <bruno@clisp.org>
3996
3997         * m4/intdiv0.m4 (gt_INTDIV0): When cross-compiling, treat x86_64 like
3998         i386.
3999
4000 2007-04-01  Simon Josefsson  <simon@josefsson.org>
4001
4002         * modules/crypto/arcfour: Moved from ../.
4003         * modules/crypto/arcfour-tests: Moved from ../.
4004         * modules/crypto/arctwo: Moved from ../.
4005         * modules/crypto/arctwo-tests: Moved from ../.
4006         * modules/crypto/des: Moved from ../.
4007         * modules/crypto/des-tests: Moved from ../.
4008         * modules/crypto/gc-arcfour: Moved from ../.
4009         * modules/crypto/gc-arcfour-tests: Moved from ../.
4010         * modules/crypto/gc-arctwo: Moved from ../.
4011         * modules/crypto/gc-arctwo-tests: Moved from ../.
4012         * modules/crypto/gc-des: Moved from ../.
4013         * modules/crypto/gc-des-tests: Moved from ../.
4014         * modules/crypto/gc-hmac-md5: Moved from ../.
4015         * modules/crypto/gc-hmac-md5-tests: Moved from ../.
4016         * modules/crypto/gc-hmac-sha1: Moved from ../.
4017         * modules/crypto/gc-hmac-sha1-tests: Moved from ../.
4018         * modules/crypto/gc-md2: Moved from ../.
4019         * modules/crypto/gc-md2-tests: Moved from ../.
4020         * modules/crypto/gc-md4: Moved from ../.
4021         * modules/crypto/gc-md4-tests: Moved from ../.
4022         * modules/crypto/gc-md5: Moved from ../.
4023         * modules/crypto/gc-md5-tests: Moved from ../.
4024         * modules/crypto/gc-pbkdf2-sha1: Moved from ../.
4025         * modules/crypto/gc-pbkdf2-sha1-tests: Moved from ../.
4026         * modules/crypto/gc-random: Moved from ../.
4027         * modules/crypto/gc-rijndael: Moved from ../.
4028         * modules/crypto/gc-rijndael-tests: Moved from ../.
4029         * modules/crypto/gc-sha1: Moved from ../.
4030         * modules/crypto/gc-sha1-tests: Moved from ../.
4031         * modules/crypto/gc-tests: Moved from ../.
4032         * modules/crypto/hmac-md5: Moved from ../.
4033         * modules/crypto/hmac-md5-tests: Moved from ../.
4034         * modules/crypto/hmac-sha1: Moved from ../.
4035         * modules/crypto/hmac-sha1-tests: Moved from ../.
4036         * modules/crypto/md2: Moved from ../.
4037         * modules/crypto/md2-tests: Moved from ../.
4038         * modules/crypto/md4: Moved from ../.
4039         * modules/crypto/md4-tests: Moved from ../.
4040         * modules/crypto/md5: Moved from ../.
4041         * modules/crypto/md5-tests: Moved from ../.
4042         * modules/crypto/memxor: Moved from ../.
4043         * modules/crypto/rijndael: Moved from ../.
4044         * modules/crypto/rijndael-tests: Moved from ../.
4045         * modules/crypto/sha1: Moved from ../.
4046
4047 2007-03-30  James Youngman  <jay@gnu.org>
4048
4049         * tests/test-stat-time.c (prepare_test): use chmod() rather than
4050         rename() to change the ctime of a file (because ctime is unaffected
4051         by rename on jfs2 on AIX 5.1).
4052         (main): Start by doing cleanup, in case a previous run failed leaving
4053         test files behind.
4054
4055 2007-03-31  Bruno Haible  <bruno@clisp.org>
4056
4057         Support old proprietary implementations of iconv.
4058         * modules/iconv_open: New file.
4059         * lib/iconv_.h: New file.
4060         * m4/iconv_h.m4: New file.
4061         * lib/iconv_open.c: New file.
4062         * lib/iconv_open-aix.gperf: New file.
4063         * lib/iconv_open-hpux.gperf: New file.
4064         * lib/iconv_open-irix.gperf: New file.
4065         * lib/iconv_open-osf.gperf: New file.
4066         * m4/iconv_open.m4: New file.
4067         * modules/linebreak (Depends-on): Add iconv_open.
4068         * modules/striconv (Depends-on): Likewise.
4069         * modules/striconveh (Depends-on): Likewise.
4070         * modules/unicodeio (Depends-on): Likewise.
4071         * lib/striconveh.h (mem_cd_iconveh, str_cd_iconveh): Allow cd to be
4072         (iconv_t)(-1).
4073         * lib/striconveh.c (mem_cd_iconveh_internal): Use an indirect
4074         conversion if cd is (iconv_t)(-1).
4075         (mem_iconveh, str_iconveh): Don't fail just because a direct conversion
4076         is not possible.
4077
4078 2007-03-31  Bruno Haible  <bruno@clisp.org>
4079
4080         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
4081         work on Solaris either. Protect also second use of "autodetect_jp".
4082
4083 2007-03-31  Bruno Haible  <bruno@clisp.org>
4084
4085         * m4/frexpl.m4 (gl_FUNC_FREXPL): Set HAVE_DECL_FREXPL to 0 when
4086         the function is not present.
4087
4088 2007-03-31  Bruno Haible  <bruno@clisp.org>
4089
4090         * m4/ldexpl.m4 (gl_FUNC_LDEXPL): Set HAVE_DECL_LDEXPL to 0 when
4091         the function is not present.
4092
4093 2007-03-31  Bruno Haible  <bruno@clisp.org>
4094
4095         * m4/iconv.m4 (AM_ICONV_LINK): Fix 2007-03-29 patch. Test also against
4096         a bug in HP-UX iconv_open().
4097
4098 2007-03-31  Bruno Haible  <bruno@clisp.org>
4099
4100         * MODULES.html.sh (func_module): Don't show gnulib-common.m4.
4101         (Mathematics <math.h>): New section, add fpieee.
4102         (Input/output <stdio.h>): Add fseterr.
4103         (Mathematics <math.h>): New section, add printf-frexp.
4104         (Container data structures): Add sublist.
4105         (Core language properties): Add fpucw, inline.
4106         (Functions for greatest-width integer types <inttypes.h>): Add
4107         imaxabs, imaxdiv, inttypes.
4108         (Mathematics <math.h>): Add frexp, frexpl, isnan-nolibm, isnanl,
4109         isnanl-nolibm, ldexp.
4110         (Mathematics <math.h>): New section, add printf-frexpl.
4111         (Support for systems lacking POSIX:2001): Add fprintf-posix,
4112         printf-posix, snprintf-posix, sprintf-posix, string, search, socklen,
4113         sys_select, sys_socket, vasnprintf-posix, vasprintf-posix,
4114         vfprintf-posix, vprintf-posix, vsnprintf-posix, vsprintf-posix.
4115         (Unicode string functions): Add unistr/u*-mbtoucr.
4116         (Java): Add javacomp-script, javaexec-script.
4117         (C#): Add csharpcomp-script, csharpexec-script.
4118         (Support for building libraries and executables): Add havelib,
4119         relocatable-*.
4120         (Support for maintaining and releasing projects): Renamed from
4121         'Support for maintaining and release projects'. Add announce-gen.
4122
4123 2007-03-31  Bruno Haible  <bruno@clisp.org>
4124
4125         * README: Talk primarily about git.
4126         (git and CVS): Renamed from CVS.
4127         * doc/gnulib.texi (Introduction, Build robot for gnulib): Mention that
4128         gnulib is available through git.
4129         * doc/gnulib-tool.texi (CVS Issues): Mention git and svn as well.
4130
4131 2007-03-30  Bruno Haible  <bruno@clisp.org>
4132
4133         * lib/alloca_.h: Change prefix of double-inclusion guard macro to _GL_.
4134         * lib/poll_.h: Likewise.
4135         * lib/stat_.h: Likewise.
4136         * lib/sys_time_.h: Likewise.
4137         * lib/sysexit_.h: Likewise.
4138         * lib/glob_.h: Prefix double-inclusion guard macro with _GL_.
4139         * lib/stdbool_.h: Likewise.
4140         * lib/byteswap_.h: Add double-inclusion guard.
4141
4142 2007-03-30  Sergey Poznyakoff  <gray@mirddin.farlep.net>
4143
4144         * lib/sysexit_.h: Prefix double-inclusion guard macro with _GNULIB.
4145
4146 2007-03-30  Karl Berry  <karl@gnu.org>
4147
4148         * config/srclist-update: double space after USA in the license
4149         substitution, since that's how it's usually (?) written.
4150
4151 2007-03-30  Paul Eggert  <eggert@cs.ucla.edu>
4152
4153         * lib/write-any-file.c (can_write_any_file): Fix else-else bug
4154         reported by Bruno Haible.
4155
4156 2007-03-29  Bruno Haible  <bruno@clisp.org>
4157
4158         * m4/iconv.m4 (AM_ICONV_LINK): Require AC_CANONICAL_HOST. Test against
4159         a bug in AIX iconv().
4160
4161 2007-03-29  Bruno Haible  <bruno@clisp.org>
4162
4163         * modules/ldexpl-tests: New file.
4164         * tests/test-ldexpl.c: New file.
4165
4166 2007-03-29  Bruno Haible  <bruno@clisp.org>
4167
4168         * lib/ldexpl.c: Include fpucw.h.
4169         (ldexpl): Use BEGIN/END_LONG_DOUBLE_ROUNDING. Skip the last unneeded
4170         multiplication.
4171         * modules/ldexpl (Depends-on): Add fpucw.
4172
4173 2007-03-29  Bruno Haible  <bruno@clisp.org>
4174
4175         * modules/ldexpl: New file.
4176         * m4/ldexpl.m4: New file.
4177         * lib/math_.h (ldexpl): Define to a replacement if REPLACE_LDEXPL is
4178         set.
4179         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize also GNULIB_LDEXPL,
4180         REPLACE_LDEXPL.
4181         * modules/math (Makefile.am): Substitute also GNULIB_LDEXPL,
4182         REPLACE_LDEXPL.
4183         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Invoke
4184         gl_FUNC_LDEXPL_WORKS.
4185         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Remove test for ldexpl.
4186         * modules/mathl (Files): Remove lib/ldexpl.c.
4187         (Depends-on): Add ldexpl.
4188
4189 2007-03-29  Bruno Haible  <bruno@clisp.org>
4190
4191         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Declare frexpl.
4192
4193 2007-03-29  Bruno Haible  <bruno@clisp.org>
4194
4195         * tests/test-striconveh.c (main): Don't assume that a direct conversion
4196         between ISO-8859-1 and ISO-8859-2 is possible. Needed for OSF/1, IRIX
4197         and possibly also HP-UX.
4198         * tests/test-striconveha.c (main): Don't expect "autodetect_jp" to
4199         work on AIX, IRIX, HP-UX, OSF/1.
4200         * tests/uniconv/test-u16-conv-from-enc.c (main): Likewise.
4201         * tests/uniconv/test-u16-strconv-from-enc.c (main): Likewise.
4202         * tests/uniconv/test-u32-conv-from-enc.c (main): Likewise.
4203         * tests/uniconv/test-u32-strconv-from-enc.c (main): Likewise.
4204         * tests/uniconv/test-u8-conv-from-enc.c (main): Likewise.
4205         * tests/uniconv/test-u8-strconv-from-enc.c (main): Likewise.
4206
4207 2007-03-29  Bruno Haible  <bruno@clisp.org>
4208
4209         * tests/test-stat-time.c: Include <fcntl.h>, not <sys/fcntl.h>.
4210
4211 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
4212
4213         * lib/acl-internal.h (acl_get_fd, acl_set_fd): undef before defining,
4214         to work around a problem on OSF/1 5.1 reported by Bruno Haible.
4215
4216 2007-03-29  Eric Blake  <ebb9@byu.net>
4217
4218         * lib/acl-internal.h: Remove redundant include.
4219         (ACL_NOT_WELL_SUPPORTED): Also filter on EBUSY, returned by
4220         Cygwin when a file is locked.
4221
4222 2007-03-29  Bruno Haible  <bruno@clisp.org>
4223
4224         * lib/vasprintf.c [IN_LIBASPRINTF]: Include different specification
4225         file.
4226         * lib/asprintf.c [IN_LIBASPRINTF]: Likewise.
4227
4228 2007-03-29  Paul Eggert  <eggert@cs.ucla.edu>
4229
4230         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Don't bother to
4231         try to remove a parent directory if the child couldn't be removed
4232         (except for the first rmdir, which could fail because the child
4233         doesn't exist).  Problem reported by Jeff Blaine in
4234         <http://lists.gnu.org/archive/html/bug-tar/2007-03/msg00014.html>.
4235
4236 2007-03-28  Bruno Haible  <bruno@clisp.org>
4237
4238         * lib/striconveh.c (utf8conv_carefully): New function.
4239         (mem_cd_iconveh_internal): Invoke it.
4240
4241 2007-03-28  Bruno Haible  <bruno@clisp.org>
4242
4243         * lib/striconveh.c (mem_cd_iconveh_internal): Use u8_mbtoucr instead
4244         of u8_mbtouc in order to distinguish invalid and incomplete UTF-8
4245         input.
4246         * modules/striconveh (Depends-on): Add unistr/u8-mbtoucr. Replace
4247         utf8-ucs4 with unistr/u8-mbtouc. Replace ucs4-utf8 with
4248         unistr/u8-uctomb.
4249
4250 2007-03-28  Bruno Haible  <bruno@clisp.org>
4251
4252         * modules/unistr/u8-mbtoucr: New file.
4253         * lib/unistr/u8-mbtoucr.c: New file.
4254         * modules/unistr/u16-mbtoucr: New file.
4255         * lib/unistr/u16-mbtoucr.c: New file.
4256         * modules/unistr/u16-mbtoucr: New file.
4257         * lib/unistr/u16-mbtoucr.c: New file.
4258         * lib/unistr.h (u8_mbtoucr, u16_mbtoucr, u32_mbtoucr): New declarations.
4259
4260 2007-03-27  Simon Josefsson  <simon@josefsson.org>
4261             Bruno Haible  <bruno@clisp.org>
4262
4263         * m4/vasprintf.m4: Convert AC_SUBST into shell variable for
4264         REPLACE_VASPRINTF.  Set HAVE_VASPRINTF.  Add
4265         AC_REQUIRE([gl_STDIO_H_DEFAULTS]).
4266
4267         * m4/stdio_h.m4: Add stubs for vasprintf too.
4268
4269         * modules/stdio: Support vasprintf in sed command.
4270
4271         * modules/vasprintf: Depend on stdio for prototypes.  Remove
4272         vasprintf.h.  Add stdio module indicator.
4273
4274         * lib/stdio_.h: Declare asprintf and vasprintf, based on
4275         vasprintf.h.
4276
4277         * lib/vasprintf.h: File removed.
4278
4279         * lib/asprintf.c: Use stdio.h instead of vasprintf.h.
4280         * lib/vasprintf.c: Ditto.
4281         * lib/xvasprintf.c: Ditto.
4282         * tests/test-vasprintf-posix.c: Ditto.
4283         * tests/test-vasprintf.c: Ditto.
4284
4285 2007-03-27  Bruno Haible  <bruno@clisp.org>
4286
4287         Make vasnprintf multithread-safe.
4288         * lib/vasnprintf.c (decimal_point_char): New function.
4289         (VASNPRINTF): Use it.
4290         Suggested by Simon Josefsson.
4291
4292 2007-03-27  Eric Blake  <ebb9@byu.net>
4293
4294         Support sub-second birthtime on cygwin.
4295         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Also check for st_birthtim.
4296         * lib/stat-time.h (STAT_TIMESPEC): Adjust comments.
4297         (get_stat_birthtime): Also work with st_birthtim.
4298
4299 2007-03-27  Paul Eggert  <eggert@cs.ucla.edu>
4300
4301         * lib/stat-time.h (USE_BIRTHTIME): Remove.
4302         (get_stat_atime_ns, get_stat_ctime_ns, get_stat_mtime_ns):
4303         (get_stat_birthtime_ns): Do not try to use "spare" fields.
4304         (get_stat_birthtime_ns): Simplify compile-time tests.
4305         (get_stat_birthtime): Change the API to look like
4306         get_stat_mtime etc., except return a negative tv_nsec on error.
4307         * m4/stat-time.m4 (gl_STAT_TIME, gl_STAT_BIRTHTIME):
4308         Don't check for "spare" fields.
4309         (gl_STAT_BIRTHTIME): Don't check for struct stat.st_birthtimespec.tv_sec
4310         or for struct stat.st_birthtime, as these tests aren't used.
4311         * tests/test-stat-time.c (test_birthtime): Adjust to new API.
4312
4313 2007-03-27  Bruno Haible  <bruno@clisp.org>
4314
4315         * lib/stat-time.h: Include <sys/stat.h>.
4316
4317 2007-03-27  James Youngman  <jay@gnu.org>
4318
4319         * lib/stat-time.h (get_stat_birthtime): New function for
4320           retrieving st_birthtime as provided by UFS2 (hence *BSD).
4321         * m4/stat-time.m4 (gl_STAT_BIRTHTIME): Probe for st_birthtime
4322           and its variants.
4323         * modules/stat-time (configure.ac): call gl_STAT_BIRTHTIME.
4324         * modules/stat-time-test: New file.
4325         * tests/test-stat-time.c: New test, devised by Bruno Haible.
4326
4327 2007-03-26  Bruno Haible  <bruno@clisp.org>
4328
4329         Better support of signalling NaNs.
4330         * lib/atanl.c: Include isnanl.h.
4331         (atanl): Perform test for NaN at the beginning of the function and
4332         through a call to isnanl.
4333         * lib/cosl.c: Include isnanl.h.
4334         (cosl): Perform test for NaN at the beginning of the function and
4335         through a call to isnanl.
4336         * lib/ldexpl.c: Include isnanl.h.
4337         (ldexpl): Perform test for NaN through a call to isnanl.
4338         * lib/logl.c: Include isnanl.h.
4339         (logl): Perform test for NaN at the beginning of the function and
4340         through a call to isnanl.
4341         * lib/sinl.c: Include isnanl.h.
4342         (sinl): Perform test for NaN at the beginning of the function and
4343         through a call to isnanl.
4344         * lib/sqrtl.c: Include isnanl.h.
4345         (sqrtl): Perform test for NaN at the beginning of the function and
4346         through a call to isnanl.
4347         * lib/tanl.c: Include isnanl.h.
4348         (tanl): Perform test for NaN at the beginning of the function and
4349         through a call to isnanl.
4350         * lib/trigl.c (ieee754_rem_pio2l): Remove test for NaN.
4351         * modules/mathl (Depends-on): Add isnanl.
4352
4353 2007-03-26  Eric Blake  <ebb9@byu.net>
4354
4355         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Fix
4356         regression in logic sense of previous patch.
4357
4358 2007-03-26  Bruno Haible  <bruno@clisp.org>
4359
4360         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): Don't use
4361         unportable shell command "if ! ...".
4362         Reported by Ralf Wildenhues.
4363
4364 2007-03-25  Bruno Haible  <bruno@clisp.org>
4365
4366         * lib/sysexit_,h: If HAVE_SYSEXITS_H is defined, include the original
4367         <sysexits.h> file, and only add EX_CONFIG.
4368         * m4/sysexits.m4 (gl_SYSEXITS): If <sysexits.h> exists, check its
4369         absolute file name and whether it is sufficient. Substitute also
4370         HAVE_SYSEXITS_H and ABSOLUTE_SYSEXITS_H.
4371         * modules/sysexits (Makefile.am): Substitute HAVE_SYSEXITS_H and
4372         ABSOLUTE_SYSEXITS_H into sysexits.h.
4373
4374 2007-03-25  Bruno Haible  <bruno@clisp.org>
4375
4376         * lib/getaddrinfo.c (getaddrinfo): Don't access hints->ai_flags when
4377         hints is NULL.
4378
4379 2007-03-25  Bruno Haible  <bruno@clisp.org>
4380
4381         * lib/uniconv/u8-conv-from-enc.c (u8_conv_from_encoding): Add a cast.
4382         * lib/uniconv/u8-strconv-to-enc.c (u8_strconv_to_encoding): Likewise.
4383
4384 2007-03-25  Bruno Haible  <bruno@clisp.org>
4385
4386         * lib/vasnprintf.c: Include langinfo.h.
4387         (VASNPRINTF): Prefer nl_langinfo over localeconv, since it's more
4388         multithread-safe.
4389         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_A): New macro.
4390         * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Invoke it.
4391         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
4392         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
4393         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
4394         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
4395         * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
4396         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX: Likewise.
4397         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
4398         Reported by Simon Josefsson.
4399
4400 2007-03-25  Bruno Haible  <bruno@clisp.org>
4401
4402         * lib/printf-parse.c [!IN_LIBINTL]: Include <stdint.h>, for intmax_t.
4403         (PRINTF_PARSE): Make the support for size specifier 'j' unconditional.
4404         * modules/vasnprintf (Depends-on): Add stdint.
4405
4406 2007-03-25  Bruno Haible  <bruno@clisp.org>
4407
4408         * modules/fpieee: New file.
4409         * m4/fpieee.m4: New file.
4410         * modules/isnan-nolibm (Depends-on): Add fpieee.
4411         * modules/isnanl-nolibm (Depends-on): Add fpieee.
4412         * modules/isnanl (Depends-on): Add fpieee.
4413
4414 2007-03-25  Bruno Haible  <bruno@clisp.org>
4415
4416         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Test also finite numbers.
4417
4418 2007-03-25  Bruno Haible  <bruno@clisp.org>
4419
4420         Avoid test failures on IRIX 6.5.
4421         * tests/test-frexpl.c (MIN_NORMAL_EXP): New macro.
4422         (main): Use it.
4423         * tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP): New
4424         macros.
4425         (main): Use them.
4426
4427 2007-03-25  Bruno Haible  <bruno@clisp.org>
4428
4429         * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): New macro.
4430         (gl_FUNC_FREXPL): Invoke it. Set REPLACE_FREXPL to 1 if it frexpl
4431         exists but doesn't work.
4432         * lib/math_.h (frexpl): Define as a replacement macro if REPLACE_FREXPL
4433         is set. Don't provide a prototype if REPLACE_FREXPL is not set.
4434         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize REPLACE_FREXPL.
4435         * modules/math (Makefile.am) Substibute also REPLACE_FREXPL into math.h.
4436
4437 2007-03-25  Bruno Haible  <bruno@clisp.org>
4438
4439         * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Add check whether frexp(inf)
4440         returns inf. Needed on IRIX 6.5.
4441
4442 2007-03-25  Bruno Haible  <bruno@clisp.org>
4443
4444         * tests/test-frexpl.c: Include isnanl-nolibm.h.
4445         (main): Use isnanl instead of x != x idiom.
4446         * modules/frexpl-tests (Depends-on): Add isnanl-nolibm.
4447
4448         * tests/test-frexp.c: Include isnan.h.
4449         (main): Use isnan instead of x != x idiom.
4450         * modules/frexp-tests (Depends-on): Add isnan-nolibm.
4451
4452 2007-03-25  Bruno Haible  <bruno@clisp.org>
4453
4454         * tests/test-frexp.c (NaN): New function/macro.
4455         (main): Use it instead of 0.0 / 0.0.
4456         * tests/test-isnan.c (NaN): New function/macro.
4457         (main): Use it instead of 0.0 / 0.0.
4458         * tests/test-vasnprintf-posix.c (NaN): New function/macro.
4459         (test_function): Use it instead of 0.0 / 0.0.
4460         * tests/test-vasprintf-posix.c (NaN): New function/macro.
4461         (test_function): Use it instead of 0.0 / 0.0.
4462         * tests/test-snprintf-posix.h (NaN): New function/macro.
4463         (test_function): Use it instead of 0.0 / 0.0.
4464         * tests/test-sprintf-posix.h (NaN): New function/macro.
4465         (test_function): Use it instead of 0.0 / 0.0.
4466         * tests/test-fprintf-posix.h (NaN): New function/macro.
4467         (test_function): Use it instead of 0.0 / 0.0.
4468         * tests/test-printf-posix.h (NaN): New function/macro.
4469         (test_function): Use it instead of 0.0 / 0.0.
4470
4471         * lib/isnan.c (FUNC): Work around a DEC C compiler bug.
4472
4473 2007-03-25  Bruno Haible  <bruno@clisp.org>
4474
4475         * lib/glob_.h: Include <sys/stat.h>. Avoids warnings on AIX 5.1.
4476
4477 2007-03-25  Bruno Haible  <bruno@clisp.org>
4478
4479         * lib/regexec.c (merge_state_with_log): Make static.
4480
4481 2007-03-25  Bruno Haible  <bruno@clisp.org>
4482
4483         * lib/trigl.c (kernel_rem_pio2): Make static.
4484
4485 2007-03-25  Bruno Haible  <bruno@clisp.org>
4486
4487         * lib/sincosl.c (sincosl_table): Make static.
4488
4489 2007-03-25  Bruno Haible  <bruno@clisp.org>
4490
4491         * lib/argp.h (__restrict): Define to empty, rather than to 'restrict',
4492         if the compiler does not support C99.
4493
4494 2007-03-25  Bruno Haible  <bruno@clisp.org>
4495
4496         * modules/time (Makefile.am): Ensure all rule action lines start with a
4497         tab.
4498
4499 2007-03-24  Bruno Haible  <bruno@clisp.org>
4500
4501         * modules/tsearch-tests: New file.
4502         * tests/test-tsearch.sh: New file.
4503         * tests/test-tsearch.c: New file, mostly copied from glibc.
4504
4505         * modules/search-tests: New file.
4506         * tests/test-search.c: New file.
4507
4508         * modules/search: New file.
4509         * lib/search_.h: New file, incorporating lib/tsearch.h.
4510         * m4/search_h.m4: New file.
4511         * lib/tsearch.h: Remove file.
4512         * lib/tsearch.c: Include search.h instead of tsearch.h.
4513         * m4/tsearch.m4 (gl_FUNC_TSEARCH): Require gl_SEARCH_H_DEFAULTS. Set
4514         HAVE_TSEARCH.
4515         * modules/tsearch (Files): Remove lib/tsearch.h.
4516         (Depends-on): Add search.
4517         (configure.ac): Invoke gl_SEARCH_MODULE_INDICATOR.
4518         (Include): Change tsearch.h into search.h.
4519
4520 2007-03-24  Bruno Haible  <bruno@clisp.org>
4521
4522         * modules/fpucw: New file.
4523         * lib/fpucw.h: New file.
4524         * lib/frexp.c: Include fpucw.h.
4525         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
4526         (FUNC): Use them.
4527         * lib/printf-frexp.c: Include fpucw.h.
4528         (DECL_ROUNDING, BEGIN_ROUNDING, END_ROUNDING): New macros.
4529         (FUNC): Use them.
4530         * lib/vasnprintf.c: Include fpucw.h.
4531         (VASNPRINTF): Invoke BEGIN/END_LONG_DOUBLE_ROUNDING around the
4532         'long double' calculations.
4533         * tests/test-frexpl.c: Include fpucw.h.
4534         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
4535         * tests/test-printf-frexpl.c: Include fpucw.h.
4536         (main): Invoke BEGIN_LONG_DOUBLE_ROUNDING.
4537         * modules/frexpl (Depends-on): Add fpucw.
4538         * modules/printf-frexpl (Depends-on): Likewise.
4539         * modules/fprintf-posix (Depends-on): Likewise.
4540         * modules/snprintf-posix (Depends-on): Likewise.
4541         * modules/sprintf-posix (Depends-on): Likewise.
4542         * modules/vasnprintf-posix (Depends-on): Likewise.
4543         * modules/vasprintf-posix (Depends-on): Likewise.
4544         * modules/vfprintf-posix (Depends-on): Likewise.
4545         * modules/vsnprintf-posix (Depends-on): Likewise.
4546         * modules/vsprintf-posix (Depends-on): Likewise.
4547         * modules/frexpl-tests (Depends-on): Likewise.
4548         * modules/printf-frexpl-tests (Depends-on): Likewise.
4549
4550 2007-03-24  Bruno Haible  <bruno@clisp.org>
4551
4552         * lib/float+.h: New file.
4553         * lib/isnan.c: Include float+.h.
4554         (SIZE): New macro.
4555         (FUNC): Compare only SIZE bytes of the value.
4556         * lib/vasnprintf.c: Include float+.h.
4557         (VASNPRINTF): When comparing agains +0.0L or +0.0, compare only
4558         SIZEOF_LDBL or SIZEOF_DBL bytes.
4559         * modules/isnan-nolibm (Files): Add lib/float+.h.
4560         * modules/isnanl-nolibm (Files): Add lib/float+.h.
4561         * modules/isnanl (Files): Add lib/float+.h.
4562         * modules/vasnprintf (Files): Add lib/float+.h.
4563
4564 2007-03-24  Bruno Haible  <bruno@clisp.org>
4565
4566         * lib/vasnprintf.c [!HAVE_LONG_DOUBLE]: Include printf-frexp.h. Don't
4567         include isnanl-nolibm.h.
4568
4569 2007-03-24  Bruno Haible  <bruno@clisp.org>
4570
4571         * tests/test-read-file.c (main): Don't produce spurious output for
4572         expected situations. Make the test fail if it encountered unexpected
4573         results.
4574
4575 2007-03-24  Bruno Haible  <bruno@clisp.org>
4576
4577         * m4/locale-fr.m4 (gt_LOCALE_FR): Remove the special-casing of NetBSD,
4578         since its fr_FR.ISO8859-1 locale wouldn't pass the tests.
4579
4580 2007-03-24  Bruno Haible  <bruno@clisp.org>
4581
4582         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Fix last change.
4583
4584 2007-03-24  Bruno Haible  <bruno@clisp.org>
4585
4586         * modules/unistr/base (Depends-on): Remove utf8-ucs4-unsafe,
4587         utf16-ucs4-unsafe, utf8-ucs4, utf16-ucs4, ucs4-utf8, ucs4-utf16.
4588
4589         * modules/unistr/u8-mbtouc: Add source files from module utf8-ucs4.
4590         * modules/utf8-ucs4: Turn into a symbolic link to module
4591         unistr/u8-mbtouc.
4592
4593         * modules/unistr/u8-mbtouc-unsafe: Add source files from module
4594         utf8-ucs4-unsafe.
4595         * modules/utf8-ucs4-unsafe: Turn into a symbolic link to module
4596         unistr/u8-mbtouc-unsafe.
4597
4598         * modules/unistr/u16-mbtouc: Add source files from module utf16-ucs4.
4599         * modules/utf16-ucs4: Turn into a symbolic link to module
4600         unistr/u16-mbtouc.
4601
4602         * modules/unistr/u16-mbtouc-unsafe: Add source files from module
4603         utf16-ucs4-unsafe.
4604         * modules/utf16-ucs4-unsafe: Turn into a symbolic link to module
4605         unistr/u16-mbtouc-unsafe.
4606
4607         * modules/unistr/u8-uctomb: Add source files from module utf4-utf8.
4608         * modules/ucs4-utf8: Turn into a symbolic link to module
4609         unistr/u8-ubtomb.
4610
4611         * modules/unistr/u16-uctomb: Add source files from module utf4-utf16.
4612         * modules/ucs4-utf16: Turn into a symbolic link to module
4613         unistr/u16-ubtomb.
4614
4615 2007-03-24  Bruno Haible  <bruno@clisp.org>
4616
4617         * lib/unistr/u8-mbtouc-aux.c: Renamed from lib/unistr/utf8-ucs4.c.
4618         Enable the function only if HAVE_INLINE.
4619         * lib/unistr/u8-mbtouc-unsafe-aux.c: Renamed from
4620         lib/unistr/utf8-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
4621         * lib/unistr/u16-mbtouc-aux.c: Renamed from lib/unistr/utf16-ucs4.c.
4622         Enable the function only if HAVE_INLINE.
4623         * lib/unistr/u16-mbtouc-unsafe-aux.c: Renamed from
4624         lib/unistr/utf16-ucs4-unsafe.c. Enable the function only if HAVE_INLINE.
4625         * lib/unistr/u8-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf8.c.
4626         Enable the function only if HAVE_INLINE.
4627         * lib/unistr/u16-uctomb-aux.c: Renamed from lib/unistr/ucs4-utf16.c.
4628         Enable the function only if HAVE_INLINE.
4629         * modules/utf8-ucs4: Update.
4630         * modules/utf8-ucs4-unsafe: Update.
4631         * modules/utf16-ucs4: Update.
4632         * modules/utf16-ucs4-unsafe: Update.
4633         * modules/ucs4-utf8: Update.
4634         * modules/ucs4-utf16: Update.
4635
4636 2007-03-24  Bruno Haible  <bruno@clisp.org>
4637
4638         * lib/utf8-ucs4.h: Remove file.
4639         * lib/utf8-ucs4-unsafe.h: Remove file.
4640         * lib/utf16-ucs4.h: Remove file.
4641         * lib/utf16-ucs4-unsafe.h: Remove file.
4642         * lib/ucs4-utf8.h: Remove file.
4643         * lib/ucs4-utf16.h: Remove file.
4644         * lib/unistr.h: Include their previous contents.
4645         * m4/utf-ucs4.m4: Remove file.
4646         * m4/ucs4-utf.m4: Remove file.
4647         * modules/utf8-ucs4 (Files): Remove lib/utf8-ucs4.h.
4648         (Depends-on): Add unistr/base.
4649         (configure.ac): Remove gl_UTF_UCS4.
4650         (Makefile.am): Update.
4651         (Include): Change to unistr.h.
4652         * modules/utf8-ucs4-unsafe (Files): Remove lib/utf8-ucs4-unsafe.h.
4653         (Depends-on): Add unistr/base.
4654         (configure.ac): Remove gl_UTF_UCS4.
4655         (Makefile.am): Update.
4656         (Include): Change to unistr.h.
4657         * modules/utf16-ucs4 (Files): Remove lib/utf16-ucs4.h.
4658         (Depends-on): Add unistr/base.
4659         (configure.ac): Remove gl_UTF_UCS4.
4660         (Makefile.am): Update.
4661         (Include): Change to unistr.h.
4662         * modules/utf16-ucs4-unsafe (Files): Remove lib/utf16-ucs4-unsafe.h.
4663         (Depends-on): Add unistr/base.
4664         (configure.ac): Remove gl_UTF_UCS4.
4665         (Makefile.am): Update.
4666         (Include): Change to unistr.h.
4667         * modules/ucs4-utf8 (Files): Remove lib/ucs4-utf8.h.
4668         (Depends-on): Add unistr/base.
4669         (configure.ac): Remove gl_UCS4_UTF.
4670         (Makefile.am): Update.
4671         (Include): Change to unistr.h.
4672         * modules/ucs4-utf16 (Files): Remove lib/ucs4-utf16.h.
4673         (Depends-on): Add unistr/base.
4674         (configure.ac): Remove gl_UCS4_UTF.
4675         (Makefile.am): Update.
4676         (Include): Change to unistr.h.
4677         * lib/unistr/utf8-ucs4.c: Include unistr.h instead of utf8-ucs4.h.
4678         * lib/unistr/utf8-ucs4-unsafe.c: Include unistr.h instead of
4679         utf8-ucs4-unsafe.h.
4680         * lib/unistr/utf16-ucs4.c: Include unistr.h instead of utf16-ucs4.h.
4681         * lib/unistr/utf16-ucs4-unsafe.c: Include unistr.h instead of
4682         utf16-ucs4-unsafe.h.
4683         * lib/unistr/ucs4-utf8.c: Include unistr.h instead of ucs4-utf8.h.
4684         * lib/unistr/ucs4-utf16.c: Include unistr.h instead of ucs4-utf16.h.
4685         * lib/unistr/u8-chr.c: Don't include ucs4-utf8.h.
4686         * lib/unistr/u8-strchr.c: Likewise.
4687         * lib/unistr/u8-strrchr.c: Likewise.
4688         * lib/unistr/u16-chr.c: Don't include ucs4-utf16.h.
4689         * lib/unistr/u16-strchr.c: Likewise.
4690         * lib/unistr/u16-strrchr.c: Likewise.
4691         * lib/striconveh.c: Update.
4692         * lib/linebreak.c: Update.
4693
4694 2007-03-24  Bruno Haible  <bruno@clisp.org>
4695
4696         * lib/argp-help.c (fill_in_uparams, canon_doc_option): Cast the
4697         arguments of isspace, isalpha, isalnum, isdigit to 'unsigned char'.
4698
4699 2007-03-22  Bruno Haible  <bruno@clisp.org>
4700
4701         * lib/strptime.c (__strptime_internal): Use ANSI C syntax.
4702
4703 2007-03-23  Paul Eggert  <eggert@cs.ucla.edu>
4704
4705         * MODULES.html.sh (File system functions): New module write-any-file.
4706         * modules/write-any-file, lib/write-any-file.c, lib/write-any-file.h:
4707         * m4/write-any-file.m4: New files.
4708
4709 2007-03-23  Eric Blake  <ebb9@byu.net>
4710
4711         * gnulib-tool: Rearrange space-tab sequences, since some editors
4712         like to eat them.
4713
4714 2007-03-23  Eric Blake  <ebb9@byu.net>
4715
4716         * lib/version-etc.c (version_etc_va): Update license wording to
4717         be more concise.  Recommended by Richard Stallman.
4718
4719 2007-03-22  Bruno Haible  <bruno@clisp.org>
4720
4721         * lib/poll.c (MSG_PEEK): New fallback definition.
4722
4723 2007-03-22  Bruno Haible  <bruno@clisp.org>
4724
4725         * modules/sys_socket-tests (configure.ac): Check for shutdown function.
4726         * tests/test-sys_socket.c (a): Test only if shutdown() exists.
4727         (main): Update.
4728         Fixes a compilation error on BeOS.
4729
4730 2007-03-22  Bruno Haible  <bruno@clisp.org>
4731
4732         * modules/frexpl-tests: New file.
4733         * tests/test-frexpl.c: New file.
4734
4735         * modules/frexpl: New file.
4736         * m4/frexpl.m4: New file.
4737         * modules/math (Makefile.am): Also substitute GNULIB_FREXPL into math.h.
4738         * lib/math_.h (frexpl): Test GNULIB_FREXPL instead of GNULIB_MATHL.
4739         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Initialize GNULIB_FREXPL.
4740         * modules/mathl (Files): Remove lib/frexpl.c, lib/frexp.c.
4741         (Depends-on): Add frexpl. Remove isnanl-nolibm.
4742         * m4/mathl.m4 (gl_FUNC_LONG_DOUBLE_MATH): Don't test for frexpl.
4743
4744 2007-03-22  Bruno Haible  <bruno@clisp.org>
4745
4746         * lib/frexpl.c: Share code with lib/frexp.c.
4747         * modules/mathl (Files): Add lib/frexp.c.
4748         (Depends-on): Add isnanl-nolibm.
4749
4750 2007-03-22  Bruno Haible  <bruno@clisp.org>
4751
4752         * modules/printf-frexp (Files): Add m4/frexp.m4.
4753         * m4/printf-frexp.m4 (gl_FUNC_PRINTF_FREXP): Define HAVE_FREXP_IN_LIBC
4754         only if the found frexp function actually works.
4755
4756 2007-03-22  Bruno Haible  <bruno@clisp.org>
4757
4758         * lib/frexp.c: Remove older implementation that uses divisions.
4759
4760 2007-03-21  Bruno Haible  <bruno@clisp.org>
4761
4762         * modules/frexp-tests: New file.
4763         * tests/test-frexp.c: New file.
4764
4765         * modules/frexp: New file.
4766         * lib/frexp.c: New file.
4767         * m4/frexp.m4: New file.
4768         * lib/math_.h (frexp): New declaration.
4769         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Also initialize GNULIB_FREXP and
4770         REPLACE_FREXP.
4771         * modules/math (math.h): Also substitute GNULIB_FREXP, REPLACE_FREXP.
4772
4773 2007-03-21  Bruno Haible  <bruno@clisp.org>
4774
4775         * modules/isnanl-tests: New file.
4776         * tests/test-isnanl.c: New file.
4777
4778         * modules/isnanl: New file.
4779         * lib/isnanl.h: New file.
4780         * m4/isnanl.m4 (gl_FUNC_ISNANL): New macro.
4781         (gl_FUNC_ISNANL_NO_LIBM): Invoke gl_HAVE_ISNANL_NO_LIBM,
4782         gl_FUNC_ISNANL_WORKS.
4783         (gl_HAVE_ISNANL_NO_LIBM, gl_HAVE_ISNANL_IN_LIBM, gl_FUNC_ISNANL_WORKS):
4784         New macros.
4785
4786 2007-03-21  Bruno Haible  <bruno@clisp.org>
4787
4788         * modules/isnanl-nolibm (Files): Add lib/isnanl-nolibm.h, remove
4789         lib/isnanl.h.
4790         (Include): Update.
4791         * lib/isnanl-nolibm.h: Renamed from lib/isnanl.h.
4792         * lib/vasnprintf.c: Update.
4793         * modules/isnanl-nolibm-tests (Files): Add tests/test-isnanl-nolibm.c,
4794         tests/test-isnanl.h, remove tests/test-isnanl.c.
4795         (Makefile.am): Update.
4796         * tests/test-isnanl-nolibm.c: New file.
4797         * tests/test-isnanl.h: New file.
4798         * tests/test-isnanl.c: Remove file.
4799
4800 2007-03-21  Jim Meyering  <jim@meyering.net>
4801
4802         When trying to open ".", treat ESTALE like EACCES.
4803         * lib/savewd.c (savewd_save): Resort to forking not just upon
4804         failure with EACCES, but also when errno is ESTALE.
4805
4806 2007-03-20  Bruno Haible  <bruno@clisp.org>
4807
4808         * lib/string_.h (strndup): Enable declaration also if HAVE_STRNDUP.
4809         Needed on AIX 5.1. Reported by Matthew Woehlke.
4810
4811 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
4812
4813         Suggestions by Bruno Haible:
4814         * lib/acl-internal.h: Include "gettext.h" rather than rolling
4815         our own.
4816         (ACL_NOT_WELL_SUPPORTED): Parenthesize arg when used.
4817         * modules/acl (Depends-on): Add gettext.
4818
4819 2007-03-19  Bruno Haible  <bruno@clisp.org>
4820
4821         * modules/iconvme: Remove file.
4822         * lib/iconvme.h: Remove file.
4823         * lib/iconvme.c: Remove file.
4824         * m4/iconvme.m4: Remove file.
4825
4826 2007-03-19  Bruno Haible  <bruno@clisp.org>
4827
4828         * doc/relocatable-maint.texi: Break long shell script line.
4829         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
4830
4831 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
4832
4833         Add limited support for Solaris 10 ZFS-style ACLs: just enough to
4834         handle file_has_acl.
4835         * lib/acl-internal.h, lib/acl_entries.c, lib/file-has-acl.c: New files.
4836         * lib/acl.c: Move header inclusions and related macro defns into
4837         lib/acl-internal.h.
4838         (S_ISLNK): Remove defn, since that's now done for us.
4839         (file_has_acl): Move to lib/file-has-acl.c.
4840         Call acl_trivial if available.  This is the crucial part of the fix.
4841         (acl_entries): Move to lib/acl_entries.c.  Now extern, since it's
4842         shared within the library.  Rewrite a bit, partly to make it compatible
4843         with the GNU coding style.
4844         * m4/acl.m4 (AC_FUNC_ACL): Add AC_LIBOBJ([file-has-acl]).
4845         Remove unnecessary double-quotes.
4846         Don't test for acl_to_text; the build will catch that.
4847         Replace acl_entries if it doesn't exist and it is needed.
4848         Check for -lsec and acl_trivial (as used on Solaris 10).
4849         * modules/acl (Files): Add lib/acl-internal.h, lib/acl_entries.c,
4850         lib/file-has-acl.c.
4851         (Depends-on): Add sys_stat, for S_ISLNK.
4852
4853 2007-03-19  Ben Pfaff  <blp@gnu.org>
4854
4855         * doc/gnulib.texi: Fix typos.
4856         Suggested by Thien-Thi Nguyen <ttn@gnuvola.org>.
4857
4858 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
4859
4860         * lib/getcwd.c (__getcwd): Remove redundant comparison of buf to NULL.
4861         If size is zero here, buf must be zero.
4862
4863 2007-03-19  Simon Josefsson  <simon@josefsson.org>
4864
4865         * des.c: Remove weak_keys_chksum.  Reported by Bruno Haible
4866         <bruno@clisp.org>.
4867
4868 2007-03-18  Bruno Haible  <bruno@clisp.org>
4869
4870         * lib/vasnprintf.c (VASNPRINTF): Undo first part of last patch.
4871         Suggested by Eric Blake.
4872
4873 2007-03-18  Ben Pfaff  <blp@gnu.org>
4874
4875         * doc/relocatable.texi: Recommend using as prefix a directory
4876         that does not exist and will never be created.  Based on
4877         discussion with Bruno Haible, Ralf Wildenhues, Matthew Woehlke,
4878         and others.
4879
4880 2007-03-17  Bruno Haible  <bruno@clisp.org>
4881
4882         * lib/fchownat.c: Include lchown.h.
4883
4884 2007-03-17  Bruno Haible  <bruno@clisp.org>
4885
4886         Fix endless loop when the given allocated size was > INT_MAX.
4887         * lib/vasnprintf.c (EOVERFLOW): New fallback definition.
4888         (VASNPRINTF): Fail with EOVERFLOW when the given allocated size is
4889         larger than INT_MAX, or when it grow to a value larger than INT_MAX.
4890         * lib/vsprintf.c (vsprintf): Don't pass a size > INT_MAX to vasnprintf.
4891         * lib/sprintf.c (sprintf): Likewise.
4892
4893 2007-03-17  Bruno Haible  <bruno@clisp.org>
4894
4895         * tests/test-argp-2.sh (func_compare): Output a context diff.
4896
4897 2007-03-17  Bruno Haible  <bruno@clisp.org>
4898
4899         * m4/locale-fr.m4 (gt_LOCALE_FR, gt_LOCALE_FR_UTF8): Check also the
4900         locale's decimal-point character.
4901
4902 2007-03-17  Bruno Haible  <bruno@clisp.org>
4903
4904         * lib/vasnprintf.c (VASNPRINTF): Clear out the memory used for arg_mem
4905         before comparing it. Needed because on some platforms (e.g. x86) a
4906         'long double' occupies less bytes than sizeof (long double).
4907
4908 2007-03-17  Bruno Haible  <bruno@clisp.org>
4909
4910         * tests/test-crc.c (main): Make printf statements 64-bit clean.
4911         * tests/test-gc-pbkdf2-sha1.c (main): Likewise.
4912         * tests/test-getaddrinfo.c (simple): Likewise.
4913         * tests/test-read-file.c (main): Likewise.
4914
4915 2007-03-17  Bruno Haible  <bruno@clisp.org>
4916
4917         * tests/test-dirname.c (main): Make printf statements 64-bit clean.
4918
4919 2007-03-17  Bruno Haible  <bruno@clisp.org>
4920
4921         * tests/test-xvasprintf.c (test_xvasprintf, test_xasprintf): Remove
4922         unused variable.
4923
4924 2007-03-17  Bruno Haible  <bruno@clisp.org>
4925
4926         * tests/test-c-strcasecmp.c: Include c-strcase.h.
4927         * tests/test-c-strncasecmp.c: Likewise.
4928
4929 2007-03-17  Bruno Haible  <bruno@clisp.org>
4930
4931         * modules/stdlib (Depends-on): Add unistd.
4932         * lib/stdlib_.h: Include <unistd.h> if mkstemp is desired.
4933         Needed for MacOS X 10.3.
4934
4935 2007-03-17  Bruno Haible  <bruno@clisp.org>
4936
4937         * lib/unistr/u-strdup.h: Include <stdlib.h>.
4938
4939 2007-03-17  Bruno Haible  <bruno@clisp.org>
4940
4941         * lib/unistr/u-cpy-alloc.h: Include <stdlib.h>.
4942
4943 2007-03-17  Bruno Haible  <bruno@clisp.org>
4944
4945         * gnulib-tool (func_import): Update .cvsignore and .gitignore files
4946         to reflect files copied from gnulib (with or without modifications).
4947         Suggested by Jim Meyering.
4948
4949 2007-03-17  Eric Blake  <ebb9@byu.net>
4950
4951         * NEWS: Document stdlib change from 2007-02-18.
4952
4953 2007-03-17  Jim Meyering  <jim@meyering.net>
4954
4955         Detect use of AC_CONFIG_AUX_DIR also when its argument is quoted.
4956         * build-aux/bootstrap: Put ""s around use of $build_aux, in case
4957         someone uses a name containing shell meta-characters.
4958         Reported by Alfred M. Szmidt.
4959
4960         * build-aux/bootstrap: Don't use \> in grep regexp.  For HP-UX.
4961
4962 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
4963
4964         * build-aux/bootstrap (with_gettext): New variable.  Run autopoint
4965         and copy gettext configuration files only if configure.ac contains
4966         a use of AM_GNU_GETTEXT_VERSION.
4967
4968 2007-03-16  Alfred M. Szmidt  <ams@gnu.org>
4969
4970         * build-aux/bootstrap (gnulib_name): New variable.
4971         (gnulib_tool_options): Use it.
4972
4973 2007-03-13  Simon Josefsson  <simon@josefsson.org>
4974
4975         * tests/test-des.c: Use new namespace.
4976
4977 2007-03-15  Bruno Haible  <bruno@clisp.org>
4978
4979         * lib/dummy.c (gl_dummy_symbol): Renamed from 'dummy'.
4980         Reported by James Youngman <jay@gnu.org>.
4981
4982 2007-03-15  Bruno Haible  <bruno@clisp.org>
4983
4984         * lib/glob.c (glob): Add 'restrict' so that prototype matches the
4985         declared prototype. Needed with cc on OSF/1 5.1.
4986
4987 2007-03-15  Bruno Haible  <bruno@clisp.org>
4988
4989         * lib/gl_list.h (gl_listelement_dispose_fn): New type.
4990         (gl_list_create_empty, gl_list_create): Add dispose_fn argument.
4991         (struct gl_list_implementation): Add dispose_fn argument to the
4992         'create_empty', 'create' methods.
4993         (struct gl_list_impl_base): Add field 'dispose_fn'.
4994         * lib/gl_list.c (gl_list_create_empty, gl_list_create): Add dispose_fn
4995         argument.
4996         * lib/gl_array_list.c (gl_array_create_empty, gl_array_create): Add
4997         dispose_fn argument.
4998         (gl_array_remove_node, gl_array_remove_at, gl_array_list_free): Call
4999         dispose_fn on the dropped values.
5000         * lib/gl_carray_list.c (gl_carray_create_empty, gl_carray_create): Add
5001         dispose_fn argument.
5002         (gl_carray_remove_at, gl_carray_list_free): Call dispose_fn on the
5003         dropped values.
5004         * lib/gl_anyavltree_list2.h (gl_tree_create): Add dispose_fn argument.
5005         (gl_tree_remove_node): Call dispose_fn on the dropped value.
5006         * lib/gl_anyrbtree_list2.h (gl_tree_create): Add dispose_fn argument.
5007         (gl_tree_remove_node): Call dispose_fn on the dropped value.
5008         * lib/gl_anytree_list2.h (gl_tree_create_empty): Add dispose_fn
5009         argument.
5010         (gl_tree_list_free): Call dispose_fn on the dropped values.
5011         * lib/gl_anytreehash_list2.h (gl_tree_list_free): Call dispose_fn on
5012         the dropped values.
5013         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
5014         Add dispose_fn argument.
5015         (gl_linked_remove_node, gl_linked_remove_at, gl_linked_list_free):
5016         Call dispose_fn on the dropped values.
5017         * lib/gl_sublist.c (gl_sublist_create_empty, gl_sublist_create_fill):
5018         Add dispose_fn argument.
5019         (gl_sublist_create): Initialize the 'dispose_fn' field.
5020         * lib/clean-temp.c (create_temp_dir, register_fd): Update.
5021         * tests/test-array_list.c (main): Update.
5022         * tests/test-carray_list.c (main): Update.
5023         * tests/test-avltree_list.c (main): Update.
5024         * tests/test-rbtree_list.c (main): Update.
5025         * tests/test-avltreehash_list.c (main): Update.
5026         * tests/test-rbtreehash_list.c (main): Update.
5027         * tests/test-linked_list.c (main): Update.
5028         * tests/test-linkedhash_list.c (main): Update.
5029         * tests/test-array_oset.c (main): Update.
5030
5031 2007-03-15  Bruno Haible  <bruno@clisp.org>
5032
5033         * lib/gl_oset.h (gl_setelement_dispose_fn): New type.
5034         (gl_oset_create_empty): Add dispose_fn argument.
5035         (struct gl_oset_implementation): Add dispose_fn argument to
5036         'create_empty' method.
5037         (struct gl_oset_impl_base): Add dispose_fn field.
5038         * lib/gl_oset.c (gl_oset_create_empty): Add dispose_fn argument.
5039         * lib/gl_array_oset.c (gl_array_create_empty): Add dispose_fn argument.
5040         (gl_array_remove_at, gl_array_free): Call dispose_fn on the dropped
5041         values.
5042         * lib/gl_anytree_oset.h (gl_tree_create_empty): Add dispose_fn argument.
5043         (gl_tree_oset_free): Call dispose_fn on the dropped values.
5044         * lib/gl_avltree_oset.c (gl_tree_remove_node): Call dispose_fn on the
5045         dropped value.
5046         * lib/gl_rbtree_oset.c (gl_tree_remove_node): Call dispose_fn on the
5047         dropped value.
5048         * tests/test-array_oset.c (main): Update.
5049         * tests/test-avltree_oset.c (main): Update.
5050         * tests/test-rbtree_oset.c (main): Update.
5051         * lib/gl_anytreehash_list1.h (add_to_bucket): Update.
5052
5053 2007-03-13  Bruno Haible  <bruno@clisp.org>
5054
5055         * tests/test-stdbool.c (i): Update after last patch.
5056
5057 2007-03-12  Bruno Haible  <bruno@clisp.org>
5058
5059         * lib/quotearg.c: Include <wctype.h> early, before the definition of
5060         the iswprint macro. Needed on Solaris 2.5.1.
5061
5062 2007-03-12  Bruno Haible  <bruno@clisp.org>
5063
5064         * tests/test-printf-frexp.c (main): Declare x as volatile.
5065
5066 2007-03-12  Simon Josefsson  <simon@josefsson.org>
5067
5068         * doc/gnulib.texi (Build robot for gnulib): New section.
5069
5070 2007-03-12  Jim Meyering  <jim@meyering.net>
5071
5072         * build-aux/bootstrap: New file.
5073         * build-aux/bootstrap.conf: New file, from coreutils.
5074
5075 2007-03-11  Bruno Haible  <bruno@clisp.org>
5076
5077         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Require AC_C_INLINE.
5078
5079 2007-03-12  Simon Josefsson  <simon@josefsson.org>
5080
5081         * lib/des.h, lib/des.c, lib/gc-gnulib.c: Use gl_ namespace, to
5082         avoid collisions with 'des_setkey'.  Reported by Bruno Haible
5083         <bruno@clisp.org>.  Also change 'tripledes_' to '3des_'.
5084
5085 2007-03-11  Bruno Haible  <bruno@clisp.org>
5086
5087         * m4/locale-tr.m4 (gt_LOCALE_TR_UTF8): If the test program fails to
5088         compile, set LOCALE_TR_UTF8 to 'none' instead of empty.
5089
5090 2007-03-11  Bruno Haible  <bruno@clisp.org>
5091
5092         * lib/stdint_.h (INT64_MIN, INTMAX_MIN): Avoid using the ~INT..._MAX
5093         formula. Needed for SunPRO C 5.0.
5094
5095 2007-03-11  Bruno Haible  <bruno@clisp.org>
5096
5097         * modules/long-options (Depends-on): Add getopt.
5098
5099 2007-03-11  Bruno Haible  <bruno@clisp.org>
5100
5101         * modules/modechange (Depends-on): Add stdbool.
5102
5103 2007-03-11  Bruno Haible  <bruno@clisp.org>
5104
5105         * modules/i-ring (Depends-on): Add stdbool.
5106
5107 2007-03-11  Bruno Haible  <bruno@clisp.org>
5108
5109         * modules/gc-des (Depends-on): Add stdbool.
5110
5111 2007-03-11  Bruno Haible  <bruno@clisp.org>
5112
5113         * m4/mktime.m4 (gl_PREREQ_MKTIME): Require AC_C_INLINE.
5114
5115 2007-03-11  Bruno Haible  <bruno@clisp.org>
5116
5117         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Require AC_C_RESTRICT.
5118
5119 2007-03-11  Bruno Haible  <bruno@clisp.org>
5120
5121         * lib/unistr/u32-mbtouc-unsafe.c (u32_mbtouc_unsafe): Fix syntax error.
5122
5123 2007-03-11  Bruno Haible  <bruno@clisp.org>
5124
5125         * lib/vasnprintf.c (sprintf): Undefine.
5126
5127 2007-03-11  Bruno Haible  <bruno@clisp.org>
5128
5129         * lib/isnan.c (rpl_isnan, rpl_isnanl): Work around bug regarding
5130         initializers in SunPRO C and Compaq C compilers.
5131
5132 2007-03-11  Bruno Haible  <bruno@clisp.org>
5133
5134         * lib/gl_array_oset.c (gl_array_iterator_next): Make pointer
5135         decrementing code ANSI C compliant.
5136
5137 2007-03-11  Bruno Haible  <bruno@clisp.org>
5138
5139         * lib/dummy.c [__sun]: Define a dummy variable, not just a typedef.
5140         Needed for Solaris 2.5.1 ranlib and SunPRO C 5.0.
5141
5142 2007-03-11  Bruno Haible  <bruno@clisp.org>
5143
5144         * tests/test-stdbool.c (s, d, e, xlcbug): Disable checks that gnulib's
5145         <stdbool.h> substitute doesn't pass.
5146
5147 2007-03-11  Bruno Haible  <bruno@clisp.org>
5148
5149         * lib/vasnprintf.c (snprintf): Undefine. Avoids an endless recursion.
5150
5151 2007-03-11  Bruno Haible  <bruno@clisp.org>
5152
5153         * gnulib-tool (func_create_megatestdir): Create also an autobuild
5154         script, for submission to autobuild.josefsson.org.
5155
5156 2007-03-10  Bruno Haible  <bruno@clisp.org>
5157
5158         * modules/canonicalize-lgpl-tests: New file.
5159         * tests/test-canonicalize-lgpl.sh: New file.
5160         * tests/test-canonicalize-lgpl.c: New file.
5161
5162         * modules/c-strcase-tests: New file.
5163         * tests/test-c-strcase.sh: New file.
5164         * tests/test-c-strcasecmp.c: New file.
5165         * tests/test-c-strncasecmp.c: New file.
5166
5167         * modules/atexit-tests: New file.
5168         * tests/test-atexit.sh: New file.
5169         * tests/test-atexit.c: New file.
5170
5171 2007-03-10  Bruno Haible  <bruno@clisp.org>
5172
5173         * tests/test-binary-io.sh: Use temporary filenames that are not so
5174         likely to clash with those of other tests (in a parallel make).
5175         * tests/test-binary-io.c: Likewise.
5176
5177 2007-03-10  Bruno Haible  <bruno@clisp.org>
5178
5179         * lib/fseterr.c (fseterr): Port to Solaris/SPARC64. Deactivate the
5180         fallback; use #error instead.
5181         Suggested by Simon Josefsson.
5182
5183 2007-03-10  Bruno Haible  <bruno@clisp.org>
5184
5185         * gnulib-tool (func_create_testdir): Treat MOSTLYCLEANFILES like
5186         CLEANFILES. Put spaces in each line of $cleaned_files, not only the
5187         first and the last.
5188
5189 2007-03-10  Bruno Haible  <bruno@clisp.org>
5190
5191         * lib/stdint_.h (uint_least64_t): Fix typo in last patch.
5192
5193 2007-03-10  Bruno Haible  <bruno@clisp.org>
5194
5195         * modules/snprintf-posix-tests (EXTRA_DIST): New variable. Needed for
5196         "make distcheck".
5197         * modules/sprintf-posix-tests (EXTRA_DIST): Likewise.
5198         * modules/vsnprintf-posix-tests (EXTRA_DIST): Likewise.
5199         * modules/vsprintf-posix-tests (EXTRA_DIST): Likewise.
5200
5201 2007-03-10  Bruno Haible  <bruno@clisp.org>
5202
5203         * modules/allocsa-tests (test_allocsa_SOURCES): Remove redundant
5204         variable.
5205         * modules/dirname-tests (test_dirname_SOURCES): Remove redundant
5206         variable.
5207
5208 2007-03-09  Eric Blake  <ebb9@byu.net>
5209         and Matthew Woehlke  <mw_triad@users.sourceforge.net>  (tiny change)
5210
5211         * lib/stdint_.h (int64_t, uint64_t): Don't undefine if 64-bit
5212         types are not being provided by gnulib.
5213         (GL_INT64_T, GL_UINT64_T): New witnesses of whether gnulib 64-bit
5214         types are supported.
5215
5216 2007-03-10  Bruno Haible  <bruno@clisp.org>
5217
5218         * lib/stdio_.h (__attribute__): New macro.
5219         (fprintf, vfprintf, printf, vprintf, snprintf, vsnprintf, sprintf,
5220         vsprintf): Specify __attribute__ __format__ for GCC.
5221         Suggested by Eric Blake.
5222
5223 2007-03-09  Bruno Haible  <bruno@clisp.org>
5224
5225         * modules/printf-posix-tests: New file.
5226         * tests/test-printf-posix.sh: New file.
5227         * tests/test-printf-posix.c: New file.
5228
5229         * modules/printf-posix: New file.
5230         * lib/printf.c: New file.
5231         * m4/printf-posix-rpl.m4: New file.
5232         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_PRINTF_POSIX,
5233         REPLACE_PRINTF.
5234         * lib/stdio_.h (printf): New declaration.
5235         (format, __format__, ____printf____, ____scanf____, ____strftime____,
5236         ____strfmon____): New macros.
5237         * modules/stdio (Makefile.am): Substitute also GNULIB_PRINTF_POSIX,
5238         REPLACE_PRINTF.
5239
5240 2007-03-09  Bruno Haible  <bruno@clisp.org>
5241
5242         * tests/test-vasnprintf-posix2.sh: New file.
5243         * tests/test-vasnprintf-posix2.c: New file.
5244         * modules/vasnprintf-posix-tests (Files): Add them and m4/locale-fr.m4.
5245         (configure.ac): Invoke gt_LOCALE_FR and gt_LOCALE_FR_UTF8.
5246         (Makefile.am): Activate test-vasnprintf-posix2.sh.
5247
5248         * lib/vasnprintf.c (VASNPRINTF): For the 'a' and 'A' directives, use
5249         a locale dependent decimal point, rather than always '.'.
5250
5251 2007-03-09  Eric Blake  <ebb9@byu.net>
5252
5253         * lib/stdlib_.h (EXIT_FAILURE): GNU code expects this to be 1, in
5254         spite of platforms like Tandem/NSK that define it to -1.
5255
5256 2007-03-08  Bruno Haible  <bruno@clisp.org>
5257
5258         * modules/vprintf-posix-tests: New file.
5259         * tests/test-vprintf-posix.sh: New file.
5260         * tests/test-vprintf-posix.c: New file.
5261         * tests/test-printf-posix.h: New file.
5262
5263         * modules/vprintf-posix: New file.
5264         * lib/vprintf.c: New file.
5265         * m4/vprintf-posix.m4: New file.
5266         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VPRINTF_POSIX,
5267         REPLACE_VPRINTF.
5268         * lib/stdio_.h (vprintf): New declaration.
5269         * modules/stdio (Makefile.am): Substitute also GNULIB_VPRINTF_POSIX,
5270         REPLACE_VPRINTF.
5271
5272 2007-03-08  Bruno Haible  <bruno@clisp.org>
5273
5274         * modules/fprintf-posix-tests: New file.
5275         * tests/test-fprintf-posix.sh: New file.
5276         * tests/test-fprintf-posix.c: New file.
5277
5278         * modules/fprintf-posix: New file.
5279         * lib/fprintf.c: New file.
5280         * m4/fprintf-posix.m4: New file.
5281         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_FPRINTF_POSIX,
5282         REPLACE_FPRINTF.
5283         * lib/stdio_.h (fprintf): New declaration.
5284         * modules/stdio (Makefile.am): Substitute also GNULIB_FPRINTF_POSIX,
5285         REPLACE_FPRINTF.
5286
5287 2007-03-08  Bruno Haible  <bruno@clisp.org>
5288
5289         * modules/vfprintf-posix-tests: New file.
5290         * tests/test-vfprintf-posix.sh: New file.
5291         * tests/test-vfprintf-posix.c: New file.
5292         * tests/test-fprintf-posix.h: New file.
5293         * tests/test-fprintf-posix.out: New file.
5294
5295         * modules/vfprintf-posix: New file.
5296         * lib/vfprintf.c: New file.
5297         * m4/vfprintf-posix.m4: New file.
5298         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VFPRINTF_POSIX,
5299         REPLACE_VFPRINTF.
5300         * lib/stdio_.h (vfprintf): New declaration.
5301         * modules/stdio (Makefile.am): Substitute also GNULIB_VFPRINTF_POSIX,
5302         REPLACE_VFPRINTF.
5303
5304 2007-03-08  Bruno Haible  <bruno@clisp.org>
5305
5306         * lib/stdio_.h: Treat __need___FILE like __need_FILE.
5307
5308 2007-03-08  Bruno Haible  <bruno@clisp.org>
5309
5310         * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Use 'case' statements
5311         instead of 'expr' invocations.
5312         * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
5313         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
5314         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
5315         * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
5316         * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
5317         Suggested by Paul Eggert.
5318
5319 2007-03-08  Bruno Haible  <bruno@clisp.org>
5320
5321         * modules/fseterr-tests: New file.
5322         * tests/test-fseterr.c: New file.
5323
5324         * modules/fseterr: New file.
5325         * lib/fseterr.h: New file.
5326         * lib/fseterr.c: New file.
5327
5328 2007-03-08  Bruno Haible  <bruno@clisp.org>
5329
5330         * lib/fnmatch_.h: Convert tabs in the middle of lines to spaces.
5331         * lib/getopt_.h: Likewise.
5332         * lib/mbswidth.h: Likewise.
5333         * lib/setenv.h: Likewise.
5334         * lib/vasnprintf.h: Likewise.
5335         * lib/vasprintf.h: Likewise.
5336         * lib/verror.h: Likewise.
5337         * lib/xsetenv.h: Likewise.
5338         * lib/xvasprintf.h: Likewise.
5339
5340 2007-03-08  Jim Meyering  <jim@meyering.net>
5341
5342         * users.txt: Add parted.
5343
5344         * ChangeLog: Restore 1500 lines mistakenly removed from the end.
5345
5346 2007-03-07  Bruno Haible  <bruno@clisp.org>
5347
5348         * m4/printf.m4: Make the shell script snippets copy&pastable.
5349
5350 2007-03-02  Bruno Haible  <bruno@clisp.org>
5351
5352         * lib/netinet_in_.h: New file.
5353         * m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Test whether netinet/in.h
5354         is self-contained. Set ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H.
5355         * modules/netinet_in (Files): Add lib/netinet_in_.h.
5356         (Depends-on): Add absolute-header.
5357         (Makefile.am): Substitute ABSOLUTE_NETINET_IN_H, HAVE_NETINET_IN_H
5358         into netinet/in.h.
5359
5360 2007-03-03  Bruno Haible  <bruno@clisp.org>
5361
5362         * lib/sys_select_.h: New file.
5363         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SELECT): Test whether sys/select.h
5364         is self-contained. Set ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H.
5365         * modules/sys_select (Files): Add lib/sys_select_.h.
5366         (Depends-on): Add absolute-header.
5367         (Makefile.am): Substitute ABSOLUTE_SYS_SELECT_H, HAVE_SYS_SELECT_H
5368         into sys/select.h.
5369
5370 2007-03-02  Bruno Haible  <bruno@clisp.org>
5371
5372         * lib/socket_.h: If sys/socket.h exists, include that and <sys/types.h>
5373         before it. Turn HAVE_WINSOCK2_H and HAVE_WS2TCPIP_H into configute-time
5374         values.
5375         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Test also whether
5376         <sys/socket.h> is self-contained. Set ABSOLUTE_SYS_SOCKET_H,
5377         HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H.
5378         * modules/sys_socket (Depends-on): Add absolute-header.
5379         (Makefile.am): Substitute ABSOLUTE_SYS_SOCKET_H, HAVE_SYS_SOCKET_H,
5380         HAVE_WINSOCK2_H, HAVE_WS2TCPIP_H into sys/socket.h.
5381         (Include): Remove requirement of inclusion of <sys/types.h>.
5382
5383 2007-03-02  Bruno Haible  <bruno@clisp.org>
5384
5385         * lib/byteswap_.h (bswap_32): Fix formula.
5386
5387 2007-03-06  Bruno Haible  <bruno@clisp.org>
5388
5389         * modules/sprintf-posix-tests: New file.
5390         * tests/test-sprintf-posix.c: New file.
5391
5392         * modules/sprintf-posix: New file.
5393         * lib/sprintf.c: New file.
5394         * m4/sprintf-posix.m4: New file.
5395         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_SPRINTF_POSIX,
5396         REPLACE_SPRINTF.
5397         * lib/stdio_.h (sprintf): New declaration.
5398         * modules/stdio (Makefile.am): Substitute also GNULIB_SPRINTF_POSIX,
5399         REPLACE_SPRINTF.
5400
5401 2007-03-06  Bruno Haible  <bruno@clisp.org>
5402
5403         * modules/vsprintf-posix-tests: New file.
5404         * tests/test-vsprintf-posix.c: New file.
5405         * tests/test-sprintf-posix.h: New file.
5406
5407         * modules/vsprintf-posix: New file.
5408         * lib/vsprintf.c: New file.
5409         * m4/vsprintf-posix.m4: New file.
5410         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also GNULIB_VSPRINTF_POSIX,
5411         REPLACE_VSPRINTF.
5412         * lib/stdio_.h (vsprintf): New declaration.
5413         * modules/stdio (Makefile.am): Substitute also GNULIB_VSPRINTF_POSIX,
5414         REPLACE_VSPRINTF.
5415
5416 2007-03-06  Bruno Haible  <bruno@clisp.org>
5417
5418         * modules/vsnprintf (Depend-on): Remove minmax.
5419
5420 2007-03-06  Bruno Haible  <bruno@clisp.org>
5421
5422         * modules/snprintf-posix-tests: New file.
5423         * tests/test-snprintf-posix.c: New file.
5424
5425         * modules/snprintf-posix: New file.
5426         * m4/snprintf-posix.m4: New file.
5427         * m4/snprintf.m4 (gl_REPLACE_SNPRINTF): New macro, extracted from
5428         gl_FUNC_SNPRINTF.
5429         (gl_FUNC_SNPRINTF): Invoke it.
5430         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_SNPRINTF.
5431         * lib/stdio_.h (snprintf): Define as a replacement if REPLACE_SNPRINTF
5432         is set.
5433         * modules/stdio (Makefile.am): Substitute also REPLACE_SNPRINTF.
5434
5435 2007-03-06  Bruno Haible  <bruno@clisp.org>
5436
5437         * modules/vsnprintf-posix-tests: New file.
5438         * tests/test-vsnprintf-posix.c: New file.
5439         * tests/test-snprintf-posix.h: New file.
5440
5441         * modules/vsnprintf-posix: New file.
5442         * m4/vsnprintf-posix.m4: New file.
5443         * m4/vsnprintf.m4 (gl_REPLACE_VSNPRINTF): New macro, extracted from
5444         gl_FUNC_VSNPRINTF.
5445         (gl_FUNC_VSNPRINTF): Invoke it.
5446         * m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): Set also REPLACE_VSNPRINTF.
5447         * lib/stdio_.h (vsnprintf): Define as a replacement if
5448         REPLACE_VSNPRINTF is set.
5449         * modules/stdio (Makefile.am): Substitute also REPLACE_VSNPRINTF.
5450
5451 2007-03-06  Bruno Haible  <bruno@clisp.org>
5452
5453         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Test for vasnprintf here.
5454         * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): ... not here.
5455
5456 2007-03-06  Bruno Haible  <bruno@clisp.org>
5457
5458         * lib/math_.h (acosl): Declare also if HAVE_DECL_ACOSL is set.
5459         (asinl): Declare also if HAVE_DECL_ASINL is set.
5460         (atanl): Declare also if HAVE_DECL_ATANL is set.
5461         (ceill): Declare also if HAVE_DECL_CEILL is set.
5462         (cosl): Declare also if HAVE_DECL_COSL is set.
5463         (expl): Declare also if HAVE_DECL_EXPL is set.
5464         (floorl): Declare also if HAVE_DECL_FLOORL is set.
5465         (frexpl): Declare also if HAVE_DECL_FREXPL is set.
5466         (ldexpl): Declare also if HAVE_DECL_LDEXPL is set.
5467         (logl): Declare also if HAVE_DECL_LOGL is set.
5468         (sinl): Declare also if HAVE_DECL_SINL is set.
5469         (sqrtl): Declare also if HAVE_DECL_SQRTL is set.
5470         (tanl): Declare also if HAVE_DECL_TANL is set.
5471         * modules/math (Makefile.am): Substitute the values of HAVE_DECL_*.
5472         * m4/math_h.m4 (gl_MATH_H_DEFAULTS): Set HAVE_DECL_* to 1.
5473         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Fix tests for the
5474         declaration of frexpl, ldexpl.
5475         * modules/printf-frexpl (Depends-on): Add math.
5476         * lib/printf-frexp.c (frexpl, ldexpl): Undo last change.
5477
5478 2007-03-05  Bruno Haible  <bruno@clisp.org>
5479
5480         * m4/printf-frexpl.m4 (gl_FUNC_PRINTF_FREXPL): Also test whether
5481         frexpl and ldexpl are declared.
5482         * lib/printf-frexp.c (frexpl, ldexpl): Provide fallback declarations.
5483
5484 2007-03-05  Bruno Haible  <bruno@clisp.org>
5485
5486         * gnulib-tool (func_get_automake_snippet): Don't synthesize an
5487         EXTRA_lib_SOURCES augmentation for the relocatable-prog-wrapper module.
5488
5489 2007-03-05  Bruno Haible  <bruno@clisp.org>
5490
5491         * lib/stdio_.h: Include <stddef.h>.
5492
5493 2007-03-05  Bruno Haible  <bruno@clisp.org>
5494
5495         * m4/printf.m4 (gl_SNPRINTF_DIRECTIVE_N): New macro.
5496
5497 2007-03-05  Bruno Haible  <bruno@clisp.org>
5498
5499         * m4/printf.m4: Update with info about OpenBSD 3.9, HP-UX 10.20,
5500         NetBSD 4, from Ralf Wildenhues.
5501
5502 2007-03-04  Bruno Haible  <bruno@clisp.org>
5503
5504         * lib/vasprintf.h: Update #if logic for the case when the functions
5505         exist but are overridden.
5506
5507 2007-03-04  Bruno Haible  <bruno@clisp.org>
5508
5509         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Exclude two buggy
5510         implementations: glibc-2.4 and MacOS X 10.3.
5511         * tests/test-vasnprintf-posix.c (test_function): Test also the case
5512         that exhibits the bugs in glibc-2.4 and MacOS X 10.3.
5513         * tests/test-vasprintf-posix.c (test_function): Likewise.
5514
5515 2007-03-04  Bruno Haible  <bruno@clisp.org>
5516
5517         * modules/vasprintf-posix-tests: New file.
5518         * tests/test-vasprintf-posix.c: New file.
5519
5520         * modules/vasprintf-posix: New file.
5521         * lib/vasprintf.h (asprintf, vasprintf): Rename if REPLACE_VASPRINTF is
5522         defined.
5523         * m4/vasprintf-posix.m4: New file.
5524         * m4/vasprintf.m4 (gl_REPLACE_VASPRINTF): New macro, extracted from
5525         gl_FUNC_VASPRINTF.
5526         (gl_FUNC_VASPRINTF): Invoke it.
5527         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): Define REPLACE_VASNPRINTF
5528         here.
5529         * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Not here.
5530
5531 2007-03-04  Bruno Haible  <bruno@clisp.org>
5532
5533         * lib/sys_time_.h: Rename GETTIMEOFDAY_REPLACEMENT to
5534         REPLACE_GETTIMEOFDAY.
5535         * modules/sys_time (Makefile.am): Likewise.
5536         * m4/sys_time_h.m4: Likewise.
5537         * m4/gettimeofday.m4: Likewise.
5538
5539 2007-03-04  Bruno Haible  <bruno@clisp.org>
5540
5541         * modules/vasnprintf-posix-tests: New file.
5542         * tests/test-vasnprintf-posix.c: New file.
5543
5544         * modules/vasnprintf-posix: New file.
5545         * lib/vasnprintf.c: Include isnan.h, isnanl.h, printf-frexp.h,
5546         printf-frexpl.h.
5547         (VASNPRINTF): Handle the 'a' and 'A' directives here, if needed.
5548         * lib/vasnprintf.h (asnprintf, vasnprintf): Rename if
5549         REPLACE_VASNPRINTF is defined.
5550         * m4/vasnprintf.m4 (gl_REPLACE_VASNPRINTF): New macro, extracted from
5551         gl_FUNC_VASNPRINTF.
5552         (gl_FUNC_VASNPRINTF): Invoke it.
5553         * m4/vasnprintf-posix.m4: New file.
5554         * m4/printf.m4: New file.
5555
5556 2007-03-04  Bruno Haible  <bruno@clisp.org>
5557
5558         Compile progreloc.c only if --enable-relocatable is specified.
5559         * m4/relocatable.m4 (gl_RELOCATABLE): Arrange to compile progreloc.c
5560         if --enable-relocatable was specified.
5561         * modules/relocatable-prog (Makefile.am): Remove progreloc.c from
5562         lib_SOURCES.
5563
5564 2007-03-04  Jim Meyering  <jim@meyering.net>
5565
5566         * lib/acl.c (ACL_NOT_WELL_SUPPORTED): New macro.
5567         Use it consistently, rather than enumerating errno constants.
5568
5569 2007-03-04  Bruno Haible  <bruno@clisp.org>
5570
5571         * modules/xvasprintf-tests: New file.
5572         * tests/test-xvasprintf.c: New file.
5573
5574         * modules/vasprintf-tests: New file.
5575         * tests/test-vasprintf.c: New file.
5576
5577         * modules/vasnprintf-tests: New file.
5578         * tests/test-vasnprintf.c: New file.
5579
5580         * modules/vsnprintf-tests: New file.
5581         * tests/test-vsnprintf.c: New file.
5582
5583         * modules/snprintf-tests: New file.
5584         * tests/test-snprintf.c: New file.
5585
5586 2007-03-04  Bruno Haible  <bruno@clisp.org>
5587
5588         Compile relocatable.c only if --enable-relocatable is specified.
5589         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY_BODY): Renamed from
5590         gl_RELOCATABLE_LIBRARY.
5591         (gl_RELOCATABLE_LIBRARY, gl_RELOCATABLE_LIBRARY_SEPARATE): New macros.
5592         * m4/relocatable.m4 (gl_RELOCATABLE): Invoke gl_RELOCATABLE_LIBRARY.
5593         (gl_RELOCATABLE_BODY): Require gl_RELOCATABLE_LIBRARY_BODY instead of
5594         gl_RELOCATABLE_LIBRARY.
5595         * modules/relocatable-lib (configure.ac): Invoke gl_RELOCATABLE_LIBRARY.
5596         (Makefile.am): Remove lib_SOURCES.
5597         * modules/relocatable-lib-lgpl (configure.ac): Invoke
5598         gl_RELOCATABLE_LIBRARY.
5599         (Makefile.am): Remove lib_SOURCES.
5600         * modules/relocatable-prog (Makefile.am): Don't compile relocatable.c
5601         always.
5602         * modules/relocatable-prog-wrapper (configure.ac): Invoke
5603         gl_RELOCATABLE_LIBRARY_SEPARATE instead of gl_RELOCATABLE_LIBRARY.
5604
5605 2007-03-04  Bruno Haible  <bruno@clisp.org>
5606
5607         * modules/argmatch-tests: New file.
5608         * tests/test-argmatch.c: New file.
5609
5610         * tests/test-allocsa.c (main): Halve the number of loop runs.
5611
5612         * modules/alloca-opt-tests: New file.
5613         * tests/test-alloca-opt.c: New file.
5614
5615 2007-03-04  Jim Meyering  <jim@meyering.net>
5616
5617         Work around difference between Linux ACLs and Solaris 10 ZFS.
5618         * lib/acl.c (set_acl): Revert to using chmod_or_fchmod also
5619         for EINVAL.
5620
5621 2007-03-03  Bruno Haible  <bruno@clisp.org>
5622
5623         * modules/relocatable-prog (Depends-on): Add back progreloc's
5624         dependencies: canonicalize-lgpl, xalloc, xreadlink, stdbool, unistd.
5625
5626 2007-03-03  Bruno Haible  <bruno@clisp.org>
5627
5628         * modules/relocatable-lib-lgpl: Renamed from modules/relocatable-lib.
5629         * modules/relocatable-lib: New file.
5630
5631 2007-03-03  Bruno Haible  <bruno@clisp.org>
5632
5633         * modules/relocatable-prog: Renamed from modules/relocatable.
5634         * doc/relocatable-maint.texi: Talk about module 'relocatable-prog'.
5635
5636 2007-03-03  Bruno Haible  <bruno@clisp.org>
5637
5638         * modules/relocatable-script (Files): Add doc/relocatable.texi,
5639         m4/relocatable-lib.m4.
5640         (Depends-on): Remove 'relocatable'.
5641         (configure.ac): Add gl_RELOCATABLE_NOP.
5642
5643 2007-03-03  Bruno Haible  <bruno@clisp.org>
5644
5645         * modules/relocatable-prog-wrapper: New file.
5646         * modules/relocatable (Depends-on): Add it. Remove all other
5647         dependencies except progname.
5648         (Files): Remove build-aux/install-reloc, lib/relocwrapper.c.
5649
5650         * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): New macro.
5651         (gl_FUNC_STRERROR): Nop.
5652         * lib/strerror.c: Compile the file only if !HAVE_STRERROR.
5653
5654         * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): New macro.
5655         * lib/setenv.c: Compile the file only if _LIBC || !HAVE_SETENV.
5656
5657         * m4/readlink.m4 (gl_FUNC_READLINK_SEPARATE): New macro.
5658         (gl_FUNC_READLINK): Update.
5659
5660         * m4/canonicalize-lgpl.m4 (gl_CANONICALIZE_LGPL_SEPARATE): New macro.
5661
5662 2007-03-03  Bruno Haible  <bruno@clisp.org>
5663
5664         * lib/xreadlink.c: Include <unistd.h> unconditionally.
5665         * modules/xreadlink (Depends-on): Add unistd.
5666         * modules/xreadlink-with-size (Depends-on): Likewise.
5667
5668 2007-03-03  Bruno Haible  <bruno@clisp.org>
5669
5670         * m4/setenv.m4 (gl_FUNC_SETENV, gl_FUNC_UNSETENV): New macros,
5671         extracted from gt_FUNC_SETENV.
5672         (gt_FUNC_SETENV): Remove macro.
5673         * modules/setenv (configure.ac): Add gl_FUNC_SETENV, gl_FUNC_UNSETENV,
5674         remove gt_FUNC_SETENV.
5675
5676 2007-03-03  Bruno Haible  <bruno@clisp.org>
5677
5678         * m4/relocatable-lib.m4 (gl_RELOCATABLE_LIBRARY): Define
5679         ENABLE_RELOCATABLE here.
5680         * m4/relocatable.m4 (gl_RELOCATABLE_BODY): Don't define it here.
5681
5682 2007-03-03  Bruno Haible  <bruno@clisp.org>
5683
5684         * modules/rbtreehash-list-tests (Depends-on): Add progname.
5685         * tests/test-rbtreehash_list.c: Include progname.h.
5686         (main): Call set_program_name.
5687
5688         * modules/rbtree-oset-tests (Depends-on): Add progname.
5689         * tests/test-rbtree_oset.c: Include progname.h.
5690         (main): Call set_program_name.
5691
5692         * modules/rbtree-list-tests (Depends-on): Add progname.
5693         * tests/test-rbtree_list.c: Include progname.h.
5694         (main): Call set_program_name.
5695
5696         * modules/linked-list-tests (Depends-on): Add progname.
5697         * tests/test-linked_list.c: Include progname.h.
5698         (main): Call set_program_name.
5699
5700 2007-03-03  Bruno Haible  <bruno@clisp.org>
5701
5702         * lib/glob-libc.h (_Restrict_): New macro, copied from lib/regex.h.
5703         All uses of __restrict changed to _Restrict_.
5704         * lib/glob_.h (__restrict): Remove macro.
5705
5706 2007-03-02  Bruno Haible  <bruno@clisp.org>
5707
5708         * modules/gettext (configure.ac): Require gettext infrastructure
5709         from version 0.16.1.
5710
5711 2007-03-02  Bruno Haible  <bruno@clisp.org>
5712
5713         * modules/linkedhash-list-tests (Depends-on): Add progname.
5714         * tests/test-linkedhash_list.c: Include progname.h.
5715         (main): Call set_program_name.
5716
5717         * modules/carray-list-tests (Depends-on): Add progname.
5718         * tests/test-carray_list.c: Include progname.h.
5719         (main): Call set_program_name.
5720
5721         * modules/avltreehash-list-tests (Depends-on): Add progname.
5722         * tests/test-avltreehash_list.c: Include progname.h.
5723         (main): Call set_program_name.
5724
5725         * modules/avltree-oset-tests (Depends-on): Add progname.
5726         * tests/test-avltree_oset.c: Include progname.h.
5727         (main): Call set_program_name.
5728
5729         * modules/avltree-list-tests (Depends-on): Add progname.
5730         * tests/test-avltree_list.c: Include progname.h.
5731         (main): Call set_program_name.
5732
5733         * modules/array-oset-tests (Depends-on): Add progname.
5734         * tests/test-array_oset.c: Include progname.h.
5735         (main): Call set_program_name.
5736
5737         * modules/array-list-tests (Depends-on): Add progname.
5738         * tests/test-array_list.c: Include progname.h.
5739         (main): Call set_program_name.
5740
5741         * modules/argp-tests (Depends-on): Add progname.
5742         * tests/test-argp.c: Include argp.h first. Include progname.h.
5743         (main): Call set_program_name.
5744
5745 2007-03-02  Paul Eggert  <eggert@cs.ucla.edu>
5746
5747         * doc/gnulib-tool.texi (Initial import): Reword description of
5748         _FILE_OFFSET_BITS and _GNU_SOURCE, since they sometimes have a
5749         limited effect even if defined after the first system include.
5750
5751 2007-03-01  Bruno Haible  <bruno@clisp.org>
5752
5753         * build-aux/config.libpath: Update to libtool-1.5.22.
5754         Reported by Albert Chin <bug-gnulib@mlists.thewrittenword.com>.
5755
5756 2007-03-01  Bruno Haible  <bruno@clisp.org>
5757
5758         * doc/relocatable-maint.texi: Recommend to set foo_CPPFLAGS, not
5759         foo_CFLAGS.
5760         Reported by Ralf Wildenhues.
5761
5762 2007-03-01  Bruno Haible  <bruno@clisp.org>
5763
5764         * build-aux/install-reloc: Remove object files left over by some
5765         compilers.
5766         Reported by Ralf Wildenhues.
5767
5768 2007-03-01  Bruno Haible  <bruno@clisp.org>
5769
5770         * build-aux/install-reloc: Break long lines.
5771
5772 2007-03-01  Bruno Haible  <bruno@clisp.org>
5773
5774         * doc/relocatable.texi: Document that it may not work on OpenBSD.
5775         Reported by Ralf Wildenhues.
5776
5777 2007-03-01  Bruno Haible  <bruno@clisp.org>
5778
5779         * doc/gnulib-tool.texi (Initial import): Remove paragraph about
5780         include ordering constraints.
5781
5782 2007-03-01  Paul Eggert  <eggert@cs.ucla.edu>
5783
5784         Followup to the 2007-02-12 patch, using suggestions from Bruno Haible in
5785         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00136.html>.
5786         * doc/gnulib-tool.texi (Initial import): Mention _FILE_OFFSET_BITS
5787         as another example.
5788         * lib/time_.h: Fix misspelling.
5789         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
5790         Require gl_HEADER_TIME_H_DEFAULTS.
5791         * m4/strptime.m4 (gl_FUNC_STRPTIME): Likewise.
5792         * m4/time_r.m4 (gl_TIME_R): Likewise.
5793         * m4/timegm.m4 (gl_FUNC_TIMEGM): Likewise.
5794
5795 2007-03-01  Bruno Haible  <bruno@clisp.org>
5796
5797         * m4/utimecmp.m4 (gl_UTIMECMP): Don't require gl_TIMESPEC.
5798         * m4/utimens.m4 (gl_UTIMENS): Likewise.
5799
5800 2007-03-01  Jim Meyering  <jim@meyering.net>
5801
5802         * modules/xreadlink (Maintainer): Add my name.
5803         * modules/xreadlink-with-size (Depends-on): Alphabetize.
5804
5805 2007-02-26  Ben Pfaff  <blp@cs.stanford.edu>
5806             Bruno Haible  <bruno@clisp.org>
5807
5808         * build-aux/install-reloc: Compile also c-ctype.c.
5809         * build-aux/relocatable.sh.in: New file.
5810         * doc/relocatable.texi: New file.
5811         * doc/relocatable-maint.texi: New file.
5812         * doc/gnulib.texi: Include relocatable-maint.texi.
5813         * lib/progreloc.c: Include unistd.h unconditionally.
5814         * lib/relocwrapper.c: Include unistd.h unconditionally.
5815         Include c-ctype.h.
5816         (add_dotbin): Use c_tolower.
5817         * m4/relocatable-lib.m4: New file, extracted from m4/relocatable.m4.
5818         (gl_RELOCATABLE_LIBRARY): Renamed from AC_RELOCATABLE_LIBRARY.
5819         (gl_RELOCATABLE_NOP): Renamed from AC_RELOCATABLE_NOP.
5820         * m4/relocatable.m4 (AC_RELOCATABLE_LIBRARY, AC_RELOCATABLE_NOP): Move
5821         to m4/relocatable-lib.m4.
5822         (gl_RELOCATABLE): Renamed from AC_RELOCATABLE. Set also
5823         RELOCATABLE_CONFIG_H_DIR, RELOCATABLE_SRC_DIR, RELOCATABLE_BUILD_DIR.
5824         (gl_RELOCATABLE_BODY): Renamed from AC_RELOCATABLE_BODY. Don't
5825         require obsolete macro AC_EXEEXT. Don't check for unistd.h. Don't set
5826         SET_RELOCATABLE. Instead set RELOCATABLE_LDFLAGS, INSTALL_PROGRAM_ENV.
5827         * modules/relocatable: New file.
5828         * modules/relocatable-lib: New file.
5829         * modules/relocatable-script: New file.
5830
5831 2007-02-28  Bruno Haible  <bruno@clisp.org>
5832
5833         Import --enable-relocatable infrastructure.
5834         * build-aux/config.libpath: New file, from GNU gettext.
5835         * build-aux/install-reloc: New file, from GNU gettext.
5836         * build-aux/reloc-ldflags: New file, from GNU gettext.
5837         * lib/relocatable.h: New file, from GNU gettext.
5838         * lib/relocatable.c: New file, from GNU gettext.
5839         * lib/relocwrapper.c: New file, from GNU gettext.
5840         * m4/relocatable.m4: New file, from GNU gettext.
5841
5842 2007-02-28  Bruno Haible  <bruno@clisp.org>
5843
5844         * MODULES.html.sh (File system functions): Add xreadlink-with-size.
5845
5846         * modules/xreadlink: New file, from GNU gettext with modifications.
5847         * lib/xreadlink.c: New file, from GNU gettext.
5848         * lib/xreadlink.h: Add comments.
5849         (xreadlink): New declaration.
5850
5851         * modules/xreadlink-with-size: Renamed from modules/xreadlink.
5852         (Files): Remove m4/xreadlink.m4. Replace lib/xreadlink.c with
5853         lib/xreadlink-with-size.c.
5854         (configure.ac): Remove gl_XREADLINK invocation.
5855         (Makefile.am): Augment lib_SOURCES.
5856         * m4/xreadlink.m4: Remove file.
5857         * lib/xreadlink-with-size.c: Renamed from lib/xreadlink.c.
5858         (xreadlink_with_size): Renamed from xreadink.
5859         * lib/xreadlink.h (xreadlink_with_size): Renamed from xreadink.
5860         * modules/canonicalize (Depends-on): Replace xreadlink with
5861         xreadlink-with-size.
5862         * lib/canonicalize.c (canonicalize_filename_mode): Update.
5863
5864 2007-02-25  Jim Meyering  <jim@meyering.net>
5865
5866         * build-aux/announce-gen: When complaining about excess arguments,
5867         list them.
5868
5869 2007-02-25  Paul Eggert  <eggert@cs.ucla.edu>
5870
5871         * README: Document signed integer overflow situation more
5872         accurately.
5873
5874 2007-02-25  Bruno Haible  <bruno@clisp.org>
5875
5876         * lib/vasnprintf.c (VASNPRINTF): Fix estimate of size needed for a
5877         'a' or 'A' conversion.
5878
5879 2007-02-25  Bruno Haible  <bruno@clisp.org>
5880
5881         * modules/filename: Renamed from modules/pathname.
5882         (Files): Replace lib/pathname.h with lib/filename.h. Replace
5883         lib/concatpath.c with lib/concat-filename.c.
5884         (Makefile.am): Update.
5885         (Include): Replace pathname.h with filename.h.
5886         * lib/filename.h: Renamed from lib/pathname.h.
5887         (concatenated_filename): Renamed from concatenated_pathname.
5888         * lib/concat-filename.c: Renamed from lib/concatpath.c.
5889         (concatenated_filename): Renamed from concatenated_pathname.
5890         * lib/findprog.c: Include filename.h instead of pathname.h.
5891         (find_in_path): Update.
5892         * lib/javacomp.c: Include filename.h instead of pathname.h.
5893         (is_envjavac_gcj43_usable, is_envjavac_oldgcj_14_14_usable,
5894         is_envjavac_oldgcj_14_13_usable, is_envjavac_nongcj_usable,
5895         is_gcj_present, is_gcj43_usable, is_oldgcj_14_14_usable,
5896         is_oldgcj_14_13_usable, is_javac_usable): Update.
5897         * lib/javaexec.c: Include filename.h instead of pathname.h.
5898         (execute_java_class): Update.
5899         * modules/findprog: Update.
5900         * modules/javacomp: Update.
5901         * modules/javaexec: Update.
5902         * MODULES.html.sh (File system functions): Add 'filename', remove
5903         'pathname'.
5904
5905 2007-02-25  Bruno Haible  <bruno@clisp.org>
5906
5907         * modules/printf-frexpl-tests: New file.
5908         * tests/test-printf-frexpl.c: New file.
5909
5910         * modules/printf-frexpl: New file.
5911         * lib/printf-frexpl.h: New file.
5912         * lib/printf-frexpl.c: New file.
5913         * m4/printf-frexpl.m4: New file.
5914
5915 2007-02-25  Bruno Haible  <bruno@clisp.org>
5916
5917         * modules/printf-frexp-tests: New file.
5918         * tests/test-printf-frexp.c: New file.
5919
5920         * modules/printf-frexp: New file.
5921         * lib/printf-frexp.h: New file.
5922         * lib/printf-frexp.c: New file.
5923         * m4/printf-frexp.m4: New file.
5924
5925 2007-02-25  Bruno Haible  <bruno@clisp.org>
5926
5927         Assume automake >= 1.10 for the tests.
5928         * modules/arcfour-tests (TESTS): Remove $(EXEEXT) suffix.
5929         * modules/arctwo-tests: Likewise.
5930         * modules/argp-tests: Likewise.
5931         * modules/avltree-list-tests: Likewise.
5932         * modules/avltree-oset-tests: Likewise.
5933         * modules/avltreehash-list-tests: Likewise.
5934         * modules/carray-list-tests: Likewise.
5935         * modules/crc-tests: Likewise.
5936         * modules/des-tests: Likewise.
5937         * modules/gc-arcfour-tests: Likewise.
5938         * modules/gc-arctwo-tests: Likewise.
5939         * modules/gc-des-tests: Likewise.
5940         * modules/gc-hmac-md5-tests: Likewise.
5941         * modules/gc-hmac-sha1-tests: Likewise.
5942         * modules/gc-md2-tests: Likewise.
5943         * modules/gc-md4-tests: Likewise.
5944         * modules/gc-md5-tests: Likewise.
5945         * modules/gc-pbkdf2-sha1-tests: Likewise.
5946         * modules/gc-rijndael-tests: Likewise.
5947         * modules/gc-sha1-tests: Likewise.
5948         * modules/gc-tests: Likewise.
5949         * modules/getaddrinfo-tests: Likewise.
5950         * modules/hmac-md5-tests: Likewise.
5951         * modules/hmac-sha1-tests: Likewise.
5952         * modules/linked-list-tests: Likewise.
5953         * modules/linkedhash-list-tests: Likewise.
5954         * modules/lock-tests: Likewise.
5955         * modules/md2-tests: Likewise.
5956         * modules/md4-tests: Likewise.
5957         * modules/md5-tests: Likewise.
5958         * modules/rbtree-list-tests: Likewise.
5959         * modules/rbtree-oset-tests: Likewise.
5960         * modules/rbtreehash-list-tests: Likewise.
5961         * modules/read-file-tests: Likewise.
5962         * modules/rijndael-tests: Likewise.
5963         * modules/stdint-tests: Likewise.
5964         * modules/tls-tests: Likewise.
5965
5966 2007-02-24  Bruno Haible  <bruno@clisp.org>
5967
5968         * lib/isnanl.h (isnanl): Define through isnan if isnan is a macro.
5969         * m4/isnan.m4 (gl_FUNC_ISNAN_NO_LIBM): Don't check for isnan as a
5970         function; instead check whether isnan with a double argument links.
5971         * m4/isnanl.m4 (gl_FUNC_ISNANL_NO_LIBM): Don't check for isnanl as a
5972         function; instead check whether isnan with a 'long double' argument
5973         links.
5974         Reported by Eric Blake <ebb9@byu.net>.
5975
5976 2007-02-24  Bruno Haible  <bruno@clisp.org>
5977
5978         * lib/isnan.c: Support the 'long double' case if USE_LONG_DOUBLE is
5979         defined.
5980         * lib/isnanl.c: Remove all code. Just include isnan.c.
5981         * modules/isnanl-nolibm (Files): Add lib/isnan.c.
5982
5983 2007-02-25  Jim Meyering  <jim@meyering.net>
5984
5985         Avoid conflicting types for 'unsetenv' on FreeBSD.
5986         * lib/putenv.c (_unsetenv): Rename from "unsetenv", to avoid
5987         conflicting with FreeBSD's (5.0 and 6.1) function declaration
5988         in stdlib.h.
5989
5990 2007-02-24  Bruno Haible  <bruno@clisp.org>
5991
5992         * modules/isnanl-nolibm-tests: New file.
5993         * tests/test-isnanl.c: New file.
5994
5995         * modules/isnanl-nolibm: New file.
5996         * lib/isnanl.h: New file.
5997         * lib/isnanl.c: New file.
5998         * m4/isnanl.m4: New file.
5999
6000 2007-02-24  Bruno Haible  <bruno@clisp.org>
6001
6002         * modules/isnan-nolibm-tests: New file.
6003         * tests/test-isnan.c: New file.
6004
6005         * modules/isnan-nolibm: New file.
6006         * lib/isnan.h: New file.
6007         * lib/isnan.c: New file.
6008         * m4/isnan.m4: New file.
6009
6010 2007-02-24  Bruno Haible  <bruno@clisp.org>
6011
6012         * lib/frexpl.c (frexpl): Correct return values for x = 1.0L. Don't
6013         assume that an exponent fits in 20 bits.
6014
6015 2007-02-24  Jim Meyering  <jim@meyering.net>
6016
6017         * m4/regex.m4: Update the description of the configure-time option,
6018         --without-included-regex, to state accurately what the defaults are,
6019         and perhaps to give people an idea why using this option is risky.
6020
6021 2007-02-24  Paul Eggert  <eggert@cs.ucla.edu>
6022
6023         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check for a nanosleep that
6024         loops on small arguments.  This attempts to avoid the problem
6025         Bruno Haible reported for AIX 4.3.2 in
6026         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00309.html>.
6027
6028 2007-02-23  Bruno Haible  <bruno@clisp.org>
6029
6030         * m4/perl.m4 (gl_PERL): Require version 5.005, not 5.003.
6031         Needed for help2man.
6032
6033 2007-02-23  Karl Berry  <karl@gnu.org>
6034
6035         * doc/gnulib-tool.texi (CVS Issues): mention that when foo_.h
6036         exists, foo.h should be cvs-ignored, not committed.
6037
6038 2007-02-23  Eric Blake  <ebb9@byu.net>
6039
6040         * lib/getdate.h (includes):  Include <time.h>, not "timespec.h".
6041         * lib/stat-time.h (includes): Likewise.
6042         * lib/utimecmp.c (includes): Likewise.
6043         * lib/utimens.h (includes): Likewise.
6044         * lib/getdate.y (includes): Also include "timespec.h" for use
6045         internal to the module.
6046         * modules/utimens (Depends-on): Revert yesterday's patch.
6047         * modules/nanosleep (Depends-on): Add missing dependency.
6048
6049 2007-02-22  Bruno Haible  <bruno@clisp.org>
6050
6051         * lib/glob.c: Don't include getlogin_r.h.
6052
6053 2007-02-22  Jim Meyering  <jim@meyering.net>
6054
6055         * modules/utimens (Depends-on): Add timespec, required for
6056         utimens.h's inclusion of timespec.h.
6057
6058 2007-02-21  Paul Eggert  <eggert@cs.ucla.edu>
6059
6060         * lib/getcwd.c (__getcwd): Undo previous change; it mishandled
6061         long unreadable paths in GNU/Linux.  Problem reported by Andreas
6062         Schwab in
6063         <http://lists.gnu.org/archive/html/bug-gnulib/2007-02/msg00261.html>.
6064         I'll try to think of a better way to fix the Solaris problem.
6065
6066         * lib/getcwd.c (__getcwd): Don't assume getcwd (NULL, 0) works
6067         like glibc; on Solaris 10, it fails with errno == EINVAL.
6068         POSIX says the behavior is unspecified if the first argument is NULL,
6069         so play it safe and never pass NULL to the system getcwd.
6070
6071 2007-02-21  Jim Meyering  <jim@meyering.net>
6072
6073         * lib/gettimeofday.c (rpl_gettimeofday): Remove declaration
6074         of gettimeofday.  It would conflict with the one now always
6075         provided via sys_time_.h.  Reported by Matthew Woehlke, as
6076         an IRIX 6.5 build failure.
6077
6078 2007-02-20  Paul Eggert  <eggert@cs.ucla.edu>
6079
6080         Minor fixups to port to Solaris 10 with Sun C 5.8.
6081         * lib/getcwd.c [!_LIBC]: Include dirfd.h, since we use dirfd.
6082         * modules/getcwd (Depends-on): Add dirfd.
6083         * lib/putenv.c (putenv): #undef it.
6084         (rpl_putenv): New decl.
6085         (malloc, free): Include <stdlib.h> rather than prototyping separately.
6086
6087 2007-02-20  Bruno Haible  <bruno@clisp.org>
6088
6089         * modules/stdio-tests: New file.
6090         * tests/test-stdio.c: New file.
6091
6092         * modules/vsnprintf (Files): Remove lib/vsnprintf.h.
6093         (Depends-on): Add stdio.
6094         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
6095         (Include): Use <stdio.h> instead of vsnprintf.h.
6096         * m4/vsnprintf.m4 (gl_FUNC_VSNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
6097         HAVE_DECL_VSNPRINTF.
6098         * lib/vsnprintf.c: Include <stdio.h> instead of vsnprintf.h.
6099
6100         * modules/snprintf (Files): Remove lib/snprintf.h.
6101         (Depends-on): Add stdio.
6102         (configure.ac): Invoke gl_STDIO_MODULE_INDICATOR.
6103         (Include): Use <stdio.h> instead of snprintf.h.
6104         * m4/snprintf.m4 (gl_FUNC_SNPRINTF): Require gl_STDIO_H_DEFAULTS. Set
6105         HAVE_DECL_SNPRINTF.
6106         * lib/snprintf.c: Include <stdio.h> instead of snprintf.h.
6107         * lib/getaddrinfo.c: Likewise.
6108
6109         * modules/stdio: New file.
6110         * lib/stdio_.h: New file, incorporating snprintf.h and vsnprintf.h.
6111         * lib/snprintf.h: Remove file.
6112         * lib/vsnprintf.h: Remove file.
6113         * lib/.cppi-disable: Remove snprintf.h.
6114         * m4/stdio_h.m4: New file.
6115         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdio.
6116
6117 2007-02-20  Jim Meyering  <jim@meyering.net>
6118
6119         * lib/ftruncate.c [HAVE_CHSIZE]: Document that this code is
6120         used by e.g., mingw.  From Bruno Haible.
6121
6122 2007-02-19  Bruno Haible  <bruno@clisp.org>
6123
6124         * lib/string_.h: Use "#pragma GCC system_header" to suppress some gcc
6125         warnings.
6126         Reported by Ben Pfaff <blp@cs.stanford.edu>.
6127
6128 2007-02-19  Bruno Haible  <bruno@clisp.org>
6129
6130         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Don't request a complaint mail
6131         from mingw users.
6132
6133 2007-02-19  Bruno Haible  <bruno@clisp.org>
6134
6135         * lib/stdlib_.h: Use "#pragma GCC system_header" to suppress some gcc
6136         warnings.
6137         Reported by Joel E. Denny <jdenny@ces.clemson.edu> via Paul Eggert.
6138
6139 2007-02-19  Jim Meyering  <jim@meyering.net>
6140
6141         Don't use FD after a successful "fdopendir (fd)".
6142         * lib/getcwd.c (__getcwd) [AT_FDCWD]: fdopendir (fd) usually closes fd.
6143         Reset it by calling dirfd on the just-obtained DIR*.
6144
6145         * m4/ftruncate.m4: Adjust comment to give this module a 3-year reprieve.
6146         Prompted by a report from Bruno Haible that mingw lacks ftruncate.
6147
6148 2007-02-18  Bruno Haible  <bruno@clisp.org>
6149
6150         * lib/readlink.c: Include <unistd.h>.
6151         * m4/readlink.m4 (gl_FUNC_READLINK): Require gl_UNISTD_H_DEFAULTS. Set
6152         HAVE_READLINK.
6153         * modules/readlink (Depends-on): Add unistd.
6154         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
6155         (Include): Add <unistd.h>.
6156
6157         * lib/getlogin_r.h: Remove file.
6158         * lib/getlogin_r.c: Include <unistd.h> instead of getlogin_r.h.
6159         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE): Remove macro.
6160         (gl_GETLOGIN_R): Inline it here. Require gl_UNISTD_H_DEFAULTS. Set
6161         HAVE_DECL_GETLOGIN_R.
6162         * modules/getlogin_r (Files): Remove lib/getlogin_r.h.
6163         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
6164         (Include): Use <unistd.h> instead of getlogin_r.h.
6165
6166         * lib/getcwd.h: Remove file.
6167         * lib/getcwd.c: Include <unistd.h> instead of getcwd.h.
6168         * lib/xgetcwd.c: Likewise.
6169         * m4/getcwd.m4 (gl_FUNC_GETCWD): Require gl_UNISTD_H_DEFAULTS. Set
6170         REPLACE_GETCWD. Don't define __GETCWD_PREFIX.
6171         * modules/getcwd (Files): Remove lib/getcwd.h.
6172         (Depends-on): Add unistd.
6173         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
6174         (Include): Use <unistd.h> instad of getcwd.h.
6175
6176         * lib/ftruncate.c: Include <unistd.h> first.
6177         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Require gl_UNISTD_H_DEFAULTS.
6178         Set HAVE_FTRUNCATE.
6179         * modules/ftruncate (Depends-on): Add unistd.
6180         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
6181
6182         * lib/fchdir.c: Include <unistd.h> first.
6183         * lib/dirent_.h: Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT.
6184         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_UNISTD_H_DEFAULTS instead
6185         of gl_HEADER_UNISTD_DEFAULTS. Set REPLACE_FCHDIR. Don't set UNISTD_H.
6186         * modules/fchdir (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
6187         (Makefile.am): Substitute also REPLACE_FCHDIR into dirent.h.
6188
6189         * lib/dup2.c: Include <unistd.h> first.
6190         * m4/dup2.m4 (gl_FUNC_DUP2): Require gl_UNISTD_H_DEFAULTS. Set
6191         HAVE_DUP2.
6192         * modules/dup2 (Depends-on): Add unistd.
6193         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
6194
6195         * lib/chown.c: Include <unistd.h> first. Undefine chown later.
6196         * m4/chown.m4 (gl_FUNC_CHOWN): Require gl_UNISTD_H_DEFAULTS. Set
6197         REPLACE_CHOWN. Don't define chown as a macro here.
6198         * modules/chown (Depends-on): Add unistd.
6199         (configure.ac): Invoke gl_UNISTD_MODULE_INDICATOR.
6200
6201         * lib/unistd_.h: Test HAVE_UNISTD_H determined at configure time.
6202         Add definition for GL_LINK_WARNING.
6203         (chown, dup2): New declarations.
6204         (fchdir): Test REPLACE_FCHDIR, not FCHDIR_REPLACEMENT. Provide optional
6205         link warning.
6206         (ftruncate): New declaration.
6207         (getcwd): New declaration, taken from old getcwd.h.
6208         (getlogin_r): New declaration, taken from old getlogin_r.h.
6209         (readlink): New declaration.
6210         * m4/unistd_h.m4 (gl_UNISTD_H): Renamed from gl_HEADER_UNISTD. Don't
6211         set UNISTD_H. Inline gl_PREREQ_UNISTD. Set HAVE_UNISTD_H.
6212         (gl_PREREQ_UNISTD): Remove macro.
6213         (gl_UNISTD_MODULE_INDICATOR): New macro.
6214         (gl_UNISTD_H_DEFAULTS): Renamed from gl_HEADER_UNISTD_DEFAULTS. Set
6215         many new variables. Don't set UNISTD_H.
6216         * modules/unistd (Description): Change.
6217         (Depends-on): Add link-warning.
6218         (configure.ac): Update.
6219         (Makefile.am): Create unistd.h always. Substitute many new variables
6220         into it.
6221
6222 2007-02-18  Bruno Haible  <bruno@clisp.org>
6223
6224         * lib/stdlib_.h (getsubopt): New declaration, copied from getsubopt.h.
6225         * modules/stdlib (stdlib.h): Also substitute GNULIB_GETSUBOPT and
6226         HAVE_GETSUBOPT.
6227         * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Also initialize
6228         GNULIB_GETSUBOPT and HAVE_GETSUBOPT.
6229         * lib/getsubopt.h: Remove file.
6230         * modules/getsubopt (Files): Remove lib/getsubopt.h.
6231         (Depends-on): Add stdlib.
6232         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
6233         (Includes): Use <stdlib.h> instead of getsubopt.h.
6234         * m4/getsubopt.m4 (gl_FUNC_GETSUBOPT): Require gl_STDLIB_H_DEFAULTS.
6235         Set HAVE_GETSUBOPT.
6236         * lib/getsubopt.c: Don't include getsubopt.h.
6237
6238 2007-02-18  Bruno Haible  <bruno@clisp.org>
6239
6240         * modules/fchdir (Depends-on): Add dup2.
6241
6242 2007-02-18  Bruno Haible  <bruno@clisp.org>
6243
6244         * lib/stdlib_.h: Handle glibc's special invocation convention
6245         specially.
6246
6247 2007-02-18  Bruno Haible  <bruno@clisp.org>
6248
6249         * modules/stdlib-tests: New file.
6250         * tests/test-stdlib.c: New file.
6251
6252         * modules/mkstemp (Files): Remove lib/mkstemp.h.
6253         (Depends-on): Add stdlib.
6254         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
6255         (Includes): Use <stdlib.h> instead of mkstemp.h.
6256         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require gl_STDLIB_H_DEFAULTS. Set
6257         REPLACE_MKSTEMP. Remove definition of __MKSTEMP_PREFIX.
6258         * lib/mkstemp.c: Don't include mkstemp.h.
6259         * lib/mkstemp-safer.c: Include <stdlib.h> instead of mkstemp.h.
6260         * lib/stdlib--.h: Don't include mkstemp.h.
6261
6262         * modules/mkdtemp (Files): Remove lib/mkdtemp.h.
6263         (Depends-on): Add stdlib.
6264         (configure.ac): Invoke gl_STDLIB_MODULE_INDICATOR.
6265         (Includes): Use <stdlib.h> instead of mkdtemp.h.
6266         * m4/mkdtemp.m4 (gt_FUNC_MKDTEMP): Require gl_STDLIB_H_DEFAULTS. Set
6267         HAVE_MKDTEMP.
6268         * lib/mkdtemp.c: Don't include mkdtemp.h.
6269         * lib/clean-temp.c: Don't include mkdtemp.h.
6270
6271         * modules/exit (Files): Remove lib/exit.h.
6272         (Depends-on): Add stdlib.
6273         (Makefile.am): Remove lib_SOURCES.
6274         (Include): Use <stdlib.h> instead of exit.h.
6275         * lib/argmatch.c: Don't include exit.h.
6276         * lib/execute.c: Likewise.
6277         * lib/pagealign_alloc.c: Likewise.
6278         * lib/pipe.c: Likewise.
6279         * lib/wait-process.c: Likewise.
6280         * lib/copy-file.c: Include <stdlib.h> instead of exit.h.
6281         * lib/exitfail.c: Likewise.
6282         * lib/savewd.c: Likewise.
6283         * lib/xsetenv.c: Likewise.
6284
6285         * modules/stdlib: New file.
6286         * lib/stdlib_.h: New file, incorporating exit.h, mkdtemp.h, mkstemp.h
6287         and extra comments about mkstemp().
6288         * lib/exit.h: Remove file.
6289         * lib/mkdtemp.h: Remove file.
6290         * lib/mkstemp.h: Remove file.
6291         * m4/stdlib_h.m4: New file.
6292         * MODULES.html.sh (Support for systems lacking ANSI C 89): Add stdlib.
6293
6294 2007-02-18  Bruno Haible  <bruno@clisp.org>
6295
6296         * modules/math-tests: New file.
6297         * tests/test-math.c: New file.
6298
6299         * modules/math: New file.
6300         * modules/mathl (Files): Remove lib/mathl.h.
6301         (Depends-on): Add math.
6302         (Makefile.am): Don't mention mathl.h.
6303         (Include): Use <math.h> instead of mathl.h.
6304         * lib/math_.h: New file.
6305         * lib/mathl.h: Remove file.
6306         * lib/acosl.c: Include <config.h> and <math.h> first. Don't include
6307         mathl.h.
6308         * lib/asinl.c: Likewise.
6309         * lib/atanl.c: Likewise.
6310         * lib/ceill.c: Likewise.
6311         * lib/cosl.c: Likewise.
6312         * lib/expl.c: Likewise.
6313         * lib/floorl.c: Likewise.
6314         * lib/frexpl.c: Likewise.
6315         * lib/ldexpl.c: Likewise.
6316         * lib/logl.c: Likewise.
6317         * lib/sincosl.c: Likewise.
6318         * lib/sinl.c: Likewise.
6319         * lib/sqrtl.c: Likewise.
6320         * lib/tanl.c: Likewise.
6321         * lib/trigl.c: Likewise.
6322         * m4/math_h.m4: New file.
6323         * MODULES.html.sh (Mathematics): Add math.
6324
6325 2007-02-17  Bruno Haible  <bruno@clisp.org>
6326
6327         * modules/wctype-tests: New file.
6328         * tests/test-wctype.c: New file.
6329
6330         * modules/wchar-tests: New file.
6331         * tests/test-wchar.c: New file.
6332
6333         * modules/unistd-tests: New file.
6334         * tests/test-unistd.c: New file.
6335
6336         * modules/time-tests: New file.
6337         * tests/test-time.c: New file.
6338
6339         * modules/sysexits-tests: New file.
6340         * tests/test-sysexits.c: New file.
6341
6342         * modules/sys_time-tests: New file.
6343         * tests/test-sys_time.c: New file.
6344
6345         * modules/sys_stat-tests: New file.
6346         * tests/test-sys_stat.c: New file.
6347
6348         * modules/sys_socket-tests: New file.
6349         * tests/test-sys_socket.c: New file.
6350
6351         * modules/sys_select-tests: New file.
6352         * tests/test-sys_select.c: New file.
6353
6354         * modules/string-tests: New file.
6355         * tests/test-string.c: New file.
6356
6357         * modules/stdbool-tests: New file.
6358         * tests/test-stdbool.c: New file.
6359
6360         * modules/netinet_in-tests: New file.
6361         * tests/test-netinet_in.c: New file.
6362
6363         * modules/inttypes-tests: New file.
6364         * tests/test-inttypes.c: New file.
6365
6366         * modules/fcntl-tests: New file.
6367         * tests/test-fcntl.c: New file.
6368
6369         * modules/byteswap-tests: New file.
6370         * tests/test-byteswap.c: New file.
6371
6372         * modules/arpa_inet-tests: New file.
6373         * tests/test-arpa_inet.c: New file.
6374
6375 2007-02-17  Bruno Haible  <bruno@clisp.org>
6376
6377         * lib/inttypes_.h: Add definition for GL_LINK_WARNING.
6378         (imaxabs, imaxdiv, strtoimax, strtoumax): Don't declare the function
6379         if the corresponding module is not enabled. Emit link warnings if
6380         the function is used nevertheless.
6381         * m4/inttypes.m4 (gl_INTTYPES_H): Never use the existing <inttypes.h>.
6382         Don't AC_SUBST HAVE_DECL_IMAXABS, HAVE_DECL_IMAXDIV,
6383         HAVE_DECL_STRTOIMAX, HAVE_DECL_STRTOUMAX.
6384         (gl_INTTYPES_MODULE_INDICATOR, gl_INTTYPES_H_DEFAULTS): New macros.
6385         * modules/inttypes (Depends-on): Add link-warning.
6386         (Makefile.am): Copy the contents of build-aux/link-warning.h into
6387         inttypes.h. Substitute also GNULIB_IMAXABS, GNULIB_IMAXDIV,
6388         GNULIB_STRTOIMAX, GNULIB_STRTOUMAX.
6389         * modules/imaxabs (configure.ac): Invoke gl_INTTYPES_MODULE_INDICATOR.
6390         * modules/imaxdiv (configure.ac): Likewise.
6391         * modules/strtoimax (configure.ac): Likewise.
6392         * modules/strtoumax (configure.ac): Likewise.
6393
6394 2007-02-17  Bruno Haible  <bruno@clisp.org>
6395
6396         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Include the contents of
6397         gl_STRING_MODULE_INDICATOR_DEFAULTS.
6398         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Remove macro.
6399         (gl_HEADER_STRING_H_BODY, gl_STRING_MODULE_INDICATOR): Update.
6400
6401 2007-02-17  Bruno Haible  <bruno@clisp.org>
6402
6403         * modules/link-warning: New file.
6404         * build-aux/link-warning.h: New file, extracted from lib/string_.h.
6405         * lib/string_.h (GL_LINK_WARNING): Remove definition.
6406         * modules/string (Depends-on): Add link-warning.
6407         (Makefile.am): Copy the contents of build-aux/link-warning.h into
6408         string.h.
6409         * MODULES.html.sh (Support for building libraries and executables): Add
6410         link-warning.
6411
6412 2007-02-17  Bruno Haible  <bruno@clisp.org>
6413
6414         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strcasecmp,
6415         strncasecmp, strchr, strchrnul, strdup, strndup, strnlen, strcspn,
6416         strpbrk, strspn, strrchr, strsep, strstr, strcasestr, strtok_r): Break
6417         long lines.
6418
6419 2007-02-17  Ben Pfaff  <blp@cs.stanford.edu>
6420             Bruno Haible  <bruno@clisp.org>
6421
6422         * modules/tmpfile: New file.
6423         * lib/tmpfile.c: New file.
6424         * m4/tmpfile.m4: New file.
6425         * MODULES.html.sh (func_all_modules): New section "Input/output".
6426
6427 2007-02-15  Bruno Haible  <bruno@clisp.org>
6428
6429         * lib/clean-temp.c [WIN32 && !CYGWIN]: Include <windows.h>.
6430         (supports_delete_on_close): New function.
6431         (open_temp, fopen_temp): Use _O_TEMPORARY when supported.
6432
6433 2007-02-14  Bruno Haible  <bruno@clisp.org>
6434
6435         * modules/mbspcasecmp-tests: New file.
6436         * tests/test-mbspcasecmp.sh: New file.
6437         * tests/test-mbspcasecmp.c: New file.
6438
6439         New module mbspcasecmp.
6440         * modules/mbspcasecmp: New file.
6441         * lib/mbspcasecmp.c: New file.
6442         * lib/string_.h (strncasecmp): Change warning message.
6443         (mbspcasecmp): New declaration.
6444         * m4/mbspcasecmp.m4: New file.
6445         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6446         GNULIB_MBSPCASECMP.
6447         * modules/string (string.h): Also substitute GNULIB_MBSPCASECMP.
6448         * MODULES.html.sh (Internationalization functions): Add mbspcasecmp.
6449
6450 2007-02-14  Bruno Haible  <bruno@clisp.org>
6451
6452         * modules/mbsncasecmp-tests: New file.
6453         * tests/test-mbsncasecmp.sh: New file.
6454         * tests/test-mbsncasecmp.c: New file.
6455
6456         New module mbsncasecmp.
6457         * modules/mbsncasecmp: New file.
6458         * lib/mbsncasecmp.c: New file.
6459         * lib/string_.h (mbsncasecmp): New declaration.
6460         * m4/mbsncasecmp.m4: New file.
6461         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6462         GNULIB_MBSNCASECMP.
6463         * modules/string (string.h): Also substitute GNULIB_MBSNCASECMP.
6464         * MODULES.html.sh (Internationalization functions): Add mbsncasecmp.
6465
6466 2007-02-14  Paul Eggert  <eggert@cs.ucla.edu>
6467
6468         * lib/exclude.c (FNM_EXTMATCH): Define if system does not.
6469         Verify that it doesn't overlap with our flags.
6470         (fnmatch_no_wildcards): Don't use strcasecmp or strncasecmp, which
6471         do not have the desired effect in multibyte locales; instead, use
6472         mbscasecmp.
6473         * modules/exclude (Depends-on): Depend on mbscasecmp, not strcase.
6474         Add dependency on xalloc.  Depend on fnmatch, not fnmatch-gnu, since
6475         we don't require GNU fnmatch ourselves (if our users require it, they
6476         should do so explicitly).
6477
6478         Fix regex code so it doesn't rely on strcasecmp.
6479         * lib/regex_internal.h: Include <langinfo.h> only if _LIBC is defined.
6480         Otherwise, include gnulib's langinfo.h.
6481         * lib/regcomp.c (init_dfa): Don't use strcasecmp, as it can have
6482         undesirable behavior in non-C locales.  Instead, rely on localecharset.
6483         * m4/regex.m4 (gl_PREREQ_REGEX): Don't require AM_LANGINFO_CODESET.
6484         * modules/regex (FILES): Remove m4/codeset.m4.
6485         (Depends-on): Add localcharset.  Remove strcase.
6486
6487 2007-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6488
6489         * m4/unlinkdir.m4 (gl_UNLINKDIR): Fix m4 quoting bug.
6490         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
6491
6492 2007-02-13  Bruno Haible  <bruno@clisp.org>
6493
6494         * m4/intdiv0.m4 (gt_INTDIV0): Assume ANSI C. Fix underquoting bug.
6495         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6496
6497 2007-02-12  Bruno Haible  <bruno@clisp.org>
6498
6499         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
6500         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): If
6501         GNULIB_POSIXCHECK and the gnulib module not enabled, provoke a link-
6502         time warning rather than a link error.
6503
6504 2007-02-12  Bruno Haible  <bruno@clisp.org>
6505
6506         * m4/locale-fr.m4 (gt_LOCALE_FR): Fix m4 quoting bug.
6507         * m4/locale-zh.m4 (gt_LOCALE_ZH_CN): Likewise.
6508         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6509
6510 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
6511
6512         * lib/string_.h (strncasecmp): Fix typo: this macro takes 3
6513         args, not 2.
6514
6515 2007-02-12  Paul Eggert  <eggert@cs.ucla.edu>
6516
6517         New module 'time', so that apps can include <time.h> as per
6518         POSIX and GNU instead of separate include files like time_r.h
6519         and timegm.h.  This implementation tries out a simpler approach
6520         for replacing decls in standard include files (as compared to
6521         the string module), somewhat as an experiment.
6522
6523         * config/srclist.txt: Comment out mktime.c for now.
6524         * doc/gnulib-tool.texi (Initial import): Don't use time_r as an example
6525         since it doesn't apply any more.  Use generic wording instead.
6526         * MODULES.html.sh (Support for systems lacking POSIX:2001): New module
6527         'time'.
6528         * lib/time_.h, m4/time_h.m4, modules/time: New files.
6529         * lib/strptime.h, lib/time_r.h, lib/timegm.h: Remove.
6530         * lib/mktime.c: Include config.h depending on _LIBC, not HAVE_CONFIG_H.
6531         Don't include <sys/types.h>; no longer needed since we assume C89.
6532         * lib/mktime.c: Don't include "time_r.h"; no longer needed.
6533         * lib/strftime.c: Likewise.
6534         * lib/time_r.c: Likewise.
6535         * lib/nanosleep.c (nanosleep): #undef after include files, not before.
6536         * lib/nanosleep.c: Include <time.h> first, to check interface.
6537         * lib/strptime.c: Likewise.
6538         * lib/time_r.c: Likewise.
6539         * lib/timegm.c: Likewise.
6540         * lib/strptime.c: Don't include strptime.h or time_r.h; no longer
6541         needed.
6542         * lib/timegm.c: Don't include timegm.h; no longer needed.
6543         * lib/timespec.h: Don't include <sys/time.h> before <time.h>;
6544         time.h now handles any problems in that area.
6545         (struct timespec, nanosleep): Remove; time.h now arranges for these.
6546         * lib/xnanosleep.c: Don't include timespec.h; no longer needed now
6547         that time.h defines struct timespec.
6548         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Check that nanosleep is declared.
6549         Set REPLACE_NANOSLEEP.  Don't AC_DEFINE nanosleep; the time module now
6550         handles that.
6551         * m4/strptime.m4 (gl_FUNC_STPRTIME): Set REPLACE_STRPTIME.
6552         * m4/time_r.m4 (gl_TIME_R): Don't define HAVE_TIME_R_POSIX; no longer
6553         needed.  Set REPLACE_LOCALTIME.
6554         * m4/timegm.m4 (gl_FUNC_TIMEGM): Set REPLACE_TIMEGM.
6555         * m4/timespec.m4 (gl_CHECK_TYPE_STRUCT_TIMESPEC): Move to time_h.m4.
6556         (gl_TIMESPEC): Don't check for sys/time.h or struct timespec or
6557         nanosleep; time_h.m4 now does that.  Don't require
6558         gl_USE_SYSTEM_EXTENSIONS; no longer needed directly, and the time
6559         module handles this now.
6560         * modules/getdate (Depends-on): Remove timespec.  Add time.
6561         * modules/nanosleep (Depends-on): Likewise.
6562         * modules/stat-time (Depends-on): Likewise.
6563         * modules/nanosleep (Include): Include time.h, not timespec.h.
6564         * modules/strptime (Files): Remove lib/strptime.h.
6565         (Depends-on): Add extensions, time.
6566         (Include): Include time.h, not strptime.h.
6567         * modules/time_r (Files): Remove lib/time_r.h.
6568         (Depends-on): Add time.
6569         (Include): Include time.h, not time_r.h.
6570         * modules/timegm: Likewise.
6571         * modules/timespec (Description): Now does timespec-related decls
6572         of our own, instead of struct timespec itself.
6573         (Depends-on): Add time; remove extensions.
6574         (Maintainer): Add self.
6575         * modules/utimecmp (Depends-on): Add time; remove timespec.
6576         * modules/utimens (Depends-on): Likewise.
6577         * modules/xnanosleep (Depends-on): Likewise.
6578
6579 2007-02-11  Bruno Haible  <bruno@clisp.org>
6580
6581         * lib/c-strstr.c: Include allocsa.h.
6582         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
6583         * lib/c-strcasestr.c: Include allocsa.h.
6584         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
6585         * lib/strcasestr.c: Include allocsa.h.
6586         (knuth_morris_pratt): Use allocsa/freesa instead of malloc/free.
6587         * lib/mbsstr.c: Include allocsa.h.
6588         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
6589         allocsa/freesa instead of malloc/free.
6590         * lib/mbscasestr.c: Include allocsa.h.
6591         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): Use
6592         allocsa/freesa instead of malloc/free.
6593         * modules/c-strstr (Depends-on): Add allocsa.
6594         * modules/c-strcasestr (Depends-on): Likewise.
6595         * modules/strcasestr (Depends-on): Likewise.
6596         * modules/mbsstr (Depends-on): Likewise.
6597         * modules/mbscasestr (Depends-on): Likewise.
6598
6599 2007-02-11  Bruno Haible  <bruno@clisp.org>
6600
6601         * lib/mbsspn.c (mbsspn): Fix bug. Remove unnecessary strlen call.
6602
6603         * modules/mbsspn-tests: New file.
6604         * tests/test-mbsspn.sh: New file.
6605         * tests/test-mbsspn.c: New file.
6606
6607 2007-02-11  Bruno Haible  <bruno@clisp.org>
6608
6609         * lib/mbspbrk.c (mbspbrk): Remove unneeded cast.
6610
6611         * modules/mbspbrk-tests: New file.
6612         * tests/test-mbspbrk.sh: New file.
6613         * tests/test-mbspbrk.c: New file.
6614
6615 2007-02-11  Bruno Haible  <bruno@clisp.org>
6616
6617         * lib/mbscspn.c (mbscspn): Remove unnecessary strlen call and
6618         unneeded cast.
6619
6620         * modules/mbscspn-tests: New file.
6621         * tests/test-mbscspn.sh: New file.
6622         * tests/test-mbscspn.c: New file.
6623
6624 2007-02-11  Bruno Haible  <bruno@clisp.org>
6625
6626         * modules/mbscasecmp-tests: New file.
6627         * tests/test-mbscasecmp.sh: New file.
6628         * tests/test-mbscasecmp.c: New file.
6629
6630 2007-02-11  Bruno Haible  <bruno@clisp.org>
6631
6632         Ensure O(n) worst-case complexity of mbscasestr.
6633         * lib/mbscasestr.c: Include stdbool.h.
6634         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
6635         functions.
6636         (mbscasestr): Add some bookkeeping. Invoke knuth_morris_pratt_* when
6637         the bookkeeping indicates that it's worth it.
6638         * modules/mbscasestr (Depends-on): Add stdbool, mbslen, strnlen.
6639
6640         * modules/mbscasestr-tests: New file.
6641         * tests/test-mbscasestr1.c: New file.
6642         * tests/test-mbscasestr2.sh: New file.
6643         * tests/test-mbscasestr2.c: New file.
6644         * tests/test-mbscasestr3.sh: New file.
6645         * tests/test-mbscasestr3.c: New file.
6646         * tests/test-mbscasestr4.sh: New file.
6647         * tests/test-mbscasestr4.c: New file.
6648         * m4/locale-tr.m4: New file.
6649
6650 2007-02-11  Bruno Haible  <bruno@clisp.org>
6651
6652         Ensure O(n) worst-case complexity of mbsstr.
6653         * lib/mbsstr.c: Include stdbool.h.
6654         (knuth_morris_pratt_unibyte, knuth_morris_pratt_multibyte): New
6655         functions.
6656         (mbsstr): Add some bookkeeping. Invoke knuth_morris_pratt_* when the
6657         bookkeeping indicates that it's worth it.
6658         * modules/mbsstr (Depends-on): Add stdbool, mbslen, strnlen.
6659
6660         * modules/mbsstr-tests: New file.
6661         * tests/test-mbsstr1.c: New file.
6662         * tests/test-mbsstr2.sh: New file.
6663         * tests/test-mbsstr2.c: New file.
6664         * tests/test-mbsstr3.sh: New file.
6665         * tests/test-mbsstr3.c: New file.
6666         * m4/locale-fr.m4: New file.
6667
6668 2007-02-11  Bruno Haible  <bruno@clisp.org>
6669
6670         * lib/mbsrchr.c (mbsrchr): Fix bug.
6671
6672         * modules/mbsrchr-tests: New file.
6673         * tests/test-mbsrchr.sh: New file.
6674         * tests/test-mbsrchr.c: New file.
6675
6676 2007-02-11  Bruno Haible  <bruno@clisp.org>
6677
6678         * lib/mbschr.c (mbschr): Fix bug.
6679
6680         * modules/mbschr-tests: New file.
6681         * tests/test-mbschr.sh: New file.
6682         * tests/test-mbschr.c: New file.
6683         * m4/locale-zh.m4: New file.
6684
6685 2007-02-11  Bruno Haible  <bruno@clisp.org>
6686
6687         Support for copying multibyte string iterators.
6688         * lib/mbiter.h: Include <string.h>.
6689         (mbiter_multi_copy): New function.
6690         (mbi_copy): New macro.
6691         * lib/mbuiter.h: Include <string.h>.
6692         (mbuiter_multi_copy): New function.
6693         (mbui_copy): New macro.
6694
6695 2007-02-11  Bruno Haible  <bruno@clisp.org>
6696
6697         New module mbslen.
6698         * modules/mbslen: New file.
6699         * lib/mbslen.c: New file.
6700         * lib/string_.h (mbslen): New declaration.
6701         * m4/mbslen.m4: New file.
6702         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6703         GNULIB_MBSLEN.
6704         * modules/string (string.h): Also substitute GNULIB_MBSLEN.
6705         * MODULES.html.sh (Internationalization functions): Add mbslen.
6706
6707 2007-02-11  Bruno Haible  <bruno@clisp.org>
6708
6709         Ensure O(n) worst-case complexity of strcasestr substitute.
6710         * lib/strcasestr.c: Include stdbool.h.
6711         (knuth_morris_pratt): New function.
6712         (strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when the
6713         bookkeeping indicates that it's worth it.
6714         * modules/strcasestr (Depends-on): Add stdbool, strnlen.
6715
6716         * modules/strcasestr-tests: New file.
6717         * tests/test-strcasestr.c: New file.
6718
6719 2007-02-11  Bruno Haible  <bruno@clisp.org>
6720
6721         Ensure O(n) worst-case complexity of c_strcasestr.
6722         * lib/c-strcasestr.c: Include stdbool.h, string.h.
6723         (knuth_morris_pratt): New function.
6724         (c_strcasestr): Add some bookkeeping. Invoke knuth_morris_pratt when
6725         the bookkeeping indicates that it's worth it.
6726         * modules/c-strcasestr (Depends-on): Add stdbool, strnlen.
6727
6728         * modules/c-strcasestr-tests: New file.
6729         * tests/test-c-strcasestr.c: New file.
6730
6731 2007-02-11  Bruno Haible  <bruno@clisp.org>
6732
6733         Ensure O(n) worst-case complexity of c_strstr.
6734         * lib/c-strstr.c: Include stdbool.h, string.h.
6735         (knuth_morris_pratt): New function.
6736         (c_strstr): Add some bookkeeping. Invoke knuth_morris_pratt when the
6737         bookkeeping indicates that it's worth it.
6738         * modules/c-strstr (Depends-on): Add stdbool, strnlen.
6739
6740         * lib/c-strstr.c: Complete rewrite for maintainability.
6741
6742         * modules/c-strstr-tests: New file.
6743         * tests/test-c-strstr.c: New file.
6744
6745 2007-02-11  Bruno Haible  <bruno@clisp.org>
6746
6747         * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils
6748         5.2.1 and earlier, whereby \055 was treated just like the range
6749         delimiter '-'.
6750         Reported by Joel E. Denny <jdenny@ces.clemson.edu>.
6751
6752 2007-02-08  Bruno Haible  <bruno@clisp.org>
6753
6754         * modules/regex (Depends-on): Add stdbool.
6755         Reported by Dalibor Topic <robilad@kaffe.org>.
6756
6757 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
6758
6759         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
6760         Prefer returning from main to exiting from it.
6761         Remove unnecessary parens after sizeof.
6762
6763 2007-02-05  Bruno Haible  <bruno@clisp.org>
6764
6765         New module mbssep.
6766         * modules/mbssep: New file.
6767         * lib/mbssep.c: New file.
6768         * lib/string_.h (strsep): Add a conditional link warning.
6769         (mbssep): New declaration.
6770         * m4/mbssep.m4: New file.
6771         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6772         GNULIB_MBSSEP.
6773         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
6774         * MODULES.html.sh (Internationalization functions): Add mbssep.
6775
6776 2007-02-05  Bruno Haible  <bruno@clisp.org>
6777
6778         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
6779         Optimize search in case of 1 delimiter.
6780
6781 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
6782
6783         * lib/acl.h: Include sys/types.h before sys/acl.h.
6784
6785 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
6786
6787         Merge upstream fix for glibc bugzilla #3957:
6788
6789         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
6790
6791         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
6792         bit for RE_HAT_LISTS_NOT_NEWLINE.
6793         (build_charclass_op): Remove bogus comment.
6794
6795 2007-02-05  Simon Josefsson  <simon@josefsson.org>
6796
6797         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
6798
6799 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
6800
6801         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
6802         * lib/memmem.c [!defined _LIBC]: Include config.h.
6803
6804 2007-02-04  Bruno Haible  <bruno@clisp.org>
6805
6806         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
6807         warning message.
6808
6809 2007-02-04  Bruno Haible  <bruno@clisp.org>
6810
6811         New module mbstok_r.
6812         * modules/mbstok_r: New file.
6813         * lib/mbstok_r.c: New file.
6814         * lib/string_.h (strtok_r): Change argument names to match the
6815         comments. Add a conditional link warning.
6816         (mbstok_r): New declaration.
6817         * m4/mbstok_r.m4: New file.
6818         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6819         GNULIB_MBSTOK_R.
6820         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
6821         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
6822
6823 2007-02-04  Bruno Haible  <bruno@clisp.org>
6824
6825         New module mbsspn.
6826         * modules/mbsspn: New file.
6827         * lib/mbsspn.c: New file.
6828         * lib/string_.h (strspn): Add a conditional link warning.
6829         (mbsspn): New declaration.
6830         * m4/mbsspn.m4: New file.
6831         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6832         GNULIB_MBSSPN.
6833         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
6834         * MODULES.html.sh (Internationalization functions): Add mbsspn.
6835
6836 2007-02-04  Bruno Haible  <bruno@clisp.org>
6837
6838         New module mbspbrk.
6839         * modules/mbspbrk: New file.
6840         * lib/mbspbrk.c: New file.
6841         * lib/string_.h (strpbrk): Add a conditional link warning.
6842         (mbspbrk): New declaration.
6843         * m4/mbspbrk.m4: New file.
6844         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6845         GNULIB_MBSPBRK.
6846         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
6847         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
6848
6849 2007-02-04  Bruno Haible  <bruno@clisp.org>
6850
6851         New module mbscspn.
6852         * modules/mbscspn: New file.
6853         * lib/mbscspn.c: New file.
6854         * lib/string_.h (strcspn): Add a conditional link warning.
6855         (mbscspn): New declaration.
6856         * m4/mbscspn.m4: New file.
6857         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6858         GNULIB_MBSCSPN.
6859         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
6860         * MODULES.html.sh (Internationalization functions): Add mbscspn.
6861
6862 2007-02-04  Bruno Haible  <bruno@clisp.org>
6863
6864         New module mbscasestr, reduced goal of strcasestr.
6865         * modules/mbscasestr: New file.
6866         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
6867         (mbscasestr): Renamed from strcasestr.
6868         * lib/strcasestr.c: Don't include mbuiter.h.
6869         (strcasestr): Remove support for multibyte locales.
6870         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
6871         Change the conditional link warning.
6872         (mbscasestr): New declaration.
6873         * m4/mbscasestr.m4: New file.
6874         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
6875         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
6876         REPLACE_STRCASESTR.
6877         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
6878         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
6879         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
6880         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
6881         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
6882         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
6883         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
6884         (Depends-on): Remove mbuiter.
6885         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
6886
6887 2007-02-04  Bruno Haible  <bruno@clisp.org>
6888
6889         Simplify handling of strncasecmp.
6890         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
6891         the conditional link warning.
6892         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
6893         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
6894         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
6895         * modules/strcase (configure.ac): Don't invoke
6896         gl_STRING_MODULE_INDICATOR.
6897         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
6898
6899 2007-02-04  Bruno Haible  <bruno@clisp.org>
6900
6901         New module mbscasecmp, reduced goal of strcasecmp.
6902         * modules/mbscasecmp: New file.
6903         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
6904         (mbscasecmp): Renamed from strcasecmp.
6905         * lib/strcasecmp.c: Don't include mbuiter.h.
6906         (strcasecmp): Remove support for multibyte locales.
6907         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
6908         Change the conditional link warning.
6909         (mbscasecmp): New declaration.
6910         * m4/mbscasecmp.m4: New file.
6911         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
6912         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
6913         REPLACE_STRCASECMP.
6914         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
6915         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6916         GNULIB_MBSCASECMP.
6917         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
6918         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
6919         * modules/strcase (Files): Remove m4/mbrtowc.m4.
6920         (Depends-on): Remove mbuiter.
6921         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
6922
6923 2007-02-04  Bruno Haible  <bruno@clisp.org>
6924
6925         New module mbsstr. Remove module strstr.
6926         * modules/mbsstr: New file.
6927         * modules/strstr: Remove file.
6928         * lib/mbsstr.c: Renamed from lib/strstr.c.
6929         (mbsstr): Renamed from strstr.
6930         * lib/string_.h (strstr): Remove declaration. Change the conditional
6931         link warning.
6932         (mbsstr): New declaration.
6933         * m4/mbsstr.m4: New file.
6934         * m4/strstr.m4: Remove file.
6935         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
6936         REPLACE_STRSTR.
6937         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
6938         Don't initialize GNULIB_STRSTR.
6939         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
6940         substitute GNULIB_STRSTR and REPLACE_STRSTR.
6941         * MODULES.html.sh (Internationalization functions): Add mbsstr.
6942         (Support for systems lacking ANSI C 89): Remove strstr.
6943
6944 2007-02-04  Bruno Haible  <bruno@clisp.org>
6945
6946         New module mbsrchr.
6947         * modules/mbsrchr: New file.
6948         * lib/mbsrchr.c: New file.
6949         * lib/string_.h (strrchr): Add a conditional link warning.
6950         (mbsrchr): New declaration.
6951         * m4/mbsrchr.m4: New file.
6952         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6953         GNULIB_MBSRCHR.
6954         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
6955         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
6956
6957 2007-02-04  Bruno Haible  <bruno@clisp.org>
6958
6959         New module mbschr.
6960         * modules/mbschr: New file.
6961         * lib/mbschr.c: New file.
6962         * lib/string_.h (strchr): Add a conditional link warning.
6963         (mbschr): New declaration.
6964         * m4/mbschr.m4: New file.
6965         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
6966         GNULIB_MBSCHR.
6967         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
6968         * MODULES.html.sh (Internationalization functions): Add mbschr.
6969
6970 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
6971
6972         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
6973
6974         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
6975
6976 2007-02-04  Bruno Haible  <bruno@clisp.org>
6977
6978         New module description section 'configure.ac-early'.
6979         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
6980         (func_get_autoconf_early_snippet): New function.
6981         (func_import, func_create_testdir): Use it. Remove special cases for
6982         modules 'extensions' and 'lock'.
6983         * modules/extensions (configure.ac-early): Require
6984         gl_USE_SYSTEM_EXTENSIONS.
6985         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
6986
6987 2007-02-04  Bruno Haible  <bruno@clisp.org>
6988
6989         Make use of gcj-4.3's -fsource and -ftarget option.
6990         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
6991         and if so try the options -fsource and -ftarget.
6992         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
6993         source_version, ftarget_option, target_version arguments.
6994         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
6995         (is_envjavac_oldgcj_14_14_usable): Renamed from
6996         is_envjavac_gcj_14_14_usable.
6997         (is_envjavac_oldgcj_14_13_usable): Renamed from
6998         is_envjavac_gcj_14_13_usable.
6999         (is_gcj_present): Update.
7000         (is_gcj_43, is_gcj43_usable): New functions.
7001         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
7002         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
7003         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
7004         try the options -fsource and -ftarget.
7005
7006 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
7007
7008         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
7009         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
7010         larger value.
7011
7012 2007-02-03  Jim Meyering  <jim@meyering.net>
7013
7014         Give tools a better chance to allocate space for very large buffers.
7015         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
7016
7017         Make pwd and readlink work also when run with an unreadable parent dir
7018         on systems with openat support.
7019         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
7020         provided getcwd function, even when we have openat support.
7021         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
7022
7023 2007-02-02  Bruno Haible  <bruno@clisp.org>
7024
7025         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
7026         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
7027         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
7028         portability problems if one of these functions is only used on specific
7029         platforms.
7030         Reported by Paul Eggert.
7031
7032 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
7033
7034         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
7035         is causing more trouble than it's curing.
7036         * lib/regex_internal.h (__mempcpy): Remove.
7037         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
7038         (and make the code a tad smaller to boot).
7039         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
7040
7041 2007-02-02  Jim Meyering  <jim@meyering.net>
7042
7043         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
7044         section, not in the Makefile.am: one.
7045
7046 2007-02-02  Eric Blake  <ebb9@byu.net>
7047
7048         * lib/strchrnul.c: Always include config.h first.
7049
7050         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
7051         gnulib strstr is not necessary here.
7052
7053 2007-02-02  Simon Josefsson  <simon@josefsson.org>
7054
7055         * m4/socklen.m4: Fix typo.
7056
7057 2007-02-02  Eric Blake  <ebb9@byu.net>
7058
7059         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
7060         * modules/netinet_in (Makefile.am): Likewise.
7061
7062 2007-02-01  Bruno Haible  <bruno@clisp.org>
7063
7064         * lib/string_.h (GL_LINK_WARNING): New macro.
7065         (strcasecmp, strstr, strcasestr): If provided by the system,
7066         conditionally define as a macro that leads to a warning instead of to
7067         an error.
7068         (strncasecmp): Conditionally define as a macro that leads to a warning.
7069
7070 2007-02-01  Karl Berry  <karl@gnu.org>
7071
7072         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
7073
7074 2007-02-01  Bruno Haible  <bruno@clisp.org>
7075
7076         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
7077         renamings.
7078
7079 2007-02-01  Eric Blake  <ebb9@byu.net>
7080
7081         * modules/regex (Depends-on): Revert dependence on mempcpy.
7082         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
7083         module's definition of mempcpy.
7084         Reported by Paul Eggert.
7085
7086 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
7087
7088         * lib/string_.h: If the gnulib module XYZ is not present, undefine
7089         the symbol XYZ before redefining it.  This fixes a problem with
7090         programs that don't use XYZ, when compiled on systems that define
7091         XYZ to something else.
7092
7093 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
7094
7095         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
7096         occurs when "mkdir -m foo" creates a setgid directory that is (1)
7097         writeable to group or other and (2) is intended to have a special
7098         mode bit that is set or cleared.  In such a case, the directory
7099         should be neither group- nor other-writeable until the special
7100         mode bits are right.
7101
7102 2007-01-31  Eric Blake  <ebb9@byu.net>
7103
7104         * modules/mountlist (Depends-on): Add strstr.
7105
7106         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
7107         bug.
7108         * modules/string (Makefile.am): Remove redundant replacement.
7109         * modules/regex (Depends-on): Add mempcpy.
7110
7111 2007-01-31  Bruno Haible  <bruno@clisp.org>
7112
7113         New module description field 'Link'.
7114         * gnulib-tool (func_usage): Document --extract-link-directive.
7115         (sed_extract_prog): Recognize 'Link' directive.
7116         (func_get_link_directive): New function.
7117         (func_import): Show summary of link directives.
7118         Handle --extract-link-directive option.
7119         * modules/acl (Link): New section.
7120         * modules/clock-time (Link): New section.
7121         * modules/euidaccess (Link): New section.
7122         * modules/gettext (Link): New section.
7123         * modules/iconv (Link): New section.
7124         * modules/lock (Link): New section.
7125         * modules/nanosleep (Link): New section.
7126         * modules/readline (Link): New section.
7127
7128 2007-01-27  Bruno Haible  <bruno@clisp.org>
7129
7130         Enforce the use of gnulib modules for unportable <string.h> functions.
7131         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
7132         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
7133         (gl_HEADER_STRING_H_BODY): Require it.
7134         * lib/string_.h: If the gnulib module XYZ is not present, redefine
7135         the symbol XYZ to one that gives a link error.
7136         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
7137         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
7138         * modules/mempcpy (configure.ac): Likewise.
7139         * modules/memrchr (configure.ac): Likewise.
7140         * modules/stpcpy (configure.ac): Likewise.
7141         * modules/stpncpy (configure.ac): Likewise.
7142         * modules/strcase (configure.ac): Likewise.
7143         * modules/strcasestr (configure.ac): Likewise.
7144         * modules/strchrnul (configure.ac): Likewise.
7145         * modules/strdup (configure.ac): Likewise.
7146         * modules/strndup (configure.ac): Likewise.
7147         * modules/strnlen (configure.ac): Likewise.
7148         * modules/strpbrk (configure.ac): Likewise.
7149         * modules/strsep (configure.ac): Likewise.
7150         * modules/strstr (configure.ac): Likewise.
7151         * modules/strtok_r (configure.ac): Likewise.
7152
7153 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
7154
7155         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
7156
7157 2007-01-30  Jim Meyering  <jim@meyering.net>
7158
7159         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
7160
7161 2007-01-29  Bruno Haible  <bruno@clisp.org>
7162
7163         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
7164         * lib/execute.c: Likewise.
7165         * lib/pipe.c: Likewise.
7166         * lib/printf-args.h: Likewise.
7167         * lib/printf-args.c: Likewise.
7168         * lib/printf-parse.c: Likewise.
7169         * lib/vasnprintf.c: Likewise.
7170
7171 2007-01-29  Eric Blake  <ebb9@byu.net>
7172
7173         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
7174         declaration.
7175
7176 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
7177
7178         * lib/strptime.h (strptime): Use 'restrict' for args where
7179         POSIX requires this.
7180         * lib/strptime.c (strptime): Likewise.
7181         Change license notice from LGPL to GPL, since gnulib-tool will
7182         change this as needed.
7183         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
7184         defined.
7185         Include "strptime.h" first, to check interface.
7186         Do not #undef _LIBC and _NL_CURRENT.
7187         Do not include <stdlib.h>; no longer needed.
7188         Include "time_r.h" and declare ptime_locale_status
7189         only if _LIBC is not defined.
7190         (__P): Remove unused macro.
7191         (match_string): Bring back glibc version, but use it only if _LIBC
7192         is defined.
7193         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
7194         Remove unnecessary assertion and abort() call.
7195         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
7196         * m4/strptime.m4: Fix serial number comment.
7197         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
7198         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
7199         (Depends-on): Add time_r.
7200
7201 2007-01-29  Bruno Haible  <bruno@clisp.org>
7202
7203         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
7204         strptime.
7205         * modules/strptime (Depends-on): Add stdbool.
7206         * lib/strptime.h: Include <time.h> always. Add comments.
7207
7208 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
7209
7210         * modules/strptime: New file.
7211         * lib/strptime.h: New file.
7212         * lib/strptime.c: New file.
7213         * m4/strptime.m4: New file.
7214
7215 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
7216
7217         * MODULES.html.sh: New module mpsort.
7218         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
7219
7220         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
7221         a circularity problem with HP-UX ia64 reported by Bob Proulx in
7222         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
7223         All uses changed.
7224         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
7225         All uses changed.
7226         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
7227         to _Restrict_.
7228         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
7229         the parameter matches the prototype.
7230
7231 2007-01-28  Jim Meyering  <jim@meyering.net>
7232
7233         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
7234         sys/time.h here, reverting that part of the previous patch:
7235         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
7236
7237 2007-01-28  Bruno Haible  <bruno@clisp.org>
7238
7239         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
7240         value of $(SYS_TIME_H).
7241         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
7242         remove it conditionally, too. [added by Jim Meyering]
7243         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
7244         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
7245         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
7246         GETTIMEOFDAY_REPLACEMENT to 1.
7247
7248 2007-01-28  Bruno Haible  <bruno@clisp.org>
7249
7250         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
7251         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
7252         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
7253         Set UNISTD_H instead of UNISTD_H2.
7254         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
7255
7256 2007-01-28  Bruno Haible  <bruno@clisp.org>
7257
7258         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
7259         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
7260
7261 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7262
7263         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
7264         (func_create_testdir): Ensure C locale for `grep' and `tr'
7265         character ranges.
7266         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
7267         ACLOCAL_AMFLAGS parsing state machine.
7268
7269 2007-01-27  Bruno Haible  <bruno@clisp.org>
7270
7271         * modules/unistr/base: Update.
7272
7273 2007-01-27  Bruno Haible  <bruno@clisp.org>
7274
7275         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
7276         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
7277         * modules/unistr/u32-mbtouc-unsafe: Renamed from
7278         modules/unistr/u32-mbtouc.
7279         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
7280         * lib/unistr.h: Update.
7281         * lib/linebreak.c: Update.
7282         * modules/unistr/u32-mbtouc: Renamed from
7283         modules/unistr/u32-mbtouc-safe.
7284         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
7285         * lib/unistr.h: Update.
7286         * lib/unistr/u32-to-u8.c: Update.
7287         * lib/unistr/u32-to-u16.c: Update.
7288
7289 2007-01-27  Bruno Haible  <bruno@clisp.org>
7290
7291         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
7292         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
7293         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
7294         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
7295         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
7296         * modules/unistr/u16-mbtouc-unsafe: Renamed from
7297         modules/unistr/u16-mbtouc.
7298         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
7299         * lib/unistr.h: Update.
7300         * lib/linebreak.c: Update.
7301         * modules/linebreak: Update.
7302         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
7303         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
7304         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
7305         * modules/unistr/u16-mbtouc: Renamed from
7306         modules/unistr/u16-mbtouc-safe.
7307         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
7308         * lib/unistr.h: Update.
7309         * lib/unistr/u16-to-u8.c: Update.
7310         * modules/unistr/u16-to-u8: Update.
7311         * lib/unistr/u16-to-u32.c: Update.
7312         * modules/unistr/u16-to-u32: Update.
7313
7314 2007-01-27  Bruno Haible  <bruno@clisp.org>
7315
7316         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
7317         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
7318         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
7319         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
7320         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
7321         * modules/unistr/u8-mbtouc-unsafe: Renamed from
7322         modules/unistr/u8-mbtouc.
7323         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
7324         * lib/unistr.h: Update.
7325         * lib/striconveh.c: Update.
7326         * modules/striconveh: Update.
7327         * lib/linebreak.c: Update.
7328         * modules/linebreak: Update.
7329         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
7330         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
7331         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
7332         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
7333         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
7334         * lib/unistr.h: Update.
7335         * lib/striconveh.c: Update.
7336         * modules/striconveh: Update.
7337         * lib/unistr/u8-to-u16.c: Update.
7338         * modules/unistr/u8-to-u16: Update.
7339         * lib/unistr/u8-to-u32.c: Update.
7340         * modules/unistr/u8-to-u32: Update.
7341
7342 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7343
7344         Sync from Libtool.
7345         * lib/argz.c: Do not include strings.h nor memory.h, include
7346         string.h unconditionally.  Patch by Simon Josefsson.
7347
7348 2007-01-27  Bruno Haible  <bruno@clisp.org>
7349
7350         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
7351         from gl_HEADER_STRING_H_BODY.
7352         (gl_HEADER_STRING_H_BODY): Require it.
7353         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
7354         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
7355         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
7356         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
7357         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
7358         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
7359         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
7360         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
7361         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
7362         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
7363         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
7364         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
7365         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
7366         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
7367         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
7368
7369 2007-01-27  Bruno Haible  <bruno@clisp.org>
7370
7371         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
7372         check_PROGRAMS into noinst_PROGRAMS.
7373         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
7374         check_PROGRAMS in this case.
7375         (func_import): Set for_test to false.
7376         (func_create_testdir): Set for_test to true.
7377
7378 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
7379             Bruno Haible  <bruno@clisp.org>
7380
7381         * modules/strcasestr (Files): Remove lib/strcasestr.h.
7382         (Depends-on): Add string.
7383         (Includes): Use <string.h> instead of strcasestr.h.
7384         * modules/string (Makefile.am): Also substitute the value of
7385         REPLACE_STRCASESTR.
7386         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
7387         assume strcasestr is declared in <string.h> not <strings.h>. Also
7388         set REPLACE_STRCASESTR.
7389         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
7390         REPLACE_STRCASESTR.
7391         * lib/strcasestr.h: Remove file.
7392         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
7393         * lib/string_.h (strcasestr): New declaration.
7394
7395 2007-01-27  Bruno Haible  <bruno@clisp.org>
7396
7397         * lib/string_.h: Use 'extern'.
7398
7399 2007-01-27  Jim Meyering  <jim@meyering.net>
7400
7401         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
7402         of set-but-not-used local, "q".
7403
7404         * lib/mempcpy.c: Include <config.h> before <string.h>.
7405         This fixes a compilation error on HP-UX, due to the system's
7406         "restrict"-using mempcpy prototype.
7407
7408 2007-01-26  Bruno Haible  <bruno@clisp.org>
7409
7410         Small optimization.
7411         * lib/javacomp.c: Include c-strstr.h.
7412          (is_envjavac_gcj): Use c_strstr instead of strstr.
7413         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
7414
7415 2007-01-26  Bruno Haible  <bruno@clisp.org>
7416
7417         * MODULES.html.sh (Unicode string functions): Add the new modules.
7418
7419         * modules/uniconv/u32-strconv-to-locale: New file.
7420         * lib/uniconv/u32-strconv-to-locale.c: New file.
7421
7422         * modules/uniconv/u16-strconv-to-locale: New file.
7423         * lib/uniconv/u16-strconv-to-locale.c: New file.
7424
7425         * modules/uniconv/u8-strconv-to-locale: New file.
7426         * lib/uniconv/u8-strconv-to-locale.c: New file.
7427
7428         * modules/uniconv/u32-strconv-from-locale: New file.
7429         * lib/uniconv/u32-strconv-from-locale.c: New file.
7430
7431         * modules/uniconv/u16-strconv-from-locale: New file.
7432         * lib/uniconv/u16-strconv-from-locale.c: New file.
7433
7434         * modules/uniconv/u8-strconv-from-locale: New file.
7435         * lib/uniconv/u8-strconv-from-locale.c: New file.
7436
7437         * modules/uniconv/u32-strconv-to-enc: New file.
7438         * lib/uniconv/u32-strconv-to-enc.c: New file.
7439         * modules/uniconv/u32-strconv-to-enc-tests: New file.
7440         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
7441
7442         * modules/uniconv/u16-strconv-to-enc: New file.
7443         * lib/uniconv/u16-strconv-to-enc.c: New file.
7444         * lib/uniconv/u-strconv-to-enc.h: New file.
7445         * modules/uniconv/u16-strconv-to-enc-tests: New file.
7446         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
7447
7448         * modules/uniconv/u8-strconv-to-enc: New file.
7449         * lib/uniconv/u8-strconv-to-enc.c: New file.
7450         * modules/uniconv/u8-strconv-to-enc-tests: New file.
7451         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
7452
7453         * modules/uniconv/u32-strconv-from-enc: New file.
7454         * lib/uniconv/u32-strconv-from-enc.c: New file.
7455         * modules/uniconv/u32-strconv-from-enc-tests: New file.
7456         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
7457
7458         * modules/uniconv/u16-strconv-from-enc: New file.
7459         * lib/uniconv/u16-strconv-from-enc.c: New file.
7460         * modules/uniconv/u16-strconv-from-enc-tests: New file.
7461         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
7462
7463         * modules/uniconv/u8-strconv-from-enc: New file.
7464         * lib/uniconv/u8-strconv-from-enc.c: New file.
7465         * lib/uniconv/u-strconv-from-enc.h: New file.
7466         * modules/uniconv/u8-strconv-from-enc-tests: New file.
7467         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
7468
7469         * modules/uniconv/u32-conv-from-enc: New file.
7470         * lib/uniconv/u32-conv-from-enc.c: New file.
7471         * modules/uniconv/u32-conv-from-enc-tests: New file.
7472         * tests/uniconv/test-u32-conv-from-enc.c: New file.
7473
7474         * modules/uniconv/u16-conv-from-enc: New file.
7475         * lib/uniconv/u16-conv-from-enc.c: New file.
7476         * lib/uniconv/u-conv-from-enc.h: New file.
7477         * modules/uniconv/u16-conv-from-enc-tests: New file.
7478         * tests/uniconv/test-u16-conv-from-enc.c: New file.
7479
7480         * modules/uniconv/u8-conv-from-enc: New file.
7481         * lib/uniconv/u8-conv-from-enc.c: New file.
7482         * modules/uniconv/u8-conv-from-enc-tests: New file.
7483         * tests/uniconv/test-u8-conv-from-enc.c: New file.
7484
7485         * modules/uniconv/base: New file.
7486         * lib/uniconv.h: New file.
7487
7488 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
7489
7490         * doc/gnulib-tool.texi (Initial import): Update to match current
7491         behavior with strdup module.
7492         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
7493         * lib/memmem.h: Remove; all uses removed.  This is now done
7494         by <string.h>.
7495         * lib/mempcpy.h: Likewise.
7496         * lib/memrchr.h: Likewise.
7497         * lib/stpcpy.h: Likewise.
7498         * lib/stpncpy.h: Likewise.
7499         * lib/strcase.h: Likewise.
7500         * lib/strchrnul.h: Likewise.
7501         * lib/strdup.h: Likewise.
7502         * lib/strndup.h: Likewise.
7503         * lib/strnlen.h: Likewise.
7504         * lib/strpbrk.h: Likewise.
7505         * lib/strsep.h: Likewise.
7506         * lib/strstr.h: Likewise.
7507         * lib/strtok_r.h: Likewise.
7508         * lib/string_.h: New file.
7509         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
7510         Rely on <string.h> instead.
7511         * lib/canon-host.c: Likewise.
7512         * lib/chdir-long.c: Likewise.
7513         * lib/concatpath.c: Likewise.
7514         * lib/exclude.c: Likewise.
7515         * lib/fchdir.c: Likewise.
7516         * lib/getaddrinfo.c: Likewise.
7517         * lib/getcwd.c: Likewise.
7518         * lib/getsubopt.c: Likewise.
7519         * lib/glob.c: Likewise.
7520         * lib/hard-locale.c: Likewise.
7521         * lib/iconvme.c: Likewise.
7522         * lib/javacomp.c: Likewise.
7523         * lib/mempcpy.c: Likewise.
7524         * lib/memrchr.c: Likewise.
7525         * lib/regex_internal.h: Likewise.
7526         * lib/stpncpy.c: Likewise.
7527         * lib/strcasecmp.c: Likewise.
7528         * lib/strchrnul.c: Likewise.
7529         * lib/strdup.c: Likewise.
7530         * lib/striconv.c: Likewise.
7531         * lib/striconveh.c: Likewise.
7532         * lib/striconveha.c: Likewise.
7533         * lib/strncasecmp.c: Likewise.
7534         * lib/strndup.c: Likewise.
7535         * lib/strnlen.c: Likewise.
7536         * lib/strsep.c: Likewise.
7537         * lib/strstr.c: Likewise.
7538         * lib/strtok_r.c: Likewise.
7539         * lib/userspec.c: Likewise.
7540         * lib/w32spawn.h: Likewise.
7541         * lib/xstrndup.c: Likewise.
7542         * lib/mountlist.c (strstr): Remove decl.
7543         * m4/string_h.m4: New file.
7544         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
7545         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
7546         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
7547         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
7548         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
7549         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
7550         Set REPLACE_STRCASECMP if necessary.
7551         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
7552         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
7553         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
7554         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
7555         HAVE_DECL_STRDUP if necessary.
7556         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
7557         since gl_FUNC_STRNDUP does that now.
7558         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
7559         Check for decl here...
7560         (gl_PREREQ_STRNLEN): ... not here.
7561         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
7562         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
7563         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
7564         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
7565         necessary.
7566         * modules/string: New file.
7567         * modules/memmem (Files): Remove special-purpose include file.
7568         (Depends-on): Add string.
7569         (Include): Include <string.h>, not the removed file.
7570         * modules/mempcpy: Likewise.
7571         * modules/memrchr: Likewise.
7572         * modules/stpcpy: Likewise.
7573         * modules/stpncpy: Likewise.
7574         * modules/strcase: Likewise.
7575         * modules/strchrnul: Likewise.
7576         * modules/strdup: Likewise.
7577         * modules/strndup: Likewise.
7578         * modules/strnlen: Likewise.
7579         * modules/strpbrk: Likewise.
7580         * modules/strsep: Likewise.
7581         * modules/strstr: Likewise.
7582         * modules/strtok_r: Likewise.
7583         * tests/test-dirname.c: Don't include "strdup.h", since
7584         <string.h> now suffices.
7585         * tests/test-memmem.c: Don't include "memmem.h", since
7586         <string.h> now suffices.
7587
7588 2007-01-25  Bruno Haible  <bruno@clisp.org>
7589
7590         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
7591         *resultp is 0.
7592
7593         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
7594         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
7595         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
7596         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
7597
7598         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
7599         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
7600         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
7601         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
7602         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
7603         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
7604
7605 2007-01-24  Bruno Haible  <bruno@clisp.org>
7606
7607         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
7608         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
7609         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
7610         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
7611         gl_FUNC_FTS_CORE.
7612         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
7613         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
7614         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
7615         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
7616         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
7617         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
7618         gl_FUNC_FCHOWNAT.
7619         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
7620         gl_FUNC_STRFTIME.
7621         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
7622         Reported by Ralf Wildenhues.
7623
7624 2007-01-24  Bruno Haible  <bruno@clisp.org>
7625
7626         Drop AC_REQUIRE calls that are redundant with the module dependencies.
7627         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
7628         gl_GETADDRINFO.
7629         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
7630         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
7631         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
7632
7633 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
7634
7635         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
7636         Don't use 'exit'; just return from 'main'.
7637         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
7638
7639         * lib/fnmatch_.h: Readjust white space and comments to match
7640         glibc, to avoid spurious diffs.
7641
7642 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
7643
7644         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
7645         2004-12-01 change by Jakub Jelinek, since this code won't compile
7646         if !LIBC.  Problem reported by Bob Proulx.
7647
7648 2007-01-23  Bruno Haible  <bruno@clisp.org>
7649
7650         * lib/striconveh.c: Include c-strcaseeq.h.
7651         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
7652         * modules/striconveh (Depends-on): Add c-strcaseeq.
7653
7654 2007-01-23  Bruno Haible  <bruno@clisp.org>
7655
7656         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
7657
7658         * modules/c-strcaseeq: New file.
7659         * lib/c-strcaseeq.h: New file.
7660
7661         * modules/streq: New file.
7662         * lib/streq.h: New file.
7663
7664 2007-01-23  Bruno Haible  <bruno@clisp.org>
7665
7666         * modules/striconveha-tests: New file.
7667         * tests/test-striconveha.c: New file.
7668
7669         * lib/striconveha.h: Include <stdbool.h>.
7670         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
7671         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
7672         (mem_iconveha_notranslit): Renamed from mem_iconveha.
7673         (mem_iconveha): New function.
7674         (str_iconveha_notranslit): Renamed from str_iconveha.
7675         (str_iconveha): New function.
7676         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
7677         c-strcase.
7678
7679 2007-01-23  Bruno Haible  <bruno@clisp.org>
7680
7681         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
7682         encodings without forgiving before trying any encoding with handler.
7683         (str_iconveha): Try all encodings without forgiving before trying any
7684         encoding with handler.
7685
7686 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
7687
7688         Import the following changes from libc.
7689
7690         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
7691
7692         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
7693
7694         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
7695
7696         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
7697         normal_bracket label.
7698
7699         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
7700
7701         [BZ #361]
7702         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
7703         to normal_bracket after fetching the next character.
7704
7705 2007-01-22  Bruno Haible  <bruno@clisp.org>
7706
7707         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
7708         argument.
7709         * lib/striconveh.c (iconv_carefully_1): New function.
7710         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
7711         argument.
7712         (str_cd_iconveh): Update.
7713         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
7714         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
7715         * tests/test-striconveh.c (MAGIC): New macro.
7716         (new_offsets): New function.
7717         (main): Test call with and without offsets.
7718
7719 2007-01-22  Bruno Haible  <bruno@clisp.org>
7720
7721         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
7722         * modules/sys_select (Makefile.am): Likewise.
7723         * modules/sys_socket (Makefile.am): Likewise.
7724         * modules/sys_time (Makefile.am): Likewise.
7725
7726 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
7727
7728         * modules/gettimeofday (License): Change from GPL to LGPL, since
7729         gettimeofday is a library function.
7730
7731 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7732
7733         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
7734
7735 2007-01-21  Bruno Haible  <bruno@clisp.org>
7736
7737         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
7738
7739 2007-01-21  Bruno Haible  <bruno@clisp.org>
7740
7741         * modules/striconveha: New file.
7742         * lib/striconveha.h: New file.
7743         * lib/striconveha.c: New file.
7744         * MODULES.html.sh (Internationalization functions): Add striconveha.
7745         * lib/striconv.c (str_iconv): Optimize the case of an empty input
7746         string.
7747         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
7748
7749 2007-01-21  Bruno Haible  <bruno@clisp.org>
7750
7751         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
7752         * lib/striconveh.c (str_iconveh): Likewise.
7753
7754 2007-01-21  Bruno Haible  <bruno@clisp.org>
7755
7756         * lib/striconveh.h (mem_iconveh): New declaration.
7757         * lib/striconveh.c (mem_iconveh): New function.
7758         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
7759
7760 2007-01-21  Bruno Haible  <bruno@clisp.org>
7761
7762         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
7763
7764         * lib/striconveh.h (mem_cd_iconveh): Change specification.
7765         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
7766         original result buffer.
7767         (str_cd_iconveh): Update.
7768         * tests/test-striconveh.c (main): Update.
7769
7770         * lib/striconv.h (mem_cd_iconv): Change specification.
7771         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
7772         result buffer.
7773         (str_cd_iconv): Update.
7774         * tests/test-striconv.c (main): Update.
7775
7776 2007-01-21  Bruno Haible  <bruno@clisp.org>
7777
7778         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
7779
7780 2007-01-20  Jim Meyering  <jim@meyering.net>
7781
7782         * lib/userspec.c (parse_with_separator): If a user or group string
7783         starts with "+", skip the corresponding name-to-ID look-up, since
7784         such a look-up must fail: user and group names may not include "+".
7785
7786 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
7787
7788         * lib/poll.c: Include sys/time.h and time.h unconditionally,
7789         since we now assume the sys_time module.
7790         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
7791         check for sys/time.h; no longer needed.
7792         * modules/poll (Depends-on): Depend on sys_time.
7793
7794 2007-01-18  Bruno Haible  <bruno@clisp.org>
7795
7796         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
7797         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
7798
7799         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
7800         gettimeofday.
7801
7802         * tests/test-gettimeofday.c: Include <time.h>.
7803         (dummy): Remove variable.
7804
7805         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
7806         gl_HEADER_SYS_TIME_H.
7807         (gl_HEADER_SYS_TIME_H): New macro.
7808
7809         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
7810         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7811         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
7812         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
7813         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7814         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
7815         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
7816         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7817         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
7818         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
7819         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7820
7821         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
7822         last change; it caused a compilation error when cross-compiling to
7823         Cygwin.
7824
7825 2007-01-18  Jim Meyering  <jim@meyering.net>
7826
7827         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
7828         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
7829         than the race-prone "test -d sys || mkdir sys".
7830         (configure.ac): Use AC_PROG_MKDIR_P.
7831         * modules/sys_select: Likewise.
7832         * modules/sys_socket: Likewise.
7833         * modules/sys_time: Likewise.
7834
7835 2007-01-18  Eric Blake  <ebb9@byu.net>
7836
7837         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
7838         replace gettimeofday.
7839         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
7840         name, to avoid infinite recursion.
7841
7842 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
7843
7844         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
7845         module sys_time.
7846         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
7847         assume timespec.h defines struct timeval.
7848         * lib/settime.c: Likewise.
7849         * lib/utimens.c: Likewise.
7850         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
7851         since we now assume the gettimeofday module.
7852         * lib/tempname.c (__gen_tempname): Likewise.
7853         * lib/gettimeofday.h: Remove.
7854         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
7855         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
7856         Include <time.h>, for 'time()'.
7857         (localtime_buffer_addr): Also use this workaround if
7858         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
7859         to simplify the uses.  All uses changed.
7860         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
7861         that #undef is inside {}, and 'const' follows type name consistently.
7862         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
7863         (gettimeofday): Do not use the maximum possible value for
7864         tv->tv_usec, since that might break usages other than ls.c.
7865         Instead, we'll leave ls.c alone.  This undoes today's patch
7866         by Bruno.  Add a compile-time warning for 1s-clock resolution;
7867         we've never observed the problem but might as well keep the
7868         canary.
7869         * lib/nanosleep.c: Include timespec.h first, for interface check.
7870         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
7871         now assume the sys_time module.
7872         * lib/tempname.c: Likewise.
7873         * lib/timespec.h: Likewise.
7874         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
7875         needed.
7876         * lib/strftime.c: Likewise.
7877         * lib/timespec.h: Likewise.
7878         * lib/posixtm.c: Include posixtm.h first, for interface check.
7879         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
7880         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
7881         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
7882         * lib/sys_time_.h: New file.
7883         * lib/timespec.h (struct timespec): Use long int, not long.
7884         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
7885         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
7886         Remove obsolescent call to AC_HEADER_TIME.
7887         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
7888         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
7889         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
7890         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
7891         Likewise.
7892         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
7893         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
7894         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
7895         into the sys_time module.  Check for gettimeofday just once.
7896         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
7897         for gettimeofday signature to just check the signature.  Merely
7898         compile it, since linking doesn't test signature.  Improve test for
7899         whether gettimeofday.o is actually needed.
7900         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
7901         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
7902         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
7903         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7904         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
7905         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
7906         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
7907         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
7908         than worrying about sys/time.h.
7909         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
7910         Don't bother worrying about TIME_WITH_SYS_TIME.
7911         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
7912         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
7913         * m4/sys_time_h.m4: New file.
7914         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
7915         Don't include sys/time.h.  Return from main rather than exiting.
7916         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
7917         all uses changed.
7918         * modules/gethrxtime (Depends-on): Add sys_time.
7919         * modules/gettime (Depends-on): Likewise.
7920         * modules/gettimeofday (Depends-on): Likewise.
7921         * modules/nanosleep (Depends-on): Likewise.
7922         * modules/settime (Depends-on): Likewise.
7923         * modules/tempname (Depends-on): Likewise.
7924         * modules/utimens (Depends-on): Likewise.
7925         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
7926         (Include:) Change back to <sys/time.h>.
7927         (Maintainer:) Add self.
7928         * modules/sys_time: New file.
7929         * modules/tempname (Depends-on): Add gettimeofday.
7930         * tests/test-gettimeofday.c: Include <sys/time.h>
7931         rather than gettimeofday.h.
7932
7933 2007-01-17  Bruno Haible  <bruno@clisp.org>
7934
7935         * gnulib-tool (func_get_license): Revert last patch. Instead, let
7936         the license default to GPL.
7937         (func_create_testdir): Don't complain if a module is LGPL and its
7938         tests module depends on GPLed modules.
7939
7940 2007-01-17  Bruno Haible  <bruno@clisp.org>
7941
7942         * lib/gettimeofday.c (gettimeofday): Add code for the case
7943         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
7944         maximum possible value for tv->tv_usec, rather than the minimum one.
7945
7946 2005-10-08  Martin Lambers  <marlam@marlam.de>
7947 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
7948 2007-01-16  Bruno Haible  <bruno@clisp.org>
7949
7950         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
7951         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
7952         gl_FUNC_GETTIMEOFDAY.
7953         (Include): Add gettimeofday.h.
7954         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
7955         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
7956         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
7957         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
7958         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
7959         * lib/gettimeofday.h: New file.
7960         * lib/gettimeofday.c: Include <sys/timeb.h>.
7961         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
7962         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
7963         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
7964         fall back on time().
7965
7966         * tests/test-gettimeofday.c: New file.
7967         * modules/gettimeofday-tests: New file.
7968
7969 2007-01-16  Eric Blake  <ebb9@byu.net>
7970
7971         * modules/fnmatch (Depends-on): Depend on wchar.
7972         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
7973         * m4/fnmatch.m4: Likewise.
7974         * modules/mbchar (Makefile.am): Assume <wchar.h>.
7975         * m4/mbchar.m4: Likewise.
7976         * modules/mbswidth (Depends-on): Depend on wchar.
7977         * lib/mbswidth.c: Assume <wchar.h>.
7978         * m4/mbswidth.m4: Likewise.
7979         * modules/quotearg (Depends-on): Depend on wchar.
7980         * lib/quotearg.c: Assume <wchar.h>.
7981         * m4/quotearg.m4: Likewise.
7982         * modules/regex (Depends-on): Depend on wchar.
7983         * lib/regex_internal.h: Assume <wchar.h>.
7984         * m4/regex.m4: Likewise.
7985         * modules/stdint (Depends-on): Depend on wchar.
7986         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
7987         * m4/stdint.m4: Likewise.
7988         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
7989         * modules/strftime (Depends-on): Depend on wchar.
7990         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
7991         * modules/strtol (Depends-on): Depend on wchar.
7992         * lib/strtol.c: Assume <wchar.h>.
7993         * modules/wcwidth (Depends-on): Depend on wchar.
7994         * lib/wcwidth.h: Assume <wchar.h>.
7995         * m4/wcwidth.m4: Likewise.
7996
7997 2007-01-16  Bruno Haible  <bruno@clisp.org>
7998
7999         * modules/csharpexec-script: New, created from...
8000         * modules/csharpexec: ... this.
8001
8002 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
8003
8004         * modules/javaexec-script: New, created from...
8005         * modules/javaexec: ... this.
8006
8007 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
8008
8009         * modules/poll (Dependencies): Add sys_select.
8010
8011 2007-01-15  Jim Meyering  <jim@meyering.net>
8012
8013         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
8014         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
8015         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
8016         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
8017
8018 2007-01-15  Bruno Haible  <bruno@clisp.org>
8019
8020         * modules/striconveh: New file.
8021         * lib/striconveh.h: New file.
8022         * lib/striconveh.c: New file.
8023         * MODULES.html.sh (Internationalization functions): Add striconveh.
8024
8025         * modules/striconveh-tests: New file.
8026         * tests/test-striconveh.c: New file.
8027
8028 2007-01-15  Bruno Haible  <bruno@clisp.org>
8029
8030         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
8031         not from GNU libiconv or GNU libc.
8032
8033 2007-01-15  Bruno Haible  <bruno@clisp.org>
8034
8035         * doc/gnulib-intro.texi (Copyright): Explain the different license
8036         terms for module descriptions, autoconf macros, tests, documentation.
8037
8038 2007-01-14  Bruno Haible  <bruno@clisp.org>
8039
8040         * modules/striconv-tests: New file.
8041         * tests/test-striconv.c: New file.
8042
8043 2007-01-14  Bruno Haible  <bruno@clisp.org>
8044
8045         * modules/iconv-tests: New file.
8046         * tests/test-iconv.c: New file.
8047
8048 2007-01-14  Bruno Haible  <bruno@clisp.org>
8049
8050         * gnulib-tool (func_get_license): For test modules, use the license of
8051         the main module.
8052
8053 2007-01-14  Bruno Haible  <bruno@clisp.org>
8054
8055         * modules/iconv (Include): Clarify that <iconv.h> can only be included
8056         if iconv is found to exist.
8057
8058 2007-01-14  Bruno Haible  <bruno@clisp.org>
8059
8060         * modules/c-ctype-tests: New file.
8061         * tests/test-c-ctype.c: New file.
8062
8063 2007-01-14  Bruno Haible  <bruno@clisp.org>
8064
8065         * modules/binary-io-tests: New file.
8066         * tests/test-binary-io.sh: New file.
8067         * tests/test-binary-io.c: New file.
8068
8069 2007-01-14  Bruno Haible  <bruno@clisp.org>
8070
8071         * modules/array-oset-tests: New file.
8072         * tests/test-array_oset.c: New file.
8073
8074 2007-01-14  Bruno Haible  <bruno@clisp.org>
8075
8076         * modules/array-list-tests: New file.
8077         * tests/test-array_list.c: New file.
8078
8079 2007-01-14  Bruno Haible  <bruno@clisp.org>
8080
8081         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
8082         and make.
8083         Reported by Simon Josefsson in
8084         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
8085
8086 2007-01-14  Bruno Haible  <bruno@clisp.org>
8087
8088         * modules/allocsa-tests: New file.
8089         * tests/test-allocsa.c: New file.
8090
8091 2007-01-14  Bruno Haible  <bruno@clisp.org>
8092
8093         * modules/fchdir (Depends-on): Add absolute-header.
8094         * modules/unistd (Depends-on): Likewise.
8095
8096 2006-12-30  Bruno Haible  <bruno@clisp.org>
8097
8098         * modules/fchdir: New file.
8099         * modules/unistd (Files): Add lib/unistd_.h.
8100         (Makefile.am): Generate unistd.h from unistd_.h.
8101         * lib/fchdir.c: New file.
8102         * lib/dirent_.h: New file.
8103         * lib/unistd_.h: New file.
8104         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
8105         * m4/fchdir.m4: New file.
8106         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
8107         (gl_HEADER_UNISTD): Invoke it.
8108         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
8109         function.
8110         * lib/backupfile.c (opendir, closedir): Undefine.
8111         * lib/chown.c (open, close): Undefine.
8112         * lib/clean-temp.c (open, close): Undefine.
8113         * lib/copy-file.c (open, close): Undefine.
8114         * lib/execute.c (open, close): Undefine.
8115         * lib/fsusage.c (open, close): Undefine.
8116         * lib/gc-gnulib.c (open, close): Undefine.
8117         * lib/getcwd.c (opendir, closedir): Undefine.
8118         * lib/glob.c (opendir, closedir): Undefine.
8119         * lib/javacomp.c (open, close): Undefine.
8120         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
8121         * lib/openat-proc.c (open, close): Undefine.
8122         * lib/pagealign_alloc.c (open, close): Undefine.
8123         * lib/pipe.c (open, close): Undefine.
8124         * lib/progreloc.c (open, close): Undefine.
8125         * lib/savedir.c (opendir, closedir): Undefine.
8126         * lib/utime.c (open, close): Undefine.
8127         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
8128
8129 2007-01-10  Bruno Haible  <bruno@clisp.org>
8130
8131         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
8132
8133 2007-01-12  Eric Blake  <ebb9@byu.net>
8134
8135         Provide a robust <wchar.h>.  Further simplifications are now
8136         possible in other modules, but not included here.
8137         * modules/wchar: New module.
8138         * m4/wchar.m4: New file.
8139         * lib/wchar_.h: Likewise.
8140         * modules/mbchar (Depends-on): Depend on wchar, as the first use
8141         of the new module.
8142         * MODULES.html.sh (Extended multibyte and wide character utilities):
8143         New section.
8144
8145 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
8146
8147         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
8148         to a reasonable default for memory allocation.
8149         (xreadlink): Don't allocate a huge buffer, to work around a buggy
8150         file system that reports garbage st_size values for symlinks.
8151         Problem reported by Liyang Hu.
8152
8153 2007-01-11  Simon Josefsson  <simon@josefsson.org>
8154
8155         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
8156         Emacs .#* auto-save files).
8157
8158 2007-01-11  Bruno Haible  <bruno@clisp.org>
8159
8160         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
8161         directory.
8162
8163 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
8164
8165         Use @...@ consistently in lib/wctype_.h.
8166         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
8167         on it being set to 1 or 0.
8168         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
8169         go back to AC_SUBSTing it.
8170         * modules/wctype (Makefile.am): Undo previous change.
8171
8172 2007-01-10  Eric Blake  <ebb9@byu.net>
8173
8174         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
8175         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
8176         * modules/wctype (Makefile.am): Likewise.
8177         Reported by Chris McGuire.
8178
8179 2007-01-10  Jim Meyering  <jim@meyering.net>
8180
8181         fts.c: a small readability/maintainability improvement
8182         * lib/fts.c (fts_read): Make this code slightly more readable and
8183         maintainable by hoisting the "sp->fts_cur = p" assignments to
8184         immediately follow the statements that set P.  Derived from
8185         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
8186
8187 2007-01-10  Eric Blake  <ebb9@byu.net>
8188
8189         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
8190         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
8191         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
8192         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
8193         Reported by Chris McGuire.
8194
8195 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8196
8197         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
8198         in sed script.
8199
8200 2007-01-09  Bruno Haible  <bruno@clisp.org>
8201
8202         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
8203         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
8204         variables.
8205         (func_module): Use them.
8206
8207 2007-01-09  Bruno Haible  <bruno@clisp.org>
8208
8209         * modules/unistr/base: New file.
8210         * lib/unistr.h: New file.
8211
8212         * modules/unistr/u8-to-u16: New file.
8213         * lib/unistr/u8-to-u16.c: New file.
8214
8215         * modules/unistr/u8-to-u32: New file.
8216         * lib/unistr/u8-to-u32.c: New file.
8217
8218         * modules/unistr/u16-to-u8: New file.
8219         * lib/unistr/u16-to-u8.c: New file.
8220
8221         * modules/unistr/u16-to-u32: New file.
8222         * lib/unistr/u16-to-u32.c: New file.
8223
8224         * modules/unistr/u32-to-u8: New file.
8225         * lib/unistr/u32-to-u8.c: New file.
8226
8227         * modules/unistr/u32-to-u16: New file.
8228         * lib/unistr/u32-to-u16.c: New file.
8229
8230         * modules/unistr/u8-check: New file.
8231         * modules/unistr/u16-check: New file.
8232         * modules/unistr/u32-check: New file.
8233         * lib/unistr/u8-check.c: New file.
8234         * lib/unistr/u16-check.c: New file.
8235         * lib/unistr/u32-check.c: New file.
8236
8237         * modules/unistr/u8-chr: New file.
8238         * modules/unistr/u16-chr: New file.
8239         * modules/unistr/u32-chr: New file.
8240         * lib/unistr/u8-chr.c: New file.
8241         * lib/unistr/u16-chr.c: New file.
8242         * lib/unistr/u32-chr.c: New file.
8243
8244         * modules/unistr/u8-cmp: New file.
8245         * modules/unistr/u16-cmp: New file.
8246         * modules/unistr/u32-cmp: New file.
8247         * lib/unistr/u8-cmp.c: New file.
8248         * lib/unistr/u16-cmp.c: New file.
8249         * lib/unistr/u32-cmp.c: New file.
8250
8251         * modules/unistr/u8-cpy: New file.
8252         * modules/unistr/u16-cpy: New file.
8253         * modules/unistr/u32-cpy: New file.
8254         * lib/unistr/u8-cpy.c: New file.
8255         * lib/unistr/u16-cpy.c: New file.
8256         * lib/unistr/u32-cpy.c: New file.
8257         * lib/unistr/u-cpy.h: New file.
8258
8259         * modules/unistr/u8-cpy-alloc: New file.
8260         * modules/unistr/u16-cpy-alloc: New file.
8261         * modules/unistr/u32-cpy-alloc: New file.
8262         * lib/unistr/u8-cpy-alloc.c: New file.
8263         * lib/unistr/u16-cpy-alloc.c: New file.
8264         * lib/unistr/u32-cpy-alloc.c: New file.
8265         * lib/unistr/u-cpy-alloc.h: New file.
8266
8267         * modules/unistr/u8-endswith: New file.
8268         * modules/unistr/u16-endswith: New file.
8269         * modules/unistr/u32-endswith: New file.
8270         * lib/unistr/u8-endswith.c: New file.
8271         * lib/unistr/u16-endswith.c: New file.
8272         * lib/unistr/u32-endswith.c: New file.
8273         * lib/unistr/u-endswith.h: New file.
8274
8275         * modules/unistr/u8-mblen: New file.
8276         * modules/unistr/u16-mblen: New file.
8277         * modules/unistr/u32-mblen: New file.
8278         * lib/unistr/u8-mblen.c: New file.
8279         * lib/unistr/u16-mblen.c: New file.
8280         * lib/unistr/u32-mblen.c: New file.
8281
8282         * modules/unistr/u8-mbtouc: New file.
8283         * modules/unistr/u16-mbtouc: New file.
8284         * modules/unistr/u32-mbtouc: New file.
8285         * lib/unistr/u8-mbtouc.c: New file.
8286         * lib/unistr/u16-mbtouc.c: New file.
8287         * lib/unistr/u32-mbtouc.c: New file.
8288
8289         * modules/unistr/u8-mbtouc-safe: New file.
8290         * modules/unistr/u16-mbtouc-safe: New file.
8291         * modules/unistr/u32-mbtouc-safe: New file.
8292         * lib/unistr/u8-mbtouc-safe.c: New file.
8293         * lib/unistr/u16-mbtouc-safe.c: New file.
8294         * lib/unistr/u32-mbtouc-safe.c: New file.
8295
8296         * modules/unistr/u8-move: New file.
8297         * modules/unistr/u16-move: New file.
8298         * modules/unistr/u32-move: New file.
8299         * lib/unistr/u8-move.c: New file.
8300         * lib/unistr/u16-move.c: New file.
8301         * lib/unistr/u32-move.c: New file.
8302         * lib/unistr/u-move.h: New file.
8303
8304         * modules/unistr/u8-next: New file.
8305         * modules/unistr/u16-next: New file.
8306         * modules/unistr/u32-next: New file.
8307         * lib/unistr/u8-next.c: New file.
8308         * lib/unistr/u16-next.c: New file.
8309         * lib/unistr/u32-next.c: New file.
8310
8311         * modules/unistr/u8-prev: New file.
8312         * modules/unistr/u16-prev: New file.
8313         * modules/unistr/u32-prev: New file.
8314         * lib/unistr/u8-prev.c: New file.
8315         * lib/unistr/u16-prev.c: New file.
8316         * lib/unistr/u32-prev.c: New file.
8317
8318         * modules/unistr/u8-set: New file.
8319         * modules/unistr/u16-set: New file.
8320         * modules/unistr/u32-set: New file.
8321         * lib/unistr/u8-set.c: New file.
8322         * lib/unistr/u16-set.c: New file.
8323         * lib/unistr/u32-set.c: New file.
8324         * lib/unistr/u-set.h: New file.
8325
8326         * modules/unistr/u8-startswith: New file.
8327         * modules/unistr/u16-startswith: New file.
8328         * modules/unistr/u32-startswith: New file.
8329         * lib/unistr/u8-startswith.c: New file.
8330         * lib/unistr/u16-startswith.c: New file.
8331         * lib/unistr/u32-startswith.c: New file.
8332         * lib/unistr/u-startswith.h: New file.
8333
8334         * modules/unistr/u8-stpcpy: New file.
8335         * modules/unistr/u16-stpcpy: New file.
8336         * modules/unistr/u32-stpcpy: New file.
8337         * lib/unistr/u8-stpcpy.c: New file.
8338         * lib/unistr/u16-stpcpy.c: New file.
8339         * lib/unistr/u32-stpcpy.c: New file.
8340         * lib/unistr/u-stpcpy.h: New file.
8341
8342         * modules/unistr/u8-stpncpy: New file.
8343         * modules/unistr/u16-stpncpy: New file.
8344         * modules/unistr/u32-stpncpy: New file.
8345         * lib/unistr/u8-stpncpy.c: New file.
8346         * lib/unistr/u16-stpncpy.c: New file.
8347         * lib/unistr/u32-stpncpy.c: New file.
8348         * lib/unistr/u-stpncpy.h: New file.
8349
8350         * modules/unistr/u8-strcat: New file.
8351         * modules/unistr/u16-strcat: New file.
8352         * modules/unistr/u32-strcat: New file.
8353         * lib/unistr/u8-strcat.c: New file.
8354         * lib/unistr/u16-strcat.c: New file.
8355         * lib/unistr/u32-strcat.c: New file.
8356         * lib/unistr/u-strcat.h: New file.
8357
8358         * modules/unistr/u8-strchr: New file.
8359         * modules/unistr/u16-strchr: New file.
8360         * modules/unistr/u32-strchr: New file.
8361         * lib/unistr/u8-strchr.c: New file.
8362         * lib/unistr/u16-strchr.c: New file.
8363         * lib/unistr/u32-strchr.c: New file.
8364
8365         * modules/unistr/u8-strcmp: New file.
8366         * modules/unistr/u16-strcmp: New file.
8367         * modules/unistr/u32-strcmp: New file.
8368         * lib/unistr/u8-strcmp.c: New file.
8369         * lib/unistr/u16-strcmp.c: New file.
8370         * lib/unistr/u32-strcmp.c: New file.
8371
8372         * modules/unistr/u8-strcpy: New file.
8373         * modules/unistr/u16-strcpy: New file.
8374         * modules/unistr/u32-strcpy: New file.
8375         * lib/unistr/u8-strcpy.c: New file.
8376         * lib/unistr/u16-strcpy.c: New file.
8377         * lib/unistr/u32-strcpy.c: New file.
8378         * lib/unistr/u-strcpy.h: New file.
8379
8380         * modules/unistr/u8-strcspn: New file.
8381         * modules/unistr/u16-strcspn: New file.
8382         * modules/unistr/u32-strcspn: New file.
8383         * lib/unistr/u8-strcspn.c: New file.
8384         * lib/unistr/u16-strcspn.c: New file.
8385         * lib/unistr/u32-strcspn.c: New file.
8386         * lib/unistr/u-strcspn.h: New file.
8387
8388         * modules/unistr/u8-strdup: New file.
8389         * modules/unistr/u16-strdup: New file.
8390         * modules/unistr/u32-strdup: New file.
8391         * lib/unistr/u8-strdup.c: New file.
8392         * lib/unistr/u16-strdup.c: New file.
8393         * lib/unistr/u32-strdup.c: New file.
8394         * lib/unistr/u-strdup.h: New file.
8395
8396         * modules/unistr/u8-strlen: New file.
8397         * modules/unistr/u16-strlen: New file.
8398         * modules/unistr/u32-strlen: New file.
8399         * lib/unistr/u8-strlen.c: New file.
8400         * lib/unistr/u16-strlen.c: New file.
8401         * lib/unistr/u32-strlen.c: New file.
8402         * lib/unistr/u-strlen.h: New file.
8403
8404         * modules/unistr/u8-strmblen: New file.
8405         * modules/unistr/u16-strmblen: New file.
8406         * modules/unistr/u32-strmblen: New file.
8407         * lib/unistr/u8-strmblen.c: New file.
8408         * lib/unistr/u16-strmblen.c: New file.
8409         * lib/unistr/u32-strmblen.c: New file.
8410
8411         * modules/unistr/u8-strmbtouc: New file.
8412         * modules/unistr/u16-strmbtouc: New file.
8413         * modules/unistr/u32-strmbtouc: New file.
8414         * lib/unistr/u8-strmbtouc.c: New file.
8415         * lib/unistr/u16-strmbtouc.c: New file.
8416         * lib/unistr/u32-strmbtouc.c: New file.
8417
8418         * modules/unistr/u8-strncat: New file.
8419         * modules/unistr/u16-strncat: New file.
8420         * modules/unistr/u32-strncat: New file.
8421         * lib/unistr/u8-strncat.c: New file.
8422         * lib/unistr/u16-strncat.c: New file.
8423         * lib/unistr/u32-strncat.c: New file.
8424         * lib/unistr/u-strncat.h: New file.
8425
8426         * modules/unistr/u8-strncmp: New file.
8427         * modules/unistr/u16-strncmp: New file.
8428         * modules/unistr/u32-strncmp: New file.
8429         * lib/unistr/u8-strncmp.c: New file.
8430         * lib/unistr/u16-strncmp.c: New file.
8431         * lib/unistr/u32-strncmp.c: New file.
8432
8433         * modules/unistr/u8-strncpy: New file.
8434         * modules/unistr/u16-strncpy: New file.
8435         * modules/unistr/u32-strncpy: New file.
8436         * lib/unistr/u8-strncpy.c: New file.
8437         * lib/unistr/u16-strncpy.c: New file.
8438         * lib/unistr/u32-strncpy.c: New file.
8439         * lib/unistr/u-strncpy.h: New file.
8440
8441         * modules/unistr/u8-strnlen: New file.
8442         * modules/unistr/u16-strnlen: New file.
8443         * modules/unistr/u32-strnlen: New file.
8444         * lib/unistr/u8-strnlen.c: New file.
8445         * lib/unistr/u16-strnlen.c: New file.
8446         * lib/unistr/u32-strnlen.c: New file.
8447         * lib/unistr/u-strnlen.h: New file.
8448
8449         * modules/unistr/u8-strpbrk: New file.
8450         * modules/unistr/u16-strpbrk: New file.
8451         * modules/unistr/u32-strpbrk: New file.
8452         * lib/unistr/u8-strpbrk.c: New file.
8453         * lib/unistr/u16-strpbrk.c: New file.
8454         * lib/unistr/u32-strpbrk.c: New file.
8455         * lib/unistr/u-strpbrk.h: New file.
8456
8457         * modules/unistr/u8-strrchr: New file.
8458         * modules/unistr/u16-strrchr: New file.
8459         * modules/unistr/u32-strrchr: New file.
8460         * lib/unistr/u8-strrchr.c: New file.
8461         * lib/unistr/u16-strrchr.c: New file.
8462         * lib/unistr/u32-strrchr.c: New file.
8463
8464         * modules/unistr/u8-strspn: New file.
8465         * modules/unistr/u16-strspn: New file.
8466         * modules/unistr/u32-strspn: New file.
8467         * lib/unistr/u8-strspn.c: New file.
8468         * lib/unistr/u16-strspn.c: New file.
8469         * lib/unistr/u32-strspn.c: New file.
8470         * lib/unistr/u-strspn.h: New file.
8471
8472         * modules/unistr/u8-strstr: New file.
8473         * modules/unistr/u16-strstr: New file.
8474         * modules/unistr/u32-strstr: New file.
8475         * lib/unistr/u8-strstr.c: New file.
8476         * lib/unistr/u16-strstr.c: New file.
8477         * lib/unistr/u32-strstr.c: New file.
8478         * lib/unistr/u-strstr.h: New file.
8479
8480         * modules/unistr/u8-strtok: New file.
8481         * modules/unistr/u16-strtok: New file.
8482         * modules/unistr/u32-strtok: New file.
8483         * lib/unistr/u8-strtok.c: New file.
8484         * lib/unistr/u16-strtok.c: New file.
8485         * lib/unistr/u32-strtok.c: New file.
8486         * lib/unistr/u-strtok.h: New file.
8487
8488         * modules/unistr/u8-uctomb: New file.
8489         * modules/unistr/u16-uctomb: New file.
8490         * modules/unistr/u32-uctomb: New file.
8491         * lib/unistr/u8-uctomb.c: New file.
8492         * lib/unistr/u16-uctomb.c: New file.
8493         * lib/unistr/u32-uctomb.c: New file.
8494
8495         * MODULES.html.sh (Unicode string functions): Add the new modules.
8496
8497 2007-01-08  Bruno Haible  <bruno@clisp.org>
8498
8499         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
8500         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
8501         subdirectories.
8502
8503 2007-01-08  Karl Berry  <karl@gnu.org>
8504
8505         * doc/error.texi: mention that main() fns must set program_name
8506         when progname is used.
8507
8508 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
8509
8510         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
8511         WCTYPE_H is empty, for the benefit of builds from non-distclean
8512         directories.  Problem reported by Eric Blake in
8513         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
8514
8515 2007-01-08  Bruno Haible  <bruno@clisp.org>
8516
8517         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
8518         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
8519         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
8520         PROVIDE_CANONICALIZE_FILENAME_MODE.
8521         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
8522
8523 2007-01-08  Bruno Haible  <bruno@clisp.org>
8524
8525         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
8526         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
8527         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
8528         * lib/fts.c: Likewise.
8529         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
8530
8531 2006-12-25  Bruno Haible  <bruno@clisp.org>
8532
8533         * modules/utf8-ucs4-safe: New file.
8534         * lib/utf8-ucs4-safe.h: New file.
8535         * lib/unistr/utf8-ucs4-safe.c: New file.
8536
8537         * modules/utf16-ucs4-safe: New file.
8538         * lib/utf16-ucs4-safe.h: New file.
8539         * lib/unistr/utf16-ucs4-safe.c: New file.
8540
8541         * MODULES.html.sh (Unicode string functions): Add the new modules.
8542
8543 2007-01-08  Bruno Haible  <bruno@clisp.org>
8544
8545         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
8546         (Depends-on): Add unitypes.
8547         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
8548         (u8_mbtouc_aux): Move out to separate file.
8549         (u8_mbtouc): Use ucs4_t, uint8_t types.
8550         * lib/unistr/utf8-ucs4.c: New file.
8551
8552         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
8553         (Depends-on): Add unitypes.
8554         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
8555         (u16_mbtouc_aux): Move out to separate file.
8556         (u16_mbtouc): Use ucs4_t, uint16_t types.
8557         * lib/unistr/utf16-ucs4.c: New file.
8558
8559         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
8560         (Depends-on): Add unitypes.
8561         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
8562         (u8_uctomb_aux): Move out to separate file.
8563         (u8_uctomb): Use ucs4_t, uint8_t types.
8564         * lib/unistr/ucs4-utf8.c: New file.
8565
8566         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
8567         (Depends-on): Add unitypes.
8568         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
8569         (u16_uctomb_aux): Move out to separate file.
8570         (u16_uctomb): Use ucs4_t, uint16_t types.
8571         * lib/unistr/ucs4-utf16.c: New file.
8572
8573 2006-12-25  Bruno Haible  <bruno@clisp.org>
8574
8575         * modules/unitypes: New file.
8576         * lib/unitypes.h: New file.
8577         * MODULES.html.sh (func_all_modules): New section "Unicode string
8578         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
8579         this section. Add unitypes.
8580
8581 2007-01-08  Bruno Haible  <bruno@clisp.org>
8582
8583         Avoid variable names that conflict with those from libtool.
8584         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
8585         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
8586         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
8587         library_names_spec to acl_library_names_spec, hardcode_* to
8588         acl_hardcode_*.
8589         Reported by Ralf Wildenhues.
8590
8591 2007-01-08  Bruno Haible  <bruno@clisp.org>
8592
8593         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
8594         definition.
8595         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
8596         definition.
8597         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
8598         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
8599         definition.
8600         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
8601         definition.
8602         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
8603         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
8604         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
8605         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
8606         definition.
8607         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
8608         definition.
8609         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
8610         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
8611         GC_USE_<algorithm>.
8612         * lib/gc-libgcrypt.c: Likewise.
8613         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
8614         * modules/gc-arctwo (configure.ac): Likewise.
8615         * modules/gc-des (configure.ac): Likewise.
8616         * modules/gc-hmac-md5 (configure.ac): Likewise.
8617         * modules/gc-hmac-sha1 (configure.ac): Likewise.
8618         * modules/gc-md2 (configure.ac): Likewise.
8619         * modules/gc-md4 (configure.ac): Likewise.
8620         * modules/gc-md5 (configure.ac): Likewise.
8621         * modules/gc-random (configure.ac): Likewise.
8622         * modules/gc-rijndael (configure.ac): Likewise.
8623         * modules/gc-sha1 (configure.ac): Likewise.
8624
8625 2007-01-08  Bruno Haible  <bruno@clisp.org>
8626
8627         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
8628         macro definition.
8629         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
8630         definition.
8631         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
8632         definition.
8633         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
8634         * modules/fcntl-safer (configure.ac): Likewise.
8635         * modules/fopen-safer (configure.ac): Likewise.
8636         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
8637         GNULIB_FWRITEERROR macro definition.
8638
8639 2007-01-08  Bruno Haible  <bruno@clisp.org>
8640
8641         * m4/gnulib-common.m4: New file.
8642         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
8643         (func_get_filelist): Add m4/gnulib-common.m4.
8644
8645 2007-01-08  Bruno Haible  <bruno@clisp.org>
8646
8647         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
8648         command.
8649
8650 2007-01-08  Jim Meyering  <jim@meyering.net>
8651
8652         Use a more robust test for a "can't happen" condition.
8653         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
8654         narrowed the st_size value.  Presuming the "can't happen" condition
8655         is true, that narrowing could conceivably convert an invalid st_size
8656         value into a valid one.  Instead, use a change based on Matthew
8657         Woehlke's original patch.
8658
8659         Slight readability improvement: use an assert-like macro
8660         in place of literal "abort ()" uses.
8661         * lib/fts.c (fts_assert): Define.
8662         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
8663         Use this macro instead of a bare 'abort'.
8664
8665 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
8666
8667         Don't worry about using IRIX 5.3's wctype.h broken definitions;
8668         simply work around them.
8669         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
8670         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
8671         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before
8672         declaring.
8673         Don't bother to define as macros, since the standard doesn't require it.
8674         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
8675         longer worry about IRIX 5.3.
8676         (HAVE_WCTYPE_CTMP_BUG): Remove.
8677
8678 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
8679
8680         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
8681         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
8682         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
8683         Problems reported by Georg Schwarz for IRIX 5.3.
8684
8685         * gnulib-tool (autoconf_minversion): Take the maximum version number
8686         found, not the minimum.  Problem reported by James Youngman.
8687
8688 2007-01-03  Karl Berry  <karl@gnu.org>
8689
8690         * doc/error.texi: new file, explaining interaction with progname.
8691         * doc/gnulib.texi: include it.  Update copyright.
8692
8693 2007-01-03  Simon Josefsson  <simon@josefsson.org>
8694
8695         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
8696         AC_CANONICAL_HOST, to improve autobuild outputs.
8697
8698 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
8699             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
8700
8701         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
8702         sockets, server sockets, and other file descriptors.  Count errors
8703         to compute the return value.  Reorder the code a bit to be easier
8704         to follow.  Don't set event bits that were not requested (except
8705         POLLERR and POLLHUP).
8706
8707 2007-01-01  Bruno Haible  <bruno@clisp.org>
8708
8709         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
8710
8711 2007-01-03  Jim Meyering  <jim@meyering.net>
8712
8713         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
8714
8715 2007-01-02  Bruno Haible  <bruno@clisp.org>
8716
8717         * modules/settime (Include): Require timespec.h.
8718         * modules/nanosleep (Include): Likewise.
8719
8720 2007-01-01  Bruno Haible  <bruno@clisp.org>
8721
8722         * gnulib-tool (func_emit_copyright_notice): Bump year.
8723         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
8724
8725 2007-01-01  Bruno Haible  <bruno@clisp.org>
8726
8727         Improve support for OpenBSD.
8728         * build-aux/config.rpath (libname_spec): Export.
8729         (library_names_spec): New variable. Export.
8730         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
8731         library_names_spec from the config.rpath output. Locate shared library
8732         through the name pattern in library_names_spec.
8733
8734 2007-01-01  Eric Blake  <ebb9@byu.net>
8735
8736         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
8737
8738 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
8739
8740         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
8741         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
8742         assume the C locale, and avoid an "eval" that could cause trouble.
8743         Problem with SORT reported by Bob Proulx.
8744
8745         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
8746         Define.  Trivial patch from Henning Nielsen Lund, originally
8747         sent to bug-grep@gnu.org today.
8748
8749 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
8750
8751         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
8752         struct stat.  Problem reported by Henning Nielsen Lund.
8753         * lib/acl.c: Include acl.h first, to check interface.  Don't
8754         bother to include sys/types.h and sys/stat.h again.
8755
8756 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
8757
8758         Import the following change from libc; problem reported by
8759         Sven Verdoolaege.
8760
8761         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
8762
8763         [BZ #1373]
8764         * lib/argp.h: Remove __NTH for __argp_usage inline function.
8765
8766 2006-12-28  Jim Meyering  <jim@meyering.net>
8767
8768         * build-aux/announce-gen: Do not assume that the package
8769         builds any of tar.gz, tar.bz2, and .xdelta files.
8770         Suggestion from Simon Josefsson.
8771
8772 2006-12-28  Simon Josefsson  <simon@josefsson.org>
8773
8774         * modules/announce-gen: New file.
8775
8776 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
8777
8778         * lib/mbchar.h: Just include <wctype.h>; the wctype module
8779         handles its gotchas now.
8780         * lib/mbswidth.c: Likewise.
8781         * lib/wcwidth.h: Likewise.
8782         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
8783         and iswcntrl; the wctype module does this stuff now.
8784         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
8785         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
8786         * modules/mbchar (Depends-on): Add wctype.
8787         * modules/mbswidth (Depends-on): Likewise.
8788         * modules/wcwidth (Depends-on): Likewise.
8789
8790 2006-12-27  Eric Blake  <ebb9@byu.net>
8791
8792         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
8793         module uses more than what <wctype.h> is required to provide.
8794
8795 2006-12-26  Eric Blake  <ebb9@byu.net>
8796
8797         * gnulib-tool (sed_extract_prog): Avoid space-tab.
8798
8799 2006-12-26  Eric Blake  <ebb9@byu.net>
8800
8801         * modules/absolute-header: New module.
8802         * modules/fcntl (Depends-on): Depend on it.
8803         * modules/inttypes (Depends-on): Likewise.
8804         * modules/stdint (Depends-on): Likewise.
8805         * modules/sys_stat (Depends-on): Likewise.
8806         * modules/wctype (Depends-on): Likewise.
8807         * MODULES.html.sh (Support for building libraries and
8808         executables): Document it.
8809
8810 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
8811
8812         * gnulib-tool (SED): Remove, undoing previous change.
8813         The problem was that it broke coreutils on Solaris, because
8814         "sed --posix" leaked into a makefile.
8815         (sed): New alias, if 'alias' and GNU sed.
8816
8817 2006-12-24  Jim Meyering  <jim@meyering.net>
8818
8819         Work around an fchownat bug in glibc-2.4:
8820         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
8821         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
8822         in spite of the -P option.
8823         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
8824         New macros.
8825         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
8826         * modules/openat (Files): Add lib/fchownat.c.
8827         * lib/openat.c (fchownat): Don't define here.  Move to...
8828         * lib/fchownat.c: ...this new file.
8829
8830 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
8831
8832         Fix bug reported by Bruno Haible in
8833         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
8834         where quotearg.c didn't compile on Mac OS X 10.2 because it
8835         lacks <wchar.h> and wint_t.
8836         * lib/wctype_.h (__wctype_wint_t): New type.
8837         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
8838         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
8839         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
8840         Arg is now of type __wctype_wint_t, not wint_t.
8841         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
8842         substitute HAVE_WINT_T.
8843         * modules/wctype (Files): Add m4/wint_t.m4.
8844         (wctype.h): Substitute HAVE_WINT_T.
8845
8846 2006-12-23  Bruno Haible  <bruno@clisp.org>
8847
8848         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
8849
8850 2006-12-23  Bruno Haible  <bruno@clisp.org>
8851
8852         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
8853         S_ISLNK.
8854         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
8855         mingw.
8856
8857 2006-12-22  Bruno Haible  <bruno@clisp.org>
8858
8859         * lib/copy-file.c: Include acl.h.
8860         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
8861         Close the file descriptors only after being done with copy_acl.
8862         * modules/copy-file (Depends-on): Add acl.
8863
8864 2006-12-22  Bruno Haible  <bruno@clisp.org>
8865
8866         * gnulib-tool (SED): New variable.
8867         Use $SED instead of sed everywhere.
8868
8869 2006-12-22  Bruno Haible  <bruno@clisp.org>
8870
8871         * modules/no-c++: New file.
8872         * m4/no-c++.m4: New file.
8873         * MODULES.html.sh (Support for building libraries and executables):
8874         Add no-c++.
8875
8876 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
8877
8878         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
8879         Include <limits.h>, and use its INT_MAX to rewrite the
8880         j loop so that it does not overflow 'int'.  Problem reported by
8881         Ralf Wildenhues in
8882         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
8883         Play it safe by shifting left by 1 rather than multiplying by 2,
8884         as GCC is less likely to optimize this away when the value
8885         is signed (when it assumes overflow leads to undefined behavior).
8886         Also, don't assume time_t uses two's complement.
8887
8888 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
8889
8890         * MODULES.html.sh: New module wctype.
8891         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
8892         * lib/fnmatch.c: Don't bother to include <wchar.h> before
8893         <wctype.h>, since the new wctype module should fix this.
8894         * lib/quotearg.c: Include <wctype.h> unconditionally, since
8895         the wctype module should arrange for it.
8896         * lib/regex_internal.h: Likewise.
8897         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
8898         since the wctype module should handle this now.
8899         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
8900         * modules/fnmatch (Depends-on): Add wctype.
8901         * modules/quotearg (Depends-on): Likewise.
8902         * modules/regex (Depends-on): Likewise.
8903
8904 2006-12-19  Bruno Haible  <bruno@clisp.org>
8905
8906         * lib/strdup.h [C++]: Wrap definitions in extern "C".
8907         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
8908
8909 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8910
8911         * modules/savewd (Depends-on): Fix dependency on fcntl.
8912
8913 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
8914
8915         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
8916         conforms to C99, rather than relying on the user's environment
8917         setting of STDINT_H.
8918
8919 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
8920         and Eric Blake  <ebb9@byu.net>
8921
8922         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
8923         This is more consistent with the other defines here.
8924         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
8925         Port to z/OS.  Problem reported by Paul Gilmartin.
8926         Change local vars to use gl_ prefix rather than ac_.
8927         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
8928         with other defines.
8929         * modules/double-slash-root: New module.
8930         * modules/dirname (Files): Remove m4/double-slash-root.m4.
8931         (Depends-on): Add double-slash-root.
8932         * MODULES.html.sh (File system functions): Mention new module.
8933
8934 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
8935
8936         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
8937         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
8938         This is for the benefit of gzip, which doesn't do i18n.
8939
8940 2006-12-12  Jim Meyering  <jim@meyering.net>
8941
8942         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
8943         Reported by Andreas Schwab <schwab@suse.de>.
8944
8945 2006-12-12  Bruno Haible  <bruno@clisp.org>
8946
8947         Merge these changes.
8948         2006-09-05  Bruno Haible  <bruno@clisp.org>
8949         * lib/iconvme.c (iconv_string): No need to save and restore errno when
8950         iconv_alloc succeeded.
8951         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
8952         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
8953         test for " && dest " at the end - dest is always != NULL there. Call
8954         iconv with 4xNULL arguments initially, to reset the state. Call iconv
8955         with 2xNULL arguments, also to flush the state storage. Handle the
8956         IRIX iconv behaviour. Realloc the final result, to throw away unused
8957         memory.
8958
8959 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
8960
8961         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
8962         and fchmodat unconditionally, since glibc 2.4 has them.
8963         Problem reported by Arkadiusz Miskiewicz.
8964
8965 2006-12-10  Bruno Haible  <bruno@clisp.org>
8966
8967         * gnulib-tool (func_import): Show the include files only for those
8968         modules that are copied and specified.
8969         Reported by Karl Berry.
8970
8971 2006-12-08  Jim Meyering  <jim@meyering.net>
8972
8973         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
8974         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
8975
8976         * build-aux/announce-gen: Add two new options, both optional:
8977         --bootstrap-tools=TOOL_LIST
8978               a comma-separated list of tools, e.g.,
8979               autoconf,automake,bison,gnulib
8980         --gnulib-snapshot-date=DATE
8981               if gnulib is in the bootstrap tool list,
8982               then report this as the snapshot date.
8983               If not specified, use the current date/time.
8984               If you specify a date here, be sure it's UTC.
8985
8986 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8987
8988         * tests/test-argp-2.sh: Fix test to match actual output.
8989         (func_compare): Fix sed script to be portable.
8990
8991 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
8992
8993         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
8994         workaround for this case.  It is not autoconfigured now; offhand
8995         it's hard to see how to autoconfigure it.
8996
8997 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
8998
8999         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
9000         a directory that is about to be chowned.  Such a directory's
9001         initial file permissions should permit the owner only and this
9002         should not be changed until after the chown, since the group and
9003         other bits would be incorrect if they granted permission before
9004         the chown.
9005
9006         Fix porting problem for iswctype reported by Georg Schwarz in:
9007         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
9008         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
9009         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
9010         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
9011         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
9012
9013 2006-12-03  Jim Meyering  <jim@meyering.net>
9014
9015         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
9016         p->fts_statp may not yet be defined.
9017         (fts_read): Instead, set it in the caller, once p->fts_statp is
9018         sure to be defined, and corresponds to a top-level directory.
9019         This bug made du -x fail.  Here's the coreutils test case:
9020         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
9021         Reported by Mike Frysinger.
9022
9023 2006-12-01  Jim Meyering  <jim@meyering.net>
9024
9025         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
9026         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
9027         Reported by Simon Josefsson.
9028
9029 2006-11-30  Jim Meyering  <jim@meyering.net>
9030
9031         * m4/warning.m4: Use the all-permissive copyright notice
9032         recommended by RMS (rather than LGPL).
9033         * m4/vararrays.m4: Likewise.
9034         * m4/flexmember.m4: Likewise.
9035
9036 2006-11-29  Bruno Haible  <bruno@clisp.org>
9037
9038         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
9039         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
9040         using +=.
9041         Reported by Simon Josefsson <simon@josefsson.org>.
9042
9043 2006-11-28  James Youngman <jay@gnu.org>
9044
9045         * README: Advise users that they might find the bug-gnulib@gnu.org
9046         and autotools-announce@gnu.org mailing lists useful.
9047
9048 2006-11-28  Bruno Haible  <bruno@clisp.org>
9049
9050         * m4/ptrdiff_max.m4: Remove file.
9051
9052 2006-11-21  Bruno Haible  <bruno@clisp.org>
9053
9054         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
9055         _AC_COMPUTE_INT.
9056         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
9057         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
9058         _AC_COMPUTE_INT.
9059         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
9060         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
9061         _AC_COMPUTE_INT.
9062         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
9063
9064 2006-11-28  Jim Meyering  <jim@meyering.net>
9065
9066         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
9067         warning from "gcc -Wshadow" about shadowing the builtin.
9068
9069 2006-11-27  Bruno Haible  <bruno@clisp.org>
9070
9071         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
9072         _AC_COMPUTE_INT.
9073         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
9074
9075 2006-11-27  Bruno Haible  <bruno@clisp.org>
9076             Paul Eggert  <eggert@cs.ucla.edu>
9077
9078         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
9079
9080 2006-11-26  Bruno Haible  <bruno@clisp.org>
9081
9082         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
9083         noinst_LTLIBRARIES.
9084
9085 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
9086             Bruno Haible  <bruno@clisp.org>
9087
9088         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
9089         if compiling with "gcc -ansi".
9090
9091 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
9092
9093         Fix some incompatibilities with gcc -ansi -pedantic.
9094         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
9095         if compiling pedantically with GCC, unless it's C99 or later.
9096         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
9097         it mishandles gcc -ansi -pedantic as well.
9098         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
9099         if gcc -pedantic.
9100         * lib/regexec.c (check_node_accept_bytes): Don't use auto
9101         initializers for struct if -pedantic, unless it's C99 or later.
9102
9103 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
9104
9105         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
9106         Don't close an fd more than once. Identical atimes indicate
9107         success, not failure.
9108
9109 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
9110
9111         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
9112
9113 2006-11-23  Jim Meyering  <jim@meyering.net>
9114
9115         * build-aux/announce-gen: New file.  From coreutils.
9116
9117 2006-11-22  Jim Meyering  <jim@meyering.net>
9118
9119         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
9120         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
9121         (fts_read): Use a temporary to narrow the overused st_size member
9122         before using it in a switch statement.  Reported by Matthew Woehlke.
9123
9124         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
9125         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
9126
9127 2006-11-20  Bruno Haible  <bruno@clisp.org>
9128
9129         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
9130         changequote instead of pairs of brackets.
9131         Reported by Andreas Schwab <schwab@suse.de>.
9132
9133 2006-11-21  Jim Meyering  <jim@meyering.net>
9134
9135         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
9136         so as to remain compatible with older compilers.
9137         Patch from Michael Deutschmann.
9138
9139 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
9140
9141         * MODULES.html.sh (File system functions): Add openat.
9142
9143         * lib/openat.h (rpl_fstatat): New macro, if
9144         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
9145         (fstatat): Define to rpl_fstatat under the same conditions,
9146         unless COMPILING_FSTATAT.
9147         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
9148         seems to have the bug.
9149         * lib/fstatat.c: New file.
9150         * modules/openat (Files): Add it.
9151
9152 2006-11-20  Bruno Haible  <bruno@clisp.org>
9153
9154         * Makefile: New file.
9155
9156 2006-11-20  Jim Meyering  <jim@meyering.net>
9157
9158         The beginnings of syntax-related checks for gnulib.
9159         * lib/Makefile: New file.
9160         * lib/t-idcache: New script.  Ensure that the two halves of
9161         idcache.c stay in sync.
9162
9163         * lib/idcache.c: Adjust comments in user- and group- portions to
9164         be more accurate, and to be consistent with one another.
9165
9166 2006-11-20  Jim Meyering  <jim@meyering.net>
9167
9168         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
9169         continue using the flexible array member (thus, this module performs
9170         half as many malloc calls), with the addition that...
9171         (getgroup, getuser): Consistently record a non-match via an empty
9172         "name" string, and map an empty string match to a NULL return value.
9173         * modules/idcache (Depends-on): Re-add flexmember.
9174
9175         * lib/idcache.c (getuser): Remove all uses of the register keyword.
9176         (getuidbyname, getgroup, getgidbyname): Likewise.
9177
9178         Use cleaner syntax: NULL rather than 0.
9179         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
9180
9181 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
9182
9183         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
9184         It mishandled the case where the group was missing.
9185         Problem reported by Greg Schafer.
9186         * modules/idcache: Likewise.
9187
9188 2006-11-18  Jim Meyering  <jim@meyering.net>
9189
9190         * check-module (%exempt_header): Add exception for some
9191         conditionally-included headers.
9192
9193         * modules/i-ring (Depends-on): Add verify.
9194         (License): Change to LGPL.
9195
9196 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
9197
9198         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
9199         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
9200         and inttostr.h.  Use snprintf rather than uinttostr, so that
9201         LGPLed code doesn't depend on GPLed.
9202
9203 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
9204
9205         * modules/inline (License): Change from GPL to LGPL.
9206
9207 2006-11-17  Jim Meyering  <jim@meyering.net>
9208
9209         * modules/d-type (License): Switch to LGPL.
9210
9211 2006-11-15  Bruno Haible  <bruno@clisp.org>
9212
9213         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
9214
9215 2006-11-15  Eric Blake  <ebb9@byu.net>
9216
9217         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
9218         the module dependency.
9219
9220 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
9221             Bruno Haible  <bruno@clisp.org>
9222
9223         * gnulib-tool (func_create_testdir): Add license consistency check.
9224
9225 2006-11-15  Eric Blake  <ebb9@byu.net>
9226
9227         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
9228         random "(cached)" in configure output.
9229
9230 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9231
9232         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
9233         test for conforming inttypes.h is both announced and cached.
9234
9235         * MODULES.html.sh (seen_modules, seen_files): New variables.
9236         (func_module): Rewrite to use a few less gnulib-tool and sed
9237         invocations.  Avoid a couple of quadratic algorithms for ...
9238         (missed_modules, missed_files): ... these, with ...
9239         (func_append, func_tmpdir): ... these new functions, from
9240         gnulib-tool.  Analogously, install traps for cleanup.
9241
9242         * tests/test-gc.c (main): Remove unused variables.
9243         * tests/test-read-file.c: Include stdlib.h, for 'free'.
9244
9245 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
9246
9247         * modules/inttostr (License): Change to LGPL.
9248
9249 2006-11-14  Eric Blake  <ebb9@byu.net>
9250
9251         * modules/tempname (License): Change to LGPL.
9252
9253 2006-11-14  Eric Blake  <ebb9@byu.net>
9254
9255         * doc/functions.texi (Function Portability): *printf functions on
9256         Cygwin now understand all POSIX size specifiers.
9257
9258 2006-11-14  Bruno Haible  <bruno@clisp.org>
9259
9260         * modules/c-ctype (License): Change to LGPL.
9261
9262 2006-11-12  Bruno Haible  <bruno@clisp.org>
9263
9264         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
9265         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
9266         for GNOME libraries, for which the include files are installed in
9267         subdirectories of $prefix/include.
9268
9269 2006-11-12  Bruno Haible  <bruno@clisp.org>
9270
9271         * m4/lib-link.m4: Require at least autoconf-2.54.
9272         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
9273         name to underscores for the --with option.
9274
9275 2006-11-13  Bruno Haible  <bruno@clisp.org>
9276
9277         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
9278         the tests directory.
9279         Reported by Ralf Wildenhues.
9280
9281 2006-11-13  Bruno Haible  <bruno@clisp.org>
9282
9283         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
9284         (func_emit_initmacro_end): Undo the override here.
9285         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
9286         Works around the famous automake error in coreutils.
9287
9288 2006-11-13  Eric Blake  <ebb9@byu.net>
9289
9290         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
9291         element, not its node.
9292
9293 2006-11-12  Bruno Haible  <bruno@clisp.org>
9294
9295         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
9296         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
9297
9298 2006-11-12  Bruno Haible  <bruno@clisp.org>
9299
9300         * gnulib-tool: New option --local-symlink.
9301         (func_usage): Document it.
9302         (lsymbolic): New variable.
9303         (func_import, func_create_testdir): If --symlink was not specified,
9304         test whether --local-symlink was specified and the file comes from
9305         the local_gnulib_dir.
9306
9307 2006-11-12  Bruno Haible  <bruno@clisp.org>
9308
9309         * gnulib-tool (func_ln): New function.
9310         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
9311
9312 2006-11-12  Bruno Haible  <bruno@clisp.org>
9313
9314         Finish support for source files in subdirectories.
9315         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
9316         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
9317         AUTOMAKE_OPTIONS.
9318         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
9319
9320 2006-11-12  Bruno Haible  <bruno@clisp.org>
9321
9322         * gnulib-tool (func_get_automake_snippet): Synthesize also an
9323         EXTRA_lib_SOURCES augmentation.
9324         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
9325
9326 2006-11-12  Jim Meyering  <jim@meyering.net>
9327
9328         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
9329         file descriptors.  This also averts a failure on systems with
9330         native openat support when a traversed directory lacks "x" access.
9331         * lib/fts_.h: Include "i-ring.h"
9332         (struct FTS) [fts_fd_ring]: New member.
9333         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
9334         (FCHDIR): Add parentheses.
9335         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
9336         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
9337         When descending, rather than simply closing the previous
9338         fts_cwd_fd value, push that file descriptor onto the ring.
9339         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
9340         (fts_open): Initialize the new fd_ring member.
9341         (fts_close): Clear the ring.
9342         (fts_safe_changedir): When possible, use our new fd_ring to skip
9343         the diropen and fstat and dev/ino comparison that would normally
9344         accompany a virtual `chdir ("..")'.
9345
9346         * modules/fts (Depends-on): Add i-ring.
9347         * modules/i-ring: New module.
9348         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
9349         * m4/i-ring.m4: New file.
9350
9351 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9352
9353         * gnulib-tool (func_create_testdir): Fix replacement of
9354         `build-aux' in configure.ac.  Run autotools in gltests
9355         subdirectory.
9356         (func_create_testdir, func_create_megatestdir, test): There is
9357         no need for '--force' in most autotool invocations in a new
9358         tree.  Actually fail the whole test if any of the tools, or the
9359         configure or make stages fail.
9360
9361         Sync from Automake.
9362         * build-aux/gnupload: Revert last change.  Add pointer to upload
9363         instructions of the GNU Maintenance Instructions.
9364         Suggestion by Karl Berry.
9365
9366 2006-11-10  Jim Meyering  <jim@meyering.net>
9367
9368         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
9369
9370 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
9371
9372         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
9373         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
9374         (bind_textdomain_codeset) [! ENABLE_NLS]:
9375         Evaluate all the arguments.  That way, callers get compatible behavior
9376         if the arguments have side effects.  Also, it avoids some GCC
9377         diagnostics in some cases; Joel E. Denny reported problems when Bison
9378         was configured with --enable-gcc-warnigs.
9379
9380 2006-11-10  Jim Meyering  <jim@meyering.net>
9381
9382         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
9383         relevant options in CFLAGS (like -O, -fno-inline) are taken into
9384         account.
9385
9386 2006-11-10  Jim Meyering  <jim@meyering.net>
9387
9388         * modules/inline: New file/module.
9389         * modules/xalloc (Files): Remove m4/inline.m4.
9390         (Depends-on): Add inline, instead.
9391         * modules/oset: Likewise.
9392         * modules/list: Likewise.
9393
9394 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
9395
9396         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
9397         Problem reported by Matthew Woehlke.
9398
9399 2006-11-09  Bruno Haible  <bruno@clisp.org>
9400
9401         * lib/tempname.c (gen_tempname): Remove variant that invokes
9402         __gen_tempname.
9403         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
9404         __gen_tempname.
9405
9406 2006-11-08  Bruno Haible  <bruno@clisp.org>
9407
9408         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
9409         to 'yes' instead of 'cross-compiling'.
9410
9411 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
9412
9413         * lib/quotearg.h (quotearg_free): New decl.
9414         * lib/quotearg.c (quotearg_free): New function.
9415         (slot0, nslots, slotvec0, slotvec):
9416         Now file-scope so that quotearg_free can get at them.
9417
9418 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9419
9420         Sync from Automake.
9421         * build-aux/gnupload: Add missing 'gnu' to example URL.
9422         Report by Karl Berry.
9423
9424 2006-11-08  Bruno Haible  <bruno@clisp.org>
9425
9426         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
9427         Suggested by Paul Eggert.
9428
9429 2006-11-08  Jim Meyering  <jim@meyering.net>
9430
9431         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
9432         It's already included if !_LIBC.
9433         (fts_safe_changedir): Add a comment.
9434
9435 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
9436
9437         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
9438         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
9439         Matthew Woehlke.
9440
9441         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
9442         definitions up, to avoid colliding with change below.
9443         (static_inline) [HAVE_INLINE]: New macro.
9444         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
9445         Provide extern decls when !HAVE_INLINE.  Do not define unless
9446         static_inline is defined, either by us or by xmalloc.c.  Use
9447         static_inline rather than static inline.
9448         (XCALLOC): Optimize sizeof(T) = 1 case.
9449         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
9450
9451 2006-11-07  Bruno Haible  <bruno@clisp.org>
9452
9453         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
9454         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
9455         AC_C_INLINE.
9456         * modules/xalloc (Files): Add m4/inline.m4.
9457
9458 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9459
9460         * README: Fix typo.
9461         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
9462         (Miscellanous Notes): ...from this.
9463
9464 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
9465
9466         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
9467         Mention that offsetof should be used instead of sizeof.
9468         From Bruno Haible.
9469
9470 2006-11-07  Bruno Haible  <bruno@clisp.org>
9471
9472         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
9473
9474 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
9475
9476         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
9477         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
9478         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
9479         (gl_tree_add_before, gl_tree_add_after):
9480         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
9481         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
9482         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
9483         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
9484         (gl_linked_add_after, gl_linked_add_at): Likewise.
9485         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
9486         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
9487         (gl_tree_add_before, gl_tree_add_after): Likewise.
9488         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
9489         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
9490         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
9491
9492 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9493
9494         * lib/gl_oset.h: Use C comment style, not C++ comment style.
9495
9496 2006-11-06  Bruno Haible  <bruno@clisp.org>
9497
9498         * m4/inline.m4: New file.
9499         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
9500         * modules/list (Files): Add m4/inline.m4.
9501         * modules/oset (Files): Likewise.
9502
9503 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
9504
9505         * lib/idcache.c: Include <stddef.h>, for offsetof.
9506         (struct userid.name): Change from char * to a flexible array member.
9507         All uses changed.
9508         * modules/idcache (Depends-on): Add flexmember.
9509
9510         * MODULES.html.sh (Core language properties): New module flexmember.
9511         * modules/flexmember, m4/flexmember.m4: New files.
9512
9513         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
9514         inline functions that are identical with the old xnmalloc_inline,
9515         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
9516         that we can avoid some unnecessary integer multiplications and
9517         divisions in the common case where the element size is known at
9518         compile time.
9519         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
9520         needed.
9521         (xnboundedmalloc): Remove.
9522         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
9523         arguments, for consistency with rest of this header.
9524         (xcharalloc): Rewrite using XNMALLOC.
9525         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
9526         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
9527         versions have been moved to lib/xalloc.h and renamed to be the
9528         non-*_inline versions.
9529         (xmalloc, xrealloc): Implement without reference to the xnmalloc
9530         and xnrealloc functions, since those functions are now inline and
9531         now call us.
9532         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
9533         renaming described above.
9534         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
9535         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
9536         captures the dependency in AC_C_INLINE.
9537
9538         New module canonicalize-lgpl, proposed by Charles Wilson in
9539         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
9540         with a few small changes afterwards.
9541         * MODULES.html.sh (File system functions): New module
9542         canonicalize-lgpl.
9543         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
9544         and canonicalize_file_name.
9545         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
9546         * modules/canonicalize-lgpl: New files.
9547
9548 2006-11-05  Bruno Haible  <bruno@clisp.org>
9549
9550         * gnulib-tool (func_import, func_create_testdir): Create directories
9551         also for files in subdirectories of lib/.
9552
9553 2006-11-05  Bruno Haible  <bruno@clisp.org>
9554
9555         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
9556         ANSI C compliant.
9557
9558 2006-11-03  Bruno Haible  <bruno@clisp.org>
9559
9560         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
9561         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
9562         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
9563         (xnboundedmalloc): New inline function.
9564         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
9565         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
9566         xmalloc.
9567         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
9568         xmalloc.
9569         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
9570         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
9571         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
9572         xmalloc.
9573         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
9574         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
9575         xmalloc.
9576         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
9577         gl_tree_add_after): Use XMALLOC instead of xmalloc.
9578         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
9579         xmalloc.
9580         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
9581         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
9582         gl_tree_add_after): Use XMALLOC instead of xmalloc.
9583         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
9584         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
9585         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
9586         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
9587
9588 2006-11-03  Bruno Haible  <bruno@clisp.org>
9589
9590         * lib/c-ctype.h [C++]: Define functions without name mangling.
9591         * lib/fwriteerror.h [C++]: Likewise.
9592         * lib/gcd.h [C++]: Likewise.
9593         * lib/linebreak.h [C++]: Likewise.
9594
9595 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
9596
9597         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
9598         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
9599         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
9600         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
9601         Check for functions and headers just once.
9602         Check for declaration of canonicalize_file_name.
9603         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
9604
9605 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
9606
9607         * gnulib-tool (func_import): Fix typo in actioncmd.
9608
9609 2006-11-02  Bruno Haible  <bruno@clisp.org>
9610
9611         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
9612         newline sequence in the Makefile.am snippet as a space, like "make"
9613         does.
9614         Reported by Roger Persson <perrog@gmail.com>.
9615
9616 2006-11-01  Bruno Haible  <bruno@clisp.org>
9617
9618         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
9619         already declared in <string.h>.
9620         * lib/strcase.h (strncasecmp): Don't declare it if yes.
9621
9622 2006-11-01  Bruno Haible  <bruno@clisp.org>
9623
9624         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
9625         * lib/strcase.h: Include <string.h>.
9626         (strcasecmp): Define to rpl_strcasecmp here.
9627
9628 2006-11-01  Bruno Haible  <bruno@clisp.org>
9629
9630         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
9631
9632 2006-11-01  Eric Blake  <ebb9@byu.net>
9633
9634         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
9635
9636         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
9637
9638 2006-10-29  Bruno Haible  <bruno@clisp.org>
9639
9640         Make it compile in C++ mode.
9641         * lib/full-write.c (full_rw): Add a cast.
9642
9643 2006-11-01  Bruno Haible  <bruno@clisp.org>
9644
9645         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
9646         be POSIX compliant.
9647         Reported by Roger Persson <perrog@gmail.com>.
9648
9649 2006-11-01  Eric Blake  <ebb9@byu.net>
9650
9651         * lib/getopt_.h: Fix comments.
9652
9653 2006-10-31  Eric Blake  <ebb9@byu.net>
9654
9655         * modules/tmpdir (Depends-on): Add sys_stat.
9656         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
9657         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
9658         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
9659         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
9660         tempname.
9661
9662 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
9663
9664         Avoid some C++ diagnostics reported by Bruno Haible.
9665         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
9666         xmalloc.
9667         (quotearg_alloc): Use xcharalloc rather than xmalloc.
9668         (struct slotvec): Move to top level.
9669         (quotearg_n_options): Rewrite to avoid xmalloc.
9670         * lib/xalloc.h (xcharalloc): New function.
9671         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
9672         [defined __cplusplus]: Add function template that provides result
9673         type propagation.  This part of the change is from Bruno Haible.
9674
9675 2006-10-29  Bruno Haible  <bruno@clisp.org>
9676
9677         Make it compile in C++ mode.
9678         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
9679         * lib/strnlen1.c (strnlen1): Cast memchr result.
9680         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
9681         * lib/clean-temp.c (string_equals, string_hash): Add casts.
9682         (create_temp_dir): Rename local variable 'template'.
9683         (compile_csharp_using_sscli): Add cast.
9684         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
9685         * lib/findprog.c (find_in_path): Likewise.
9686         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
9687         * lib/wait-process.c (register_slave_subprocess): Likewise.
9688
9689 2006-10-22  Bruno Haible  <bruno@clisp.org>
9690
9691         * modules/tsearch: New file.
9692         * lib/tsearch.h: New file.
9693         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
9694         * m4/tsearch.m4: New file.
9695         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
9696
9697 2006-10-29  Eric Blake  <ebb9@byu.net>
9698
9699         * lib/arcfour.c: Assume config.h.
9700         * lib/arctwo.c: Likewise.
9701         * lib/base64.c: Likewise.
9702         * lib/check-version.c: Likewise.
9703         * lib/crc.c: Likewise.
9704         * lib/des.c: Likewise.
9705         * lib/gc-gnulib.c: Likewise.
9706         * lib/gc-libgcrypt.c: Likewise.
9707         * lib/gc-pbkdf2-sha1.c: Likewise.
9708         * lib/getaddrinfo.c: Likewise.
9709         * lib/getdelim.c: Likewise.
9710         * lib/getline.c: Likewise.
9711         * lib/hmac-md5.c: Likewise.
9712         * lib/hmac-sha1.c: Likewise.
9713         * lib/iconvme.c: Likewise.
9714         * lib/md2.c: Likewise.
9715         * lib/md4.c: Likewise.
9716         * lib/memxor.c: Likewise.
9717         * lib/read-file.c: Likewise.
9718         * lib/readline.c: Likewise.
9719         * lib/rijndael-alg-fst.c: Likewise.
9720         * lib/rijndael-api-fst.c: Likewise.
9721         * lib/xgetdomainname.c: Likewise.
9722
9723 2006-10-28  Eric Blake  <ebb9@byu.net>
9724
9725         * lib/xstrndup.c: Assume config.h.
9726
9727 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
9728
9729         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
9730         stat-macros.h is now for our own macros, whereas stat_h is for
9731         macros in the <sys/stat.h> name space.
9732         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
9733         (STAT_MACROS_H): Remove.
9734         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
9735         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
9736         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
9737         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
9738         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
9739         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
9740         Move these macros to ...
9741         * lib/stat_.h: here.  Don't include stat-macros.h.
9742         * lib/canonicalize.c: Don't include stat-macros.h.
9743         * lib/chown.c: Likewise.
9744         * lib/euidaccess.c: Likewise.
9745         * lib/file-type.c: Likewise.
9746         * lib/filemode.c: Likewise.
9747         * lib/glob.c: Likewise.
9748         * lib/isapipe.c: Likewise.
9749         * lib/lchown.c: Likewise.
9750         * lib/lstat.c: Likewise.
9751         * lib/mkdir-p.c: Likewise.
9752         * lib/rmdir.c: Likewise.
9753         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
9754         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
9755         unless mkdir isn't declared, to speed up 'configure'.
9756         Always create sys/stat.h, since it's unlikely any real sys/stat.h
9757         would define all the S_* symbols.
9758         * modules/canonicalize (Depends-on):
9759         Depend on sys_stat, not stat-macros.
9760         * modules/chown: Likewise.
9761         * modules/euidaccess: Likewise.
9762         * modules/filemode: Likewise.
9763         * modules/file-type: Likewise.
9764         * modules/glob: Likewise.
9765         * modules/isapipe: Likewise.
9766         * modules/lchown: Likewise.
9767         * modules/lstat: Likewise.
9768         * modules/mkancesdirs: Likewise.
9769         * modules/rmdir: Likewise.
9770         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
9771         * modules/modechange: Likewise.
9772         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
9773         (configure.ac): Remove gl_STAT_MACROS.
9774         * modules/sys_stat (Depends-on): Remove stat-macros.
9775
9776 2006-10-27  Bruno Haible  <bruno@clisp.org>
9777
9778         * m4/signed.m4: Remove file.
9779         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
9780         invocation.
9781         * modules/vasnprintf (Files): Remove m4/signed.m4.
9782
9783 2006-10-27  Bruno Haible  <bruno@clisp.org>
9784
9785         Update to GNU gettext 0.16.
9786         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
9787         m4/inttypes-h.m4, m4/signed.m4.
9788         * m4/gettext.m4: Update to GNU gettext 0.16.
9789         * m4/intl.m4: New file, from GNU gettext.
9790         * m4/intldir.m4: New file, from GNU gettext.
9791         * config/srclist.txt: Update
9792
9793 2006-10-27  Eric Blake  <ebb9@byu.net>
9794
9795         * MODULES.html.sh: Document tempname.
9796         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
9797         dependencies.
9798         (Files): Move lib/tempname.c...
9799         * modules/tempname: ...to this new module.
9800         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
9801         (gl_PREREQ_TEMPNAME): Move...
9802         * m4/tempname.m4: ...to this new file.
9803         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
9804         * modules/sys_stat (Depends-on): Add stat-macros.
9805         * lib/stat_.h (includes): Pick up stat macros.
9806         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
9807         if stat macros are broken.
9808         * lib/tempname.c (includes): No need to include "stat-macros.h".
9809         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
9810         (direxists, __path_search) [!_LIBC]: Don't compile these in
9811         gnulib; the tmpdir module covers that.
9812         * lib/tempname.h: New file.
9813
9814 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
9815
9816         * COPYING: Explain how gnulib-tool converts licence headers.
9817         Almost all wording by Eric Blake.
9818
9819 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
9820
9821         * lib/mbchar.h (is_basic_table): Make read-only.
9822         * lib/mbchar.c (is_basic_table): Likewise.
9823         Reported by John Darrington.
9824
9825 2006-10-25  Bruno Haible  <bruno@clisp.org>
9826
9827         * lib/progname.h (set_program_name): Undefine before defining.
9828
9829 2006-10-25  Bruno Haible  <bruno@clisp.org>
9830
9831         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
9832         false for non-gcc C++ compilers.
9833         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
9834
9835 2006-10-24  Bruno Haible  <bruno@clisp.org>
9836
9837         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
9838         iconv implementations like Irix iconv.
9839
9840 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
9841
9842         * modules/vararrays: New file.
9843         * m4/vararrays.m4: New file, taken from diffutils.
9844         * MODULES.html.sh: New module vararrays.
9845
9846 2006-10-24  Karl Berry  <karl@gnu.org>
9847
9848         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
9849         Don't call GNU Unix.
9850
9851 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9852
9853         * users.txt: Add Libtool.
9854
9855         Sync from Libtool:
9856
9857         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
9858
9859         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
9860         to gnulib's policy of including config.h unconditionally.
9861
9862 2006-10-24  Bruno Haible  <bruno@clisp.org>
9863
9864         * modules/wcwidth (Files): Add m4/wint_t.m4.
9865         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
9866         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
9867
9868 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
9869
9870         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
9871         to pacify GCC with some -W flags enabled.  Problem reported by
9872         Bruno Haible.
9873
9874 2006-10-24  Jim Meyering  <jim@meyering.net>
9875
9876         * MODULES.html.sh: Remove uinttostr.  It's not a module.
9877         Reported by Karl Berry.
9878
9879 2006-10-23  Bruno Haible  <bruno@clisp.org>
9880
9881         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
9882
9883 2006-10-24  Bruno Haible  <bruno@clisp.org>
9884
9885         * lib/gl_list.h: Use C comment style, not C++ comment style.
9886
9887 2006-10-23  Eric Blake  <ebb9@byu.net>
9888
9889         * lib/getaddrinfo.c (includes): Add missing include.
9890
9891 2006-10-23  Bruno Haible  <bruno@clisp.org>
9892             Paul Eggert  <eggert@cs.ucla.edu>
9893
9894         Ability to rename obstack_free.
9895         * lib/obstack.h (__obstack_free): New macro. Declare instead of
9896         obstack_free.
9897         (obstack_free): Invoke the __obstack_free macro.
9898         * lib/obstack.c (obstack_free): Use __obstack_free macro.
9899
9900 2006-10-23  Bruno Haible  <bruno@clisp.org>
9901             Paul Eggert  <eggert@cs.ucla.edu>
9902
9903         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
9904         __argc, __argv from the declaration. (They are defined as macros on
9905         mingw.)
9906
9907 2006-10-22  Bruno Haible  <bruno@clisp.org>
9908
9909         * doc/gnulib-intro.texi: New file.
9910         * doc/gnulib.texi: Include it.
9911
9912 2006-10-21  Bruno Haible  <bruno@clisp.org>
9913
9914         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
9915         "Introduction", "Miscellanous Notes", "Particular Modules".
9916
9917 2006-10-21  Bruno Haible  <bruno@clisp.org>
9918
9919         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9920         Change mostlyclean-local rule to avoid sh syntax error from bash
9921         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
9922
9923 2006-10-23  Jim Meyering  <jim@meyering.net>
9924
9925         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
9926         in place of snprintf.
9927
9928         * modules/inttostr (Files): Add lib/uinttostr.c.
9929         * lib/uinttostr.c (inttostr): New file/function.
9930         * lib/inttostr.h (uinttostr): Declare.
9931         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
9932         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
9933         Add uinttostr.
9934         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
9935
9936 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
9937
9938         * lib/canonicalize.c (ELOOP): Define if not already defined.
9939         Problem reported by Bruno Haible in
9940         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
9941
9942 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
9943
9944         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
9945         Problem reported by Perry Smith and Ville Laurikari.
9946
9947         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
9948         uses.
9949
9950 2006-10-19  Bruno Haible  <bruno@clisp.org>
9951
9952         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
9953         for mingw.
9954
9955 2006-10-19  Bruno Haible  <bruno@clisp.org>
9956
9957         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
9958         Needed for mingw.
9959
9960 2006-10-19  Bruno Haible  <bruno@clisp.org>
9961
9962         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
9963
9964 2006-10-19  Bruno Haible  <bruno@clisp.org>
9965
9966         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
9967         it.
9968
9969 2006-10-19  Bruno Haible  <bruno@clisp.org>
9970
9971         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
9972         invocation.
9973
9974 2006-10-19  Bruno Haible  <bruno@clisp.org>
9975
9976         * gnulib-tool (func_create_testdir): Don't include ftruncate and
9977         mountlist by default.
9978
9979 2006-10-16  Bruno Haible  <bruno@clisp.org>
9980
9981         * lib/c-strstr.c: Include c-strstr.h.
9982
9983 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
9984
9985         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
9986         in a slash.
9987
9988 2006-10-18  Bruno Haible  <bruno@clisp.org>
9989
9990         * lib/lock.h [C++]: Wrap definitions in extern "C".
9991
9992 2006-10-18  Bruno Haible  <bruno@clisp.org>
9993
9994         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
9995         gl_LIBOBJS list.
9996
9997 2006-10-18  Bruno Haible  <bruno@clisp.org>
9998
9999         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
10000
10001 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
10002
10003         * lib/xstrtol.h: Include gettext.h.
10004         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
10005         Problem reported by Eric Blake.
10006         * modules/xstrtol (Depends-on): Add gettext-h.
10007
10008 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
10009
10010         * lib/strftime.c (advance): New macro.
10011         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
10012         incomplete type, so you can't add 0 to it.  Problem and patch
10013         reported by Eelco Dolstra for dietlibc.
10014
10015 2006-10-18  Jim Meyering  <jim@meyering.net>
10016
10017         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
10018         type for a local, and rename it: s/up/user_proc/.
10019
10020 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
10021
10022         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
10023         READ_UTMP_USER_PROCESS.
10024         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
10025
10026 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
10027
10028         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
10029         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
10030
10031 2006-10-17  Eric Blake  <ebb9@byu.net>
10032
10033         * lib/sigprocmask.c (sigprocmask): Fix typo.
10034
10035         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
10036
10037         * modules/clean-temp (Makefile.am): Don't add to make output...
10038         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
10039         config.h.
10040
10041 2006-10-17  Bruno Haible  <bruno@clisp.org>
10042
10043         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
10044         differently if DEFAULT_TEXT_DOMAIN is set.
10045
10046 2006-10-16  Bruno Haible  <bruno@clisp.org>
10047
10048         * lib/clean-temp.c: Include fwriteerror.h.
10049
10050 2006-10-16  Bruno Haible  <bruno@clisp.org>
10051
10052         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
10053
10054 2006-10-16  Bruno Haible  <bruno@clisp.org>
10055
10056         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
10057         * lib/sigprocmask.h: Include <sys/types.h>.
10058         (sigset_t): Use the system's definition if present.
10059
10060 2006-10-17  Eric Blake  <ebb9@byu.net>
10061
10062         * lib/xvasprintf.c (includes): Assume config.h.
10063         * lib/xasprintf.c (includes): Likewise.
10064
10065 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
10066
10067         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
10068         at least as wide as intmax_t.
10069
10070 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
10071
10072         (Imported from Automake.)
10073         * build-aux/gnupload: Update to version 1.1 of directive file.
10074
10075 2006-10-16  Eric Blake  <ebb9@byu.net>
10076
10077         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
10078         match Automake 1.10a.
10079
10080 2006-10-14  Bruno Haible  <bruno@clisp.org>
10081
10082         * modules/sigprocmask: New file.
10083         * lib/sigprocmask.h: New file.
10084         * lib/sigprocmask.c: New file.
10085         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
10086         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
10087         request sigprocmask.o.
10088         (gl_PREREQ_SIGPROCMASK): New macro.
10089         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
10090         (Depends-on): Add sigprocmask.
10091         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
10092         gt_SIGNALBLOCKING. Test for 'raise' only once.
10093         * lib/fatal-signal.c: Include sigprocmask.h.
10094         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
10095         unblock_fatal_signals): Define always.
10096         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
10097         sigprocmask.
10098
10099 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
10100
10101         Sync from Automake.
10102         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
10103         which incorrectly sets the mode of an existing destination
10104         directory.  In some cases the unpatched install-sh could do the
10105         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
10106         system.  We hope this is rare in practice, but it's clearly worth
10107         fixing.  Problem reported by Alex Unleashed in
10108         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
10109         Also, don't bother to check for -m bugs unless we're using -m;
10110         suggested by Stepan Kasal.
10111
10112 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10113
10114         Sync from Automake.
10115         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
10116         `-c' flag, so they appear at the same position as in %FASTDEP%
10117         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
10118         which ignores unknown options only after the first non-option.
10119         Bug report against M4 by Nelson H. F. Beebe.
10120
10121 2006-10-13  Jim Meyering  <jim@meyering.net>
10122
10123         Fix a bug in yesterday's change.
10124         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
10125         p->fts_statp->st_dev would be used uninitialized.
10126         Ensures that we always call fts_stat on the very first entry.
10127         Miklos Szeredi reported that find -xdev stopped working.
10128
10129 2006-10-12  Bruno Haible  <bruno@clisp.org>
10130
10131         * gnulib-tool (func_get_automake_snippet): Append an automatically
10132         computed EXTRA_DIST augmentation.
10133         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
10134         * modules/alloca-opt (Makefile.am): Likewise.
10135         * modules/allocsa (Makefile.am): Likewise.
10136         * modules/arcfour (Makefile.am): Likewise.
10137         * modules/arctwo (Makefile.am): Likewise.
10138         * modules/argmatch (Makefile.am): Likewise.
10139         * modules/argz (Makefile.am): Likewise.
10140         * modules/atexit (Makefile.am): Likewise.
10141         * modules/backupfile (Makefile.am): Likewise.
10142         * modules/byteswap (Makefile.am): Likewise.
10143         * modules/c-strtod (Makefile.am): Likewise.
10144         * modules/c-strtold (Makefile.am): Likewise.
10145         * modules/calloc (Makefile.am): Likewise.
10146         * modules/canon-host (Makefile.am): Likewise.
10147         * modules/canonicalize (Makefile.am): Likewise.
10148         * modules/chdir-long (Makefile.am): Likewise.
10149         * modules/chdir-safer (Makefile.am): Likewise.
10150         * modules/check-version (Makefile.am): Likewise.
10151         * modules/chown (Makefile.am): Likewise.
10152         * modules/cloexec (Makefile.am): Likewise.
10153         * modules/close-stream (Makefile.am): Likewise.
10154         * modules/closeout (Makefile.am): Likewise.
10155         * modules/crc (Makefile.am): Likewise.
10156         * modules/csharpexec (Makefile.am): Likewise.
10157         * modules/cycle-check (Makefile.am): Likewise.
10158         * modules/des (Makefile.am): Likewise.
10159         * modules/dev-ino (Makefile.am): Likewise.
10160         * modules/dirfd (Makefile.am): Likewise.
10161         * modules/dirname (Makefile.am): Likewise.
10162         * modules/dup2 (Makefile.am): Likewise.
10163         * modules/eealloc (Makefile.am): Likewise.
10164         * modules/error (Makefile.am): Likewise.
10165         * modules/euidaccess (Makefile.am): Likewise.
10166         * modules/exclude (Makefile.am): Likewise.
10167         * modules/exitfail (Makefile.am): Likewise.
10168         * modules/fcntl-safer (Makefile.am): Likewise.
10169         * modules/fcntl (Makefile.am): Likewise.
10170         * modules/file-type (Makefile.am): Likewise.
10171         * modules/fileblocks (Makefile.am): Likewise.
10172         * modules/filemode (Makefile.am): Likewise.
10173         * modules/filenamecat (Makefile.am): Likewise.
10174         * modules/fnmatch (Makefile.am): Likewise.
10175         * modules/fopen-safer (Makefile.am): Likewise.
10176         * modules/fpending (Makefile.am): Likewise.
10177         * modules/fprintftime (Makefile.am): Likewise.
10178         * modules/free (Makefile.am): Likewise.
10179         * modules/fsusage (Makefile.am): Likewise.
10180         * modules/ftruncate (Makefile.am): Likewise.
10181         * modules/fts (Makefile.am): Likewise.
10182         * modules/gc-arcfour (Makefile.am): Likewise.
10183         * modules/gc-des (Makefile.am): Likewise.
10184         * modules/gc-hmac-md5 (Makefile.am): Likewise.
10185         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
10186         * modules/gc-md4 (Makefile.am): Likewise.
10187         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
10188         * modules/gc-sha1 (Makefile.am): Likewise.
10189         * modules/gc (Makefile.am): Likewise.
10190         * modules/getaddrinfo (Makefile.am): Likewise.
10191         * modules/getcwd (Makefile.am): Likewise.
10192         * modules/getdelim (Makefile.am): Likewise.
10193         * modules/getdomainname (Makefile.am): Likewise.
10194         * modules/getgroups (Makefile.am): Likewise.
10195         * modules/gethostname (Makefile.am): Likewise.
10196         * modules/gethrxtime (Makefile.am): Likewise.
10197         * modules/getline (Makefile.am): Likewise.
10198         * modules/getloadavg (Makefile.am): Likewise.
10199         * modules/getlogin_r (Makefile.am): Likewise.
10200         * modules/getndelim2 (Makefile.am): Likewise.
10201         * modules/getopt (Makefile.am): Likewise.
10202         * modules/getpagesize (Makefile.am): Likewise.
10203         * modules/getpass-gnu (Makefile.am): Likewise.
10204         * modules/getpass (Makefile.am): Likewise.
10205         * modules/getsubopt (Makefile.am): Likewise.
10206         * modules/gettime (Makefile.am): Likewise.
10207         * modules/gettimeofday (Makefile.am): Likewise.
10208         * modules/getugroups (Makefile.am): Likewise.
10209         * modules/getusershell (Makefile.am): Likewise.
10210         * modules/glob (Makefile.am): Likewise.
10211         * modules/group-member (Makefile.am): Likewise.
10212         * modules/hard-locale (Makefile.am): Likewise.
10213         * modules/hash (Makefile.am): Likewise.
10214         * modules/hmac-md5 (Makefile.am): Likewise.
10215         * modules/hmac-sha1 (Makefile.am): Likewise.
10216         * modules/human (Makefile.am): Likewise.
10217         * modules/idcache (Makefile.am): Likewise.
10218         * modules/imaxabs (Makefile.am): Likewise.
10219         * modules/imaxdiv (Makefile.am): Likewise.
10220         * modules/inet_ntop (Makefile.am): Likewise.
10221         * modules/inet_pton (Makefile.am): Likewise.
10222         * modules/intprops (Makefile.am): Likewise.
10223         * modules/inttostr (Makefile.am): Likewise.
10224         * modules/inttypes (Makefile.am): Likewise.
10225         * modules/isapipe (Makefile.am): Likewise.
10226         * modules/javaversion (Makefile.am): Likewise.
10227         * modules/lchmod (Makefile.am): Likewise.
10228         * modules/lchown (Makefile.am): Likewise.
10229         * modules/localcharset (Makefile.am): Likewise.
10230         * modules/long-options (Makefile.am): Likewise.
10231         * modules/lstat (Makefile.am): Likewise.
10232         * modules/malloc (Makefile.am): Likewise.
10233         * modules/mathl (Makefile.am): Likewise.
10234         * modules/mbchar (Makefile.am): Likewise.
10235         * modules/md2 (Makefile.am): Likewise.
10236         * modules/md4 (Makefile.am): Likewise.
10237         * modules/md5 (Makefile.am): Likewise.
10238         * modules/memcasecmp (Makefile.am): Likewise.
10239         * modules/memchr (Makefile.am): Likewise.
10240         * modules/memcmp (Makefile.am): Likewise.
10241         * modules/memcoll (Makefile.am): Likewise.
10242         * modules/memcpy (Makefile.am): Likewise.
10243         * modules/memmem (Makefile.am): Likewise.
10244         * modules/memmove (Makefile.am): Likewise.
10245         * modules/mempcpy (Makefile.am): Likewise.
10246         * modules/memrchr (Makefile.am): Likewise.
10247         * modules/memset (Makefile.am): Likewise.
10248         * modules/memxor (Makefile.am): Likewise.
10249         * modules/mkancesdirs (Makefile.am): Likewise.
10250         * modules/mkdir-p (Makefile.am): Likewise.
10251         * modules/mkdir (Makefile.am): Likewise.
10252         * modules/mkdtemp (Makefile.am): Likewise.
10253         * modules/mkstemp (Makefile.am): Likewise.
10254         * modules/mktime (Makefile.am): Likewise.
10255         * modules/modechange (Makefile.am): Likewise.
10256         * modules/mountlist (Makefile.am): Likewise.
10257         * modules/nanosleep (Makefile.am): Likewise.
10258         * modules/obstack (Makefile.am): Likewise.
10259         * modules/openat (Makefile.am): Likewise.
10260         * modules/pagealign_alloc (Makefile.am): Likewise.
10261         * modules/pathmax (Makefile.am): Likewise.
10262         * modules/physmem (Makefile.am): Likewise.
10263         * modules/poll (Makefile.am): Likewise.
10264         * modules/posixtm (Makefile.am): Likewise.
10265         * modules/posixver (Makefile.am): Likewise.
10266         * modules/putenv (Makefile.am): Likewise.
10267         * modules/quote (Makefile.am): Likewise.
10268         * modules/quotearg (Makefile.am): Likewise.
10269         * modules/raise (Makefile.am): Likewise.
10270         * modules/read-file (Makefile.am): Likewise.
10271         * modules/readline (Makefile.am): Likewise.
10272         * modules/readlink (Makefile.am): Likewise.
10273         * modules/readtokens (Makefile.am): Likewise.
10274         * modules/readutmp (Makefile.am): Likewise.
10275         * modules/realloc (Makefile.am): Likewise.
10276         * modules/regex (Makefile.am): Likewise.
10277         * modules/rename-dest-slash (Makefile.am): Likewise.
10278         * modules/rename (Makefile.am): Likewise.
10279         * modules/rijndael (Makefile.am): Likewise.
10280         * modules/rmdir (Makefile.am): Likewise.
10281         * modules/rpmatch (Makefile.am): Likewise.
10282         * modules/safe-read (Makefile.am): Likewise.
10283         * modules/safe-write (Makefile.am): Likewise.
10284         * modules/same-inode (Makefile.am): Likewise.
10285         * modules/same (Makefile.am): Likewise.
10286         * modules/save-cwd (Makefile.am): Likewise.
10287         * modules/savedir (Makefile.am): Likewise.
10288         * modules/setenv (Makefile.am): Likewise.
10289         * modules/settime (Makefile.am): Likewise.
10290         * modules/sha1 (Makefile.am): Likewise.
10291         * modules/sig2str (Makefile.am): Likewise.
10292         * modules/snprintf (Makefile.am): Likewise.
10293         * modules/stat-macros (Makefile.am): Likewise.
10294         * modules/stat-time (Makefile.am): Likewise.
10295         * modules/stdbool (Makefile.am): Likewise.
10296         * modules/stdint (Makefile.am): Likewise.
10297         * modules/stdlib-safer (Makefile.am): Likewise.
10298         * modules/stpcpy (Makefile.am): Likewise.
10299         * modules/stpncpy (Makefile.am): Likewise.
10300         * modules/strcase (Makefile.am): Likewise.
10301         * modules/strcasestr (Makefile.am): Likewise.
10302         * modules/strchrnul (Makefile.am): Likewise.
10303         * modules/strcspn (Makefile.am): Likewise.
10304         * modules/strdup (Makefile.am): Likewise.
10305         * modules/strerror (Makefile.am): Likewise.
10306         * modules/strftime (Makefile.am): Likewise.
10307         * modules/strndup (Makefile.am): Likewise.
10308         * modules/strnlen (Makefile.am): Likewise.
10309         * modules/strpbrk (Makefile.am): Likewise.
10310         * modules/strsep (Makefile.am): Likewise.
10311         * modules/strstr (Makefile.am): Likewise.
10312         * modules/strtod (Makefile.am): Likewise.
10313         * modules/strtoimax (Makefile.am): Likewise.
10314         * modules/strtok_r (Makefile.am): Likewise.
10315         * modules/strtol (Makefile.am): Likewise.
10316         * modules/strtoll (Makefile.am): Likewise.
10317         * modules/strtoul (Makefile.am): Likewise.
10318         * modules/strtoull (Makefile.am): Likewise.
10319         * modules/strtoumax (Makefile.am): Likewise.
10320         * modules/strverscmp (Makefile.am): Likewise.
10321         * modules/sys_socket (Makefile.am): Likewise.
10322         * modules/sys_stat (Makefile.am): Likewise.
10323         * modules/sysexits (Makefile.am): Likewise.
10324         * modules/time_r (Makefile.am): Likewise.
10325         * modules/timegm (Makefile.am): Likewise.
10326         * modules/timespec (Makefile.am): Likewise.
10327         * modules/tmpfile-safer (Makefile.am): Likewise.
10328         * modules/trim (Makefile.am): Likewise.
10329         * modules/unistd-safer (Makefile.am): Likewise.
10330         * modules/unlinkdir (Makefile.am): Likewise.
10331         * modules/unlocked-io (Makefile.am): Likewise.
10332         * modules/userspec (Makefile.am): Likewise.
10333         * modules/utime (Makefile.am): Likewise.
10334         * modules/utimecmp (Makefile.am): Likewise.
10335         * modules/utimens (Makefile.am): Likewise.
10336         * modules/vasnprintf (Makefile.am): Likewise.
10337         * modules/vasprintf (Makefile.am): Likewise.
10338         * modules/vsnprintf (Makefile.am): Likewise.
10339         * modules/xalloc (Makefile.am): Likewise.
10340         * modules/xgetcwd (Makefile.am): Likewise.
10341         * modules/xnanosleep (Makefile.am): Likewise.
10342         * modules/xreadlink (Makefile.am): Likewise.
10343         * modules/xstrtod (Makefile.am): Likewise.
10344         * modules/xstrtol (Makefile.am): Likewise.
10345         * modules/xstrtold (Makefile.am): Likewise.
10346         * modules/yesno (Makefile.am): Likewise.
10347         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
10348
10349 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
10350
10351         * modules/error (Makefile.am): Distribute files through
10352         EXTRA_DIST, not lib_SOURCES.
10353
10354 2006-10-12  Eric Blake  <ebb9@byu.net>
10355
10356         * modules/error (Makefile.am): Distribute files in /lib.
10357         * modules/obstack (Makefile.am): Likewise.
10358
10359 2006-10-12  Bruno Haible  <bruno@clisp.org>
10360
10361         * modules/acl (Makefile.am): Distribute all files in lib/ through
10362         EXTRA_DIST.
10363         * modules/arcfour (Makefile.am): Likewise.
10364         * modules/arctwo (Makefile.am): Likewise.
10365         * modules/argmatch (Makefile.am): Likewise.
10366         * modules/argz (Makefile.am): Likewise.
10367         * modules/atexit (Makefile.am): Likewise.
10368         * modules/backupfile (Makefile.am): Likewise.
10369         * modules/c-strtod (Makefile.am): Likewise.
10370         * modules/c-strtold (Makefile.am): Likewise.
10371         * modules/calloc (Makefile.am): Likewise.
10372         * modules/canon-host (Makefile.am): Likewise.
10373         * modules/canonicalize (Makefile.am): Likewise.
10374         * modules/chdir-long (Makefile.am): Likewise.
10375         * modules/chdir-safer (Makefile.am): Likewise.
10376         * modules/check-version (Makefile.am): Likewise.
10377         * modules/chown (Makefile.am): Likewise.
10378         * modules/cloexec (Makefile.am): Likewise.
10379         * modules/close-stream (Makefile.am): Likewise.
10380         * modules/closeout (Makefile.am): Likewise.
10381         * modules/crc (Makefile.am): Likewise.
10382         * modules/cycle-check (Makefile.am): Likewise.
10383         * modules/des (Makefile.am): Likewise.
10384         * modules/dirfd (Makefile.am): Likewise.
10385         * modules/dirname (Makefile.am): Likewise.
10386         * modules/dup2 (Makefile.am): Likewise.
10387         * modules/euidaccess (Makefile.am): Likewise.
10388         * modules/exclude (Makefile.am): Likewise.
10389         * modules/exitfail (Makefile.am): Likewise.
10390         * modules/fcntl-safer (Makefile.am): Likewise.
10391         * modules/file-type (Makefile.am): Likewise.
10392         * modules/fileblocks (Makefile.am): Likewise.
10393         * modules/filemode (Makefile.am): Likewise.
10394         * modules/filenamecat (Makefile.am): Likewise.
10395         * modules/fnmatch (Makefile.am): Likewise.
10396         * modules/fopen-safer (Makefile.am): Likewise.
10397         * modules/fpending (Makefile.am): Likewise.
10398         * modules/fprintftime (Makefile.am): Likewise.
10399         * modules/free (Makefile.am): Likewise.
10400         * modules/fsusage (Makefile.am): Likewise.
10401         * modules/ftruncate (Makefile.am): Likewise.
10402         * modules/fts (Makefile.am): Likewise.
10403         * modules/gc (Makefile.am): Likewise.
10404         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
10405         * modules/getaddrinfo (Makefile.am): Likewise.
10406         * modules/getcwd (Makefile.am): Likewise.
10407         * modules/getdelim (Makefile.am): Likewise.
10408         * modules/getdomainname (Makefile.am): Likewise.
10409         * modules/getgroups (Makefile.am): Likewise.
10410         * modules/gethostname (Makefile.am): Likewise.
10411         * modules/gethrxtime (Makefile.am): Likewise.
10412         * modules/getline (Makefile.am): Likewise.
10413         * modules/getloadavg (Makefile.am): Likewise.
10414         * modules/getlogin_r (Makefile.am): Likewise.
10415         * modules/getopt (Makefile.am): Likewise.
10416         * modules/getpass (Makefile.am): Likewise.
10417         * modules/getpass-gnu (Makefile.am): Likewise.
10418         * modules/getsubopt (Makefile.am): Likewise.
10419         * modules/gettime (Makefile.am): Likewise.
10420         * modules/gettimeofday (Makefile.am): Likewise.
10421         * modules/getugroups (Makefile.am): Likewise.
10422         * modules/getusershell (Makefile.am): Likewise.
10423         * modules/glob (Makefile.am): Likewise.
10424         * modules/group-member (Makefile.am): Likewise.
10425         * modules/hard-locale (Makefile.am): Likewise.
10426         * modules/hash (Makefile.am): Likewise.
10427         * modules/hmac-md5 (Makefile.am): Likewise.
10428         * modules/hmac-sha1 (Makefile.am): Likewise.
10429         * modules/human (Makefile.am): Likewise.
10430         * modules/idcache (Makefile.am): Likewise.
10431         * modules/imaxabs (Makefile.am): Likewise.
10432         * modules/imaxdiv (Makefile.am): Likewise.
10433         * modules/inet_ntop (Makefile.am): Likewise.
10434         * modules/inet_pton (Makefile.am): Likewise.
10435         * modules/inttostr (Makefile.am): Likewise.
10436         * modules/isapipe (Makefile.am): Likewise.
10437         * modules/lchown (Makefile.am): Likewise.
10438         * modules/long-options (Makefile.am): Likewise.
10439         * modules/lstat (Makefile.am): Likewise.
10440         * modules/malloc (Makefile.am): Likewise.
10441         * modules/mathl (Makefile.am): Likewise.
10442         * modules/mbchar (Makefile.am): Likewise.
10443         * modules/md2 (Makefile.am): Likewise.
10444         * modules/md4 (Makefile.am): Likewise.
10445         * modules/md5 (Makefile.am): Likewise.
10446         * modules/memcasecmp (Makefile.am): Likewise.
10447         * modules/memchr (Makefile.am): Likewise.
10448         * modules/memcmp (Makefile.am): Likewise.
10449         * modules/memcoll (Makefile.am): Likewise.
10450         * modules/memcpy (Makefile.am): Likewise.
10451         * modules/memmem (Makefile.am): Likewise.
10452         * modules/memmove (Makefile.am): Likewise.
10453         * modules/mempcpy (Makefile.am): Likewise.
10454         * modules/memrchr (Makefile.am): Likewise.
10455         * modules/memset (Makefile.am): Likewise.
10456         * modules/memxor (Makefile.am): Likewise.
10457         * modules/mkancesdirs (Makefile.am): Likewise.
10458         * modules/mkdir (Makefile.am): Likewise.
10459         * modules/mkdir-p (Makefile.am): Likewise.
10460         * modules/mkdtemp (Makefile.am): Likewise.
10461         * modules/mkstemp (Makefile.am): Likewise.
10462         * modules/mktime (Makefile.am): Likewise.
10463         * modules/modechange (Makefile.am): Likewise.
10464         * modules/mountlist (Makefile.am): Likewise.
10465         * modules/nanosleep (Makefile.am): Likewise.
10466         * modules/openat (Makefile.am): Likewise.
10467         * modules/pagealign_alloc (Makefile.am): Likewise.
10468         * modules/physmem (Makefile.am): Likewise.
10469         * modules/poll (Makefile.am): Likewise.
10470         * modules/posixtm (Makefile.am): Likewise.
10471         * modules/posixver (Makefile.am): Likewise.
10472         * modules/putenv (Makefile.am): Likewise.
10473         * modules/quote (Makefile.am): Likewise.
10474         * modules/quotearg (Makefile.am): Likewise.
10475         * modules/raise (Makefile.am): Likewise.
10476         * modules/read-file (Makefile.am): Likewise.
10477         * modules/readline (Makefile.am): Likewise.
10478         * modules/readlink (Makefile.am): Likewise.
10479         * modules/readtokens (Makefile.am): Likewise.
10480         * modules/readutmp (Makefile.am): Likewise.
10481         * modules/realloc (Makefile.am): Likewise.
10482         * modules/regex (Makefile.am): Likewise.
10483         * modules/rename (Makefile.am): Likewise.
10484         * modules/rename-dest-slash (Makefile.am): Likewise.
10485         * modules/rijndael (Makefile.am): Likewise.
10486         * modules/rmdir (Makefile.am): Likewise.
10487         * modules/rpmatch (Makefile.am): Likewise.
10488         * modules/safe-read (Makefile.am): Likewise.
10489         * modules/safe-write (Makefile.am): Likewise.
10490         * modules/same (Makefile.am): Likewise.
10491         * modules/save-cwd (Makefile.am): Likewise.
10492         * modules/savedir (Makefile.am): Likewise.
10493         * modules/setenv (Makefile.am): Likewise.
10494         * modules/settime (Makefile.am): Likewise.
10495         * modules/sha1 (Makefile.am): Likewise.
10496         * modules/sig2str (Makefile.am): Likewise.
10497         * modules/snprintf (Makefile.am): Likewise.
10498         * modules/stdlib-safer (Makefile.am): Likewise.
10499         * modules/stpcpy (Makefile.am): Likewise.
10500         * modules/stpncpy (Makefile.am): Likewise.
10501         * modules/strcase (Makefile.am): Likewise.
10502         * modules/strcasestr (Makefile.am): Likewise.
10503         * modules/strchrnul (Makefile.am): Likewise.
10504         * modules/strcspn (Makefile.am): Likewise.
10505         * modules/strdup (Makefile.am): Likewise.
10506         * modules/strerror (Makefile.am): Likewise.
10507         * modules/strftime (Makefile.am): Likewise.
10508         * modules/strndup (Makefile.am): Likewise.
10509         * modules/strnlen (Makefile.am): Likewise.
10510         * modules/strpbrk (Makefile.am): Likewise.
10511         * modules/strsep (Makefile.am): Likewise.
10512         * modules/strstr (Makefile.am): Likewise.
10513         * modules/strtod (Makefile.am): Likewise.
10514         * modules/strtoimax (Makefile.am): Likewise.
10515         * modules/strtok_r (Makefile.am): Likewise.
10516         * modules/strtol (Makefile.am): Likewise.
10517         * modules/strtoll (Makefile.am): Likewise.
10518         * modules/strtoul (Makefile.am): Likewise.
10519         * modules/strtoull (Makefile.am): Likewise.
10520         * modules/strtoumax (Makefile.am): Likewise.
10521         * modules/strverscmp (Makefile.am): Likewise.
10522         * modules/time_r (Makefile.am): Likewise.
10523         * modules/timegm (Makefile.am): Likewise.
10524         * modules/tmpfile-safer (Makefile.am): Likewise.
10525         * modules/unistd-safer (Makefile.am): Likewise.
10526         * modules/unlinkdir (Makefile.am): Likewise.
10527         * modules/userspec (Makefile.am): Likewise.
10528         * modules/utime (Makefile.am): Likewise.
10529         * modules/utimecmp (Makefile.am): Likewise.
10530         * modules/utimens (Makefile.am): Likewise.
10531         * modules/vasnprintf (Makefile.am): Likewise.
10532         * modules/vasprintf (Makefile.am): Likewise.
10533         * modules/vsnprintf (Makefile.am): Likewise.
10534         * modules/xalloc (Makefile.am): Likewise.
10535         * modules/xgetcwd (Makefile.am): Likewise.
10536         * modules/xnanosleep (Makefile.am): Likewise.
10537         * modules/xreadlink (Makefile.am): Likewise.
10538         * modules/xstrtod (Makefile.am): Likewise.
10539         * modules/xstrtol (Makefile.am): Likewise.
10540         * modules/xstrtold (Makefile.am): Likewise.
10541         * modules/yesno (Makefile.am): Likewise.
10542
10543 2006-10-12  Jim Meyering  <jim@meyering.net>
10544
10545         * m4/getloadavg.m4: Revert the change below.
10546
10547         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
10548         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
10549         fail with a symlink, which is what coreutils' ./bootstrap now
10550         creates by default.
10551
10552 2006-10-12  Bruno Haible  <bruno@clisp.org>
10553
10554         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
10555         mingw.
10556         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
10557         MSVC and mingw explicitly.
10558
10559 2006-10-11  Simon Josefsson  <jas@extundo.com>
10560             Bruno Haible  <bruno@clisp.org>
10561
10562         Add support for multiple gnulib-tool invocations in the scope of a
10563         single configure.ac file.
10564         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
10565         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
10566         with the same contents as the _LIBADD variable.
10567         (func_emit_initmacro_start, func_emit_initmacro_end,
10568         func_emit_initmacro_done): New functions.
10569         (func_import, func_create_testdir): Invoke them. Allow the identifiers
10570         gl_LIBOBJS and gl_LTLIBOBJS.
10571
10572 2006-10-11  Bruno Haible  <bruno@clisp.org>
10573
10574         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
10575         (func_create_testdir): Don't create po/Makefile.am, don't invoke
10576         autoreconf. Instead, invoke autopoint explicitly but move back the
10577         *.m4 files from gnulib.
10578
10579 2006-10-11  Bruno Haible  <bruno@clisp.org>
10580
10581         * gnulib-tool (func_usage): Make module names after --create-testdir
10582         optional.
10583         (func_create_testdir): If no module was specified, use nearly all
10584         modules.
10585
10586 2006-10-12  Jim Meyering  <jim@meyering.net>
10587
10588         Big performance improvement for fts-based tools that use FTS_NOSTAT.
10589         Avoid spurious inode-mismatch problems on non-POSIX file systems.
10590         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
10591         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
10592         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
10593         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
10594         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
10595         (fts_set_stat_required): New function.
10596         (fts_open): Defer the calls to fts_stat, if possible or requested.
10597         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
10598         into fts_stat itself.
10599         (fts_read): Perform any required (deferred) fts_stat call.
10600         (fts_build): Likewise, for the directory we're about to open and read.
10601         In the readdir loop, carefully decide whether each entry will require
10602         an eventual call to fts_stat, using dirent.d_type info if available.
10603         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
10604         a command line argument into this function.  Update all callers.
10605         Map a return value of FTS_DOT to FTS_D for a command line argument.
10606         * modules/fts (Depends-on): Add d-type.  Alphabetize.
10607         Thanks to Miklos Szeredi for his tenacity and for the initial
10608         bug report about "find" failing on a FUSE-based file system.
10609
10610         * lib/fts.c (fts_open): Use consistent indentation.
10611
10612 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
10613
10614         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
10615         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
10616         reported by Jim Meyering.  All uses of cache variables renamed
10617         to match Autoconf's.
10618         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
10619         the other one.
10620
10621         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
10622         Fix misspelling in diagnostic.
10623
10624 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
10625
10626         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
10627         defined.  Problem reported by Matthew Woehlke.
10628
10629         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
10630         Add support for Tandem NonStop R series.
10631         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
10632         Use new macro.
10633
10634         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
10635         (has_trailing_slash): Omit size arg; all callers changed.
10636         Omit 'inline', since it doesn't help performance and we'd
10637         need to configure it.
10638         Don't count //, ///, etc. as having a trailing slash.
10639         As a side effect, this removes a C99ism reported by Matthew Woehlke.
10640         (rpl_rename_dest_slash): On failure, use rename's errno rather
10641         than (in some cases) an incorrect or junk errno.
10642         Simplify code by removing need to compute length; this does
10643         cause it to make two passes instead of one over the file name,
10644         but it's worth it.
10645
10646         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
10647         change, since Autoconf's version may no longer be appropriate now
10648         that we are using CVS Autoconf's version.  Add support for Tandem.
10649
10650 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
10651             Bruno Haible  <bruno@clisp.org>
10652
10653         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
10654         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
10655         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
10656         gl_AC_TYPE_LONG_LONG.
10657
10658         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
10659         instead of HAVE_LONG_LONG.
10660         * lib/printf-args.c (printf_fetchargs): Likewise.
10661         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
10662         * lib/vasnprintf.c (VASNPRINTF): Likewise.
10663         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
10664         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
10665         gl_AC_TYPE_LONG_LONG.
10666
10667 2006-10-11  Bruno Haible  <bruno@clisp.org>
10668
10669         * m4/longlong.m4: Add comments.
10670         * m4/ulonglong.m4: Likewise.
10671
10672 2006-10-10  Bruno Haible  <bruno@clisp.org>
10673
10674         Make it possible to #define stpcpy, strdup to aliases.
10675         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
10676         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
10677
10678 2006-10-10  Bruno Haible  <bruno@clisp.org>
10679
10680         Make it possible to #define gcd to an alias.
10681         * lib/gcd.c: Include config.h.
10682
10683 2006-10-10  Bruno Haible  <bruno@clisp.org>
10684
10685         Make it possible to #define c_isascii to an alias.
10686         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
10687         defined. Undefine the macros before defining them, to avoid gcc
10688         warnings.
10689         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
10690         define NO_C_CTYPE_MACROS early.
10691
10692 2006-10-10  Bruno Haible  <bruno@clisp.org>
10693
10694         Make it possible to #define set_program_name to an alias.
10695         * lib/progname.c: Don't undefine set_program_name; instead, undefine
10696         ENABLE_RELOCATABLE early.
10697
10698 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
10699
10700         Port to Tandem NSK OSS, which has 64-bit signed int but at most
10701         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
10702         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
10703         More generally, don't assume that 64-bit signed int is available
10704         if unsigned int is, and vice versa.
10705         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
10706         unsigned symbols, not on their signed counterparts.
10707         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
10708         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
10709         (UINT64_C, UINTMAX_C):
10710         Likewise.
10711         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
10712         unsigned counterparts.
10713         (Have_long_long, Unsigned): New macros.
10714         (Int): Renamed from INT.
10715         (strtoimax): Use the new macros.
10716         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
10717         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
10718         * modules/inttypes (inttypes.h): Substitute
10719         HAVE_UNSIGNED_LONG_LONG_INT.
10720         * modules/stdint (stdint.h): Likewise.
10721         (Files): Add m4/ulonglong.m4.
10722
10723 2006-10-10  Bruno Haible  <bruno@clisp.org>
10724
10725         Fix a gcc -Wshadow warning.
10726         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
10727         to 'bucket'.
10728         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
10729         gl_linked_indexof_from_to): Likewise.
10730         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
10731         Likewise.
10732         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
10733         Likewise.
10734         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
10735         Reported by Eric Blake.
10736
10737 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
10738
10739         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
10740         for NetBSD.  Problem reported by Bruno Haible.
10741
10742 2006-10-09  Jim Meyering  <jim@meyering.net>
10743
10744         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
10745         Patch from Bruno Haible.
10746
10747 2006-10-09  Jim Meyering  <jim@meyering.net>
10748
10749         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
10750         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
10751         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
10752
10753 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
10754
10755         Don't include <config.h> twice; this doesn't work in some cases,
10756         e.g., when config.h has "#define intmax_t long long int" and
10757         we include <config.h>, <inttypes.h>, <config.h> in that order.
10758         Problem reported by Matthew Woehlke in:
10759         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
10760         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
10761         * lib/fts-cycle.c: Don't include config.h.
10762         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
10763         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
10764         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
10765         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
10766         inttypes.h.
10767         * lib/xstrtoumax.c: Likewise.
10768         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
10769         __strtol and the like, so that this module is more like its siblings.
10770         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
10771         Remove; no longer needed now that we assume gnulib inttypes.h.
10772
10773 2006-10-08  Bruno Haible  <bruno@clisp.org>
10774
10775         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
10776         option.
10777
10778 2006-10-07  Jim Meyering  <jim@meyering.net>
10779
10780         * modules/inttypes (inttypes.h): Revert what seems to have been
10781         an inadvertent part of today's change: use "|", not "/" in the
10782         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
10783
10784 2006-10-07  Bruno Haible  <bruno@clisp.org>
10785
10786         * modules/sublist: New file.
10787
10788 2006-10-07  Bruno Haible  <bruno@clisp.org>
10789
10790         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
10791         * modules/argz (argz.h): Likewise.
10792         * modules/arpa_inet (arpa/inet.h): Likewise.
10793         * modules/byteswap (byteswap.h): Likewise.
10794         * modules/configmake (configmake.h): Likewise.
10795         * modules/fcntl (fcntl.h): Likewise.
10796         * modules/fnmatch (fnmatch.h): Likewise.
10797         * modules/getopt (getopt.h): Likewise.
10798         * modules/glob (glob.h): Likewise.
10799         * modules/inttypes (inttypes.h): Likewise.
10800         * modules/netinet_in (netinet/in.h): Likewise.
10801         * modules/poll (poll.h): Likewise.
10802         * modules/stdbool (stdbool.h): Likewise.
10803         * modules/stdint (stdint.h): Likewise.
10804         * modules/sys_select (sys/select.h): Likewise.
10805         * modules/sys_socket (sys/socket.h): Likewise.
10806         * modules/sys_stat (sys/stat.h): Likewise.
10807         * modules/sysexits (sysexits.h): Likewise.
10808         * modules/unistd (unistd.h): Likewise.
10809         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
10810         Add a "DO NOT EDIT" comment to the generated file.
10811         (func_import): Likewise for gnulib-comp.m4.
10812
10813 2006-10-07  Bruno Haible  <bruno@clisp.org>
10814
10815         * lib/gl_sublist.h: New file.
10816         * lib/gl_sublist.c: New file.
10817
10818 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
10819
10820         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
10821         name (relative to the original working directory) and the file
10822         name component (relative to the temporary working directory).  All
10823         callers changed.
10824         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
10825         * lib/mkdir-p.c (make_dir_parents): Likewise.
10826         * lib/mkdir-p.h (make_dir_parents): Likewise.
10827
10828 2006-10-06  Eric Blake  <ebb9@byu.net>
10829
10830         Define several macros for use by the clean-temp module.
10831         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
10832         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
10833         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
10834
10835         * lib/clean-temp.h (close_stream_temp): New declaration.
10836         * lib/clean-temp.c (includes): Pull in headers according to what
10837         other modules are in use.
10838         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
10839
10840 2006-10-06  Bruno Haible  <bruno@clisp.org>
10841
10842         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
10843         instead of fopen, fwriteerror.
10844
10845 2006-10-06  Bruno Haible  <bruno@clisp.org>
10846
10847         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
10848         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
10849         int.
10850         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
10851         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
10852         Return an error indicator.
10853         Suggested by Eric Blake.
10854
10855 2006-10-06  Bruno Haible  <bruno@clisp.org>
10856
10857         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
10858         Reported by Eric Blake.
10859
10860 2006-10-06  Bruno Haible  <bruno@clisp.org>
10861
10862         * modules/closeout (Description): Mention stderr too.
10863
10864 2006-10-06  Bruno Haible  <bruno@clisp.org>
10865         and Paul Eggert  <eggert@cs.ucla.edu>
10866
10867         * lib/closeout.c (close_stdout): Also close stderr.
10868         * lib/closeout.h: Update comment.
10869
10870 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
10871
10872         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
10873         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
10874         * lib/dirchownmod.c: Include lchown.h.
10875         * lib/lchown.c: Don't include files that lchown.h now includes.
10876         Don't declare chown, since lchown.h now does that.
10877         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
10878         (lchown): Define to rpl_chown if lchown is declared but
10879         does not exist.  Declare using a prototype if lchown is not
10880         declared.  Add a copyright notice.
10881         * lib/mkstemp.h: Include <unistd.h>.
10882         * lib/openat.c: Include lchown.h.
10883
10884         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
10885         we now test for that separately.
10886         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
10887         rather than O_NOFOLLOW, when testing whether it's possible to
10888         avoid a race condition reliably.
10889         * lib/savewd.c (savewd_chdir): Likewise.
10890
10891         Remove macros that are no longer needed now that stdint.h is
10892         reliable.
10893         * lib/fsusage.c (UINTMAX_MAX): Remove.
10894         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
10895         * lib/utimecmp.c (SIZE_MAX): Remove.
10896
10897         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
10898
10899         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
10900         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
10901         O_NOATIME works.
10902
10903 2006-10-05  Bruno Haible  <bruno@clisp.org>
10904
10905         * lib/gl_list.h (gl_sortedlist_search_from_to,
10906         gl_sortedlist_indexof_from_to): New declarations.
10907         (gl_list_implementation): New fields sortedlist_search_from_to,
10908         sortedlist_indexof_from_to.
10909         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
10910         inline functions.
10911         * lib/gl_list.c (gl_sortedlist_search_from_to,
10912         gl_sortedlist_indexof_from_to): New functions.
10913         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
10914         function.
10915         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
10916         (gl_array_sortedlist_search_from_to): New function.
10917         (gl_array_list_implementation): Update.
10918         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
10919         function.
10920         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
10921         (gl_carray_sortedlist_search_from_to): New function.
10922         (gl_carray_list_implementation): Update.
10923         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
10924         gl_linked_sortedlist_indexof_from_to): New functions.
10925         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
10926         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
10927         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
10928         gl_tree_sortedlist_indexof_from_to): New functions.
10929         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
10930         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
10931         Update.
10932         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
10933         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
10934         Update.
10935
10936 2006-10-05  Bruno Haible  <bruno@clisp.org>
10937
10938         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
10939         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
10940         (struct gl_list_implementation): Add fields search_from_to,
10941         indexof_from_to. Remove fields search, indexof.
10942         (gl_list_search): Use the search_from_to method.
10943         (gl_list_search_from, gl_list_search_from_to): New functions.
10944         (gl_list_indexof): Use the indexof_from_to method.
10945         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
10946         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
10947         (gl_list_search_from, gl_list_search_from_to): New functions.
10948         (gl_list_indexof): Use the indexof_from_to method.
10949         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
10950         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
10951         gl_array_indexof. Add start_index, end_index arguments.
10952         (gl_array_search_from_to): Renamed from gl_array_search. Add
10953         start_index, end_index arguments.
10954         (gl_array_remove, gl_array_list_implementation): Update.
10955         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
10956         gl_carray_indexof. Add start_index, end_index arguments.
10957         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
10958         start_index, end_index arguments.
10959         (gl_carray_remove, gl_carray_list_implementation): Update.
10960         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
10961         gl_linked_search. Add start_index, end_index arguments.
10962         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
10963         start_index, end_index arguments.
10964         (gl_linked_remove): Update.
10965         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
10966         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
10967         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
10968         field to 'size_t'.
10969         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
10970         gl_tree_search. Add start_index, end_index arguments.
10971         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
10972         start_index, end_index arguments.
10973         (gl_tree_remove): Update.
10974         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
10975         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
10976         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
10977         function.
10978         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
10979         gl_tree_search. Add start_index, end_index arguments.
10980         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
10981         start_index, end_index arguments.
10982         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
10983         Update.
10984         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
10985
10986 2006-10-05  Bruno Haible  <bruno@clisp.org>
10987
10988         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
10989
10990         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
10991         fwriteerror_temp): New declarations.
10992         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
10993         (descriptors): New variable.
10994         (cleanup): First, close the descriptors.
10995         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
10996         fclose_temp, fwriteerror_temp): New functions.
10997
10998 2006-10-04  Jim Meyering  <jim@meyering.net>
10999
11000         * lib/fts.c (fts_open): Tiny comment change.
11001
11002 2006-10-04  Bruno Haible  <bruno@clisp.org>
11003
11004         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
11005         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
11006         gl_LOCK_BODY.
11007         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
11008         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
11009         gl_LOCK_EARLY_BODY.
11010         (gl_LOCK): Require gl_LOCK_BODY.
11011
11012 2006-10-04  Bruno Haible  <bruno@clisp.org>
11013
11014         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
11015         (gl_oset_search_atleast): New declaration.
11016         (struct gl_oset_implementation): Add field 'search_atleast'.
11017         (gl_oset_search_atleast): New inline function.
11018         * lib/gl_oset.c (gl_oset_search_atleast): New function.
11019         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
11020         (gl_array_oset_implementation): Update.
11021         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
11022         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
11023         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
11024
11025 2006-10-04  Bruno Haible  <bruno@clisp.org>
11026
11027         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
11028
11029 2006-10-03  Bruno Haible  <bruno@clisp.org>
11030
11031         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
11032         from gl_avltreehash_list_implementation.
11033
11034 2006-10-03  Bruno Haible  <bruno@clisp.org>
11035
11036         * lib/gl_oset.c (gl_oset_add): Fix return type.
11037
11038 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
11039
11040         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
11041
11042 2006-10-02  Eric Blake  <ebb9@byu.net>
11043
11044         * modules/strnlen (Depends-on): Add extensions.
11045
11046 2006-10-02  Eric Blake  <ebb9@byu.net>
11047
11048         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
11049         definition in 2.60+.
11050
11051 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
11052
11053         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
11054         checks.
11055
11056 2006-10-02  Bruno Haible  <bruno@clisp.org>
11057
11058         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
11059         to the AUTOMAKE_OPTIONS.
11060         Reported by Jim Meyering.
11061
11062 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
11063
11064         Work around bug in Solaris 10 /proc file system:
11065         /proc/self/fd/NNN/.. isn't the parent directory of
11066         the directory whose file descriptor is NNN.  This needs to
11067         be worked around at run time, not compile time, since a
11068         program might be built on Solaris 8, where things work, and
11069         run on Solaris 10.
11070         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
11071         to use the following interface instead:
11072         (OPENAT_BUFFER_SIZE): New macro.
11073         (openat_proc_name): New function.
11074         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
11075         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
11076         Likewise.
11077         * lib/openat-proc.c: New file.
11078         * modules/openat (Files): Add lib/openat-proc.c.
11079         (Depends-on): Add same-inode, stdbool.
11080         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
11081
11082 2006-09-29  Bruno Haible  <bruno@clisp.org>
11083
11084         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
11085         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
11086         argument. Set stdout_closed before testing for ferror, not after.
11087         (fwriteerror, fwriteerror_no_ebadf): New functions.
11088
11089 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11090
11091         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
11092
11093 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
11094
11095         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
11096         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
11097
11098 2006-09-28  Jim Meyering  <jim@meyering.net>
11099
11100         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
11101         Include <unistd.h>.
11102
11103 2006-09-28  Bruno Haible  <bruno@clisp.org>
11104
11105         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
11106         * modules/linkedhash-list (Depends-on): Likewise.
11107         * modules/rbtreehash-list (Depends-on): Likewise.
11108
11109 2006-09-28  Bruno Haible  <bruno@clisp.org>
11110
11111         * lib/strndup.h: Simplify the redefinition of strndup.
11112         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
11113         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
11114
11115 2006-09-28  Bruno Haible  <bruno@clisp.org>
11116
11117         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
11118         * lib/gl_linkedhash_list.c: Likewise.
11119         * lib/gl_rbtreehash_list.c: Likewise.
11120
11121 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
11122
11123         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
11124         getaddrinfo.
11125
11126         * lib/__fpending.h: Don't include <stdio_ext.h> unless
11127         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
11128         it causes <stdio_ext.h> to cause a compile-time error.
11129         Problem reported by Nelson H. F. Beebe.
11130         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
11131         of HAVE_DECL___PENDING.
11132
11133         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
11134         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
11135         declaration.
11136
11137 2006-09-27  Jim Meyering  <jim@meyering.net>
11138
11139         This file could end up with a definition for a function
11140         named __strndup, rather than rpl_strndup on a system with
11141         incomplete weak_alias support.
11142         * lib/strndup.c (strndup): Rename from __strndup.
11143         Remove #defines that used to map __strndup to strndup.
11144         Don't use K&R prototypes.
11145         Remove LIBC-related code, since this file is not sync'd with glibc.
11146         * lib/strndup.h: Revamp, accordingly.
11147         * m4/strndup.m4: Modernize.
11148
11149 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
11150
11151         * modules/savewd (Depends-on): Add 'raise'.
11152         * lib/savewd.c: Include <signal.h>, for 'raise'.
11153
11154 2006-09-26  Jim Meyering  <jim@meyering.net>
11155
11156         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
11157         when we detect Darwin 8.7.0's acl_get_file bug.
11158         Rearrange to perform the new (below) run-test while $LIBS
11159         contains any acl-related library.  Set USE_ACL at the end.
11160         (gl_ACL_GET_FILE): New function.
11161
11162 2006-09-26  Eric Blake  <ebb9@byu.net>
11163
11164         * lib/verror.c: Include <config.h> unconditionally.
11165
11166 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
11167
11168         * modules/clock-time (Maintainer): Add self.
11169         * modules/getlogin_r (Depends-on): Add extensions.
11170
11171 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11172
11173         * modules/clock-time: New module.
11174         * modules/nanosleep (Depends-on): Add clock-time.
11175         * modules/gethrxtime (Depends-on): Likewise.
11176         * modules/gettime (Depends-on): Likewise.
11177         * modules/settime (Depends-on): Likewise.
11178
11179         * modules/fts-lgpl: Depend on openat.
11180         * modules/mkancesdirs: Depend on savewd.
11181         * modules/mkdir-p: Likewise.
11182
11183 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11184
11185         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
11186
11187         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
11188         `gl_have_arbitrary_file_name_length_limit' to
11189         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
11190         actually works between configure runs.
11191
11192 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11193             Bruno Haible  <bruno@clisp.org>
11194
11195         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
11196
11197 2006-09-25  Jim Meyering  <jim@meyering.net>
11198
11199         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
11200         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
11201
11202 2006-09-25  Eric Blake  <ebb9@byu.net>
11203
11204         * gnulib-tool (func_import, func_create_testdir): Fix typos in
11205         exec's in 2006-09-18 patch when shuffling fds.
11206
11207 2006-09-25  Bruno Haible  <bruno@clisp.org>
11208
11209         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
11210         Reported by Jim Meyering.
11211
11212 2006-09-24  Jim Meyering  <jim@meyering.net>
11213
11214         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
11215         compare a pointer against a literal "0".  That caused failures with
11216         at least HP-UX's hpcc.
11217
11218 2006-09-22  Simon Josefsson  <jas@extundo.com>
11219
11220         * modules/gc-sha1:
11221         * modules/gc-md4:
11222         * modules/gc-hmac-sha1:
11223         * modules/gc-hmac-md5:
11224         * modules/gc-des:
11225         * modules/gc-arcfour: Distribute more files.
11226
11227 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11228
11229         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
11230         (gl_linked_iterator_from_to): Initialize struct completely.
11231         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
11232         (gl_tree_iterator_from_to): Likewise
11233         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
11234         * lib/gl_array_list.c [lint] (gl_array_iterator)
11235         (gl_array_iterator_from_to): Likewise.
11236         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
11237         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
11238         (gl_carray_iterator_from_to): Likewise.
11239
11240         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
11241         * lib/md4.c (md4_process_block): Remove unused variable.
11242         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
11243         parentheses for clarity.
11244
11245 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11246
11247         * modules/bison-i18n (Depends-on): Add gettext.
11248
11249 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11250
11251         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
11252         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
11253         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
11254         also add missing comma that caused broken test.
11255         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
11256         stdlib.h, for `abort'.
11257         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
11258         variables.
11259         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
11260         include unistd.h if present, for `rmdir'.
11261         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
11262         variables.
11263         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
11264         in the process include standard headers for prototypes.
11265         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
11266         gets declared on GNU/Linux.
11267         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
11268         unistd.h, for `rmdir'.
11269         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
11270
11271         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
11272         always true.
11273         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
11274
11275         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
11276
11277 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11278
11279         * gnulib-tool (func_version): Create output all at once.  This
11280         may help avoid triggering unnecessary SIGPIPEs, and at any
11281         rate it doesn't hurt.
11282
11283 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11284             Bruno Haible  <bruno@clisp.org>
11285
11286         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
11287         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
11288         * m4/signed.m4 (bh_C_SIGNED): Likewise.
11289
11290         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
11291         (gl_FUNC_VASPRINTF): Invoke it.
11292
11293 2006-09-22  Bruno Haible  <bruno@clisp.org>
11294
11295         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
11296         getloadavg.c as first argument.
11297
11298 2006-09-22  Bruno Haible  <bruno@clisp.org>
11299
11300         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
11301         at the beginning of the gl_INIT macro.
11302         * modules/getloadavg (configure.ac): Pass $gl_source_base to
11303         gl_GETLOADAVG.
11304
11305 2006-09-22  Bruno Haible  <bruno@clisp.org>
11306
11307         * gnulib-tool (func_create_megatestdir): Don't include the config-h
11308         module.
11309         Suggested by Ralf Wildenhues.
11310
11311 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
11312
11313         Import this patch from libc:
11314
11315         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
11316
11317         * lib/regex_internal.c (re_string_reconstruct): Handle
11318         offset < pstr->valid_raw_len && pstr->offsets_needed case.
11319         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
11320         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
11321         re_string_context_at.
11322
11323         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
11324         now requires it.
11325         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
11326         gl_REGEX now does it for us.
11327         (gl_REGEX): Add test taken from
11328         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
11329
11330         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
11331         Check that large offsets work.  Modernize Autoconf usages.
11332         Prefer "yes" to mean a good thing rather than a bad.
11333         Don't put "#define mkstemp" in config.h, as this might interfere
11334         with standard system headers that "#define mkstemp mkstemp64".
11335
11336         * modules/mkstemp (Depends-on): Add extensions, so that
11337         mkstemp is visible on some platforms.
11338         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
11339         (Include): Change to "mkstemp.h" from <stdlib.h>.
11340         (Files): Add mkstemp.h.
11341
11342         * lib/mkstemp.h: New file, since some standard headers
11343         #define mkstemp.
11344         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
11345         Include "mkstemp.h".
11346         Make the _LIBC code resemble glibc original more,
11347         e.g., use K&R style.
11348         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
11349         (mkstemp): Remove, since mkstemp.h does this for us.
11350         * lib/stdlib--.h: Include mkstemp.h.
11351
11352         Import this patch from libc:
11353
11354         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
11355
11356         * lib/tempname.c (__gen_tempname): Change attempts_min
11357         into a macro.  Use preprocessor to decide how to initialize
11358         attempts [Coverity CID 67].
11359
11360 2006-09-20  Bruno Haible  <bruno@clisp.org>
11361
11362         * lib/mkdtemp.c: Import from libc.
11363         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
11364                 * sysdeps/posix/tempname.c (__gen_tempname): Change
11365                 attempts_min into a macro.  Use preprocessor to decide how to
11366                 initialize attempts [Coverity CID 67].
11367         2001-11-27  Paul Eggert  <eggert@twinsun.com>
11368                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
11369                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
11370
11371 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11372
11373         * gnulib-tool (func_exit): New function, to allow to pass the
11374         exit status portably through the trap.  Use everywhere.
11375         (--help, --version): Signal a write error.
11376         (trap): catch SIGPIPE, for write errors.
11377         Exit at the end of the trap, with the correct exit status.
11378
11379 2006-09-19  Karl Berry  <karl@gnu.org>
11380
11381         * doc/gnulib.texi: note about the license texinfo files.
11382
11383 2006-09-19  Eric Blake  <ebb9@byu.net>
11384
11385         * gnulib-tool: Avoid space-tab.
11386
11387 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
11388
11389         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
11390         that prevented coreutils 6.1 from building.  Problem reported
11391         by Petter Reinholdtsen.
11392
11393 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
11394
11395         * gnulib-tool (avoidlist): Fix typo that broke options like
11396         --avoid=lock that are used by coreutils bootstrap.
11397
11398 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
11399
11400         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
11401         more systematically.
11402
11403 2006-09-18  Jim Meyering  <jim@meyering.net>
11404
11405         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
11406
11407 2006-09-18  Bruno Haible  <bruno@clisp.org>
11408
11409         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
11410
11411 2006-09-18  Bruno Haible  <bruno@clisp.org>
11412
11413         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
11414         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
11415         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
11416         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
11417         * m4/gettext.m4: Require autoconf >= 2.52.
11418         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
11419         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
11420         of gl_cv_header_inttypes_h.
11421
11422 2006-09-18  Bruno Haible  <bruno@clisp.org>
11423
11424         * lib/javaversion.c: Include configmake.h.
11425
11426 2006-09-18  Bruno Haible  <bruno@clisp.org>
11427
11428         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
11429         avoid that the while loops be executed in a subshell.
11430
11431 2006-09-18  Bruno Haible  <bruno@clisp.org>
11432
11433         * MODULES.html.sh (func_module): Break long lines.
11434         Suggested by Bruce Korb <bkorb@gnu.org>.
11435
11436 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11437
11438         Speed up by a factor of 1.12.
11439         * gnulib-tool (nl): New variable.
11440         (func_import): Rewrite include directive extraction to only read each
11441         directive once.
11442
11443 2006-09-17  Bruno Haible  <bruno@clisp.org>
11444
11445         * modules/javaversion (Makefile.am): Remove DEFS setting.
11446         (Depends-on): Add configmake, for PKGDATADIR definition.
11447
11448 2006-09-17  Bruno Haible  <bruno@clisp.org>
11449
11450         * gnulib-tool (func_create_testdir): Rewrite all files at once.
11451
11452 2006-09-17  Bruno Haible  <bruno@clisp.org>
11453
11454         * gnulib-tool (func_append): New function, stolen from libtool.m4.
11455         (func_modules_transitive_closure, func_modules_add_dummy,
11456         func_modules_to_filelist, func_import, func_create_testdir,
11457         func_create_megatestdir, ...): Use it wherever possible.
11458         Suggested by Ralf Wildenhues.
11459
11460 2006-09-16  Karl Berry  <karl@gnu.org>
11461
11462         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
11463         to avoid sectioning errors.
11464         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
11465         [ifinfo]: blank line after @center-ed titles.
11466         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
11467         Spell FSF address consistently with others.
11468         (These changes approved by rms.)
11469
11470 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11471
11472         Speed up by a factor of 1.61.
11473         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
11474         already checked module names again.
11475
11476 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11477
11478         Speed up by a factor of 1.13.
11479         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
11480         for new_files, and the input to func_add_or_update.
11481
11482 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11483
11484         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
11485         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
11486
11487 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
11488
11489         * modules/mkancesdirs (Depends-on): Add fcntl.
11490         * modules/savewd: New file.
11491         * MODULES.html.sh (File system functions): Add savewd.
11492
11493         * modules/configmake (Makefile.am): Add support for the
11494         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
11495
11496 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
11497
11498         * m4/savewd.m4: New file.
11499
11500 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
11501
11502         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
11503         (dirchownmod): New arg FD.  All callers changed.
11504         Use FD rather than opening the directory ourself, as opening is
11505         now the caller's responsibility.
11506         * lib/dirchownmod.h: Likewise.
11507         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
11508         hosts that require <sys/types.h> before <sys/stat.h>.  Include
11509         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
11510         (test_dir): Remove.
11511         (mkancesdirs): Return length of prefix of FILE that has already
11512         been made, or -2 if there is a child doing the work.  Redo
11513         algorithm so that it is O(N) rather than O(N**2).  Optimize away
11514         ".", and treat ".." specially since it might stray back into
11515         already-created areas.  Use a subprocess if necessary.  New arg
11516         WD; all users changed.  MAKE_DIR function should now return 1
11517         if it creates a directory that is not readable.  Return -2 if
11518         a child process is spun off.
11519         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
11520         Adjust signature to match code.
11521         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
11522         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
11523         all users changed.
11524         * lib/savewd.c, lib/savewd.h: New files.
11525
11526 2006-09-15  Jim Meyering  <jim@meyering.net>
11527
11528         * modules/rename-dest-slash: New module.
11529         * MODULES.html.sh (posix_compat): Add it here.
11530
11531         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
11532
11533 2006-09-15  Jim Meyering  <jim@meyering.net>
11534
11535         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
11536         file.
11537
11538         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
11539
11540 2006-09-15  Jim Meyering  <jim@meyering.net>
11541
11542         * lib/rename-dest-slash.c (has_trailing_slash): Use
11543         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
11544         (rpl_rename_dest_slash): Perform the cheaper trailing slash
11545         test before testing whether SRC is a directory.
11546         Suggestions from Bruno Haible.
11547
11548         Avoid a warning about an unused variable.
11549         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
11550         into the #ifdef block where it's used.
11551
11552         * lib/rename-dest-slash.c: New file.
11553
11554 2006-09-14  Bruno Haible  <bruno@clisp.org>
11555
11556         * lib/allocsa.c: Include <config.h> unconditionally.
11557         * lib/asnprintf.c: Likewise.
11558         * lib/asprintf.c: Likewise.
11559         * lib/c-strcasecmp.c: Likewise.
11560         * lib/c-strcasestr.c: Likewise.
11561         * lib/c-strncasecmp.c: Likewise.
11562         * lib/c-strstr.c: Likewise.
11563         * lib/classpath.c: Likewise.
11564         * lib/clean-temp.c: Likewise.
11565         * lib/concatpath.c: Likewise.
11566         * lib/copy-file.c: Likewise.
11567         * lib/csharpcomp.c: Likewise.
11568         * lib/csharpexec.c: Likewise.
11569         * lib/execute.c: Likewise.
11570         * lib/fatal-signal.c: Likewise.
11571         * lib/findprog.c: Likewise.
11572         * lib/fwriteerror.c: Likewise.
11573         * lib/gl_array_list.c: Likewise.
11574         * lib/gl_array_oset.c: Likewise.
11575         * lib/gl_avltree_list.c: Likewise.
11576         * lib/gl_avltree_oset.c: Likewise.
11577         * lib/gl_avltreehash_list.c: Likewise.
11578         * lib/gl_carray_list.c: Likewise.
11579         * lib/gl_linked_list.c: Likewise.
11580         * lib/gl_linkedhash_list.c: Likewise.
11581         * lib/gl_list.c: Likewise.
11582         * lib/gl_oset.c: Likewise.
11583         * lib/gl_rbtree_list.c: Likewise.
11584         * lib/gl_rbtree_oset.c: Likewise.
11585         * lib/gl_rbtreehash_list.c: Likewise.
11586         * lib/imaxabs.c: Likewise.
11587         * lib/imaxdiv.c: Likewise.
11588         * lib/javacomp.c: Likewise.
11589         * lib/javaexec.c: Likewise.
11590         * lib/javaversion.c: Likewise.
11591         * lib/linebreak.c: Likewise.
11592         * lib/localcharset.c: Likewise.
11593         * lib/lock.c: Likewise.
11594         * lib/mbchar.c: Likewise.
11595         * lib/mbswidth.c: Likewise.
11596         * lib/mkdtemp.c: Likewise.
11597         * lib/pipe.c: Likewise.
11598         * lib/printf-args.c: Likewise.
11599         * lib/printf-parse.c: Likewise.
11600         * lib/progname.c: Likewise.
11601         * lib/progreloc.c: Likewise.
11602         * lib/readlink.c: Likewise.
11603         * lib/sh-quote.c: Likewise.
11604         * lib/stpcpy.c: Likewise.
11605         * lib/stpncpy.c: Likewise.
11606         * lib/strcasecmp.c: Likewise.
11607         * lib/strcasestr.c: Likewise.
11608         * lib/strcspn.c: Likewise.
11609         * lib/striconv.c: Likewise.
11610         * lib/strncasecmp.c: Likewise.
11611         * lib/strnlen1.c: Likewise.
11612         * lib/strstr.c: Likewise.
11613         * lib/strtok_r.c: Likewise.
11614         * lib/tls.c: Likewise.
11615         * lib/tmpdir.c: Likewise.
11616         * lib/unicodeio.c: Likewise.
11617         * lib/unsetenv.c: Likewise.
11618         * lib/vasnprintf.c: Likewise.
11619         * lib/vasprintf.c: Likewise.
11620         * lib/wait-process.c: Likewise.
11621         * lib/xallocsa.c: Likewise.
11622         * lib/xsetenv.c: Likewise.
11623         * lib/xstriconv.c: Likewise.
11624
11625 2006-09-13  Simon Josefsson  <jas@extundo.com>
11626
11627         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
11628         that internally, suggested by Ralf Wildenhues
11629         <Ralf.Wildenhues@gmx.de>.
11630
11631 2006-09-13  Simon Josefsson  <jas@extundo.com>
11632
11633         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
11634         @LIBOBJS@.
11635         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
11636
11637 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
11638
11639         * lib/_fpending.c: Include <config.h> unconditionally, since we no
11640         longer worry about uses that don't define HAVE_CONFIG_H.
11641         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
11642         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
11643         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
11644         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
11645         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
11646         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
11647         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
11648         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
11649         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
11650         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
11651         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
11652         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
11653         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
11654         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
11655         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
11656         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
11657         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
11658         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
11659         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
11660         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
11661         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
11662         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
11663         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
11664         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
11665         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
11666         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
11667         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
11668         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
11669         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
11670         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
11671         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
11672         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
11673         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
11674         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
11675         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
11676         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
11677         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
11678         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
11679         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
11680         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
11681         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
11682         Likewise.
11683
11684 2006-09-13  Eric Blake  <ebb9@byu.net>
11685
11686         * lib/getopt.c: Fix typo in last commit.
11687
11688 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
11689
11690         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
11691         dgettext.
11692
11693 2006-09-12  Jim Meyering  <jim@meyering.net>
11694
11695         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
11696         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
11697         Reported by Nelson H. F. Beebe.
11698
11699 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
11700
11701         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
11702         program_invocation_name and program_invocation_short_name are
11703         initialized.
11704         * lib/argp-namefrob.h: Move declarations of program_invocation_name
11705         and program_invocation_short_name to argp.h, so they are visible
11706         to user programs.
11707         * lib/argp.h: Likewise
11708
11709 2006-09-10  Bruno Haible  <bruno@clisp.org>
11710
11711         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
11712         m4/inttypes_h.m4, m4/uintmax_t.m4.
11713
11714 2006-09-10  Bruno Haible  <bruno@clisp.org>
11715
11716         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
11717         gl_AC_TYPE_UINTMAX_T.
11718
11719 2006-09-10  Bruno Haible  <bruno@clisp.org>
11720
11721         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
11722
11723 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
11724
11725         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
11726         convention.  Text proposed by Bruno Haible.
11727         (struct argp_option): Document the use of N_() wrappers.
11728
11729         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
11730         '\v', and translate the two parts separately, instead of feeding
11731         the whole string to gettext.  This allows to exclude
11732         '\v' from the strings visible to the translator by writing doc
11733         strings as N_("..") "\v" N_("..").
11734
11735 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
11736
11737         * config/srclist.txt: Undo latest change; the bug was fixed.
11738
11739 2006-09-09  Bruno Haible  <bruno@clisp.org>
11740
11741         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
11742         assignments if building a library without libtool.
11743         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
11744         in func_emit_lib_Makefile_am.
11745         (func_import): When building a static library libfoo.a, arrange to
11746         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
11747         (func_create_testdir): Likewise.
11748         * modules/gc (configure.ac, Makefile.am): If building statically,
11749         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
11750         * modules/iconvme (configure.ac, Makefile.am): Likewise.
11751         * modules/striconv (configure.ac, Makefile.am): Likewise.
11752         Based on a suggestion by Ralf Wildenhues.
11753
11754 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11755
11756         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
11757         Check for unistd.h too, since Autoconf doesn't assume POSIX.
11758         Also:
11759
11760         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11761         Add year_2050_test to catch glibc bug 2821
11762         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
11763
11764         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
11765         Prefer #ifdef to #if.
11766
11767         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
11768         Return from 'main' instead of calling 'exit'.
11769
11770 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11771
11772         * lib/mktime.c (guess_time_tm): Fix bug where mktime
11773         returned the maximum time_t value rather than (time_t) -1.
11774         Problem originally reported by William Bardwell
11775         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
11776
11777         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
11778         Moved to here ...
11779         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
11780         ... from here.
11781
11782 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11783
11784         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
11785         2821 is fixed.
11786
11787 2006-09-08  Jim Meyering  <jim@meyering.net>
11788
11789         Don't make generated files read-only.  That would bother too many
11790         people.  However, do retain the ability to work when targets are
11791         read-only: remove the destination and temporary files before writing
11792         them (when generated via sed or echo), or by using the -f option for
11793         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
11794         * modules/alloca-opt, modules/argz, modules/arpa_inet:
11795         * modules/byteswap, modules/configmake, modules/fcntl:
11796         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
11797         * modules/localcharset, modules/netinet_in, modules/poll:
11798         * modules/stdbool, modules/stdint, modules/sys_select:
11799         * modules/sys_socket, modules/sys_stat, modules/sysexits:
11800
11801 2006-09-08  Jim Meyering  <jim@meyering.net>
11802
11803         Avoid new build failure on FreeBSD 6.0.
11804         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
11805         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
11806         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
11807
11808 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11809
11810         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
11811
11812 2006-09-07  Jim Meyering  <jim@meyering.net>
11813
11814         Fix global typo in last change: use chmod u-w, not chmod u-x.
11815         Spotted by Paul Eggert and Bruce Korb.
11816         * modules/alloca-opt, modules/argz, modules/arpa_inet:
11817         * modules/byteswap, modules/configmake, modules/fcntl:
11818         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
11819         * modules/localcharset, modules/netinet_in, modules/poll:
11820         * modules/stdbool, modules/stdint, modules/sys_select:
11821         * modules/sys_socket, modules/sys_stat, modules/sysexits:
11822
11823 2006-09-06  Jim Meyering  <jim@meyering.net>
11824
11825         Make generated files be read-only.
11826         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
11827         Ensure that each generated file is now read-only.
11828         * modules/argz: Likewise.
11829         * modules/arpa_inet: Likewise.
11830         * modules/byteswap: Likewise.
11831         * modules/configmake: Likewise.
11832         * modules/fcntl: Likewise.
11833         * modules/fnmatch: Likewise.
11834         * modules/getopt: Likewise.
11835         * modules/glob: Likewise.
11836         * modules/inttypes: Likewise.
11837         * modules/netinet_in: Likewise.
11838         * modules/poll: Likewise.
11839         * modules/stdbool: Likewise.
11840         * modules/stdint: Likewise.
11841         * modules/sys_select: Likewise.
11842         * modules/sys_socket: Likewise.
11843         * modules/sys_stat: Likewise.
11844         * modules/sysexits: Likewise.
11845         * modules/localcharset: Same as above, but continue using temporary
11846         file named "t-$@" (why different?) rather than the "$@-t" used
11847         everywhere else.
11848
11849         * modules/sysexits (Makefile.am): Replace literal occurrences
11850         of "sysexit.h" more readable, and more consistent, "$@".
11851
11852 2006-09-06  Bruno Haible  <bruno@clisp.org>
11853
11854         * modules/striconv: New file.
11855         * modules/xstriconv: New file.
11856         * MODULES.html.sh (Internationalization functions): Add striconv,
11857         xstriconv.
11858
11859 2006-09-06  Bruno Haible  <bruno@clisp.org>
11860
11861         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
11862         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
11863         not using libtool correctly.
11864
11865 2006-09-06  Bruno Haible  <bruno@clisp.org>
11866
11867         * lib/striconv.h: New file.
11868         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
11869         iconvstring.c.
11870         * lib/xstriconv.h: New file.
11871         * lib/xstriconv.c: New file.
11872
11873 2006-09-06  Bruno Haible  <bruno@clisp.org>
11874
11875         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
11876         lib_..._LDFLAGS.
11877
11878 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11879
11880         * lib/argz_.h: Sync from Libtool.
11881
11882         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
11883                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11884
11885         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
11886
11887 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
11888
11889         * modules/trim: New file.
11890
11891 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
11892
11893         * lib/trim.h: New file.
11894         * lib/trim.c: New file.
11895
11896 2006-09-05  Bruno Haible  <bruno@clisp.org>
11897
11898         * MODULES.html.sh (String handling): Add trim.
11899
11900 2006-09-04  Karl Berry  <karl@gnu.org>
11901
11902         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
11903         until next release.
11904
11905 2006-09-03  Bruno Haible  <bruno@clisp.org>
11906
11907         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
11908         correctly.
11909
11910 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
11911
11912         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
11913         not gl_GETLOADAVG.  Omit unneeded semicolons.
11914         Problems reported by Ralf Wildenhues in
11915         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
11916         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
11917         at the end, which is the usual gnulib style.
11918
11919         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
11920         of doing all the work ourselves.
11921         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
11922         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
11923
11924 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
11925
11926         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
11927         Problem reported by Ralf Wildenhues in
11928         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
11929
11930         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
11931         HAVE_STRUCT_STATFS_F_FSTYPENAME.
11932
11933 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
11934
11935         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
11936         yesterday's patch by changing test -n to test -z.
11937
11938 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11939
11940         * modules/getloadavg (Files): Add m4/getloadavg.m4.
11941         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
11942         the former is now obsolescent.
11943
11944         * modules/chdir-long (Depends-on): Add fcntl.
11945
11946 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11947
11948         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
11949         obsolescent, and programs should use gnulib instead.
11950         * m4/getloadavg.m4: New file, with contents taken from Autoconf
11951         but with prefixes changed.
11952
11953 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11954
11955         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
11956         or stdbool.h, because they might not exist while configuring.
11957
11958         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
11959         Don't include unistd.h or limits.h; not needed, since chdir-long.h
11960         does that for us.
11961         (O_DIRECTORY): Remove.
11962
11963 2006-08-31  Eric Blake  <ebb9@byu.net>
11964
11965         * gnulib-tool: Don't let emacs change spaces to TAB.
11966
11967 2006-08-31  Bruno Haible  <bruno@clisp.org>
11968
11969         * gnulib-tool: When calling func_import more than once, do it in a
11970         subshell.
11971         Reported by Eric Blake <ebb9@byu.net>.
11972
11973 2006-08-31  Bruno Haible  <bruno@clisp.org>
11974
11975         * gnulib-tool (nl): Remove variable.
11976         (sed_transform_lib_file): Use more robust test for config-h module.
11977         (func_import): Fix typo in 2006-08-25 patch.
11978
11979 2006-08-31  Bruno Haible  <bruno@clisp.org>
11980
11981         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
11982         specified, augment Makefile.am variables instead of assigning them.
11983
11984 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
11985
11986         Work around a bug in both the Linux and SunOS 64-bit kernels:
11987         nanosleep mishandles sleeps for longer than 2**31 seconds.
11988         Problem reported by Frank v Waveren in
11989         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
11990         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
11991         Check for nanosleep bug.
11992         (LIB_NANOSLEEP): Append clock_gettime library if needed.
11993
11994 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
11995
11996         Work around a bug in both the Linux and SunOS 64-bit kernels:
11997         nanosleep mishandles sleeps for longer than 2**31 seconds.
11998         Problem reported by Frank v Waveren in
11999         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
12000         * lib/nanosleep.c (BILLION): New constant.
12001         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
12002         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
12003         implementation.
12004
12005 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
12006
12007         * modules/nanosleep (Depends-on): Add gettime.
12008
12009 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
12010         and Simon Josefsson  <jas@extundo.com>
12011         and Oskar Liljeblad  <oskar@osk.mine.nu>
12012
12013         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
12014         * gnulib-tool (func_import): New license type 'unmodifiable license
12015         text'.
12016         * modules/fdl: Use it.  Longer description.
12017         * module/gpl, module/lgpl: New files.
12018
12019 2006-08-30  Jim Meyering  <jim@meyering.net>
12020
12021         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
12022         shadowing the parameter.
12023
12024 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12025
12026         Sync from Libtool:
12027
12028         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12029
12030         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
12031         sharing with gnulib.  Report by Eric Blake.
12032
12033 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
12034
12035         * modules/isapipe: New file.
12036         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
12037
12038 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
12039
12040         * modules/configmake (Makefile.am): Add a comment, and omit
12041         the CONFIGMAKE_ prefix from generated macro names.  Suggested
12042         by Bruno Haible.
12043
12044 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
12045
12046         * m4/isapipe.m4: New file.
12047
12048 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
12049
12050         * lib/isapipe.c, lib/isapipe.h: New files.
12051
12052 2006-08-29  Jim Meyering  <jim@meyering.net>
12053
12054         * modules/configmake (Makefile.am): Make configmake.h depend on
12055         Makefile.  Otherwise, a stale configmake.h could hang around.
12056
12057 2006-08-29  Eric Blake  <ebb9@byu.net>
12058
12059         * lib/error.c (error_at_line, print_errno_message): Match libc, after
12060         resolution of upstream bug 3044.
12061
12062 2006-08-29  Bruno Haible  <bruno@clisp.org>
12063
12064         * modules/localcharset (Depends-on): Add configmake.
12065         (Makefile.am): Remove setting of LIBDIR through DEFS.
12066
12067 2006-08-29  Bruno Haible  <bruno@clisp.org>
12068
12069         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
12070         defined.
12071
12072 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
12073
12074         * modules/fcntl: New file.
12075         * modules/chdir-safer (Depends-on): Add fcntl.
12076         * modules/fts: Likewise.
12077         * modules/mkdir-p: Likewise.
12078
12079         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
12080         This undoes the most recent change, since we're now addressing the
12081         problem in a different way.
12082
12083         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
12084         into output, since the output might be called Makefile.am even
12085         if $makefile_name is something different.
12086         (func_import): Use $makefile_am rather than
12087         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
12088         empty.
12089
12090         * modules/inttypes (Files): Add m4/inttypes-h.m4.
12091
12092 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
12093
12094         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
12095         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
12096         recent change to stdint.m4, since we're now addressing the problem in a
12097         different way.
12098
12099 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
12100
12101         * m4/fcntl_h.m4: New file.
12102
12103 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
12104
12105         * lib/fcntl_.h: New file.
12106         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
12107         the fcntl module.
12108         * lib/dirchownmod.c: Likewise.
12109         * lib/fts.c: Likewise.
12110
12111         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
12112         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
12113         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
12114         just before including <inttypes.h>, to avoid circular inclusion.
12115
12116 2006-08-28  Jim Meyering  <jim@meyering.net>
12117
12118         * doc/visibility.texi: Actually read and correct the grammar of the
12119         sentence affected by yesterday's change.
12120
12121 2006-08-28  Eric Blake  <ebb9@byu.net>
12122
12123         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
12124         needs wrapper.
12125
12126 2006-08-28  Eric Blake  <ebb9@byu.net>
12127
12128         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
12129
12130 2006-08-28  Eric Blake  <ebb9@byu.net>
12131
12132         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
12133
12134 2006-08-28  Bruno Haible  <bruno@clisp.org>
12135
12136         * modules/c-strstr: New file, from GNU gettext.
12137         * MODULES.html.sh (String handling): Add c-strstr.
12138
12139 2006-08-28  Bruno Haible  <bruno@clisp.org>
12140
12141         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
12142         macros.
12143         Reported by Eric Blake.
12144
12145 2006-08-28  Bruno Haible  <bruno@clisp.org>
12146
12147         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
12148         (VASNPRINTF): Return a string of length > INT_MAX without failing.
12149         * lib/vasprintf.c: Include errno.h, limits.h.
12150         (EOVERFLOW): New fallback definition.
12151         (vasprintf): Test here whether the string length is > INT_MAX.
12152         * lib/vsnprintf.c: Include errno.h, limits.h.
12153         (EOVERFLOW): New fallback definition.
12154         (vsnprintf): Fix bug when generated string was too long for the buffer.
12155         Test here whether the string length is > INT_MAX.
12156
12157 2006-08-28  Bruno Haible  <bruno@clisp.org>
12158
12159         * lib/inttypes_.h (SCNX*): Remove definitions.
12160         Reported by Eric Blake.
12161
12162 2006-08-28  Bruno Haible  <bruno@clisp.org>
12163
12164         * lib/c-strstr.h: New file, from GNU gettext.
12165         * lib/c-strstr.c: New file, from GNU gettext.
12166
12167 2006-08-28  Bruno Haible  <bruno@clisp.org>
12168
12169         * gnulib-tool: Reorder some statements.
12170
12171 2006-08-28  Bruno Haible  <bruno@clisp.org>
12172
12173         * gnulib-tool: New option --makefile-name.
12174         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
12175         $makefile_name.
12176         (func_import): Write $makefile_name to the cache file, and read it from
12177         there unless explicitly specified. Use $makefile_name as file name
12178         instead of Makefile.am. Adjust the recommendations accordingly.
12179
12180 2006-08-28  Bruno Haible  <bruno@clisp.org>
12181
12182         * gnulib-tool (func_verify_module): Check against misapplying patch.
12183
12184 2006-08-28  Bruno Haible  <bruno@clisp.org>
12185
12186         * gnulib-tool (func_relativize, func_relconcat): New functions.
12187         Give an error if --local-dir is given with --update.
12188         Remove trailing slashes from $local_gnulib_dir.
12189         (func_import): Store the relativized $local_gnulib_dir in
12190         gnulib-cache.m4, and read it from there if not specified explicitly.
12191
12192 2006-08-28  Bruno Haible  <bruno@clisp.org>
12193
12194         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
12195         is the current directory. Respect also $local_gnulib_dir.
12196
12197 2006-08-28  Bruno Haible  <bruno@clisp.org>
12198             Simon Josefsson  <jas@extundo.com>
12199
12200         BeOS portability.
12201         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
12202
12203 2006-08-27  Jim Meyering  <jim@meyering.net>
12204
12205         * doc/visibility.texi: Remove duplicate word: "pointer".
12206
12207 2006-08-26  Bruno Haible  <bruno@clisp.org>
12208
12209         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
12210         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
12211         (Makefile.am): Create inttypes.h from inttypes_.h.
12212         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
12213
12214         * modules/imaxabs: New file.
12215
12216         * modules/imaxdiv: New file.
12217
12218 2006-08-26  Bruno Haible  <bruno@clisp.org>
12219
12220         * m4/inttypes.m4: New file.
12221         * m4/_inttypes_h.m4: Remove file.
12222         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
12223         PRI_MACROS_BROKEN.
12224         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
12225
12226         * m4/imaxabs.m4: New file.
12227
12228         * m4/imaxdiv.m4: New file.
12229
12230 2006-08-26  Bruno Haible  <bruno@clisp.org>
12231
12232         * lib/inttypes_.h: New file.
12233         * lib/inttypes.h: Remove file.
12234         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
12235
12236         * lib/imaxabs.c: New file.
12237
12238         * lib/imaxdiv.c: New file.
12239
12240 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12241
12242         New config-h module, so that "make" output needn't be cluttered
12243         by -DHAVE_CONFIG_H.
12244         * MODULES.html.sh (Support for building libraries and executables):
12245         Add config-h.
12246         * modules/config-h: New file.
12247         * gnulib-tool (nl, sed_transform_lib_file): New vars.
12248         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
12249         the config-h module is used.
12250
12251         New configmake module, so that "make" output needn't be cluttered
12252         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
12253         * MODULES.html.sh (Support for building libraries and executables):
12254         Add configmake.
12255         * modules/configmake: New file.
12256
12257 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12258
12259         * m4/config-h.m4: New file.
12260
12261 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12262
12263         * config/srclist.txt: Add elisp-comp.
12264
12265 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12266
12267         * MODULES.html.sh (Support for building libraries and executables):
12268         Add elisp-comp.
12269         * build-aux/elisp-comp: New file.
12270         * modules/elisp-comp: New file.
12271
12272 2006-08-24  Bruno Haible  <bruno@clisp.org>
12273
12274         * gnulib-tool (func_create_testdir): Use non-default values of
12275         sourcebase and m4base.
12276
12277 2006-08-24  Bruno Haible  <bruno@clisp.org>
12278
12279         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
12280         HTML structure.
12281
12282 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
12283
12284         * modules/openat (Depends-on): Add lchown.
12285
12286 2006-08-23  Bruno Haible  <bruno@clisp.org>
12287
12288         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
12289         of gl_LOCK_EARLY instead of gl_LOCK.
12290
12291 2006-08-23  Bruno Haible  <bruno@clisp.org>
12292
12293         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
12294         on OSF/1 to no.
12295         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
12296
12297 2006-08-23  Bruno Haible  <bruno@clisp.org>
12298
12299         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
12300         as unusable.
12301
12302         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
12303         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
12304         (gl_LOCK): New macro.
12305
12306 2006-08-22  Simon Josefsson  <jas@extundo.com>
12307
12308         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
12309         to md5 module.
12310
12311 2006-08-22  Simon Josefsson  <jas@extundo.com>
12312
12313         * MODULES.html.sh: Add "Support for maintaining and release
12314         projects".
12315
12316         * build-aux/gnupload: New file, from coreutils.
12317
12318 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
12319
12320         Avoid the need for AC_LIBSOURCES in m4 macros.
12321         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
12322         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
12323         * modules/check-version (EXTRA_DIST): Add check-version.h.
12324         * modules/crc (EXTRA_DIST): Add crc.h.
12325         * modules/des (EXTRA_DIST): Add des.h.
12326         * modules/gc (EXTRA_DIST): Add gc.h.
12327         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
12328         * modules/getline (EXTRA_DIST): Add getline.h.
12329         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
12330         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
12331         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
12332         * modules/md2 (EXTRA_DIST): Add md2.h.
12333         * modules/md4 (EXTRA_DIST): Add md4.h.
12334         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
12335         * modules/read-file (EXTRA_DIST): Add read-file.h.
12336         * modules/readline (EXTRA_DIST): Add readline.h.
12337         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
12338         rijndael-api-fst.h.
12339
12340 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
12341
12342         * m4/rijndael.m4 (gl_ARCFOUR):
12343         * m4/arctwo.m4 (gl_ARCTWO):
12344         * m4/check-version.m4 (gl_CHECK_VERSION):
12345         * m4/crc.m4 (gl_CRC):
12346         * m4/des.m4 (gl_DES):
12347         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
12348         * m4/gc.m4 (gl_GC):
12349         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
12350         * m4/getline.m4 (gl_FUNC_GETLINE):
12351         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
12352         * m4/hmac-md5.m4 (gl_HMAC_MD5):
12353         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
12354         * m4/md2.m4 (gl_MD2):
12355         * m4/md4.m4 (gl_MD4):
12356         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
12357         * m4/read-file.m4 (gl_FUNC_READ_FILE):
12358         * m4/readline.m4 (gl_FUNC_READLINE):
12359         * m4/rijndael.m4 (gl_RIJNDAEL):
12360         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
12361         to get the necessary .h files and whatnot.
12362
12363 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
12364
12365         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
12366         gnulib rather than the other way around.
12367         * config/srclistvars.sh (COREUTILS): Remove.
12368
12369 2006-08-22  Jim Meyering  <jim@meyering.net>
12370
12371         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
12372
12373         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
12374
12375 2006-08-22  Eric Blake  <ebb9@byu.net>
12376
12377         * modules/regexprops-generic: New file.
12378         * MODULES.html.sh (Support for building documentation): List it.
12379
12380 2006-08-22  Eric Blake  <ebb9@byu.net>
12381
12382         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
12383         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
12384         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
12385         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
12386
12387 2006-08-22  Bruno Haible  <bruno@clisp.org>
12388
12389         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
12390         and lib_LTLIBRARIES like the other lib_* variables.
12391
12392 2006-08-22  Bruno Haible  <bruno@clisp.org>
12393
12394         * build-aux/x-to-1.in: New file, from GNU gettext.
12395
12396 2006-08-22  Bruno Haible  <bruno@clisp.org>
12397
12398         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
12399         <utmpx.h> exists.
12400
12401 2006-08-22  Bruno Haible  <bruno@clisp.org>
12402
12403         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
12404         <utmpx.h> exists.
12405
12406 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
12407
12408         BeOS portability.
12409         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
12410         exist.
12411         Problem reported by Bruno Haible.
12412
12413 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
12414
12415         Avoid the need for AC_LIBSOURCES in m4 macros.
12416         * modules/acl (EXTRA_DIST): Add acl.h.
12417         * modules/argmatch (Files): Add m4/argmatch.m4.
12418         (configure.ac): Add gl_ARGMATCH.
12419         (EXTRA_DIST): Renamed from lib_SOURCES, for
12420         consistency with the other modules.  Remove argmatch.c.
12421         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
12422         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
12423         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
12424         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
12425         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
12426         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
12427         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
12428         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
12429         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
12430         * modules/closeout (EXTRA_DIST): Add closeout.h.
12431         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
12432         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
12433         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
12434         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
12435         dirname.h; remove basename.c and stripslash.c.
12436         * modules/exclude (EXTRA_DIST): Add exclude.h.
12437         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
12438         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
12439         * modules/file-type (EXTRA_DIST): Add file-type.h.
12440         * modules/filemode (EXTRA_DIST): Add filemode.h.
12441         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
12442         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
12443         * modules/fpending (EXTRA_DIST): Add __fpending.h.
12444         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
12445         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
12446         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
12447         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
12448         * modules/getdate (EXTRA_DIST): Add getdate.c.
12449         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
12450         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
12451         * modules/getpass (EXTRA_DIST): Add getpass.h.
12452         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
12453         * modules/group-member (EXTRA_DIST): Add group-member.h.
12454         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
12455         * modules/hash (EXTRA_DIST): Add hash.h.
12456         * modules/human (EXTRA_DIST): Add human.h.
12457         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
12458         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
12459         * modules/lchown (EXTRA_DIST): Add lchown.h.
12460         * modules/long-options (EXTRA_DIST): Add long-options.h.
12461         * modules/lstat (EXTRA_DIST): Add lstat.h.
12462         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
12463         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
12464         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
12465         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
12466         * modules/memxor (EXTRA_DIST): Add memxor.h.
12467         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
12468         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
12469         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
12470         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
12471         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
12472         * modules/physmem (EXTRA_DIST): Add physmem.h.
12473         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
12474         * modules/posixver (EXTRA_DIST): Add posixver.h.
12475         * modules/quote (EXTRA_DIST): Add quote.h.
12476         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
12477         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
12478         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
12479         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
12480         regex_internal.h regexec.c.
12481         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
12482         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
12483         * modules/same (EXTRA_DIST): Add same.h.
12484         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
12485         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
12486         * modules/savedir (EXTRA_DIST): Add savedir.h.
12487         * modules/sha1 (EXTRA_DIST): Add sha1.h.
12488         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
12489         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
12490         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
12491         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
12492         * modules/strdup (EXTRA_DIST): Add strdup.h.
12493         * modules/strftime (EXTRA_DIST): Add strftime.h.
12494         * modules/strndup (EXTRA_DIST): Add strndup.h.
12495         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
12496         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
12497         * modules/time_r (EXTRA_DIST): Add time_r.h.
12498         * modules/timespec (EXTRA_DIST): Add timespec.h.
12499         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
12500         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
12501         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
12502         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
12503         * modules/userspec (EXTRA_DIST): Add userspec.h.
12504         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
12505         * modules/utimens (EXTRA_DIST): Add utimens.h.
12506         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
12507         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
12508         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
12509         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
12510         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
12511         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
12512         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
12513         * modules/yesno (EXTRA_DIST): Add yesno.h.
12514
12515 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
12516
12517         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
12518
12519         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
12520         * m4/dev-ino.m4, same-inode.m4: Remove.
12521
12522         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
12523         * m4/acl.m4 (AC_FUNC_ACL):
12524         * m4/backupfile.m4 (gl_BACKUPFILE):
12525         * m4/c-strtod.m4 (gl_C99_STRTOLD):
12526         * m4/canon-host.m4 (gl_CANON_HOST):
12527         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
12528         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
12529         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
12530         * m4/cloexec.m4 (gl_CLOEXEC):
12531         * m4/close-stream.m4 (gl_CLOSE_STREAM):
12532         * m4/closeout.m4 (gl_CLOSEOUT):
12533         * m4/dirfd.m4 (gl_FUNC_DIRFD):
12534         * m4/dirname.m4 (gl_DIRNAME):
12535         * m4/exclude.m4 (gl_EXCLUDE):
12536         * m4/exitfail.m4 (gl_EXITFAIL):
12537         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
12538         * m4/file-type.m4 (gl_FILE_TYPE):
12539         * m4/filemode.m4 (gl_FILEMODE):
12540         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
12541         * m4/fpending.m4 (gl_FUNC_FPENDING):
12542         * m4/fprintftime.m4 (gl_FPRINTFTIME):
12543         * m4/fts.m4 (gl_FUNC_FTS):
12544         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
12545         * m4/getdate.m4 (gl_GETDATE):
12546         * m4/gethrxtime.m4 (gl_GETHRXTIME):
12547         * m4/getpagesize.m4 (gl_GETPAGESIZE):
12548         * m4/getpass.m4 (gl_FUNC_GETPASS):
12549         * m4/gettime.m4 (gl_GETTIME):
12550         * m4/getugroups.m4 (gl_GETUGROUPS):
12551         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
12552         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
12553         * m4/hard-locale.m4 (gl_HARD_LOCALE):
12554         * m4/hash.m4 (gl_HASH):
12555         * m4/idcache.m4 (gl_IDCACHE):
12556         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
12557         * m4/lchown.m4 (gl_FUNC_LCHOWN):
12558         * m4/long-options.m4 (gl_LONG_OPTIONS):
12559         * m4/lstat.m4 (gl_FUNC_LSTAT):
12560         * m4/md5.m4 (gl_MD5):
12561         * m4/memcasecmp.m4 (gl_MEMCASECMP):
12562         * m4/memcoll.m4 (gl_MEMCOLL):
12563         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
12564         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
12565         * m4/memxor.m4 (gl_MEMXOR):
12566         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
12567         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
12568         * m4/modechange.m4 (gl_MODECHANGE):
12569         * m4/mountlist.m4 (gl_MOUNTLIST):
12570         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
12571         * m4/openat.m4 (gl_FUNC_OPENAT):
12572         * m4/pathmax.m4 (gl_PATHMAX):
12573         * m4/physmem.m4 (gl_PHYSMEM):
12574         * m4/posixtm.m4 (gl_POSIXTM):
12575         * m4/posixver.m4 (gl_POSIXVER):
12576         * m4/quote.m4 (gl_QUOTE):
12577         * m4/quotearg.m4 (gl_QUOTEARG):
12578         * m4/readtokens.m4 (gl_READTOKENS):
12579         * m4/readutmp.m4 (gl_READUTMP):
12580         * m4/regex.m4 (gl_REGEX):
12581         * m4/safe-read.m4 (gl_SAFE_READ):
12582         * m4/safe-write.m4 (gl_SAFE_WRITE):
12583         * m4/same.m4 (gl_SAME):
12584         * m4/save-cwd.m4 (gl_SAVE_CWD):
12585         * m4/savedir.m4 (gl_SAVEDIR):
12586         * m4/settime.m4 (gl_SETTIME):
12587         * m4/sha1.m4 (gl_SHA1):
12588         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
12589         * m4/stat-macros.m4 (gl_STAT_MACROS):
12590         * m4/stat-time.m4 (gl_STAT_TIME):
12591         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
12592         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
12593         * m4/strdup.m4 (gl_FUNC_STRDUP):
12594         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
12595         * m4/strndup.m4 (gl_FUNC_STRNDUP):
12596         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
12597         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
12598         * m4/time_r.m4 (gl_TIME_R):
12599         * m4/timespec.m4 (gl_TIMESPEC):
12600         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
12601         * m4/unlinkdir.m4 (gl_UNLINKDIR):
12602         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
12603         * m4/userspec.m4 (gl_USERSPEC):
12604         * m4/utimecmp.m4 (gl_UTIMECMP):
12605         * m4/utimens.m4 (gl_UTIMENS):
12606         * m4/xalloc.m4 (gl_XALLOC):
12607         * m4/xgetcwd.m4 (gl_XGETCWD):
12608         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
12609         * m4/xreadlink.m4 (gl_XREADLINK):
12610         * m4/xstrtod.m4 (gl_XSTRTOD):
12611         * m4/yesno.m4 (gl_YESNO):
12612         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
12613         to get the necessary .h files and whatnot.
12614
12615 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
12616             Bruno Haible  <bruno@clisp.org>
12617
12618         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
12619         /bin/sh understanding of '!' conditional negation.
12620
12621 2006-08-21  Jim Meyering  <jim@meyering.net>
12622
12623         * modules/openat (Depends-on): Really alphabetize.
12624
12625         * modules/acl (Depends-on): Add error and quote.
12626
12627         * check-module (find_included_lib_files): Add at-func.c to the
12628         ok-to-include-more-than-once white list.
12629
12630         * modules/openat (Depends-on): Add lstat.  Alphabetize.
12631
12632 2006-08-21  Bruno Haible  <bruno@clisp.org>
12633
12634         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
12635         Emit a pkgdata_DATA variable only if some snippets add contents to it.
12636         Reported by Martin Lambers <marlam@marlam.de>.
12637
12638 2006-08-21  Bruno Haible  <bruno@clisp.org>
12639
12640         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
12641         specify an installation location, don't emit a noinst_LIBRARIES or
12642         noinst_LTLIBRARIES assignment.
12643
12644 2006-08-21  Bruno Haible  <bruno@clisp.org>
12645
12646         BeOS portability.
12647         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
12648         BeOS has mbrtowc() but no <wctype.h>.
12649
12650 2006-08-21  Bruno Haible  <bruno@clisp.org>
12651
12652         BeOS portability.
12653         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
12654         exist.
12655
12656 2006-08-21  Bruno Haible  <bruno@clisp.org>
12657
12658         BeOS portability.
12659         * lib/mbchar.h: Include <wctype.h> only if it exists.
12660
12661 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12662
12663         Remove files that are no longer needed by their respective modules.
12664         * m4/obstack.m4: Remove.
12665         * m4/strerror_r.m4: Remove.
12666         * m4/uint32_t.m4: Remove.
12667         * m4/uintptr_t.m4: Remove.
12668         * m4/ullong_max.m4: Remove.
12669         * m4/xstrtoimax.m4: Remove.
12670         * m4/xstrtoumax.m4: Remove.
12671
12672         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
12673         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
12674         dependencies now capture this.
12675
12676         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
12677         Do not use AC_LIBSOURCES, since gnulib modules now do this.
12678         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
12679         * m4/human.m4 (gl_HUMAN): Likewise.
12680         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
12681         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
12682
12683         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
12684
12685         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
12686         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
12687         stdint.
12688         * m4/human.m4 (gl_HUMAN): Likewise.
12689         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
12690         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
12691         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
12692         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
12693         * m4/xstrtol (gl_XSTRTOL): Likewise.
12694
12695         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
12696         AC_TYPE_LONG_LONG_INT.
12697         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
12698         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
12699         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
12700         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
12701
12702         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
12703         on stdbool.
12704
12705         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
12706         (gl_PREREQ_XSTRTOUL): Remove.
12707
12708         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
12709
12710         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
12711         mode.
12712
12713 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12714
12715         Add and change modules to make it easier for coreutils to use
12716         gnulib-tool.
12717         * modules/backupfile (Files): Remove m4/d-ino.m4.
12718         (Depends-on): Add d-ino.
12719         * modules/cycle-check (Depends-on): Add stdint.
12720         (lib_SOURCES): Add cycle-check.h.
12721         * modules/d-ino: New module.
12722         * modules/d-type: New module.
12723         * modules/error (Files): Remove m4/strerror_r.m4.
12724         * modules/filemode (Files): Add m4/st_dm_mode.m4.
12725         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
12726         m4/inttypes_h.m4, m4/uintmax_t.m4.
12727         (Depends-on): Add stdint.
12728         (lib_SOURCES): Add fsusage.h.
12729         * modules/getcwd (Files): Remove d-ino.m4.
12730         (Depends-on): Add d-ino.
12731         * modules/getndelim2 (Depends-on): Add stdint.
12732         * modules/glob (Files): Remove m4/d-type.m4.
12733         (Depends-on): Add d-type.
12734         * modules/host-os: New module.
12735         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
12736         m4/inttypes_h.m4, m4/uintmax_t.m4.
12737         * Depends-on: Add stdint.
12738         (lib_SOURCES): Add human.h.
12739         * modules/inttostr (Files): Remove m4/intmax_t.m4,
12740         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
12741         m4/uintmax_t.m4, m4/ulonglong.m4.
12742         (Depends-on): Add stdint.
12743         (EXTRA_DIST): Add inttostr.h.
12744         * modules/lchmod: New module.
12745         * modules/link-follow: New module.
12746         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
12747         (Depends-on): Add lchmod.
12748         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
12749         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
12750         (Depends-on): Add stdint.
12751         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
12752         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
12753         (Depends-on): Add stdint.
12754         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
12755         * modules/perl: New module.
12756         * modules/regex (Depends-on): Add stdint.
12757         * modules/rmdir-errno: New module.
12758         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
12759         m4/intmax_t.m4.
12760         (Depends-on): Add stdint.
12761         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
12762         m4/uintmax_t.m4.
12763         (Depends-on): Add stdint.
12764         * modules/unlink-busy: New module.
12765         * modules/utimecmp (Depends-on): Add stdint.
12766         * modules/uptime: New module.
12767         * modules/winsz-ioctl: New module.
12768         * modules/winsz-termios: New module.
12769         * modules/xnanosleep (Depends-on): Add nanosleep.
12770         * modules/ullong_max: Remove.
12771         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
12772         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
12773         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
12774         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
12775         (Depends-on): Add inttypes.
12776         (lib_SOURCES): Add xstrtol.h.
12777         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
12778         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
12779         * MODULES.html.sh: Move 'assert' into the assert section.
12780         Move 'dummy' into the linking section.
12781         Remove ullong_max.
12782         Add section for compatibility checks for POSIX:2001 functions,
12783         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
12784         winsz-ioctl, and winsz-termios into it.
12785         Add lchmod.
12786         Add top-level Misc section and put host-os, perl, and uptime
12787         into it.
12788
12789 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12790
12791         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
12792         now assume the stdint module.  Do not include inttypes.h.
12793         * lib/fsusage.h: Likewise.
12794         * lib/getndelim2.c: Likewise.
12795         * lib/human.h: Likewise.
12796         * lib/inttostr.h: Likewise.
12797         * lib/obstack.c: Likewise.
12798         * lib/regex_internal.h: Likewise.
12799         * lib/tempname.c: Likewise.
12800         * lib/utimecmp.c: Likewise.
12801         * lib/xstrtol.h: Likewise.
12802
12803         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
12804
12805         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
12806         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
12807         * lib/xtime.h: Likewise.
12808
12809 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12810
12811         * modules/openat (Files): Add lib/fchmodat.c.
12812         Fixes problem reported by Jay Youngman.
12813
12814 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12815
12816         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
12817         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
12818
12819 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
12820             Bruno Haible  <bruno@clisp.org>
12821
12822         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
12823         and is a script that invokes bison. Tighten the code. Add comments.
12824
12825 2006-08-18  Jim Meyering  <jim@meyering.net>
12826
12827         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
12828         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
12829         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
12830         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
12831
12832 2006-08-18  Bruno Haible  <bruno@clisp.org>
12833
12834         * modules/bison-i18n: New file.
12835         * MODULES.html.sh (Internationalization functions): Add it.
12836
12837 2006-08-18  Bruno Haible  <bruno@clisp.org>
12838
12839         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
12840         sys/statvfs.h. When getmntinfo was found, check its declaration and
12841         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
12842
12843 2006-08-18  Bruno Haible  <bruno@clisp.org>
12844
12845         * m4/bison-i18n.m4: New file, from bison.
12846
12847 2006-08-18  Bruno Haible  <bruno@clisp.org>
12848
12849         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
12850         (ME_DUMMY): Treat "kernfs" as a dummy.
12851         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
12852
12853 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
12854
12855         Update from coreutils.
12856
12857         2006-08-15  Jim Meyering  <jim@meyering.net>
12858
12859         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
12860
12861         2006-01-17  Jim Meyering  <jim@meyering.net>
12862
12863         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
12864
12865         2006-01-11  Jim Meyering  <jim@meyering.net>
12866
12867         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
12868         Check for the lchmod function.
12869
12870 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
12871
12872         Update from coreutils.
12873
12874         * lib/__fpending.h: Add copyright notice.
12875         * lib/fprintftime.h: Likewise.
12876         * lib/savedir.c: Use (C) in copyright notice.
12877         * lib/savedir.h: Likewise.
12878
12879         2006-08-15  Jim Meyering  <jim@meyering.net>
12880
12881         * lib/at-func.c: New file, with the logic of all emulated at-functions.
12882         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
12883         in support of the EXPECTED_ERRNO macro.
12884         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
12885         definitions.  Instead, define the appropriate symbols and include
12886         "at-func.c".
12887         * lib/mkdirat.c (mkdirat): Likewise.
12888         * lib/fchmodat.c (fchmodat): Likewise.
12889         (ENOSYS): Remove definition.
12890         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
12891         it.  Don't include "unistd--.h" -- it wasn't ever used.
12892
12893         2006-01-17  Jim Meyering  <jim@meyering.net>
12894
12895         Rewrite fts.c not to change the current working directory,
12896         by using openat, fstatat, fdopendir, etc..
12897
12898         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
12899         (HAVE_OPENAT_SUPPORT): Define.
12900         [_LIBC] (fchdir): Don't undef or define; no longer used.
12901         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
12902         Now, this `function' always succeeds, and consumes its file descriptor
12903         parameter -- so callers must not close such FDs.  Update callers.
12904         (diropen_fd, opendirat, cwd_advance_fd): New functions.
12905         (diropen): Add parameter, SP.  Adjust all callers.
12906         Implement using diropen_fd, rather than open.
12907         (fts_open): Initialize new member, fts_cwd_fd.
12908         Remove fts_rft-setting code.
12909         (fts_close): Close fts_cwd_fd, if necessary.
12910         (__opendir2): Define in terms of opendir or opendirat,
12911         depending on whether the FST_NOCHDIR flag is set.
12912         (fts_build): Since fts_safe_changedir consumes its FD, and since
12913         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
12914         and close the dup'd file descriptor upon failure.
12915         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
12916         (fts_safe_changedir): Tweak semantics to reflect that this function
12917         now calls cwd_advance_fd and hence consumes its FD argument.
12918         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
12919         [struct FTS] (fts_rft): Remove now-unused member.
12920         [struct FTS] (fts_cycle.state): Improve comment.
12921
12922         * lib/openat.c (openat_needs_fchdir): New function.
12923         * lib/openat.h (openat_needs_fchdir): Declare it.
12924
12925 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
12926
12927         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
12928         Problem and fix reported by Pádraig Brady in
12929         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
12930
12931 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
12932
12933         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
12934
12935 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
12936
12937         * lib/memcoll.c (memcoll): Optimize for the common case where the
12938         arguments are bytewise equal.
12939
12940 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
12941
12942         * doc/regexprops-generic.texi: Add a copyright notice.
12943
12944 2006-08-15  Bruno Haible  <bruno@clisp.org>
12945
12946         * modules/tmpdir (License): Change to LGPL.
12947
12948 2006-08-15  Bruno Haible  <bruno@clisp.org>
12949
12950         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
12951         module.
12952
12953 2006-08-14  Simon Josefsson  <jas@extundo.com>
12954
12955         * config/srclist.txt: Add gnupload.
12956
12957 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
12958
12959         Change copyright notice from LGPL 2 to GPL 2, since that's the
12960         standard form used in the gnulib repository.
12961         * tests/test-lock.c: Likewise.
12962         * tests/test-stdint.c: Likewise.
12963         * tests/test-tls.c: Likewise.
12964
12965         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
12966         prelude-manager.  User shorter URLs for GNU projects, without '?'.
12967         Add copyright notice.
12968
12969         * check-module: Add copyright notice.  Output a copyright
12970         notice if "--version" is specified.
12971         * modules/COPYING: New file.
12972         * tests/test-getaddrinfo.c: Add copyright notice.
12973         * tests/test-verify.c: Likewise.
12974
12975 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
12976
12977         Change copyright notice from LGPL 2 to GPL 2, since that's the
12978         standard form used in the gnulib repository.
12979         * lib/lock.c: LGPL -> GPL.
12980         * lib/lock.h: Likewise.
12981         * lib/strnlen1.c: Likewise.
12982         * lib/strnlen1.h: Likewise.
12983         * lib/tls.c: Likewise.
12984         * lib/tls.h: Likewise.
12985         * lib/tmpdir.c: Likewise.
12986
12987         * lib/TODO: Remove; this belongs only in coreutils.
12988
12989 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
12990
12991         Add copyright notices to long-enough files that lack them, since
12992         otherwise the files aren't clearly free.  Use the same notice that
12993         getdate.texi already uses.
12994         * doc/alloca-opt.texi: Add copyright notice.
12995         * doc/alloca.texi: Likewise.
12996         * doc/ctime.texi: Likewise.
12997         * doc/functions.texi: Likewise.
12998         * doc/gcd.texi: Likewise.
12999         * doc/gnulib-tool.texi: Likewise.
13000         * doc/inet_ntoa.texi: Likewise.
13001         * doc/visibility.texi: Likewise.
13002
13003         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
13004         * doc/quote.texi: Add copyright notice.
13005
13006         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
13007         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
13008         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
13009         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
13010         is now obsolete, and give a pointer to the Sun list.
13011         Add copyright notice.
13012
13013 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
13014
13015         * config/srclistvars.sh: Add copyright notice.
13016
13017 2006-08-14  Eric Blake  <ebb9@byu.net>
13018
13019         Import the following change from libc:
13020
13021         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
13022
13023         Upstream bug 2997.
13024         * lib/misc/error.c: Add space between program name and message if file
13025         name is missing.
13026
13027 2006-08-12  Karl Berry  <karl@gnu.org>
13028
13029         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
13030         remove, these originate in gnulib now.
13031
13032 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13033
13034         * doc/Makefile (standards.info standards.html standards.dvi):
13035         Also depend on make-stds.texi.
13036
13037 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
13038
13039         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
13040         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
13041
13042         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
13043         in wchar_t.  Problem reported by Eric Blake.
13044
13045         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
13046         LEN is smaller than SIZE.  Suggested by Bruno Haible.
13047         Also, help the compiler to keep LEN in a register.
13048
13049 2006-08-11  Eric Blake  <ebb9@byu.net>
13050
13051         * users.txt: Sort.  Add tar.
13052
13053 2006-08-11  Bruno Haible  <bruno@clisp.org>
13054
13055         * users.txt: New file.
13056
13057 2006-08-11  Bruno Haible  <bruno@clisp.org>
13058
13059         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
13060         before <wchar.h>. Needed for OSF/1 and BSD/OS.
13061
13062 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
13063
13064         * modules/snprintf (Depends-on): Remove minmax.
13065         (Maintainer): Add self and Bruno.
13066
13067 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
13068
13069         * lib/.cppi-disable: Add snprintf.h, socket_.h.
13070         * lib/snprintf.c: Include <errno.h> and <limits.h>.
13071         (EOVERFLOW): Define if the system does not.
13072         Do not include "minmax.h"; it wasn't used.
13073         (snprintf): Don't assume size_t promotes to an unsigned type.
13074         Fix bug when generated string was too long for the buffer: the
13075         buffer's contents are supposed to be the initial prefix of the
13076         output.  Don't assume vasnprintf returns EOVERFLOW if the size
13077         exceeds INT_MAX; do the check ourselves.
13078
13079         Import the following changes from libc:
13080
13081         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
13082
13083         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
13084         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
13085         set wc to the byte which couldn't be converted.
13086         (re_string_reconstruct): Don't clear valid_raw_len before calling
13087         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
13088         tip_context using re_string_context_at.
13089
13090         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
13091
13092         * lib/posix/regex.h: g++ still cannot handled [restrict].
13093
13094         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
13095
13096         * lib/posix/regex.h: Remove special handling for VMS.
13097
13098 2006-08-10  Jim Meyering  <jim@meyering.net>
13099
13100         * modules/same-inode: New module.
13101         * modules/dev-ino: New module.
13102         * modules/cycle-check: Depend on these modules, rather than simply
13103         including their .h files.
13104         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
13105         required via m4/cycle-check.m4.
13106         * modules/same: Depend on new same-inode module, rather than
13107         including same-inode.h.
13108         * modules/chdir-safer: New file.
13109
13110         * modules/chown (Depends-on): Add stat-macros.
13111
13112 2006-08-10  Jim Meyering  <jim@meyering.net>
13113
13114         * m4/cycle-check.m4: New file.
13115         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
13116         * m4/dev-ino.m4, m4/same-inode.m4: New files.
13117
13118 2006-08-10  Eric Blake  <ebb9@byu.net>
13119
13120         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
13121         in from original proposal.
13122
13123 2006-08-10  Eric Blake  <ebb9@byu.net>
13124         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13125
13126         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
13127         namespace.
13128
13129 2006-08-10  Bruno Haible  <bruno@clisp.org>
13130
13131         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
13132         as well.
13133
13134 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
13135
13136         Sync from coreutils.
13137
13138         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
13139
13140         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
13141         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
13142
13143 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
13144
13145         * modules/restrict: Remove; no longer needed now that we assume
13146         Autoconf 2.59 or later.
13147         * MODULES.html.sh: Remove 'restrict'.
13148         * modules/argp (Depends-on): Remove 'restrict'.
13149         * modules/base64 (Depends-on): Likewise.
13150         * modules/gc (Depends-on): Likewise.
13151         * modules/getaddrinfo (Depends-on): Likewise.
13152         * modules/glob (Depends-on): Likewise.
13153         * modules/inet_ntop (Depends-on): Likewise.
13154         * modules/inet_pton (Depends-on): Likewise.
13155         * modules/memxor (Depends-on): Likewise.
13156         * modules/regex (Depends-on): Likewise.
13157         * modules/strtok_r (Depends-on): Likewise.
13158         * modules/time_r (Depends-on): Likewise.
13159
13160 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
13161
13162         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
13163         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
13164         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
13165         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
13166         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
13167         * m4/memxor.m4 (gl_MEMXOR): Likewise.
13168         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
13169         gl_C_RESTRICT replaced by AC_C_RESTRICT.
13170
13171         Merge from coreutils.
13172         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
13173         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
13174         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
13175         * m4/time_r.m4 (gl_TIME_R): Likewise.
13176
13177 2006-08-09  Karl Berry  <karl@gnu.org>
13178
13179         * config/srclist.txt: no more gettext-tools, per Bruno.
13180
13181 2006-08-08  Eric Blake  <ebb9@byu.net>
13182
13183         * modules/verror: New module.
13184         * MODULES.html.sh: Document it.
13185
13186 2006-08-08  Eric Blake  <ebb9@byu.net>
13187
13188         * lib/verror.h, lib/verror.c: New files.
13189
13190 2006-08-08  Eric Blake  <ebb9@byu.net>
13191
13192         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
13193         verror_at_line output complies with GNU Coding Standards even when
13194         file is NULL.
13195
13196 2006-08-07  Bruno Haible  <bruno@clisp.org>
13197
13198         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
13199         versions of AIX.
13200         Reported by Ralf Wildenhues.
13201
13202 2006-08-07  Bruno Haible  <bruno@clisp.org>
13203
13204         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
13205         in an AC_DEFUN. Needed so that the autoconf snippets can use
13206         AC_REQUIRE.
13207
13208 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13209
13210         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
13211         Initialize pkgdata_DATA.
13212         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
13213         overriding it.
13214
13215 2006-08-06  Eric Blake  <ebb9@byu.net>
13216
13217         * lib/error.h: Fold in some upstream changes from glibc.
13218         * lib/error.c: Likewise.
13219
13220 2006-08-04  Bruno Haible  <bruno@clisp.org>
13221
13222         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
13223         Make the mostlyclean-local rule depend on mostlyclean-generic.
13224         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
13225
13226 2006-07-31  Bruno Haible  <bruno@clisp.org>
13227
13228         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
13229         <stdlib.h>, <string.h>.
13230
13231 2006-07-30  Bruno Haible  <bruno@clisp.org>
13232
13233         * modules/readlink (License): Change to LGPL.
13234
13235 2006-07-30  Bruno Haible  <bruno@clisp.org>
13236
13237         * modules/javaversion (Makefile.am): Distribute javaversion.java and
13238         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
13239         set PKGDATADIR to point to it.
13240
13241 2006-07-30  Bruno Haible  <bruno@clisp.org>
13242
13243         * modules/csharpexec (configure.ac): Comment out macro invocation.
13244         * modules/javaexec (configure.ac): Likewise.
13245         * modules/javacomp-script (configure.ac): Likewise.
13246
13247         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
13248
13249 2006-07-30  Bruno Haible  <bruno@clisp.org>
13250
13251         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
13252         linked-list.
13253
13254 2006-07-30  Bruno Haible  <bruno@clisp.org>
13255
13256         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
13257
13258 2006-07-30  Bruno Haible  <bruno@clisp.org>
13259
13260         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
13261         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
13262         get removed.
13263
13264 2006-07-29  Bruno Haible  <bruno@clisp.org>
13265
13266         Make it possible for gnulib-tool to work with locally modified or
13267         augmented gnulib repositories.
13268         * gnulib-tool (func_usage): Document --local-dir option.
13269         (local_gnulib_dir): New variable.
13270         Handle --local-dir option.
13271         (func_lookup_file): New function.
13272         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
13273         (func_get_description, func_get_filelist, func_get_description,
13274         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
13275         func_get_automake_snippet, func_get_include_directive,
13276         func_get_license, func_get_maintainer): Use func_lookup_file.
13277         (func_import, func_create_testdir): Use func_lookup_file.
13278
13279 2006-07-29  Bruno Haible  <bruno@clisp.org>
13280
13281         * modules/setenv (Depends-on): Add unistd.
13282
13283 2006-07-29  Bruno Haible  <bruno@clisp.org>
13284
13285         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
13286
13287 2006-07-29  Bruno Haible  <bruno@clisp.org>
13288
13289         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
13290
13291 2006-07-29  Bruno Haible  <bruno@clisp.org>
13292
13293         * gnulib-tool (import, update): If there is no Makefile.am, look at
13294         aclocal.m4, instead of bailing out.
13295
13296 2006-07-29  Bruno Haible  <bruno@clisp.org>
13297
13298         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
13299         Categorize the options by when they are useful.
13300
13301 2006-07-29  Bruno Haible  <bruno@clisp.org>
13302
13303         * gnulib-tool (func_usage): Document option --no-libtool.
13304         Handle option --no-libtool.
13305         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
13306         for changed semantics of $libtool variable.
13307         (func_import): Likewise. If libtool is not used, show this through
13308         an option --no-libtool.
13309         (func_create_testdir): Update.
13310
13311 2006-07-29  Bruno Haible  <bruno@clisp.org>
13312
13313         * gnulib-tool (func_import): Extend error message about missing
13314         --doc-base.
13315
13316 2006-07-29  Bruno Haible  <bruno@clisp.org>
13317
13318         * gnulib-tool (func_import): Don't create the $docbase directory if
13319         there is no file to store there.
13320
13321 2006-07-29  Bruno Haible  <bruno@clisp.org>
13322
13323         * gnulib-tool (autoconf_minversion): If a --dir option is given and
13324         relevant, look for configure.ac there, not in the current directory.
13325         Also use a simple search for AC_PREREQ, not "autoconf --trace".
13326
13327 2006-07-29  Bruno Haible  <bruno@clisp.org>
13328
13329         * gnulib-tool (SORT): New variable.
13330         (func_usage): Undocument --assume-autoconf option.
13331         Remove --assume-autoconf option handling.
13332         (autoconf_minversion): Determine from the contents of configure.ac.
13333         (func_import): Remove autoconf_minversion handling.
13334         Suggested by Eric Blake.
13335
13336 2006-07-29  Bruno Haible  <bruno@clisp.org>
13337
13338         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
13339
13340 2006-07-29  Bruno Haible  <bruno@clisp.org>
13341
13342         * config/srclist.txt (*setenv.[ch]): Remove rules.
13343
13344 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13345
13346         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
13347
13348 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13349
13350         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
13351         arpa/inet.h.
13352
13353 2006-07-28  Simon Josefsson  <jas@extundo.com>
13354
13355         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
13356         * modules/inet_pton (Depends-on): Likewise.
13357
13358 2006-07-28  Simon Josefsson  <jas@extundo.com>
13359
13360         * m4/netinet_in_h.m4: New file.
13361
13362 2006-07-28  Simon Josefsson  <jas@extundo.com>
13363
13364         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
13365         #include's.
13366
13367 2006-07-28  Simon Josefsson  <jas@extundo.com>
13368
13369         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
13370         #include's.
13371
13372 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
13373
13374         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
13375         setgid on directories only if they set these bits.
13376         * lib/modechange.h: Remove obsolete comment about masks.
13377
13378 2006-07-28  Eric Blake  <ebb9@byu.net>
13379
13380         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
13381         macro expansion.
13382
13383 2006-07-28  Bruno Haible  <bruno@clisp.org>
13384
13385         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
13386
13387 2006-07-28  Bruno Haible  <bruno@clisp.org>
13388
13389         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
13390
13391 2006-07-28  Bruno Haible  <bruno@clisp.org>
13392
13393         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
13394         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
13395         Define fallbacks.
13396         Avoids link error on FreeBSD 4.x.
13397         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
13398
13399         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
13400         encoding.
13401         * lib/mbswidth.c (iswcntrl): Likewise.
13402
13403 2006-07-27  Bruno Haible  <bruno@clisp.org>
13404
13405         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
13406         test.
13407
13408 2006-07-27  Bruno Haible  <bruno@clisp.org>
13409
13410         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
13411         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
13412         defined.
13413
13414 2006-07-26  Eric Blake  <ebb9@byu.net>
13415
13416         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
13417
13418 2006-07-26  Eric Blake  <ebb9@byu.net>
13419
13420         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
13421         like mingw that lack mkstemp.
13422         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
13423         avoid compilation warning on mingw.
13424
13425 2006-07-26  Bruno Haible  <bruno@clisp.org>
13426
13427         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
13428         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
13429         INT_FAST*_MIN, INTPTR_MIN.
13430
13431 2006-07-25  Bruno Haible  <bruno@clisp.org>
13432
13433         * modules/version-etc (Depends-on): Add stdarg.
13434
13435 2006-07-25  Bruno Haible  <bruno@clisp.org>
13436
13437         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
13438         complex commands.
13439
13440 2006-07-25  Bruno Haible  <bruno@clisp.org>
13441
13442         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
13443         defined in <stdarg.h> or config.h.
13444
13445 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
13446
13447         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
13448         (gl_STDIO_SAFER): Remove.
13449
13450 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
13451
13452         * MODULES.html.sh (File stream based Input/Output):
13453         Add fopen-safer, tmpfile-safer; remove stdio-safer.
13454         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
13455         * modules/fopen-safer, modules/tmpfile-safer: New files.
13456         * modules/stdio-safer: Remove.
13457
13458 2006-07-24  Bruno Haible  <bruno@clisp.org>
13459
13460         * modules/tmpdir: New file.
13461         * MODULES.html.sh (File system functions): Add it.
13462
13463 2006-07-24  Bruno Haible  <bruno@clisp.org>
13464
13465         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
13466         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
13467
13468 2006-07-24  Bruno Haible  <bruno@clisp.org>
13469
13470         * modules/clean-temp: New file.
13471
13472 2006-07-24  Bruno Haible  <bruno@clisp.org>
13473
13474         * m4/tmpdir.m4: New file, from GNU gettext.
13475
13476 2006-07-24  Bruno Haible  <bruno@clisp.org>
13477
13478         * lib/tmpdir.h: New file, from GNU gettext.
13479         * lib/tmpdir.c: New file, from GNU gettext.
13480
13481 2006-07-24  Bruno Haible  <bruno@clisp.org>
13482
13483         * lib/clean-temp.h: New file, from GNU gettext.
13484         * lib/clean-temp.c: New file, from GNU gettext.
13485
13486 2006-07-23  Eric Blake  <ebb9@byu.net>
13487
13488         * modules/stdio-safer (Files): Add tmpfile-safer.c.
13489         (Depends-on): Add binary-io.
13490
13491 2006-07-23  Eric Blake  <ebb9@byu.net>
13492
13493         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
13494
13495 2006-07-23  Eric Blake  <ebb9@byu.net>
13496
13497         * lib/tmpfile-safer.c: New file.
13498         * lib/stdio-safer.h (fopen_safer): Add prototype.
13499         * lib/stdio--.h (tmpfile): Make safer.
13500
13501 2006-07-23  Bruno Haible  <bruno@clisp.org>
13502
13503         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
13504         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
13505         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
13506         gl_linked_remove_at): Use it.
13507
13508 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13509         and Simon Josefsson <jas@extundo.com>
13510
13511         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
13512
13513         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
13514
13515 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
13516
13517         * modules/close-stream: New file.
13518         * modules/closeout (Description): Make it clear that it exits
13519         with a diagnostic on error.
13520         (Depends-on): Add close-stream.  Remove fpending, stdbool.
13521         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
13522
13523 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
13524
13525         * m4/close-stream.m4: New file.
13526
13527 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
13528
13529         * lib/close-stream.c, lib/close-stream.h: New files.
13530
13531 2006-07-22  Bruno Haible  <bruno@clisp.org>
13532
13533         Merge from GNU gettext 0.15.
13534
13535         2006-05-01  Bruno Haible  <bruno@clisp.org>
13536
13537                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
13538
13539         2006-07-22  Bruno Haible  <bruno@clisp.org>
13540
13541                 * modules/javaversion: New file.
13542                 * MODULES.html.sh (Java): Add javaversion.
13543
13544         2006-03-12  Bruno Haible  <bruno@clisp.org>
13545
13546                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
13547
13548         2005-12-04  Bruno Haible  <bruno@clisp.org>
13549
13550                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
13551                 (untested).
13552
13553         2006-06-21  Bruno Haible  <bruno@clisp.org>
13554
13555                 Avoid warnings from recent versions of mcs.
13556                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
13557                 -o, -L, -r any more. Use options documented since mcs-1.0
13558                 instead. Similarly for -g.
13559
13560         2005-12-04  Bruno Haible  <bruno@clisp.org>
13561
13562                 * build-aux/csharpcomp.sh.in: Suffix for resources is
13563                 .resources, not .resource.
13564
13565         2005-07-09  Bruno Haible  <bruno@clisp.org>
13566
13567                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
13568                 add a .dll suffix.
13569                 Reported by Mark Junker <mjscod@gmx.de>.
13570
13571         2006-07-22  Bruno Haible  <bruno@clisp.org>
13572
13573                 * modules/gettext: Upgrade to gettext-0.15.
13574                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
13575                 m4/visibility.m4.
13576                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
13577
13578 2006-07-22  Bruno Haible  <bruno@clisp.org>
13579
13580         Merge from GNU gettext 0.15.
13581
13582         2006-03-25  Bruno Haible  <bruno@clisp.org>
13583
13584                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
13585
13586         2006-07-21  Bruno Haible  <bruno@clisp.org>
13587
13588                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
13589                 "1.1".
13590
13591         2006-05-09  Bruno Haible  <bruno@clisp.org>
13592
13593                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
13594                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
13595                 for the conftestver execution.
13596
13597         2006-05-01  Bruno Haible  <bruno@clisp.org>
13598
13599                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
13600                 optional target-version argument. Verify that the compiler
13601                 groks source of the specified source-version, or add -source
13602                 option as necessary. Verify that the compiler produces
13603                 bytecode in the specified target-version, or add -target and
13604                 -source options as necessary. Make the result of the test
13605                 available as variable CONF_JAVAC. Also log error output in
13606                 config.log.
13607
13608         2006-03-11  Bruno Haible  <bruno@clisp.org>
13609
13610                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
13611
13612         2006-05-09  Bruno Haible  <bruno@clisp.org>
13613
13614                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
13615                 CLASSPATH_SEPARATOR to a semicolon.
13616
13617         2006-03-12  Bruno Haible  <bruno@clisp.org>
13618
13619                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
13620                 available as variable CONF_JAVA, for subsequent autoconf
13621                 tests. Also log error output in config.log.
13622
13623         2006-07-19  Bruno Haible  <bruno@clisp.org>
13624
13625                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
13626                 that getline works on glibc2 systems. Needed to avoid trouble
13627                 in relocatable.c.
13628                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
13629
13630         2005-12-04  Bruno Haible  <bruno@clisp.org>
13631
13632                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
13633                 launcher (untested).
13634
13635         2005-12-04  Bruno Haible  <bruno@clisp.org>
13636
13637                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
13638
13639         2006-07-22  Bruno Haible  <bruno@clisp.org>
13640
13641                 * gettext.m4: Update from GNU gettext-0.15.
13642                 * nls.m4: Likewise.
13643                 * po.m4: Likewise.
13644                 * inttypes-pri.m4: Likewise.
13645                 * inttypes-h.m4: Renamed from inttypes.m4.
13646                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
13647
13648 2006-07-22  Bruno Haible  <bruno@clisp.org>
13649
13650         Merge from GNU gettext 0.15.
13651
13652         2005-07-05  Bruno Haible  <bruno@clisp.org>
13653
13654                 * printf-args.c (printf_fetchargs): Work around broken
13655                 definition of wint_t on mingw.
13656
13657         2005-02-12  Bruno Haible  <bruno@clisp.org>
13658
13659                 * xallocsa.h: Add extern "C" for C++.
13660
13661         2006-05-17  Bruno Haible  <bruno@clisp.org>
13662
13663                 Cygwin portability.
13664                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
13665
13666         2006-04-30  Bruno Haible  <bruno@clisp.org>
13667
13668                 * progreloc.c: Include <mach-o/dyld.h> if available.
13669                 (find_executable): Use _NSGetExecutablePath when possible.
13670
13671         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
13672
13673                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
13674                 function.
13675
13676         2005-12-29  Bruno Haible  <bruno@clisp.org>
13677
13678                 * progreloc.c (set_program_name_and_installdir): Fix
13679                 compilation error.
13680
13681         2005-12-04  Bruno Haible  <bruno@clisp.org>
13682
13683                 Cygwin portability.
13684                 * progreloc.c: Include <windows.h> also on Cygwin.
13685                 (find_executable): Add support for Cygwin.
13686                 (set_program_name_and_installdir): Handle also platforms with
13687                 nonempty EXEEXT.
13688
13689         2006-07-11  Bruno Haible  <bruno@clisp.org>
13690
13691                 * javacomp.c: Fix a comment.
13692                 Reported by Jim Meyering.
13693
13694         2006-04-30  Bruno Haible  <bruno@clisp.org>
13695
13696                 * javacomp.h (compile_java_class): Add source_version,
13697                 target_version arguments.
13698                 * javacomp.c: Rewritten to choose only a compiler that
13699                 respects the specified source_version and target_version.
13700
13701         2006-06-27  Bruno Haible  <bruno@clisp.org>
13702
13703                 Assume correct S_ISDIR macro.
13704                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
13705
13706         2006-07-22  Bruno Haible  <bruno@clisp.org>
13707
13708                 * javaversion.h: New file, from GNU gettext.
13709                 * javaversion.c: New file, from GNU gettext.
13710                 * javaversion.java: New file, from GNU gettext.
13711                 * javaversion.class: New file, from GNU gettext.
13712
13713         2006-05-17  Bruno Haible  <bruno@clisp.org>
13714
13715                 Cygwin portability.
13716                 * javaexec.c (execute_java_class): Test for jview program
13717                 also on Cygwin.
13718
13719         2006-04-09  Bruno Haible  <bruno@clisp.org>
13720
13721                 * fatal-signal.c: Don't include string.h.
13722                 (at_fatal_signal): Use a copying loop instead of memcpy.
13723
13724         2005-12-04  Bruno Haible  <bruno@clisp.org>
13725
13726                 * csharpexec.c: Add support for 'clix' launcher (untested).
13727                 (execute_csharp_using_sscli): New function.
13728                 (execute_csharp_program): Call it.
13729
13730         2006-06-21  Bruno Haible  <bruno@clisp.org>
13731
13732                 Avoid warnings from recent versions of mcs.
13733                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
13734                 -o, -L, -r any more. Use options documented since mcs-1.0
13735                 instead. Similarly for -g.
13736
13737         2005-07-09  Bruno Haible  <bruno@clisp.org>
13738
13739                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
13740                 add a .dll suffix.
13741                 Reported by Mark Junker <mjscod@gmx.de>.
13742
13743         2006-06-17  Bruno Haible  <bruno@clisp.org>
13744
13745                 * config.charset: Update for NetBSD 3.0.
13746
13747         2006-05-17  Bruno Haible  <bruno@clisp.org>
13748
13749                 Cygwin portability.
13750                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
13751
13752         2006-05-16  Bruno Haible  <bruno@clisp.org>
13753
13754                 * localcharset.c [CYGWIN]: Include <windows.h>.
13755                 (get_charset_aliases): For Cygwin, return the same CPxxx
13756                 aliases list as under WIN32.
13757                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
13758                 the environment variables. Fall back to GetACP().
13759
13760         2006-04-05  Bruno Haible  <bruno@clisp.org>
13761
13762                 * config.charset: Update Juan Manuel Guerrero's address.
13763
13764         2005-02-12  Bruno Haible  <bruno@clisp.org>
13765
13766                 * allocsa.h: Add extern "C" for C++.
13767
13768         2005-02-10  Bruno Haible  <bruno@clisp.org>
13769
13770                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
13771                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
13772
13773         2006-07-22  Bruno Haible  <bruno@clisp.org>
13774
13775                 * gettext.h: Update to GNU gettext-0.15.
13776
13777 2006-07-22  Bruno Haible  <bruno@clisp.org>
13778
13779         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
13780         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
13781         lib-prefix.m4, longdouble.m4, ssize_t.m4.
13782
13783 2006-07-21  Eric Blake  <ebb9@byu.net>
13784
13785         * modules/stdlib-safer: New file.
13786         * MODULES.html.sh (File stream based Input/Output): Add
13787         stdlib-safer.
13788
13789 2006-07-21  Eric Blake  <ebb9@byu.net>
13790
13791         * lib/stdlib-safer.h: New file from coreutils, required by
13792         stdlib--.h.
13793
13794 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
13795
13796         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
13797
13798 2006-07-20  Bruno Haible  <bruno@clisp.org>
13799
13800         * gnulib-tool: Recognize new option --assume-autoconf.
13801         (autoconf_minversion): New variable.
13802         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
13803
13804 2006-07-20  Bruno Haible  <bruno@clisp.org>
13805
13806         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
13807
13808 2006-07-19  Derek R. Price  <derek@ximbiot.com>
13809
13810         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
13811         Reindent and repaginate.
13812
13813 2006-07-19  Derek Price  <derek@ximbiot.com>
13814
13815         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
13816         Correct grammar.
13817
13818 2006-07-17  Bruno Haible  <bruno@clisp.org>
13819
13820         * modules/list: New file.
13821         * modules/array-list: New file.
13822         * modules/carray-list, modules/carray-list-tests: New files.
13823         * modules/linked-list, modules/linked-list-tests: New files.
13824         * modules/avltree-list, modules/avltree-list-tests: New files.
13825         * modules/rbtree-list, modules/rbtree-list-tests: New files.
13826         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
13827         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
13828         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
13829         * modules/oset: New file.
13830         * modules/array-oset: New file.
13831         * modules/avltree-oset, modules/avltree-oset-tests: New files.
13832         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
13833         * tests/test-carray_list.c: New file.
13834         * tests/test-linked_list.c: New file.
13835         * tests/test-avltree_list.c: New file.
13836         * tests/test-rbtree_list.c: New file.
13837         * tests/test-linkedhash_list.c: New file.
13838         * tests/test-avltreehash_list.c: New file.
13839         * tests/test-rbtreehash_list.c: New file.
13840         * tests/test-avltree_oset.c: New file.
13841         * tests/test-rbtree_oset.c: New file.
13842         * MODULES.html.sh (Container data structures): New section.
13843
13844 2006-07-17  Bruno Haible  <bruno@clisp.org>
13845
13846         * m4/gl_list.m4: New file.
13847
13848 2006-07-17  Bruno Haible  <bruno@clisp.org>
13849
13850         * lib/gl_list.h: New file.
13851         * lib/gl_list.c: New file.
13852         * lib/gl_array_list.h: New file.
13853         * lib/gl_array_list.c: New file.
13854         * lib/gl_carray_list.h: New file.
13855         * lib/gl_carray_list.c: New file.
13856         * lib/gl_linked_list.h: New file.
13857         * lib/gl_linked_list.c: New file.
13858         * lib/gl_anylinked_list1.h: New file.
13859         * lib/gl_anylinked_list2.h: New file.
13860         * lib/gl_avltree_list.h: New file.
13861         * lib/gl_avltree_list.c: New file.
13862         * lib/gl_anyavltree_list1.h: New file.
13863         * lib/gl_anyavltree_list2.h: New file.
13864         * lib/gl_rbtree_list.h: New file.
13865         * lib/gl_rbtree_list.c: New file.
13866         * lib/gl_anyrbtree_list1.h: New file.
13867         * lib/gl_anyrbtree_list2.h: New file.
13868         * lib/gl_anytree_list1.h: New file.
13869         * lib/gl_anytree_list2.h: New file.
13870         * lib/gl_linkedhash_list.h: New file.
13871         * lib/gl_linkedhash_list.c: New file.
13872         * lib/gl_anyhash_list1.h: New file.
13873         * lib/gl_anyhash_list2.h: New file.
13874         * lib/gl_avltreehash_list.h: New file.
13875         * lib/gl_avltreehash_list.c: New file.
13876         * lib/gl_rbtreehash_list.h: New file.
13877         * lib/gl_rbtreehash_list.c: New file.
13878         * lib/gl_anytreehash_list1.h: New file.
13879         * lib/gl_anytreehash_list2.h: New file.
13880
13881         * lib/gl_oset.h: New file.
13882         * lib/gl_oset.c: New file.
13883         * lib/gl_array_oset.h: New file.
13884         * lib/gl_array_oset.c: New file.
13885         * lib/gl_avltree_oset.h: New file.
13886         * lib/gl_avltree_oset.c: New file.
13887         * lib/gl_rbtree_oset.h: New file.
13888         * lib/gl_rbtree_oset.c: New file.
13889         * lib/gl_anytree_oset.h: New file.
13890
13891 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
13892
13893         * m4/mkancesdirs.m4: New file.
13894         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
13895         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
13896         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
13897         it.
13898
13899 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
13900
13901         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
13902         * lib/mkancesdirs.h: New files.
13903         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
13904         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
13905         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
13906         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
13907         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
13908         callers changed.  Revamp internals significantly, by not
13909         attempting to create directories that are temporarily more
13910         permissive than the final results.  Do not attempt to use
13911         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
13912         This removes some race conditions, fixes some bugs, and simplifies
13913         things.  Use new dirchownmod function to do owner and mode changes.
13914         * lib/mkdir-p.h: Likewise.
13915         * lib/modechange.c (octal_to_mode): New function.
13916         (struct mode_change): New member mentioned.
13917         (make_node_op_equals): New arg mentioned.  All callers changed.
13918         (mode_compile): Keep track of which mode bits the user has explicitly
13919         mentioned.
13920         (mode_adjust): New arg DIR, so that we implement the X op correctly.
13921         New arg PMODE_BITS, to keep track of which mode bits the user
13922         mentioned; it treats S_ISUID and S_ISGID speciall.
13923         All callers changed.
13924         * lib/modechange.h: Likewise.
13925
13926 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
13927
13928         * MODULES.html.sh: Add mkancestors.
13929         * modules/mkancesdirs: New module.
13930         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
13931         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
13932         The chdir-safer and afs files are now orphans; I'll remove them
13933         unless someone speaks up.
13934         Add lib/dirchownmod.c, lib/dirchownmod.h.
13935         (Depends-on): Remove alloca, chown, save-cwd, dirname.
13936         Add lchown, mkancesdirs.
13937         (Maintainer): Add self.
13938
13939 2006-07-15  Karl Berry  <karl@gnu.org>
13940
13941         * gnulib-tool: help message wording/arrangement.
13942
13943 2006-07-14  Simon Josefsson  <jas@extundo.com>
13944
13945         * doc/gnulib.texi (Libtool and Windows): New section.
13946
13947 2006-07-12  Simon Josefsson  <jas@extundo.com>
13948
13949         * modules/gendocs (License): Fix license, approved by Karl.
13950
13951 2006-07-12  Eric Blake  <ebb9@byu.net>
13952
13953         * MODULES.html.sh: Add gendocs.
13954
13955 2006-07-11  Eric Blake  <ebb9@byu.net>
13956
13957         * modules/fdl: New module, to install doc/fdl.texi.
13958         * MODULES.html.sh: Add new section for documentation modules.
13959         * gnulib-tool: Avoid space-tab.
13960         (--doc-base): New option, to manage files from doc.
13961
13962 2006-07-11  Eric Blake  <ebb9@byu.net>
13963
13964         * m4/absolute-header.m4: Fix comments to match recent change.
13965
13966 2006-07-11  Eric Blake  <ebb9@byu.net>
13967
13968         * gnulib-tool: List --doc-base before --tests-base.
13969
13970 2006-07-11  Derek R. Price  <derek@ximbiot.com>
13971
13972         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
13973
13974 2006-07-11  Bruno Haible  <bruno@clisp.org>
13975
13976         * README: Mention where to put documentation.
13977
13978 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13979
13980         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
13981
13982 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
13983
13984         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
13985         to stdint.m4.
13986
13987 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
13988
13989         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
13990         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
13991         "no/such/file/stdint.h" when there is no such file, so that
13992         the resulting C code can be parsed by dodgy compilers.
13993         Problems reported by Bob Proulx.
13994
13995 2006-07-10  Derek R. Price  <derek@ximbiot.com>
13996
13997         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
13998         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
13999         macros into the GNU _D_EXACT_NAMLEN.
14000         * lib/savedir.c:  Likewise.
14001         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
14002
14003 2006-07-10  Derek R. Price  <derek@ximbiot.com>
14004         and Paul Eggert  <eggert@cs.ucla.edu>
14005
14006         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
14007         * m4/savedir.m4:
14008         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
14009         macros into the GNU _D_EXACT_NAMLEN.
14010
14011 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
14012
14013         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
14014         around the absolute name, to work around a problem with the HP-UX
14015         11.23 native C compiler, reported by Bob Proulx.
14016
14017 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
14018
14019         * doc/maintain.texi, make-stds.texi: Sync from
14020         <http://savannah.gnu.org/projects/gnustandards>.
14021
14022 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
14023
14024         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
14025
14026 2006-07-09  Jim Meyering  <jim@meyering.net>
14027
14028         * m4/glob.m4: Remove a doubled word in a comment.
14029
14030 2006-07-09  Jim Meyering  <jim@meyering.net>
14031
14032         * lib/argp-pv.c: Remove a doubled word in a comment.
14033         * lib/check-version.c (check_version): Likewise.
14034         * lib/javacomp.c (compile_java_class): Likewise.
14035
14036 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
14037
14038         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
14039         for the benefit of people using Autoconf 2.60.  If you want to
14040         support older Autoconf versions you can copy m4/onceonly_2_57.m4
14041         (or m4/onceonly.m4, if pre-2.57) manually.
14042
14043 2006-07-08  Jim Meyering  <jim@meyering.net>
14044
14045         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
14046         comment.
14047         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
14048         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
14049         comment.
14050
14051 2006-07-08  Jim Meyering  <jim@meyering.net>
14052
14053         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
14054
14055 2006-07-07  Simon Josefsson  <jas@extundo.com>
14056
14057         * tests/test-crc.c: Change expected crc value, the test vector
14058         were probably computed using the old broken crc.c?
14059
14060 2006-07-06  Simon Josefsson  <jas@extundo.com>
14061
14062         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
14063         now the canonical place for the M4 file).
14064
14065         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
14066         from the sys_socket dependency now.
14067
14068         * modules/inet_pton (Files): Ditto.
14069
14070         * modules/inet_ntop (Files): Ditto.
14071
14072 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
14073
14074         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
14075         not gl_PREREQ_GETUSERSHELL.
14076
14077 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14078
14079         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
14080         with only one argument, for Autoconf 2.60.
14081         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
14082         expand to nothing, so add a shell command to avoid syntax error.
14083         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
14084
14085 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14086
14087         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
14088
14089 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
14090
14091         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
14092         no longer needed.  Check for isblank decl.
14093         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
14094         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
14095         of existence.
14096
14097 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
14098
14099         * lib/getloadavg.c: Use __VMS, not VMS.
14100         * lib/getopt.c: Likewise.
14101         * lib/getpagesize.h: Likewise.
14102         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
14103         and probably does not work.
14104
14105 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
14106
14107         * lib/.cppi-disable: Add wcwidth.
14108         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
14109         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
14110         (ISGRAPH): Remove.  All uses changed to isgraph.
14111         (FOLD) [!defined _LIBC]: Remove special case.
14112         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
14113         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
14114         HAVE_ISBLANK.
14115         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
14116         case.
14117
14118 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
14119
14120         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
14121         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
14122         brackets.  Other minor changes to suppress some compiler
14123         warnings.
14124
14125 2006-07-06  Derek R. Price  <derek@ximbiot.com>
14126         and Paul Eggert  <eggert@cs.ucla.edu>
14127
14128         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
14129         of invoking obsolescent AC_HEADER_DIRENT macro.
14130         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
14131         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
14132         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
14133         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
14134         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
14135         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
14136         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
14137         * m4/readdir.m4: Remove; no longer needed.
14138
14139 2006-07-06  Derek R. Price  <derek@ximbiot.com>
14140         and Paul Eggert  <eggert@cs.ucla.edu>
14141
14142         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
14143         Don't worry about this obsolete case any more.
14144         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
14145         directories.
14146         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
14147         worry about this obsolete case any more.
14148         * lib/fts.c: Likewise.
14149         * lib/getcwd.c: Likewise.
14150         * lib/glob.h: Likewise.
14151         * lib/savedir.c: Likewise.
14152
14153 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
14154
14155         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
14156         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
14157         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
14158         needed.
14159         All uses removed.
14160         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
14161         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
14162         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
14163         needed.
14164         * m4/getdate.m4 (gl_GETDATE): Likewise.
14165         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
14166         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
14167         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
14168         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
14169         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
14170         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
14171         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
14172         needed.
14173
14174 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
14175
14176         * lib/memcasecmp.c: Include <limits.h>.
14177         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
14178         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
14179         Don't assume isdigit succeeds only on '0' through '9'.
14180
14181 2006-07-05  Eric Blake  <ebb9@byu.net>
14182
14183         * modules/getaddrinfo (Depends-on): Add snprintf.
14184
14185 2006-07-05  Eric Blake  <ebb9@byu.net>
14186
14187         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
14188         to avoid 'header present but could not be compiled' on cygwin.
14189
14190 2006-07-05  Eric Blake  <ebb9@byu.net>
14191
14192         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
14193         missing from netdb.h.
14194         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
14195
14196 2006-07-05  Derek R. Price  <derek@ximbiot.com>
14197
14198         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
14199         no longer needed.
14200         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
14201         * m4/getdate.m4 (gl_GETDATE): Likewise.
14202         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
14203         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
14204         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
14205         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
14206         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
14207
14208 2006-07-05  Derek R. Price  <derek@ximbiot.com>
14209
14210         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
14211         All uses of is_space replaced by isspace.
14212         * lib/exit.h: Don't talk about STDC_HEADERS.
14213         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
14214         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
14215         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
14216         replaced by isprint etc.
14217         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
14218         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
14219         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
14220         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
14221         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
14222         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
14223
14224 2006-07-05  Bruno Haible  <bruno@clisp.org>
14225
14226         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
14227         the function exists, before testing against AIX.
14228         Reported by Martin Lambers <marlam@marlam.de>.
14229
14230 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
14231
14232         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
14233         From Mark D. Baushke.
14234
14235 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
14236
14237         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
14238         to the absolute name, not just one, to bypass Sun C 5.8's
14239         "warning: #include of /usr/include/... may be non-portable".
14240
14241 2006-07-04  Eric Blake  <ebb9@byu.net>
14242
14243         * modules/dirname-tests: New test module.
14244         * tests/test-dirname.c: New file, replacing dirname.c
14245         TEST_DIRNAME section that was recently deleted.
14246
14247 2006-07-04  Bruno Haible  <bruno@clisp.org>
14248
14249         Assume ANSI C header files and <ctype.h> functions.
14250         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
14251         (mbsnwidth): Use isprint, iscntrl instead.
14252
14253 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
14254
14255         Merge from coreutils.
14256         * MODULES.html.sh: Add xstrtold.
14257         * modules/xstrtold: New file.
14258         * modules/cycle-check (Files): Add lib/same-inode.h.
14259         * modules/dirname (Files): Add m4/double-slash-root.m4.
14260         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
14261         * modules/mkdir-p (Files): Add lib/same-inode.h.
14262         * modules/same (Files): Add lib/same-inode.h.
14263
14264 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
14265
14266         * m4/absolute-header.m4: Renamed from full-header-path.m4.
14267         This is to keep the terminology clean; POSIX talks about
14268         "absolute pathnames", not "full pathnames", but the GNU
14269         Coding Standards say to use "path" for something else;
14270         so use "absolute" to keep both sides happy.
14271         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
14272         Set gl_absolute_header, not gl_full_header_path.
14273         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
14274         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
14275         All uses changed.
14276
14277         Merge from coreutils.
14278
14279         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
14280
14281         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
14282         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
14283         want to require the building of c-strtod.o.
14284         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
14285         needs -lm directly.
14286         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
14287
14288         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
14289
14290         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
14291         --as-needed option if available.  Problem reported by Albert Chin in
14292         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
14293         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
14294         cc merely issues a bunch of annoying warnings for --as-needed
14295         (this problem was reported by Bob Proulx).  Also, try linking with
14296         -lm to detect a bug in binutils 2.16 (this problem was reported
14297         by Ralf Wildenhues).
14298
14299         2006-06-18  Jim Meyering  <jim@meyering.net>
14300
14301         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
14302         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
14303         macro.
14304         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
14305         also check for glibc-2.4's abort-inducing bug.
14306
14307         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
14308         Low-probability clean-up should be to use rmdir to get rid of
14309         the just-created directory, not unlink.
14310
14311         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
14312         configure fail, and request a bug report to inform us about it.
14313         Add a comment that, barring reports to the contrary, in 2007 we'll
14314         assume ftruncate is universally available.
14315
14316         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
14317
14318         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
14319
14320         2006-03-12  Jim Meyering  <jim@meyering.net>
14321
14322         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
14323         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
14324         * m4/same.m4 (gl_SAME): Likewise.
14325         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
14326
14327         2006-03-11  Eric Blake  <ebb9@byu.net>
14328
14329         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
14330         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
14331         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
14332         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
14333
14334 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
14335
14336         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
14337         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
14338         reported by Mark D. Baushke, one in
14339         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
14340
14341         Merge from coreutils.
14342
14343         * lib/.cppi-disable: Add stdint_.h.
14344         * lib/.cvsignore: Add stdint.h.
14345
14346         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
14347
14348         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
14349         both double and long double versions.
14350         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
14351         * lib/xstrtold.c: New file.
14352         * lib/xstrtod.h (xstrtold): New decl.
14353
14354         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
14355
14356         * lib/filemode.c (setst): Remove.
14357         (strmode): Rewrite to avoid setst.  This makes the code shorter,
14358         (arguably) clearer, and the generated code is a bit smaller on my
14359         Debian GNU/Linux stable x86 host.
14360
14361         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
14362
14363         * lib/filemode.c: Include "filemode.h" first, to test the interface.
14364         Assume that filemode.h includes sys/types.h and sys/stat.h.
14365         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
14366         (ftypelet): Reorder to put common cases first, for efficiency.
14367         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
14368         to do 'M'.
14369         (strmode): Renamed from mode_string, and now stores 12 bytes instead
14370         of 10, for compatibility with FreeBSD.  All callers changed.
14371         (filemodestring): Now stores 12 bytes instead of 10, and sets file
14372         types that can't be deduced solely from st_mode.  First arg is now a
14373         const pointer.
14374         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
14375         (strmode): Renamed from mode_string.
14376         (filemodestring): New decl.
14377         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
14378         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
14379         needed.
14380         (S_ISPORT, S_ISWHT): New macros, if not already defined.
14381
14382         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
14383
14384         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
14385         fsusage.h now does that.  Include fsusage.h first, to test interface.
14386         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
14387         at most one method (the old code could have generated decls that
14388         didn't conform to C89, not that this was ever exercised).
14389         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
14390
14391         2006-03-19  Jim Meyering  <jim@meyering.net>
14392
14393         Work even in a chroot where d_ino values for entries in "/"
14394         don't match the stat.st_ino values for the same names.
14395         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
14396         number, iterate through all entries again, using lstat instead.
14397         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
14398         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
14399
14400         * lib/getcwd.c (__getcwd): Clarify a comment.
14401         Use memcpy in place of a call to strcpy.
14402
14403         2006-03-12  Jim Meyering  <jim@meyering.net>
14404
14405         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
14406         matches that of the current directory (which we're about to chdir ".."
14407         out of), then save the dev-ino of the parent, instead.
14408
14409         * lib/same-inode.h (SAME_INODE): New file/macro.
14410         * lib/chdir-safer.c (SAME_INODE): Remove definition.
14411         Include "same-inode.h", instead.
14412         * lib/same.c: Likewise.
14413         * lib/cycle-check.h: Include "same-inode.h".
14414         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
14415         * lib/cycle-check.c (SAME_INODE): Remove definition.
14416         * lib/root-dev-ino.h: Include "same-inode.h".
14417
14418         2006-03-11  Eric Blake  <ebb9@byu.net>
14419
14420         * lib/same.c (same_name): s/base_name/last_component/
14421         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
14422         * lib/filenamecat.c (file_name_concat): Likewise.
14423
14424         2006-03-11  Eric Blake  <ebb9@byu.net>,
14425                     Paul Eggert  <eggert@cs.ucla.edu>
14426
14427         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
14428         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
14429         drive prefix.
14430         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
14431         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
14432         (last_component): New method.
14433         * lib/dirname.c (dir_len): Determine when drive letters need a
14434         subsequent slash.  Preserve // when it is special.
14435         (dir_name): Don't append dot when drive letter is absolute.
14436         [TEST_DIRNAME]: Move into a full-blown gnulib test.
14437         * lib/basename.c (base_name): New semantics - malloc the result.
14438         Preserve // when it is special.  Preserve relative files that look
14439         like drive letters.
14440         (base_len): Preserve // when it is special.
14441         (last_component): New method, similar to old base_name semantics.
14442         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
14443         base_name.  Strip redundant slashes from ///.
14444
14445 2006-07-03  Jim Meyering  <jim@meyering.net>
14446
14447         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
14448         macro is used before the first cycle_check call.
14449
14450 2006-07-03  Eric Blake  <ebb9@byu.net>
14451
14452         * modules/dirname (Depends-on): Add xstrndup.
14453
14454 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
14455
14456         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
14457         test cases, so that config.log is a bit easier to follow.
14458
14459 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
14460
14461         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
14462         both are 64 bits, since this seems to be the tradition, and this
14463         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
14464         we ever run into a host that prefers long long to long in this
14465         case, we'll need another configure-time test.  Problem reported by
14466         Jim Meyering.
14467
14468 2006-07-02  Eric Blake  <ebb9@byu.net>
14469
14470         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
14471
14472 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
14473
14474         * modules/inttypes (Depends-on): No longer depends on stdint.
14475         * modules/stdint (Description): Say more about assumptions.
14476         Say that the fast types might differ.  Say macros are used.
14477         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
14478         (Makefile.am): Revise list of substituted symbols to match
14479         new stdint.m4.
14480         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
14481         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
14482         * tests/test-stdint.c (verify_same_types)
14483         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
14484         the code conforms to C99/C89.
14485         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
14486         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
14487
14488 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
14489
14490         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
14491         but fix a bug, by requiring at least 64 bits.
14492         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
14493         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
14494         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
14495         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
14496
14497         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
14498         changes.  Make 2.59 a prerequisite.  Check and substitute for
14499         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
14500         inttypes.h.  Do not use special include files; just use the
14501         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
14502         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
14503         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
14504         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
14505         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
14506         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
14507         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
14508         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
14509         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
14510         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
14511         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
14512         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
14513         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
14514         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
14515         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
14516         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
14517         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
14518         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
14519         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
14520         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
14521         WINT_MAX.  Check for C99 conformance more strictly, by detecting
14522         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
14523         not check for things that C99 does not require, e.g., int8_t.  If
14524         a test isn't needed unless <stdint.h> isn't working, and is
14525         unlikely to be needed for any other reason, then don't do it
14526         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
14527         size_t, since we assume C89 freestanding at least.  Do not check
14528         for sig_atomic_t, wchar_t, or wint_t, since the code now does
14529         the right thing even if the types are not defined.  Instead use:
14530         (gl_STDINT_TYPE_PROPERTIES): New macro.
14531         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
14532         testing whether <sys/types.h> clashes, as Autoconf does this for
14533         us now.  All uses removed.
14534         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
14535         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
14536         (gl_CHECK_TYPE_SAME):
14537         Remove; no longer needed.
14538         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
14539         exists, since we'll return 0 anyway in that case.
14540         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
14541
14542 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
14543
14544         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
14545         possible collision with system files.
14546         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
14547         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
14548         WCHAR_MIN and WCHAR_MAX in this case.
14549         (<stddef.h>): Do not include; no longer needed.
14550         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
14551         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
14552         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
14553         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
14554         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
14555         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
14556         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
14557         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
14558         !defined(__c99))]: Include in this case too, since it's harmless
14559         now.
14560         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
14561         dangerous to do so.
14562         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
14563         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
14564         (_STDINT_MIN, _STDINT_MAX): New macros.
14565         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
14566         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
14567         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
14568         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
14569         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
14570         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
14571         macros, not typedefs; this simplifies things quite a bit.
14572         Use long int for all types narrower than int64_t.
14573         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
14574         Define in terms of long long int or int64_t or long int,
14575         not int64_t or int32_t.  This saves some compile-time testing.
14576         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
14577         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
14578         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
14579         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
14580         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
14581         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
14582         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
14583         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
14584         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
14585         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
14586         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
14587         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
14588         undef any previous version and define our own version, for
14589         simplicity and consistency with the new macros for types.
14590         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
14591         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
14592         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
14593         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
14594         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
14595         @WINT_T_SUFFIX@ to keep things simple here.
14596         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
14597         Simplify by assuming typical 8/16/32/64 host, since we're
14598         already doing that elsewhere anyway.
14599         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
14600         and assume long long int is 64 bits if available.  This
14601         speeds up 'configure'.
14602
14603 2006-07-01  Eric Blake  <ebb9@byu.net>
14604
14605         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
14606         Reported by Andreas Buening.
14607
14608 2006-07-01  Eric Blake  <ebb9@byu.net>
14609
14610         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
14611
14612 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
14613
14614         * lib/getaddrinfo.c: fixed typo
14615
14616 2006-06-29  Jim Meyering  <jim@meyering.net>
14617
14618         * modules/strftime (Maintainer): Add my name, since with the
14619         FPRINTFTIME changes strftime.c has forked from glibc.
14620
14621 2006-06-29  Eric Blake  <ebb9@byu.net>
14622
14623         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
14624
14625 2006-06-29  Eric Blake  <ebb9@byu.net>
14626
14627         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
14628
14629 2006-06-29  Eric Blake  <ebb9@byu.net>
14630
14631         * lib/stat_.h: New file.
14632
14633 2006-06-29  Eric Blake  <ebb9@byu.net>
14634
14635         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
14636         unused static function.
14637
14638 2006-06-29  Eric Blake  <ebb9@byu.net>
14639
14640         * doc/functions.texi (Function Portability): Document missing lstat
14641         on mingw.
14642
14643 2006-06-29  Eric Blake  <ebb9@byu.net>
14644
14645         * MODULES.html.sh: Add sys_stat.
14646         * modules/sys_stat: New module.
14647         * modules/mkstemp (Depends-on): Add sys_stat.
14648
14649 2006-06-29  Derek R. Price  <derek@ximbiot.com>
14650
14651         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
14652
14653 2006-06-29  Derek R. Price  <derek@ximbiot.com>
14654
14655         * m4/c-bs-a.m4: Removed.
14656
14657 2006-06-29  Derek R. Price  <derek@ximbiot.com>
14658
14659         * lib/strftime.c: Assume strftime() exists.
14660
14661 2006-06-29  Derek Price  <derek@ximbiot.com>
14662
14663         * modules/c-bs-a: Removed - \a is C89.
14664         * MODULES.html.sh: Remove c-bs-a.
14665
14666 2006-06-29  Bruno Haible  <bruno@clisp.org>
14667
14668         * modules/wcwidth (License): Change to LGPL.
14669
14670 2006-06-28  Simon Josefsson  <jas@extundo.com>
14671
14672         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
14673         on _WIN32.
14674
14675         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
14676         getnameinfo.
14677
14678 2006-06-28  Simon Josefsson  <jas@extundo.com>
14679
14680         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
14681
14682 2006-06-28  Simon Josefsson  <jas@extundo.com>
14683
14684         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
14685         functions there.  It will succeed on Windows XP, but on Windows
14686         2000 and (presumably) earlier, it will fail, and use the internal
14687         re-implementation.
14688         (use_win32_p): New function.
14689         (getaddrinfo): Use strtoul on servname, to support numeric ports.
14690         Support AI_NUMERICSERV to disable getservbyname.
14691         (getnameinfo): New function, only supports
14692         NI_NUMERICHOST|NI_NUMERICSERV for now.
14693
14694         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
14695         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
14696         getnameinfo.
14697
14698 2006-06-28  Eric Blake  <ebb9@byu.net>
14699
14700         * modules/wcwidth: New file.
14701         * modules/mbchar (Depends-on): Add wcwidth.
14702         * modules/mbswidth (Depends-on): Add wcwidth.
14703         * MODULES.html.sh: Add wcwidth.
14704
14705 2006-06-28  Eric Blake  <ebb9@byu.net>
14706
14707         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
14708         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
14709
14710 2006-06-28  Eric Blake  <ebb9@byu.net>
14711
14712         * lib/xvasprintf.h: Fix comments.
14713
14714 2006-06-28  Eric Blake  <ebb9@byu.net>
14715
14716         * lib/mbchar.h (wcwidth): Include wcwidth.h.
14717         * lib/mbswidth.c (wcwidth): Move from here...
14718         * lib/wcwidth.h: ...to this new file.
14719
14720 2006-06-28  Derek R. Price  <derek@ximbiot.com>
14721
14722         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
14723
14724         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
14725         it's obsolete.
14726         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
14727
14728 2006-06-28  Derek R. Price  <derek@ximbiot.com>
14729
14730         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
14731         Autoconf 2.60 says this stuff was obsolete.
14732
14733 2006-06-28  Bruno Haible  <bruno@clisp.org>
14734
14735         * modules/wcwidth (Files): Add m4/wchar_t.m4.
14736
14737 2006-06-28  Bruno Haible  <bruno@clisp.org>
14738
14739         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
14740         gt_TYPE_WCHAR_T.
14741
14742 2006-06-28  Bruno Haible  <bruno@clisp.org>
14743
14744         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
14745         declaration for wcwidth.
14746         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
14747
14748 2006-06-28  Bruno Haible  <bruno@clisp.org>
14749
14750         * lib/mkdtemp.c [MINGW]: Include <io.h>.
14751         (mkdir): Define using _mkdir.
14752
14753 2006-06-28  Bruno Haible  <bruno@clisp.org>
14754
14755         * lib/getaddrinfo.h: Fix POSIX URL.
14756         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
14757         _WIN32.
14758         (use_win32_p): Make static.
14759         (getaddrinfo): Reject service name if it is empty or does not consist
14760         solely of decimal digits, or if its value is > 65535.
14761         (getnameinfo): Remove useless casts.
14762
14763 2006-06-27  Simon Josefsson  <jas@extundo.com>
14764
14765         * modules/sys_select: New file, suggested by Bruno Haible, Paul
14766         Eggert and Martin Lambers.
14767
14768 2006-06-27  Simon Josefsson  <jas@extundo.com>
14769
14770         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
14771         Eggert and Martin Lambers.
14772
14773 2006-06-27  Bruno Haible  <bruno@clisp.org>
14774
14775         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
14776         result to 0, not to empty.
14777         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
14778
14779 2006-06-27  Bruno Haible  <bruno@clisp.org>
14780
14781         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
14782
14783 2006-06-26  Simon Josefsson  <jas@extundo.com>
14784
14785         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
14786         present.
14787
14788 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
14789
14790         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
14791         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
14792         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
14793
14794 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
14795
14796         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
14797
14798 2006-06-26  Bruno Haible  <bruno@clisp.org>
14799
14800         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
14801
14802 2006-06-26  Bruno Haible  <bruno@clisp.org>
14803
14804         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
14805
14806 2006-06-26  Bruno Haible  <bruno@clisp.org>
14807
14808         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
14809         SGI C compiler in pre-C99 mode.
14810         Suggested by Mark D. Baushke and Larry Jones.
14811
14812 2006-06-26  Bruno Haible  <bruno@clisp.org>
14813
14814         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
14815         WCHAR_MAX.
14816         Reported by Mark D. Baushke and Larry Jones.
14817
14818 2006-06-26  Bruno Haible  <bruno@clisp.org>
14819
14820         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
14821         in pre-C99 mode.
14822         Suggested by Mark D. Baushke and Larry Jones.
14823
14824 2006-06-23  Simon Josefsson  <jas@extundo.com>
14825             Bruno Haible  <bruno@clisp.org>
14826
14827         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
14828         Emit mostlyclean-local rule.
14829         (func_emit_tests_Makefile_am): Likewise.
14830         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
14831
14832 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
14833
14834         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
14835
14836 2006-06-23  Bruno Haible  <bruno@clisp.org>
14837
14838         * tests/test-stdint.c: Update to match ISO C 99 Technical
14839         Corrigendum 1.
14840
14841 2006-06-23  Bruno Haible  <bruno@clisp.org>
14842
14843         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
14844
14845 2006-06-23  Bruno Haible  <bruno@clisp.org>
14846
14847         * lib/stdint_.h: Treat IRIX like OpenBSD.
14848
14849 2006-06-23  Bruno Haible  <bruno@clisp.org>
14850
14851         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
14852         ISO C 99 Technical Corrigendum 1.
14853
14854 2006-06-22  Simon Josefsson  <jas@extundo.com>
14855
14856         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
14857         MinGW.
14858
14859 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
14860
14861         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
14862         needed.  Some compiler complained about some of them.  Problem reported
14863         by Larry Jones in
14864         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
14865
14866 2006-06-21  Simon Josefsson  <jas@extundo.com>
14867
14868         * tests/test-getaddrinfo.c: New file.
14869
14870         * modules/getaddrinfo-tests: New file.
14871
14872         * MODULES.html.sh: Add inet_pton.
14873
14874         * modules/inet_pton: New file.
14875
14876 2006-06-21  Simon Josefsson  <jas@extundo.com>
14877
14878         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
14879         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
14880         of using the (limited) gnulib implementation on Windows XP.
14881
14882         * m4/inet_pton.m4: New file.
14883
14884 2006-06-21  Simon Josefsson  <jas@extundo.com>
14885
14886         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
14887         variable.
14888
14889         * lib/socket_.h: Don't define WINVER.
14890
14891         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
14892         slightly modified to work in gnulib.
14893
14894 2006-06-21  Simon Josefsson  <jas@extundo.com>
14895
14896         * doc/gnulib.texi (Windows sockets): Add.
14897
14898 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
14899
14900         * lib/read-file.c (fread_file): Start with buffer allocation of
14901         0 bytes rather than 1 byte; this simplifies the code.
14902         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
14903         code to free buffer and save/restore errno.
14904         (internal_read_file): Remove unused local.
14905
14906 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
14907
14908         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
14909         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
14910         Problem reported by Denis Excoffier in
14911         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
14912
14913 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
14914
14915         * modules/sys_socket, modules/socklen: Include sys/types since
14916         FreeBSD 4.x's sys/socket.h needs it.
14917
14918 2006-06-19  Simon Josefsson  <jas@extundo.com>
14919
14920         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
14921
14922 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
14923
14924         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
14925
14926 2006-06-19  Bruno Haible  <bruno@clisp.org>
14927
14928         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
14929         and FULL_PATH_INTTYPES_H in angle brackets.
14930         Reported by Mark D. Baushke <mdb@gnu.org>.
14931
14932 2006-06-17  Eric Blake  <ebb9@byu.net>
14933
14934         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
14935         errno.
14936
14937 2006-06-17  Bruno Haible  <bruno@clisp.org>
14938
14939         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
14940         <sys/inttypes.h>.
14941
14942 2006-06-17  Bruno Haible  <bruno@clisp.org>
14943
14944         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
14945         whether errno is declared. Assume <errno.h> declares errno.
14946
14947 2006-06-17  Bruno Haible  <bruno@clisp.org>
14948
14949         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
14950
14951 2006-06-17  Bruno Haible  <bruno@clisp.org>
14952
14953         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
14954         problem on Solaris 2.5.1.
14955
14956 2006-06-16  Eric Blake  <ebb9@byu.net>
14957
14958         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
14959         * lib/unicodeio.c [!defined errno]: Likewise.
14960         * lib/strtol.c [!defined errno]: Likewise.
14961         * lib/strtod.c [!defined errno]: Likewise.
14962
14963 2006-06-15  Eric Blake  <ebb9@byu.net>
14964
14965         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
14966
14967 2006-06-15  Eric Blake  <ebb9@byu.net>
14968
14969         * config/srclist.txt (ssize_t.m4): Lose sync.
14970
14971 2006-06-15  Bruno Haible  <bruno@clisp.org>
14972
14973         * modules/stdint (Files): Include m4/full-header-path.m4,
14974         m4/size_max.m4, m4/wchar_t.m4.
14975         (Makefile.am): Many more substitutions.
14976         * modules/stdint-tests: New file.
14977         * tests/test-stdint.c: New file.
14978
14979 2006-06-15  Bruno Haible  <bruno@clisp.org>
14980
14981         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
14982         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
14983         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
14984         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
14985         gl_CHECK_TYPE_SAME): New macros.
14986
14987 2006-06-15  Bruno Haible  <bruno@clisp.org>
14988
14989         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
14990
14991 2006-06-15  Bruno Haible  <bruno@clisp.org>
14992
14993         * lib/stdint_.h: Rewritten to be fully auto-configured.
14994         Fixes bug on HP-UX/IA64.
14995
14996 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
14997
14998         * lib/getdate.y (__attribute__): Don't define if already defined.
14999         Problem reported by Larry Jones.
15000         * lib/utimens.c (__attribute__): Likewise.
15001
15002 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
15003
15004         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
15005         reported by Andreas Schwab.
15006
15007 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
15008             Bruno Haible  <bruno@clisp.org>
15009
15010         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
15011         check for the declaration of strnlen and a run test that exposes the
15012         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
15013         rpl_strndup.
15014
15015 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
15016             Bruno Haible  <bruno@clisp.org>
15017
15018         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
15019
15020 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
15021
15022         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
15023         compile test, for Tru64 4.0D.
15024
15025 2006-05-28  Karl Berry  <karl@gnu.org>
15026
15027         * config/srclist.txt (printf-args.c): lose sync.
15028
15029 2006-05-26  Martin Lambers  <marlam@marlam.de>
15030
15031         * lib/getpass.c: Updates the test for the native W32 API, and adds
15032         missing includes, thus fixing compilation warnings.
15033
15034 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
15035
15036         * lib/exclude.c (exclude_fnmatch): New function.
15037         (excluded_file_name): Call exclude_fnmatch.
15038         * lib/exclude.h (excluded_file_name): New prototype
15039
15040 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
15041
15042         * lib/tempname.c (small_open, large_open): New macros.
15043         (__open, __open64) [!_LIBC]: Remove.
15044         (__gen_tempname): Use small_open and large_open instead of __open
15045         and __open64.  This fixes a portability bug on HP-UX 11.11i
15046         reported by Simon Wing-Tang in
15047         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
15048
15049 2006-05-24  Bruno Haible  <bruno@clisp.org>
15050
15051         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
15052         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
15053         Reported by Thorsten Maerz <torte@netztorte.de> via
15054         Aaron Stone <aaron@serendipity.cx>.
15055
15056 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
15057
15058         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
15059         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
15060         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
15061         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
15062         not really conditional on the cache.
15063         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
15064
15065 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
15066
15067         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
15068         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
15069         (my_usleep): Don't mishandle maximum value.
15070
15071 2006-05-19  Jim Meyering  <jim@meyering.net>
15072
15073         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
15074
15075 2006-05-17  Bruno Haible  <bruno@clisp.org>
15076
15077         Cygwin portability.
15078         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
15079
15080 2006-05-17  Bruno Haible  <bruno@clisp.org>
15081
15082         * lib/stdint_.h: Fix recognition of Cygwin.
15083
15084 2006-05-15  Bruno Haible  <bruno@clisp.org>
15085
15086         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
15087         on libtool patch by Ralf Wildenhues.
15088
15089 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
15090
15091         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
15092         test for C99 conformance; (bool) 0.5 is an integer constant
15093         expression, but (bool) -0.5 is not.  Problem reported by Fedor
15094         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
15095
15096 2006-05-11  Simon Josefsson  <jas@extundo.com>
15097
15098         * m4/xvasprintf.m4: Fix obvious typo.
15099
15100 2006-05-11  Jim Meyering  <jim@meyering.net>
15101
15102         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
15103         James Lemley.
15104
15105 2006-05-10  Simon Josefsson  <jas@extundo.com>
15106
15107         * lib/md4.c: Typo fix, update copyright years.
15108         (K1, K2): Don't use L because it turn computations into 64-bit on
15109         64-bit platforms.
15110
15111 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
15112
15113         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
15114         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
15115         unwanted sign propagation, e.g., on hosts with 64-bit int.
15116         There still are some problems with reeelly weird theoretical hosts
15117         (e.g., 33-bit int) but it's not worth worrying about now.
15118         * lib/sha1.c (rol): Likewise.
15119         (K1, K2, K3, K4): Remove unnecessary L suffix.
15120
15121 2006-05-10  Bruno Haible  <bruno@clisp.org>
15122
15123         * lib/des.c: Cast to avoid warnings.
15124
15125 2006-05-09  Bruno Haible  <bruno@clisp.org>
15126
15127         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
15128         (Depends-on): Depend also on xsize, stdarg.
15129         (configure.ac): Add gl_XVASPRINTF.
15130
15131 2006-05-09  Bruno Haible  <bruno@clisp.org>
15132
15133         * m4/xvasprintf.m4: New file.
15134
15135 2006-05-09  Bruno Haible  <bruno@clisp.org>
15136
15137         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
15138         (EOVERFLOW): Define fallback value.
15139         (xstrcat): New function.
15140         (xvasprintf): Recognize the special case of a string concatenation.
15141
15142 2006-05-08  Eric Blake  <ebb9@byu.net>
15143
15144         * gnulib-tool (func_version): Base copyright year on CVS date.
15145         (func_emit_copyright_notice): New function.
15146         (func_emit_lib_Makefile_am): Use it.
15147         (func_emit_tests_Makefile_am): Likewise.
15148         (func_import): Likewise.
15149
15150 2006-05-08  Bruno Haible  <bruno@clisp.org>
15151
15152         * modules/stdarg: New file.
15153         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
15154
15155 2006-05-08  Bruno Haible  <bruno@clisp.org>
15156
15157         * m4/stdarg.m4: New file, from GNU gettext.
15158
15159 2006-05-08  Bruno Haible  <bruno@clisp.org>
15160
15161         * config/srclist.txt (build-aux/config.rpath): different from latest
15162         release.
15163
15164 2006-05-08  Bruno Haible  <bruno@clisp.org>
15165
15166         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
15167
15168 2006-05-05  Jim Meyering  <jim@meyering.net>
15169
15170         * m4/warning.m4: New file, derived from bison's file by the same name.
15171
15172 2006-05-03  Bruno Haible  <bruno@clisp.org>
15173
15174         * lib/stdint_.h: Shorter URL.
15175         * lib/inttypes.h: Likewise.
15176
15177 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
15178
15179         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
15180
15181 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
15182
15183         * lib/verify.h: Document the internals better.  Most of this change
15184         was written by Bruno Haible.
15185
15186 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
15187
15188         * doc/verify.texi: New file, partly based on a proposal by
15189         Bruno Haible.
15190
15191 2006-05-02  Bruno Haible  <bruno@clisp.org>
15192
15193         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
15194         test from here...
15195         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
15196
15197 2006-04-29  Bruno Haible  <bruno@clisp.org>
15198
15199         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
15200         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
15201
15202 2006-04-29  Bruno Haible  <bruno@clisp.org>
15203
15204         * gnulib-tool: Make --update option actually work.
15205
15206 2006-04-29  Bruno Haible  <bruno@clisp.org>
15207
15208         * doc/gcd.texi: New file.
15209         * doc/gnulib.texi: Include it.
15210
15211 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
15212
15213         * lib/getdate.y (get_date): When adding relative date, start with the
15214         initial time, not with the result of the first mktime call.
15215
15216 2006-04-25  Bruno Haible  <bruno@clisp.org>
15217
15218         * gnulib-tool (func_import): Output the include directives in three
15219         blocks, sorted separately.
15220         Reported by Ben Pfaff <blp@cs.stanford.edu>.
15221
15222 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
15223
15224         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
15225         to define main with arguments, for C++.  Reported by Eric Blake.
15226         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
15227         Prefer 'int main ()' to 'int main (void)', for C++.
15228         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
15229         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
15230         for 'main', for C99 and C++.
15231
15232 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
15233
15234         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
15235         Don't assume that exit status -1 is valid.
15236         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
15237         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
15238         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
15239         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
15240         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
15241         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
15242         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
15243         functions can be used without declaring them, or that you can
15244         exit with status -1.
15245         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
15246
15247 2006-04-24  Karl Berry  <karl@gnu.org>
15248
15249         * config/srclist.txt (longdouble.m4): sync lost.
15250
15251 2006-04-24  Eric Blake  <ebb9@byu.net>
15252
15253         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
15254
15255 2006-04-24  Bruno Haible  <bruno@clisp.org>
15256
15257         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
15258         poll() implementation in AIX.
15259         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
15260
15261 2006-04-24  Bruno Haible  <bruno@clisp.org>
15262
15263         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
15264         assigned exactly once.
15265
15266 2006-04-23  Claudio Fontana  <claudio@gnu.org>
15267             Bruno Haible  <bruno@clisp.org>
15268
15269         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
15270         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
15271         for AM_CPPFLAGS.
15272
15273 2006-04-23  Bruno Haible  <bruno@clisp.org>
15274
15275         * modules/copy-file: Depend on unistd.
15276         * modules/execute: Likewise.
15277         * modules/fatal-signal: Likewise.
15278         * modules/findprog: Likewise.
15279         * modules/mkdtemp : Likewise.
15280         * modules/pipe: Likewise.
15281         * modules/wait-process: Likewise.
15282
15283 2006-04-23  Bruno Haible  <bruno@clisp.org>
15284
15285         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
15286         condition was already detected.
15287         Reported by Ben Pfaff <blp@cs.stanford.edu>.
15288
15289 2006-04-23  Bruno Haible  <bruno@clisp.org>
15290
15291         * lib/copy-file.c: Include <unistd.h> unconditionally.
15292         * lib/execute.c: Likewise.
15293         * lib/fatal-signal.c: Likewise.
15294         * lib/findprog.c: Likewise.
15295         * lib/mkdtemp.c: Likewise.
15296         * lib/pipe.h: Likewise.
15297         * lib/pipe.c: Likewise.
15298         * lib/wait-process.h: Likewise.
15299
15300 2006-04-23  Bruno Haible  <bruno@clisp.org>
15301
15302         * gnulib-tool (func_usage): Fix --import description. Document
15303         --update.
15304         (func_import): Create temporary file in a temporary directory, if
15305         --dry-run is specified. Silence errors from 'grep' when there are no
15306         m4 files in $m4dir.
15307         (func_create_testdir): Silence errors from 'grep' when there are no
15308         m4 files in $m4dir.
15309         Reported by Karl Berry <karl@freefriends.org>.
15310
15311 2006-04-20  Bruno Haible  <bruno@clisp.org>
15312
15313         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
15314         one argument, so that the code will be portable to Autoconf 2.60.
15315         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
15316         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
15317         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
15318
15319 2006-04-19  Derek Price  <derek@ximbiot.com>
15320             Eric Blake  <ebb9@byu.net>
15321
15322         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
15323         rather than "/full/path.h".  Update comment to match.  Shorten &
15324         generalize m4_translit call via AS_TR_CPP.
15325
15326 2006-04-19  Derek Price  <derek@ximbiot.com>
15327             Eric Blake  <ebb9@byu.net>
15328
15329         * lib/inttypes.h: Correct grammar in comment.
15330
15331 2006-04-18  Derek Price  <derek@ximbiot.com>
15332             Paul Eggert  <eggert@cs.ucla.edu>
15333
15334         * modules/inttypes: New file.
15335         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
15336
15337 2006-04-18  Derek Price  <derek@ximbiot.com>
15338             Paul Eggert  <eggert@cs.ucla.edu>
15339
15340         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
15341         New files.
15342
15343 2006-04-18  Derek Price  <derek@ximbiot.com>
15344             Paul Eggert  <eggert@cs.ucla.edu>
15345
15346         * lib/inttypes.h: New file.
15347         * lib/strtoimax.c: Assume <inttypes.h>.
15348
15349 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
15350
15351         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
15352         isn't mounted.  Problem reported by Kir Kolyshkin.
15353
15354 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
15355
15356         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
15357         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
15358         Derek R. Price.
15359         * lib/regex.h (RE_DUP_MAX): Update comment to match current
15360         implementation.
15361
15362 2006-04-12  Eric Blake  <ebb9@byu.net>
15363
15364         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
15365         is now done automatically by the corresponding Autoconf macro.
15366
15367 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
15368
15369         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
15370         time_r.h.
15371
15372 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
15373
15374         Merge regex changes from libc, removing some of our
15375         POSIX-conformance changes that were rejected and redoing them in a
15376         less-intrusive way.
15377
15378         * lib/regcomp.c (re_compile_internal, init_dfa):
15379         Length arg is now size_t, not Idx.  All uses changed.
15380         (peek_token): Forward decl now says internal_function.
15381         (__re_error_msgid, __re_error_msgid_idx):
15382         Now static rather than extern with attribute_hidden.
15383         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
15384         For some reason libc prefers K&R style defns for external functions.
15385         (regerror) [!defined _LIBC]: Likewise.
15386         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
15387         (seek_collating_symbol_entry, lookup_collation_sequence_value):
15388         (build_range_exp, build_collating_symbol):
15389         Use K&R-style defn.
15390         (re_compile_fastmap): Use '\0' to memset, not 0.
15391         (utf8_sb_map): Make the calculations more obvious.
15392         (init_dfa, parse_bracket_exp, build_charclass_op):
15393         Call calloc and cast result, as glibc does.
15394         (init_word_char, fetch_token, peek_token, peek_token_bracket):
15395         (build_range_exp, build_collating_symbol):
15396         Now internal functions.
15397
15398         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
15399
15400         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
15401         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
15402         Don't depend on VMS; depend on __VMS instead, for POSIX
15403         namespace cleanness.
15404         (regoff_t): Define to ssize_t, not long int.
15405
15406         Remove the REG_ macros named below.  Instead, make the old names
15407         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
15408         __USE_GNU_REGEX.
15409         (REG_BACKSLASH_ESCAPE_IN_LISTS):
15410         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
15411         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
15412         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
15413         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
15414         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
15415         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
15416         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
15417         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
15418         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
15419         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
15420         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
15421         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
15422         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
15423         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
15424         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
15425         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
15426         (REG_NREGS):
15427         Remove.  All uses replaced by the old RE_* names.
15428         (RE_BACKSLASH_ESCAPE_IN_LISTS):
15429         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
15430         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
15431         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
15432         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
15433         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
15434         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
15435         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
15436         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
15437         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
15438         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
15439         Don't bother having these macros be independent of each others'
15440         values, since they no longer exist in the POSIX name space.
15441
15442         Rename the following member names back to their old names,
15443         unless !__USE_GNU_REGEX.  All uses changed back.
15444         (buffer): Renamed from re_buffer.
15445         (allocated): Renamed from re_allocated.
15446         (used): Renamed from re_used.
15447         (syntax): Renamed from re_syntax.
15448         (fastmap): Renamed from re_fastmap.
15449         (translate): Renamed from re_translate.
15450         (can_be_null): Renamed from re_can_be_null.
15451         (regs_allocated): Renamed from re_regs_allocated.
15452         (fastmap_accurate): Renamed from re_fastmap_accurate.
15453         (no_sub): Renamed from re_no_sub.
15454         (not_bol): Renamed from re_not_bol.
15455         (not_eol): Renamed from re_not_eol.
15456         (newline_anchor): Renamed from re_newline_anchor.
15457         (num_regs): Renamed from rm_num_regs.
15458         (start): Renamed from rm_start.
15459         (end): Renamed from rm_end.
15460
15461         (free_state): Move up a bit.
15462
15463         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
15464         #define to be empty.
15465         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
15466         when that is what is intended.
15467         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
15468         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
15469         (MAX): New macro.
15470         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
15471         All uses changed back to re_malloc, etc.  It's now the caller's
15472         responsibility to check for overflow; all callers changed.
15473         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
15474         (re_x2nrealloc): Remove.
15475         (free_state): Remove decl.
15476
15477         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
15478         (re_set_registers, re_exec):
15479         Use K&R-style defn.
15480
15481         2006-01-31  Roland McGrath  <roland@redhat.com>
15482
15483         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
15484         Reported by Mike Frysinger <vapier@gentoo.org>.
15485
15486         2006-01-15  Andreas Jaeger  <aj@suse.de>
15487
15488         [BZ #1950]
15489         * lib/regex_internal.c (re_string_reconstruct): Adjust for
15490         build_wcs_upper_buffer change.
15491         (build_wcs_upper_buffer): Change return type.
15492
15493         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
15494
15495         * lib/regex_internal.h: Include <stdint.h> if available.
15496
15497         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
15498
15499         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
15500
15501         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
15502
15503         * lib/regcomp.c: Adjust for changed secondary hash function.
15504
15505         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
15506
15507         * lib/regex.h: Pretty printing.
15508         Clean up namespace a bit.
15509
15510         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
15511
15512         * lib/regexec.c (update_cur_sifted_state, check_arrival,
15513         check_arrival_add_next_nodes): Avoid using uninitialized variable.
15514
15515         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
15516                     Ulrich Drepper  <drepper@redhat.com>
15517
15518         [BZ #1302]
15519         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
15520         changed.
15521         (bitset_word_t): Renamed from bitset_word.  All uses changed.
15522
15523         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
15524
15525         [BZ #281]
15526         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
15527         * lib/regcomp.c: Remove unnecessary uses of
15528         unsigned RE_TRANSLATE_TYPE.
15529         * lib/regex_internal.h: Likewise.
15530         * lib/regex_internal.c: Likewise.
15531         * lib/regexec.c: Likewise.
15532         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
15533
15534         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
15535
15536         * lib/regexec.c (find_recover_state): Remove unnecessary
15537         initialization.
15538         (transit_state_bkref): Make DFA a const pointer.
15539         (get_subexp): Likewise.
15540         (check_arrival): Likewise.
15541         (update_cur_sifted_state): Likewise.
15542         (re_search_internal): Likewise.
15543         (prune_impossible_nodes): Likewise.
15544         (acquire_init_state_context): Likewise.
15545         (proceed_next_node): Likewise.
15546         (set_regs): Likewise.
15547         (free_fail_stack_return): Likewise.
15548         (check_arrival_expand_ecl): Mark DFA parameter as const.
15549         (check_arrival_expand_ecl_sub): Likewise.
15550         (check_subexp_limits): Likewise.
15551         (sub_epsilon_src_nodes):  Likewise.
15552         (add_epsilon_src_nodes):  Likewise.
15553         (merge_state_array): Likewise.
15554         (update_regs): Likewise.
15555         (build_trtable): Likewise.
15556         (sift_states_backward): Mark MCTX parameter as const.
15557         (build_sifted_states): Likewise.
15558         (update_cur_sifted_state): Likewise.
15559         (sift_states_mkref): Likewise.
15560         (check_arrival_expand_ecl): Mark eclosure as const.
15561         (check_dst_limits_calc_pos_1): Likewise.
15562         * lib/regex_internal.h (re_match_context_t): Make dfa a const
15563         pointer.
15564
15565         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
15566
15567         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
15568         (transit_state_sb): Likewise.
15569         (transit_state_mb): Likewise.
15570         (sift_states_iter_mb): Likewise.
15571         (check_arrival_add_next_nodes): Likewise.
15572         (check_node_accept_bytes): Change first parameter to pointer-to-const.
15573         [_LIBC] (re_search_2_stub): Use mempcpy.
15574
15575         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
15576         mbrtowc for very simple UTF-8 case.
15577
15578         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
15579         a pointer-to-const.
15580         (re_acquire_state_context): Likewise.
15581         * lib/regex_internal.h: Adjust prototypes.
15582
15583         * lib/regex.c: Prevent using C++ compilers.
15584
15585         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
15586         (re_acquire_state_context): Likewise.
15587
15588 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
15589
15590         * modules/regex (Depends-on): Add ssize_t.
15591
15592 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
15593
15594         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
15595         translation table.
15596
15597 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
15598
15599         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
15600
15601 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
15602             Bruno Haible  <bruno@clisp.org>
15603
15604         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
15605         <sys/types.h> and <inttypes.h>.
15606
15607 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
15608
15609         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
15610         `__error_t_defined', so argp.h will not typedef the former.
15611
15612 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
15613
15614         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
15615         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
15616         glibc names.  Even if glibc is changed to conform to POSIX, the
15617         traditional names will be available anyway, since regex depends on
15618         the extensions module.  Also, fix a longstanding typo in the
15619         implementation of Spencer ERE test #75 from grep 2.3.  Problems
15620         reported by Emanuele Giaquinta.  Also, change sense of cached
15621         variable, so that the message makes sense.
15622
15623 2006-03-24  Simon Josefsson  <jas@extundo.com>
15624
15625         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
15626         including some doc fixes.
15627         (base64_encode_alloc): Fix +1 bug on allocation failures.
15628
15629 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
15630
15631         * lib/base64.c (base64_encode): Do not read past end of array with
15632         unsanitized input on systems with CHAR_BIT > 8.
15633
15634 2006-03-24  Eric Blake  <ebb9@byu.net>
15635
15636         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
15637
15638 2006-03-22  Karl Berry  <karl@gnu.org>
15639
15640         * config/srclist.txt (*setenv.[ch]): get from coreutils.
15641         * config/srclistvars.sh (COREUTILS): new var.
15642
15643 2006-03-17  Jim Meyering  <jim@meyering.net>
15644
15645         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
15646         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
15647
15648 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
15649
15650         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
15651         no longer needs it.  Instead, check that regoff_t is as least
15652         as wide as ptrdiff_t.
15653
15654         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
15655         so that our regex.h stays compatible with the installed regex.
15656         This is helpful for installers who configure --without-included-regex.
15657         Problem reported by Emanuele Giaquinta.
15658
15659 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
15660
15661         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
15662         Typedef to long int, not to off_, as POSIX will likely change
15663         in that direction.
15664
15665 2006-03-15  Eric Blake  <ebb9@byu.net>
15666
15667         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
15668
15669 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
15670
15671         * lib/argp-help.c (validate_uparams): Fix typo
15672         * lib/argp-parse.c (argp_default_options): Consistently begin help
15673         messages with a lowercase letter.
15674
15675 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
15676
15677         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
15678         overrun buffers and shouldn't be used (much as gets shouldn't be
15679         used).
15680         * lib/time_r.c (asctime_r, ctime_r): Likewise.
15681
15682 2006-03-08  Simon Josefsson  <jas@extundo.com>
15683
15684         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
15685         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
15686
15687 2006-03-08  Simon Josefsson  <jas@extundo.com>
15688
15689         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
15690         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
15691
15692 2006-03-08  Simon Josefsson  <jas@extundo.com>
15693
15694         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
15695         signal that configure disabled the device.
15696
15697 2006-03-08  Simon Josefsson  <jas@extundo.com>
15698
15699         * build-aux/maint.mk: Fix refresh-po, to handle no translated
15700         languages.
15701
15702 2006-03-07  Simon Josefsson  <jas@extundo.com>
15703
15704         * modules/getopt (Depends-on): Add unistd.
15705
15706         * modules/unistd: New file.
15707
15708 2006-03-07  Simon Josefsson  <jas@extundo.com>
15709
15710         * modules/gc-random: New file.
15711
15712 2006-03-07  Simon Josefsson  <jas@extundo.com>
15713
15714         * m4/unistd_h.m4: New file.
15715
15716 2006-03-07  Simon Josefsson  <jas@extundo.com>
15717
15718         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
15719         test to be side-effect free by storing the result in the cache
15720         variable gl_cv_lib_readline, and moving the assignment of
15721         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
15722         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
15723
15724 2006-03-07  Simon Josefsson  <jas@extundo.com>
15725
15726         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
15727         error on missing devices (the functions will return an error).
15728
15729         * m4/gc.m4: Move random stuff to gc-random.m4
15730
15731 2006-03-07  Simon Josefsson  <jas@extundo.com>
15732
15733         * lib/unistd_.h: New file.
15734
15735 2006-03-07  Simon Josefsson  <jas@extundo.com>
15736
15737         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
15738
15739 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
15740
15741         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
15742         Problem reported by Juan Manuel Guerrero.
15743
15744 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
15745
15746         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
15747         the unistd module.
15748         * lib/getlogin_r.c: Likewise.
15749         * lib/getlogin_r.h: Likewise.
15750         * lib/glob.c: Likewise.
15751         * lib/pagealign_alloc.c: Likewise.
15752         * lib/unistd_.h: Remove; no longer needed.
15753
15754 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
15755
15756         * MODULES.html.sh (Support for systems lacking POSIX:2001):
15757         Add unistd.
15758         * modules/c-stack (Depends-on): Add unistd.
15759         * modules/getlogin_r: Likewise.
15760         * modules/glob: Likewise.
15761         * modules/pagealign_alloc: Likewise.
15762         * modules/unistd (Files): Remove lib/unistd_.h.
15763         (EXTRA_DIST): Remove.
15764         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
15765         need unistd_.h.
15766         (MOSTLYCLEANFILES): Remove unistd.h-t.
15767
15768 2006-03-03  Simon Josefsson  <jas@extundo.com>
15769
15770         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
15771
15772 2006-03-03  Simon Josefsson  <jas@extundo.com>
15773
15774         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
15775         libidn and bison.
15776
15777 2006-03-03  Simon Josefsson  <jas@extundo.com>
15778
15779         * build-aux/maint.mk: Add indent target.
15780
15781 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
15782
15783         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
15784         our replacement poll.h in any case, to avoid a differing
15785         declaration from a system header.  Seen on AIX.
15786
15787 2006-03-01  Simon Josefsson  <jas@extundo.com>
15788
15789         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
15790         <kasal@ucw.cz>.
15791
15792 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15793
15794         * modules/gettime (Depends-on): Add extensions module.
15795         * modules/nanosleep (Depends-on): Likewise.
15796         * modules/settime (Depends-on): Likewise.
15797
15798 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
15799
15800         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
15801         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
15802         pedantically.
15803         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
15804         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
15805
15806         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
15807         not "==".  Reported by Ralf Wildenhues.
15808
15809 2006-03-01  Karl Berry  <karl@gnu.org>
15810
15811         * doc/Copyright/request-*: new files, synced from gnuorg.
15812
15813 2006-03-01  Karl Berry  <karl@gnu.org>
15814
15815         * config/srclist.txt (Copyright/*): new entries.
15816
15817 2006-02-28  Simon Josefsson  <jas@extundo.com>
15818
15819         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
15820
15821 2006-02-27  Simon Josefsson  <jas@extundo.com>
15822
15823         * lib/base64.h: Indent #define's.  From Jim Meyering
15824         <jim@meyering.net>.
15825
15826 2006-02-27  Jim Meyering  <jim@meyering.net>
15827
15828         Revert the change of 2006-02-24, so these files can continue
15829         to be sync'd from gettext.
15830         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
15831         of `config.h'.
15832
15833 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
15834
15835         * modules/intprops: New file.
15836         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
15837         Add intprops.
15838         * modules/getloadavg (Files): Remove lib/intprops.h.
15839         (Depends-on): Add intprops.
15840         * modules/human: Likewise.
15841         * modules/inttostr: Likewise.
15842         * modules/openat: Likewise.
15843         * modules/sig2str: Likewise.
15844         * modules/userspec: Likewise.
15845         * modules/utimecmp: Likewise.
15846         * modules/xnanosleep: Likewise.
15847         * modules/xstrtol: Likewise.
15848
15849 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
15850
15851         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
15852         * modules/lock-tests (TESTS): Use $(EXEEXT).
15853         * modules/tls-tests: Likewise.
15854         * modules/argp-tests: Likewise.
15855         (check_PROGRAMS): New var, replacing...
15856         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
15857
15858 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
15859
15860         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
15861         `config.h'.
15862
15863 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
15864
15865         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
15866
15867 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
15868
15869         Sync from coreutils.
15870         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
15871         gl_CHDIR_SAFER.
15872
15873 2006-02-22  Jim Meyering  <jim@meyering.net>
15874
15875         Sync from coreutils.
15876         * m4/chdir-safer.m4: New file.
15877
15878 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
15879
15880         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
15881         AT_FDCWD exceeds INT_MAX.
15882         * lib/openat.h (AT_FDCWD): Likewise.
15883
15884 2006-02-17  Eric Blake  <address@hidden>
15885
15886         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
15887
15888 2006-02-16  Simon Josefsson  <jas@extundo.com>
15889
15890         * modules/getaddrinfo (Depends-on): Add sys_socket.
15891
15892 2006-02-15  Simon Josefsson  <jas@extundo.com>
15893
15894         * build-aux/maint.mk: Add dsyntax-check rule.
15895
15896 2006-02-15  Eric Blake  <ebb9@byu.net>
15897
15898         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
15899         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
15900         'present but cannot compile' warnings on cygwin.
15901         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
15902         use ws2tcpip.h if sys/socket.h works.
15903         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
15904         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
15905
15906 2006-02-14  Simon Josefsson  <jas@extundo.com>
15907
15908         * modules/maintainer-makefile (Files): Rename.
15909
15910         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
15911         and (the local) Makefile.cfg to maint-cfg.mk.
15912
15913         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
15914         to the latter.
15915
15916         * modules/maintainer-makefile: New module.
15917
15918         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
15919         severaly stripped to make it possible to build it up from scratch
15920         with reliable tests.
15921
15922         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
15923         fixes to permit overriding the default actions when configure and
15924         makefile are not available.
15925
15926 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
15927
15928         Sync from coreutils.
15929         * modules/lstat (Depends-on): Don't depend on xalloc.
15930         (License): Change from GPL to LGPL, since this is now simply a
15931         replacement for a libc function.
15932
15933 2006-02-14  Jim Meyering  <jim@meyering.net>
15934
15935         Sync from coreutils.
15936
15937         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
15938         failure on deficient systems, and simplify gnulib lgpl dependencies.
15939         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
15940         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
15941
15942         * lib/xalloc-die.c: Remove unused definition of N_.
15943
15944 2006-02-14  Jim Meyering  <jim@meyering.net>
15945
15946         Sync from coreutils.
15947         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
15948         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
15949         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
15950         double-quote uses of that variable, to accommodate the rare case in
15951         which getmntent is available in none of the libraries checked.  This
15952         happens at least on FreeBSD 5.0.
15953
15954 2006-02-13  Simon Josefsson  <jas@extundo.com>
15955
15956         * gnulib-tool (Usage): Fix --import, from
15957         karl@freefriends.org (Karl Berry).
15958
15959 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
15960
15961         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
15962
15963 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
15964
15965         * lib/argp-namefrob.h: Restore changes accidentally lost during the
15966         "autoupdate" on 2005-12-12.
15967
15968 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
15969
15970         * modules/closeout (Depends-on): Remove atexit.
15971
15972 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
15973
15974         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
15975         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
15976
15977 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
15978
15979         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
15980         __EXTENSIONS__ if this causes compilation to fail.  Problem
15981         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
15982         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
15983
15984 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
15985
15986         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
15987         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
15988         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
15989         All uses changed.
15990
15991 2006-01-26  Simon Josefsson  <jas@extundo.com>
15992
15993         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
15994         prototype is visible on mingw32.
15995
15996         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
15997         for mingw32.
15998
15999         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
16000         mingw32).
16001
16002 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
16003
16004         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
16005         attempt to open for write; this always fails, at least on POSIX
16006         hosts.  This reinstates the 2006-01-09 change, which was
16007         inadvertently removed.
16008
16009 2006-01-26  Bruno Haible  <bruno@clisp.org>
16010
16011         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
16012         Reported by Paul Eggert.
16013
16014 2006-01-26  Bruno Haible  <bruno@clisp.org>
16015             Paul Eggert  <eggert@cs.ucla.edu>
16016
16017         * lib/stdbool_.h (_Bool)
16018         [(! (defined __cplusplus || defined __BEOS__)
16019           && !defined __GNUC__
16020           && !(defined __HP_cc || defined __xlc__
16021                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
16022                || defined __sgi))]:
16023         #define to signed char in these cases too; this simplifies
16024         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
16025         etc., separately) and makes it more conservative.
16026
16027 2006-01-25  Simon Josefsson  <jas@extundo.com>
16028
16029         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
16030         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
16031         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
16032
16033 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
16034
16035         * lib/argp-namefrob.h: Bugfix. Remove stray #
16036
16037 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
16038
16039         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
16040         so that we test the test.
16041         Check for yet another HP-UX cc bug involving *bool |= bool.
16042
16043 2006-01-25  Karl Berry  <karl@gnu.org>
16044
16045         * config/srclist.txt (vasnprintf.c): sync lost.
16046
16047 2006-01-25  Jim Meyering  <jim@meyering.net>
16048
16049         Sync from the stable (b5) branch of coreutils:
16050
16051         * lib/fts.c (fts_children): Don't let close() clobber errno from
16052         failed fchdir().
16053
16054         * lib/fts.c (fts_stat): When following a symlink-to-directory,
16055         don't necessarily interpret stat-fails+lstat-succeeds as indicating
16056         a dangling symlink.  That can also happen at least for ELOOP.
16057         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
16058         FYI, this bug predates the inclusion of fts.c in coreutils.
16059
16060         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
16061         in their own block, so pre-c99 compilers don't object.
16062
16063         Avoid the double-free (first in fts_read, second in fts_close) that
16064         would occur when an `active' directory is made inaccessible (e.g.,
16065         via chmod a-x) during a traversal.
16066         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
16067         before returning.  Reproduce this failure by
16068         mkdir -p a/b; cd a; chmod a-x . b
16069         Reported by Stavros Passas.
16070
16071 2006-01-25  Jim Meyering  <jim@meyering.net>
16072
16073         * lib/fileblocks.c: Remove more useless parentheses.
16074         * lib/readutmp.h: Likewise.
16075
16076 2006-01-25  Bruno Haible  <bruno@clisp.org>
16077
16078         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
16079         warnings.
16080         Reported by Paul Eggert.
16081
16082 2006-01-25  Bruno Haible  <bruno@clisp.org>
16083
16084         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
16085         rid of a trap command. For Solaris sh.
16086         Reported by Mark D. Baushke <mdb@gnu.org>.
16087
16088 2006-01-24  Simon Josefsson  <jas@extundo.com>
16089
16090         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
16091         Bruno.
16092
16093 2006-01-24  Karl Berry  <karl@gnu.org>
16094
16095         * config/srclist.txt (argp-namefrob.h): sync lost.
16096
16097 2006-01-24  Jim Meyering  <jim@meyering.net>
16098
16099         * modules/openat (Files): Add lib/intprops.h.
16100         From Mark D. Baushke.
16101
16102 2006-01-24  Jim Meyering  <jim@meyering.net>
16103
16104         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
16105         Reported by Mark D. Baushke.
16106
16107 2006-01-24  Jim Meyering  <jim@meyering.net>
16108
16109         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
16110
16111 2006-01-24  Bruno Haible  <bruno@clisp.org>
16112
16113         * modules/strnlen (Maintainer): Change from glibc to all.
16114
16115 2006-01-24  Bruno Haible  <bruno@clisp.org>
16116
16117         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
16118         Patch by Paul Eggert.
16119
16120 2006-01-24  Bruno Haible  <bruno@clisp.org>
16121
16122         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
16123         already has it.
16124         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
16125         2005-11-26.
16126
16127         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
16128         'signed char' to avoid problems with the built-in _Bool type.
16129         Reported by Paul Eggert on 2005-11-26.
16130
16131 2006-01-24  Bruno Haible  <bruno@clisp.org>
16132
16133         * gnulib-tool (func_import): Avoid constructing complicated sed
16134         expressions inside backquote.
16135         Report and solution by Mark D. Baushke <mdb@gnu.org>.
16136
16137 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
16138
16139         These changes imported from libc.
16140         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
16141         test and two separate function calls.
16142         * lib/strndup.c (__strndup): Add libc_hidden_def.
16143
16144 2006-01-23  Simon Josefsson  <jas@extundo.com>
16145
16146         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
16147         Remove the test_*_SOURCES variable: automake infers it by default.
16148         * modules/tls-tests: Likewise.
16149
16150 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
16151
16152         Work around porting bugs reported by Dieter in
16153         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
16154         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
16155         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
16156         Include "getopt.h" first, to check interface.
16157         (getenv): Declare only if defined HAVE_DECL_GETENV &&
16158         !HAVE_DECL_GETENV.
16159         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
16160         (__strndup): Revert to K&R-style function dfns, the glibc style.
16161         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
16162         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
16163         Include strnlen.h first, to get prototype properly.
16164         (strnlen): Renamed from __strnlen.
16165         Remove weak alias.
16166
16167 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
16168
16169         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
16170
16171 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
16172
16173         * config/srclist.txt: Adjust to reflect glibc reorganization.
16174         This affects only comments.
16175
16176 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
16177
16178          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
16179          Reported by Bruce Korb <bkorb@gnu.org>.
16180
16181 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
16182
16183         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
16184         to pacify gcc -Wswitch-default.
16185
16186 2006-01-22  Bruno Haible  <bruno@clisp.org>
16187
16188         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
16189         temporary buffer for sprintf, take into account the precision also
16190         for 'd', 'i', 'u', 'o', 'x', 'X'.
16191
16192 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
16193
16194         * modules/argp-tests: New module
16195         * tests/test-argp.c: New file
16196         * tests/test-argp-2.sh: New file
16197
16198 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
16199
16200         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
16201         (__argp_base_name): Removed
16202         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
16203         typo.
16204         (__argp_base_name): Provide macro definition or extern declaration
16205         depending on the configuration
16206
16207 2006-01-20  Simon Josefsson  <jas@extundo.com>
16208
16209         * modules/inet_ntop (Depends-on): Depend on sys_socket.
16210
16211 2006-01-20  Simon Josefsson  <jas@extundo.com>
16212
16213         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
16214
16215 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
16216
16217         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
16218         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
16219         Suggested by Bruno Haible.
16220
16221 2006-01-20  Karl Berry  <karl@gnu.org>
16222
16223         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
16224         until changes propagate, I guess.
16225
16226 2006-01-19  Simon Josefsson  <jas@extundo.com>
16227
16228         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
16229
16230 2006-01-19  Simon Josefsson  <jas@extundo.com>
16231
16232         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
16233
16234 2006-01-19  Simon Josefsson  <jas@extundo.com>
16235
16236         * gnulib-tool: Set check_PROGRAMS.
16237
16238         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
16239         modules/des-tests, modules/gc-arcfour-tests,
16240         modules/gc-arctwo-tests, modules/gc-des-tests,
16241         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
16242         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
16243         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
16244         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
16245         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
16246         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
16247         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
16248         test_*_SOURCES.
16249
16250 2006-01-18  Simon Josefsson  <jas@extundo.com>
16251
16252         * modules/socklen (Depends-on): Depend on sys_socket.
16253
16254 2006-01-18  Simon Josefsson  <jas@extundo.com>
16255
16256         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
16257         modules/des-tests, modules/gc-arcfour-tests,
16258         modules/gc-arctwo-tests, modules/gc-des-tests,
16259         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
16260         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
16261         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
16262         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
16263         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
16264         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
16265         $(EXEEXT) to automake TESTS variable, for mingw32.
16266
16267 2006-01-17  Simon Josefsson  <jas@extundo.com>
16268
16269         * modules/socklen (Include): Need sys/socket.h.
16270
16271 2006-01-17  Bruno Haible  <bruno@clisp.org>
16272
16273         * modules/ssize_t (Include): Add <sys/types.h>.
16274
16275 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
16276
16277         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
16278         it's not portable and it doesn't work with cross-compiles.
16279         Problem reported by Bruno Haible.  Fix missing-$ typo in
16280         'test "gl_cv_ignore_unused_libraries" ...' that prevented
16281         -zignore from being used with Sun's C compiler.
16282
16283 2006-01-12  Simon Josefsson  <jas@extundo.com>
16284
16285         * lib/base64.c: Fix warning, reported by Bruno Haible
16286         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
16287
16288 2006-01-12  Bruno Haible  <bruno@clisp.org>
16289
16290         * modules/ldd: New file.
16291         * build-aux/ldd.sh.in: New file.
16292         * MODULES.html.sh (Support for building libraries and executables): Add
16293         ldd.
16294
16295 2006-01-12  Bruno Haible  <bruno@clisp.org>
16296
16297         * m4/ldd.m4: New file.
16298
16299 2006-01-12  Bruno Haible  <bruno@clisp.org>
16300
16301         * gnulib-tool (func_import, func_create_testdir): Don't go into an
16302         endless loop while replacing $auxdir with build-aux.
16303
16304 2006-01-11  Simon Josefsson  <jas@extundo.com>
16305
16306         * lib/stdint_.h (SIZE_MAX): Add missing (.
16307
16308 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
16309
16310         Sync from coreutils.
16311         * lib/md5.c: Fix commentary typos.
16312         (alignof, UNALIGNED_P): No need for a GCC-specific version.
16313         * lib/md5.h (__attribute__): Remove; unused.
16314         * lib/sha1.c: Fix commentary to match md5 better.
16315         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
16316         so that we don't need to worry about alignment.  All uses changed.
16317         This merges the 2005-10-28 md5 change into sha1.
16318
16319 2006-01-11  Jim Meyering  <jim@meyering.net>
16320
16321         Sync from coreutils.
16322         * lib/md5.c (OP): Fix spacing.
16323
16324 2006-01-11  Bruno Haible  <bruno@clisp.org>
16325
16326         Ensure automatic ordering between gl_LOCK and gl_ARGP.
16327         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
16328         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
16329
16330 2006-01-11  Bruno Haible  <bruno@clisp.org>
16331
16332         Ensure automatic ordering between gl_LOCK and gl_ARGP.
16333         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
16334         the "early" section as well.
16335
16336 2006-01-11  Bruno Haible  <bruno@clisp.org>
16337
16338         Avoid "ar: no archive members specified" error on MacOS X.
16339         * gnulib-tool (func_modules_add_dummy): New function.
16340         (func_import, func_create_testdir): Invoke it.
16341
16342 2006-01-11  Bruno Haible  <bruno@clisp.org>
16343
16344         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
16345         with $auxdir in AC_CONFIG_FILES statements.
16346
16347 2006-01-11  Bruno Haible  <bruno@clisp.org>
16348
16349         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
16350         Initialize also noinst_HEADERS to empty.
16351
16352 2006-01-11  Bruno Haible  <bruno@clisp.org>
16353
16354         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
16355         variables.
16356         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
16357         autoreconf.
16358
16359 2006-01-11  Bruno Haible  <bruno@clisp.org>
16360
16361         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
16362         overridable by the user.
16363         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
16364
16365 2006-01-10  Simon Josefsson  <jas@extundo.com>
16366
16367         * modules/sys_socket: New file.
16368
16369 2006-01-10  Simon Josefsson  <jas@extundo.com>
16370
16371         * m4/sys_socket_h.m4: New file.
16372
16373 2006-01-10  Simon Josefsson  <jas@extundo.com>
16374
16375         * lib/socket_.h: New file.
16376
16377 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
16378
16379         * modules/readutmp (Maintainer): Add myself.
16380
16381 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
16382
16383         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
16384         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
16385         People who are still concerned with buggy memcmp implementations
16386         can invoke gl_FUNC_MEMCMP themselves.
16387
16388 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
16389
16390         * lib/regex_internal.h (BITSET_WORD_BITS):
16391         Work around a bug in 64-bit PGC (before version 6.1-2), where the
16392         preprocessor mishandles large unsigned values as if they were signed.
16393         Problem reported by Claudio Fontana in
16394         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
16395
16396 2006-01-10  Jim Meyering  <jim@meyering.net>
16397
16398         Avoid the double-free (first in fts_read, second in fts_close) that
16399         would occur when an `active' directory is made inaccessible (e.g.,
16400         via chmod a-x) during a traversal.
16401         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
16402         before returning.  Reproduce this failure by
16403         mkdir -p a/b; cd a; chmod a-x . b
16404         Reported by Stavros Passas.
16405
16406         Sync from coreutils.
16407         * lib/sha1.c: Tweak grammar in a comment.
16408
16409 2006-01-10  Jim Meyering  <jim@meyering.net>
16410
16411         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
16412         Patch by Joerg Sonnenberger.
16413
16414 2006-01-10  Bruno Haible  <bruno@clisp.org>
16415
16416         * modules/readutmp: Depend on module free.
16417         * modules/strtok_r: Depend on module restrict.
16418
16419 2006-01-10  Bruno Haible  <bruno@clisp.org>
16420
16421         * modules/gettext (configure.ac): Add an invocation of
16422         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
16423
16424 2006-01-10  Bruno Haible  <bruno@clisp.org>
16425
16426         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
16427         Reported by Werner Lemberg <wl@gnu.org>.
16428
16429 2006-01-10  Bruno Haible  <bruno@clisp.org>
16430
16431         * lib/localcharset.c: Update from GNU gettext.
16432
16433 2006-01-10  Bruno Haible  <bruno@clisp.org>
16434
16435         * lib/argp.h (__const): Remove macro. Use const instead.
16436         * lib/argp-fmtstream.h (__const): Likewise.
16437         * lib/glob_.h (__const): Remove macro.
16438         * lib/glob-libc.h: Use const instead of __const.
16439
16440 2006-01-10  Bruno Haible  <bruno@clisp.org>
16441
16442         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
16443         variable.
16444         Needed to avoid an automake error regarding the 'gettext' module.
16445
16446 2006-01-09  Simon Josefsson  <jas@extundo.com>
16447
16448         * modules/inet_ntop (Depends-on): Add restrict.
16449
16450 2006-01-09  Simon Josefsson  <jas@extundo.com>
16451
16452         * modules/gc-rijndael-tests (License): Put under LGPL.
16453
16454         * modules/gc-des-tests (License): Likewise.
16455
16456         * modules/gc-arcfour-tests (License): Likewise.
16457
16458         * modules/gc-arctwo-tests (License): Likewise.
16459
16460         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
16461
16462         * modules/gc-hmac-sha1-tests (Files): Likewise.
16463
16464         * modules/gc-hmac-md5-tests (License): Likewise.
16465
16466         * modules/gc-sha1-tests (License): Likewise.
16467
16468         * modules/gc-md5-tests (License): Likewise.
16469
16470         * modules/gc-md4-tests (License): Likewise.
16471
16472         * modules/gc-md2-tests (License): Likewise.
16473
16474         * modules/gc-tests (License): Likewise.
16475
16476         * modules/des-tests (License): Likewise.
16477
16478         * modules/md4-tests (License): Likewise.
16479
16480         * modules/md2-tests (License): Likewise.
16481
16482 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
16483
16484         Sync from coreutils:
16485
16486         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
16487         * modules/lib-ignore: New file.
16488         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
16489         chdir-safer.m4, lchmod.m4.
16490         * modules/openat: Add mkdirat.c, openat-priv.h.
16491
16492 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
16493
16494         Sync from coreutils.
16495         * m4/lib-ignore.m4: New file.
16496         * m4/lchmod.m4: New file.
16497
16498 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
16499
16500         Sync from coreutils.
16501         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
16502         for write access: POSIX says that must fail.
16503         * lib/fts.c (diropen): Likewise.
16504         * lib/save-cwd.c (save_cwd): Likewise.
16505         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
16506         well, for minor improvements on hosts that lack O_DIRECTORY.
16507         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
16508         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
16509         Fall back on chown if open failed with EACCES.
16510
16511         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
16512         Report an error at compile-time if only a 1-second nominal clock
16513         resolution is found.
16514
16515         * lib/lchmod.h: New file.
16516         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
16517         (make_dir_parents): Use lchown rather than chown, and
16518         lchmod rather than chmod.
16519
16520         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
16521         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
16522         "proc" reported by n0dalus.
16523
16524         * lib/mountlist.c: Include <limits.h>.
16525         (dev_from_mount_options)
16526         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
16527         New function.  It no longer assumes "dev=" has the System V meaning
16528         on Linux (since it doesn't).  It also parses "dev=" more carefully.
16529         (read_file_system_list)
16530         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
16531         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
16532         dev= in that case.
16533
16534         * lib/posixtm.h (PDS_PRE_2000): New macro.
16535         * lib/posixtm.c (year): Arg is now syntax_bits rather than
16536         allow_century.  All usages changed.  Reject dates outside the range
16537         1969-1999 if PDS_PRE_2000 is used.
16538
16539 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
16540
16541         Sync from coreutils.
16542         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
16543         (Time of day items): Mention the possibility of leap seconds.
16544         Problem reported by Dr. David Alan Gilbert.
16545
16546 2006-01-09  Jim Meyering  <jim@meyering.net>
16547
16548         Sync from coreutils.
16549
16550         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
16551
16552         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
16553
16554         * lib/modechange.c (mode_compile): Reject an invalid mode string
16555         that starts with an octal digit.  From Andreas Gruenbacher.
16556
16557         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
16558         and dup to open_safer and dup_safer, respectively.
16559         (openat_permissive): Fix typo in comment.
16560
16561         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
16562         "gettext.h"; either no longer needed or are guaranteed by openat.h.
16563         (_): Remove; no longer needed.
16564         (openat): Renamed from rpl_openat; no need for rpl_openat
16565         since openat.h renames openat for us.
16566         Replace most of the body with a call to openat_permissive,
16567         to avoid duplicate code.
16568         Port to (probably hypothetical) environments were mode_t is
16569         wider than int.
16570         (openat_permissive): Require mode arg, so that we can check
16571         types better.  Put it just after flags.  Change cwd failure
16572         indicator from pointer-to-bool to pointer-to-errno-value.
16573         All callers changed.
16574         Invoke openat_save_fail and/or openat_restore_fail if
16575         cwd_errno is null, so that openat can call us.
16576         (openat_permissive, fdopendir, fstatat, unlinkat):
16577         Simplify errno handling to avoid some duplicate code,
16578         as it's OK to set errno on success.
16579         * lib/openat.h: Revamp code so that function macros depend on
16580         __OPENAT_PREFIX only, not also on AT_FDCWD.
16581         (openat_ro): Remove.  Caller changed to use openat_permissive.
16582         (openat_permissive): Now a macro, if not a function.
16583         (openat_restore_fail, openat_save_fail): Now always functions,
16584         since mkdirat needs them even if __OPENAT_PREFIX is defined.
16585
16586         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
16587         and openat.c.
16588         * lib/mkdirat.c: Include openat-priv.h.
16589         Remove definitions of macros defined therein.
16590         * lib/openat.c: Likewise.
16591
16592         * lib/mkdirat.c (mkdirat): New file and function.
16593         * lib/openat.h (mkdirat): Declare.
16594
16595         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
16596
16597         * lib/openat.h (openat_permissive): Declare.
16598         (openat_ro): Define.
16599
16600         * lib/openat.c (EXPECTED_ERRNO): New macro.
16601         (openat_permissive): New function -- used in remove.c rewrite.
16602         (all functions): Set errno just before returning, only if there
16603         was an actual failure.
16604         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
16605
16606         Emulate openat-family functions using Linux's procfs, if possible.
16607         Idea and some code based on Ulrich Drepper's glibc changes.
16608
16609         * lib/openat.c: (BUILD_PROC_NAME): New macro.
16610         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
16611         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
16612         before falling back on save_cwd and restore_cwd.
16613         (fdopendir, fstatat, unlinkat): Likewise.
16614
16615         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
16616         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
16617
16618         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
16619         as second argument to va_arg.  Otherwise, some versions of gcc
16620         warn that `if this code is reached, the program will abort'.
16621
16622 2006-01-09  Jim Meyering  <jim@meyering.net>
16623
16624         Sync from coreutils.
16625         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
16626         Require openat-priv.h.
16627
16628 2006-01-09  Bruno Haible  <bruno@clisp.org>
16629
16630         * modules/strnlen (Include): Use strnlen.h.
16631
16632 2006-01-09  Bruno Haible  <bruno@clisp.org>
16633
16634         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
16635
16636 2006-01-09  Bruno Haible  <bruno@clisp.org>
16637
16638         * lib/sysexit_.h (EX_OK): New macro.
16639         Suggested by Martin Lambers <marlam@marlam.de>.
16640
16641 2006-01-09  Bruno Haible  <bruno@clisp.org>
16642
16643         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
16644         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
16645
16646 2006-01-09  Bruno Haible  <bruno@clisp.org>
16647
16648         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
16649         numbers.
16650
16651 2006-01-09  Bruno Haible  <bruno@clisp.org>
16652
16653         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
16654         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
16655         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
16656         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
16657
16658 2006-01-09  Bruno Haible  <bruno@clisp.org>
16659
16660         * build-aux/javacomp.sh.in: New file, moved from lib/.
16661         * modules/javacomp-script (Files): Update.
16662         (configure.ac): Add AC_CONFIG_FILES invocation.
16663         (EXTRA_DIST): Remove variable.
16664
16665         * build-aux/javaexec.sh.in: New file, moved from lib/.
16666         * modules/javaexec (Files): Update.
16667         (configure.ac): Add AC_CONFIG_FILES invocation.
16668         (EXTRA_DIST): Remove javaexec.sh.in.
16669
16670         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
16671         * modules/csharpcomp-script (Files): Update.
16672         (configure.ac): Add AC_CONFIG_FILES invocation.
16673         (EXTRA_DIST): Remove variable.
16674
16675         * build-aux/csharpexec.sh.in: New file, moved from lib/.
16676         * modules/csharpexec (Files): Update.
16677         (configure.ac): Add AC_CONFIG_FILES invocation.
16678         (EXTRA_DIST): Remove csharpexec.sh.in.
16679
16680 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
16681
16682         Sync from coreutils.
16683
16684         Add POSIX ACL support
16685         * lib/acl.h (copy_acl, set_acl): Add declarations.
16686         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
16687         systems other than Linux.
16688         (chmod_or_fchmod): New function: use fchmod when possible,
16689         and chmod otherwise.
16690         (file_has_acl): Add a POSIX ACL implementation, with a
16691         Linux-specific subcase.
16692         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
16693         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
16694         acls are unsupported.
16695         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
16696         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
16697         are unsupported.
16698
16699 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
16700
16701         Sync from coreutils.
16702         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
16703
16704 2006-01-07  Bruno Haible  <bruno@clisp.org>
16705
16706         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
16707         gl_EARLY.
16708
16709 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
16710
16711         * lib/strftime.c (tzname): Don't declare if it is already #defined.
16712         Problem reported for Mingw by Mark Junker.
16713
16714 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
16715
16716         * README: Gnulib normally doesn't generate a tarball.
16717
16718 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
16719
16720         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
16721         long int, not int, for nanosecond counts, so that people who are
16722         used to POSIX struct timespec won't be surprised.  Reported by Jim
16723         Meyering.
16724
16725 2005-12-28  Bruno Haible  <bruno@clisp.org>
16726
16727         * build-aux/config.rpath: Update from GNU gettext.
16728
16729 2005-12-16  Jim Meyering  <jim@meyering.net>
16730
16731         * modules/fprintftime: New module.
16732         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
16733
16734 2005-12-16  Jim Meyering  <jim@meyering.net>
16735
16736         * m4/fprintftime.m4: New file.
16737
16738 2005-12-16  Jim Meyering  <jim@meyering.net>
16739
16740         * lib/fprintftime.c, lib/fprintftime.h: New files.
16741
16742 2005-12-15  Simon Josefsson  <jas@extundo.com>
16743
16744         * modules/socklen (configure.ac): Fix M4 macro name, to align with
16745         new m4/socklen.m4.
16746
16747 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
16748
16749         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
16750         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
16751
16752 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
16753
16754         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
16755         * lib/argp-help.c (fill_in_uparams): Check if the constructed
16756         struct uparams is valid. Fall back to the default values if it is
16757         not.
16758
16759 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
16760
16761         * modules/argp (Files): Add argp-pin.c
16762         (Depends-on): dirname
16763         (lib_SOURCES): Add argp-pin.c
16764
16765 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
16766
16767         * m4/argp.m4:  Check if program_invocation_name and
16768         program_invocation_short_name are declared and define appropriate
16769         macros if they are not.
16770
16771 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
16772
16773         * lib/argp-help.c (__argp_base_name): New function
16774         (__argp_short_program_name): Rewrite using __argp_base_name
16775         * lib/argp-namefrob.h: Define program_invocation_name and
16776         program_invocation_short_name if requested
16777         (__argp_base_name): Add prototype
16778         * lib/argp-parse.c (argp_def): Use gettext wrappers
16779         (argp_default_parser): Use __argp_base_name
16780         * lib/argp-pin.c: New file. Defines program_invocation_name and
16781         program_invocation_short_name on systems that lack them.
16782
16783 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
16784
16785         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
16786         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
16787         porting problem reported by Georg Schwarz in
16788         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
16789
16790 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
16791
16792         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
16793         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
16794         porting problem reported by Georg Schwarz in
16795         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
16796
16797 2005-12-05  Bruno Haible  <bruno@clisp.org>
16798
16799         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
16800         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
16801         Reported by Mark Junker <mjscod@gmx.de>.
16802
16803 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
16804
16805         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
16806         Use implementation from Albert Chin, with some
16807         comments/corrections by Stepan Kasal and myself.
16808
16809 2005-12-02  Bruno Haible  <bruno@clisp.org>
16810
16811         * gnulib-tool (func_import): Accept GPLed build tool modules when
16812         --lgpl is given.
16813         * modules/csharpcomp-script: New file.
16814         * modules/csharpcomp: Depend on it.
16815         * modules/javacomp-script: New file.
16816         * modules/javacomp: Depend on it.
16817         Suggested by Simon Josefsson.
16818
16819 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
16820
16821         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
16822         statement, to work around an HP-UX 10.20 compiler bug reported by
16823         Peter O'Gorman.
16824
16825 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
16826
16827         * modules/savedir (Depends-on): Add openat.
16828
16829 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
16830
16831         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
16832         (uintmax_t) [defined uintmax_t]: Do not declare.
16833         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
16834         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
16835         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
16836         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
16837         sake of portability to weird hosts that C allows (though we don't
16838         know of any practical examples).
16839
16840         * lib/savedir.h (fdsavedir): New decl.
16841         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
16842         contains most of the former guts of savedir.
16843         (savedir): Use savedirstream.
16844         Include "openat.h".
16845
16846 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
16847
16848         * modules/obstack (Files): Add m4/ulonglong.m4.
16849         Problem reported by Davide Angelocola.
16850
16851 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
16852
16853         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
16854         coreutils no longer futzes with rounding modes.
16855
16856 2005-11-14  Jim Meyering  <jim@meyering.net>
16857
16858         * lib/mkstemp-safer.c: Include <config.h>, required for possible
16859         replacement of mkstemp.
16860
16861 2005-11-10  Simon Josefsson  <jas@extundo.com>
16862
16863         * lib/readline.c: Remove EOL.
16864
16865 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16866
16867         * modules/gethrxtime (Depends-on): Add gettime.
16868
16869 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16870
16871         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
16872         or gettimeofday; no longer needed.
16873
16874 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
16875
16876         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
16877         time business.
16878         (gethrxtime) [! (HAVE_NANOUPTIME
16879         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
16880         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
16881         our own approximation.
16882
16883 2005-11-08  Eric Blake  <ebb9@byu.net>
16884
16885         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
16886
16887 2005-11-08  Eric Blake  <ebb9@byu.net>
16888
16889         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
16890
16891 2005-11-04  Bruno Haible  <bruno@clisp.org>
16892
16893         * gnulib-tool: Implement --update mode.
16894
16895 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
16896
16897         Fix porting problem reported by Theodoros V. Kalamatianos.
16898         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
16899         Don't assume that futimes failing means we must fail.
16900
16901 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
16902
16903         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
16904         variables to suggest the intended function of the PATH_MAX check.
16905
16906 2005-10-30  Kean Johnston  <jkj@sco.com>
16907
16908         Trivial changes to support SCO systems.
16909         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
16910         as PATH_MAX.
16911         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
16912         where __ptr is null when no I/O is pending.
16913
16914 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
16915
16916         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
16917         leave errno alone.  Problem reported by Dmitry V. Levin.
16918
16919 2005-10-28  Simon Josefsson  <jas@extundo.com>
16920
16921         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
16922         Test more.
16923
16924         * tests/test-gc-md2.c, tests/test-md2.c: New files.
16925
16926         * modules/md2, modules/md2-tests: New files.
16927
16928 2005-10-28  Simon Josefsson  <jas@extundo.com>
16929
16930         * m4/inet_ntop.m4: More tests.
16931
16932         * m4/gc-md2.m4, md2.m4: New file.
16933
16934 2005-10-28  Simon Josefsson  <jas@extundo.com>
16935
16936         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
16937         "restrict" keywords, as per POSIX.  Protect the function
16938         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
16939         Don't use K&R prototypes.  Check the sprintf return values.
16940         Re-define EAFNOSUPPORT if not present.  Indent.
16941
16942         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
16943         suggested by Bruno Haible <bruno@clisp.org>.
16944
16945         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
16946
16947         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
16948
16949         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
16950         libgcrypt).
16951
16952         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
16953
16954         * lib/md2.h, lib/md2.c: New files.
16955
16956 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
16957
16958         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
16959         errno alone.  Problem reported by Frederic Jolliton.
16960
16961 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
16962
16963         * modules/verify (License): Change from GPL to LGPL.  This is a
16964         tiny module and there are apparently near-equivalents that are
16965         under the BSD license.
16966
16967 2005-10-24  Simon Josefsson  <jas@extundo.com>
16968
16969         * modules/sha1: Relicense to LGPL.
16970
16971 2005-10-24  Simon Josefsson  <jas@extundo.com>
16972
16973         * lib/md4.h: Shrink buffer size, now that we changed the type.
16974
16975 2005-10-23  Simon Josefsson  <jas@extundo.com>
16976
16977         * gnulib-tool (func_import): Fix --tests-base.
16978
16979 2005-10-22  Simon Josefsson  <jas@extundo.com>
16980
16981         * modules/arcfour (Depends-on): Need stdint.
16982
16983 2005-10-22  Simon Josefsson  <jas@extundo.com>
16984
16985         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
16986         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
16987
16988 2005-10-22  Simon Josefsson  <jas@extundo.com>
16989
16990         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
16991         suggested by Bruno Haible <bruno@clisp.org>.
16992
16993 2005-10-22  Simon Josefsson  <jas@extundo.com>
16994
16995         * lib/crc.h: Include stddef.h, for size_t.
16996
16997 2005-10-22  Simon Josefsson  <jas@extundo.com>
16998
16999         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
17000         arcfour_context struct (simplify test vector testing in GNU
17001         Shishi).
17002
17003 2005-10-21  Simon Josefsson  <jas@extundo.com>
17004
17005         * modules/des, modules/des-tests: New files.
17006
17007         * modules/gc-des, modules/gc-des-tests: New files.
17008
17009         * tests/test-des.c, tests/test-gc-des.c: New file.
17010
17011 2005-10-21  Simon Josefsson  <jas@extundo.com>
17012
17013         * modules/arctwo, modules/arctwo-tests: New files.
17014
17015         * tests/test-arctwo.c: New file.
17016
17017         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
17018
17019         * tests/test-gc-arctwo.c: New file.
17020
17021 2005-10-21  Simon Josefsson  <jas@extundo.com>
17022
17023         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
17024         Bruno Haible <bruno@clisp.org>.
17025
17026         * m4/gc-des.m4: New file.
17027
17028 2005-10-21  Simon Josefsson  <jas@extundo.com>
17029
17030         * m4/arctwo.m4: New file.
17031
17032         * m4/gc-arctwo.m4: New file.
17033
17034 2005-10-21  Simon Josefsson  <jas@extundo.com>
17035
17036         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
17037         block.
17038
17039 2005-10-21  Simon Josefsson  <jas@extundo.com>
17040
17041         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
17042         <bruno@clisp.org>.
17043
17044         * lib/hmac-sha1.c (hmac_sha1): Likewise.
17045
17046         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
17047         Bruno Haible <bruno@clisp.org>.
17048
17049         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
17050         <bruno@clisp.org>.
17051
17052 2005-10-21  Simon Josefsson  <jas@extundo.com>
17053
17054         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
17055
17056 2005-10-21  Simon Josefsson  <jas@extundo.com>
17057
17058         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
17059
17060 2005-10-21  Simon Josefsson  <jas@extundo.com>
17061
17062         * lib/des.h, lib/des.c: New files.
17063
17064         * lib/gc-gnulib.c: Support DES.c
17065
17066 2005-10-21  Simon Josefsson  <jas@extundo.com>
17067
17068         * lib/arctwo.h, lib/arctwo.c: New files.
17069
17070         * lib/gc-gnulib.c: Support ARCTWO.
17071
17072 2005-10-21  Simon Josefsson  <jas@extundo.com>
17073
17074         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
17075         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
17076
17077 2005-10-21  Simon Josefsson  <jas@extundo.com>
17078
17079         * gnulib-tool (func_import, func_create_testdir): Define automake
17080         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
17081         Makefile.am snippet),
17082         suggested by Bruno Haible <bruno@clisp.org>.
17083
17084         * modules/gc (Makefile.am): Use it.
17085
17086 2005-10-21  Bruno Haible  <bruno@clisp.org>
17087
17088         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
17089         patch.
17090
17091 2005-10-19  Simon Josefsson  <jas@extundo.com>
17092
17093         * tests/test-gc-rijndael.c: New file.
17094
17095         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
17096
17097 2005-10-19  Simon Josefsson  <jas@extundo.com>
17098
17099         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
17100         interface too.
17101
17102 2005-10-19  Simon Josefsson  <jas@extundo.com>
17103
17104         * tests/test-gc-arcfour.c: New file.
17105
17106         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
17107
17108 2005-10-19  Simon Josefsson  <jas@extundo.com>
17109
17110         * modules/gc-md4, modules/gc-md4-tests: New file.
17111
17112         * tests/test-gc-md4.c: New file.
17113
17114 2005-10-19  Simon Josefsson  <jas@extundo.com>
17115
17116         * m4/gc-md4.m4: New file.
17117
17118 2005-10-19  Simon Josefsson  <jas@extundo.com>
17119
17120         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
17121         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
17122         <kasal@ucw.cz>.
17123
17124 2005-10-19  Simon Josefsson  <jas@extundo.com>
17125
17126         * m4/gc-arcfour.m4: New file.
17127
17128         * m4/gc-rijndael.m4: New file.
17129
17130 2005-10-19  Simon Josefsson  <jas@extundo.com>
17131
17132         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
17133
17134 2005-10-19  Simon Josefsson  <jas@extundo.com>
17135
17136         * lib/gc-gnulib.c: Support ARCFOUR.
17137
17138 2005-10-19  Simon Josefsson  <jas@extundo.com>
17139
17140         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
17141         support.
17142
17143         * lib/gc.h: Add ECB enum type.
17144
17145         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
17146
17147 2005-10-18  Simon Josefsson  <jas@extundo.com>
17148
17149         * tests/test-md5.c: New file.
17150
17151         * modules/md5-tests: New file.
17152
17153 2005-10-18  Simon Josefsson  <jas@extundo.com>
17154
17155         * tests/test-md4.c: New file.
17156
17157         * modules/md4, modules/md4-tests: New files.
17158
17159 2005-10-18  Simon Josefsson  <jas@extundo.com>
17160
17161         * m4/md4.m4: New file.
17162
17163 2005-10-18  Simon Josefsson  <jas@extundo.com>
17164
17165         * lib/md4.h, lib/md4.c: New files, based on md5.?.
17166
17167 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
17168
17169         * gnulib-tool (func_create_testdir): Omit the second check whether
17170         BUILT_SOURCES in nonempty.
17171
17172 2005-10-17  Simon Josefsson  <jas@extundo.com>
17173
17174         * tests/test-rijndael.c: New file.
17175
17176 2005-10-17  Simon Josefsson  <jas@extundo.com>
17177
17178         * modules/sha1: Depend on stdint instead of md5.
17179
17180         * modules/md5: Depend on stdint, remove uint32_t.
17181
17182 2005-10-17  Simon Josefsson  <jas@extundo.com>
17183
17184         * modules/gc-sha1-tests: New file.
17185
17186         * tests/test-gc-sha1.c: New file.
17187
17188 2005-10-17  Simon Josefsson  <jas@extundo.com>
17189
17190         * m4/md5.m4: Remove call to uint32_t.m4.
17191
17192 2005-10-17  Simon Josefsson  <jas@extundo.com>
17193
17194         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
17195
17196         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
17197         md5.h.
17198
17199         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
17200
17201         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
17202
17203 2005-10-17  Simon Josefsson  <jas@extundo.com>
17204
17205         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
17206
17207 2005-10-17  Simon Josefsson  <jas@extundo.com>
17208
17209         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
17210
17211 2005-10-17  Simon Josefsson  <jas@extundo.com>
17212
17213         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
17214
17215         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
17216
17217 2005-10-17  Bruno Haible  <bruno@clisp.org>
17218
17219         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
17220         that it can also be used in a test.
17221
17222 2005-10-16  Bruno Haible  <bruno@clisp.org>
17223
17224         * gnulib-tool (func_emit_tests_Makefile_am): Also define
17225         TESTS_ENVIRONMENT, so that individual tests can augment it.
17226
17227         * gnulib-tool (func_create_testdir): Use an intermediate target for
17228         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
17229         macros, like $(ALLOCA_H), which cannot be passed through the command
17230         line.
17231
17232 2005-10-15  Simon Josefsson  <jas@extundo.com>
17233
17234         * modules/rijndael-tests: New file.
17235
17236         * modules/rijndael: New file.
17237
17238 2005-10-15  Simon Josefsson  <jas@extundo.com>
17239
17240         * m4/rijndael.m4: New file.
17241
17242 2005-10-15  Simon Josefsson  <jas@extundo.com>
17243
17244         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
17245
17246         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
17247
17248 2005-10-14  Simon Josefsson  <jas@extundo.com>
17249
17250         * tests/test-arcfour.c: New file.
17251
17252         * modules/arcfour, modules/arcfour-tests: New files.
17253
17254 2005-10-14  Simon Josefsson  <jas@extundo.com>
17255
17256         * m4/arcfour.m4: New file.
17257
17258 2005-10-14  Simon Josefsson  <jas@extundo.com>
17259
17260         * lib/arcfour.h, lib/arcfour.c: New files.
17261
17262 2005-10-14  Roland McGrath  <roland@redhat.com>
17263
17264         Import from libc.  [BZ #1331]
17265         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
17266         macro argument.
17267         Reported by Matej Vela <vela@debian.org>.
17268
17269 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
17270
17271         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
17272         include <wchar.h>; no longer needed.
17273
17274 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
17275
17276         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
17277
17278 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
17279         and  Ulrich Drepper  <drepper@redhat.com>
17280
17281         Import from libc.
17282         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
17283         instead of inline stream orientation test and two separate
17284         function calls.  Pay no attention to USE_IN_LIBIO.
17285
17286 2005-10-13  Simon Josefsson  <jas@extundo.com>
17287
17288         * modules/gc-hmac-md5-tests: New file.
17289
17290         * tests/test-gc-hmac-sha1.c: New file.
17291
17292         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
17293
17294         * modules/gc-hmac-md5-tests: New file.
17295
17296         * tests/test-gc-md5.c: New file.
17297
17298         * modules/gc-md5-tests: New file.
17299
17300 2005-10-13  Simon Josefsson  <jas@extundo.com>
17301
17302         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
17303         Move memory allocation outside of loop.
17304
17305 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
17306
17307         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
17308         intermediate directory is in a read-only file system.  Problem
17309         reported by Eric Blake.
17310
17311 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
17312
17313         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
17314
17315 2005-10-12  Simon Josefsson  <jas@extundo.com>
17316
17317         * tests/test-hmac-sha1.c: New file.
17318
17319         * modules/hmac-sha1-tests: New file.
17320
17321         * modules/hmac-sha1: New file.
17322
17323 2005-10-12  Simon Josefsson  <jas@extundo.com>
17324
17325         * modules/gc-sha1: New file.
17326
17327 2005-10-12  Simon Josefsson  <jas@extundo.com>
17328
17329         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
17330
17331         * tests/test-gc-pbkdf2-sha1.c: New file.
17332
17333 2005-10-12  Simon Josefsson  <jas@extundo.com>
17334
17335         * modules/gc-md5, modules/gc-hmac-md5: New files.
17336
17337         * modules/gc (Files): Remove md5, memxor and hmac files.
17338
17339 2005-10-12  Simon Josefsson  <jas@extundo.com>
17340
17341         * m4/gc-pbkdf2-sha1.m4: New file.
17342
17343         * m4/gc-hmac-sha1.m4: New file.
17344
17345         * m4/gc-sha1: New file.
17346
17347         * m4/hmac-sha1.m4: New file.
17348
17349 2005-10-12  Simon Josefsson  <jas@extundo.com>
17350
17351         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
17352
17353         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
17354
17355 2005-10-12  Simon Josefsson  <jas@extundo.com>
17356
17357         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
17358         suggested by Bruno Haible <bruno@clisp.org>.
17359
17360 2005-10-12  Simon Josefsson  <jas@extundo.com>
17361
17362         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
17363
17364 2005-10-12  Simon Josefsson  <jas@extundo.com>
17365
17366         * lib/gc-pbkdf2-sha1.c: New file.
17367
17368         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
17369
17370 2005-10-12  Simon Josefsson  <jas@extundo.com>
17371
17372         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
17373
17374         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
17375
17376 2005-10-12  Simon Josefsson  <jas@extundo.com>
17377
17378         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
17379         GC_USE_HMAC_MD5, respectively.
17380
17381         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
17382         (gc_md5): Fix typo.
17383
17384         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
17385
17386         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
17387
17388         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
17389
17390 2005-10-12  Bruno Haible  <bruno@clisp.org>
17391
17392         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
17393         Reported by Stepan Kasal <kasal@ucw.cz>.
17394
17395 2005-10-11  Simon Josefsson  <jas@extundo.com>
17396
17397         * tests/test-crc.c: New file.
17398
17399         * modules/crc, modules/crc-tests: New files.
17400
17401 2005-10-11  Simon Josefsson  <jas@extundo.com>
17402
17403         * m4/crc.m4: New file.
17404
17405 2005-10-11  Simon Josefsson  <jas@extundo.com>
17406
17407         * lib/gc.h: Add gc_hash and gc_hash_buffer.
17408
17409         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
17410
17411         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
17412
17413 2005-10-11  Simon Josefsson  <jas@extundo.com>
17414
17415         * lib/crc.h, lib/crc.c: New files.
17416
17417         * lib/gc.h (gc_hash_buffer): Add doc.
17418
17419 2005-10-11  Bruno Haible  <bruno@clisp.org>
17420
17421         * modules/c-strcasestr: New file.
17422         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
17423
17424 2005-10-11  Bruno Haible  <bruno@clisp.org>
17425
17426         * modules/c-strcase: New file.
17427         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
17428
17429 2005-10-11  Bruno Haible  <bruno@clisp.org>
17430
17431         * lib/strcasecmp.c: Include limits.h.
17432         (strcasecmp): Avoid integer overflow on exotic platforms.
17433         * lib/strncasecmp.c: Include limits.h.
17434         (strncasecmp): Avoid integer overflow on exotic platforms.
17435         Reported by Paul Eggert.
17436
17437 2005-10-11  Bruno Haible  <bruno@clisp.org>
17438
17439         * lib/c-strcasestr.h: New file, from GNU gettext.
17440         * lib/c-strcasestr.c: New file, from GNU gettext.
17441
17442 2005-10-11  Bruno Haible  <bruno@clisp.org>
17443
17444         * lib/c-strcase.h: New file, from GNU gettext.
17445         * lib/c-strcasecmp.c: New file, from GNU gettext.
17446         * lib/c-strncasecmp.c: New file, from GNU gettext.
17447
17448 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
17449
17450         * modules/mempcpy (License): GPL -> LGPL.
17451         * modules/strchrnul (License): Likewise.
17452         * modules/sysexits (License): Likewise.
17453
17454 2005-10-08  Simon Josefsson  <jas@extundo.com>
17455
17456         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
17457
17458 2005-10-07  Simon Josefsson  <jas@extundo.com>
17459
17460         * m4/memxor.m4: Remove gl_C_RESTRICT call.
17461
17462 2005-10-06  Simon Josefsson  <jas@extundo.com>
17463
17464         * tests/test-hmac-md5.c: New file.
17465
17466         * modules/hmac-md5-tests: New file.
17467
17468         * modules/hmac-md5: New file.
17469
17470 2005-10-06  Simon Josefsson  <jas@extundo.com>
17471
17472         * m4/hmac-md5.m4: New file.
17473
17474         * m4/memxor.m4: Require gl_C_RESTRICT.
17475
17476 2005-10-06  Simon Josefsson  <jas@extundo.com>
17477
17478         * lib/memxor.c (memxor): Avoid casts and warnings.
17479
17480 2005-10-06  Simon Josefsson  <jas@extundo.com>
17481
17482         * lib/hmac-md5.c: New file.
17483
17484         * lib/hmac.h: New file.
17485
17486 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
17487
17488         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
17489         promotes to int, not unsigned int, to catch the AIX 5.3
17490         compiler bug.
17491
17492 2005-10-05  Simon Josefsson  <jas@extundo.com>
17493
17494         * modules/memxor: New file.
17495
17496         * modules/iconv (Files): Move config.rpath to havelib, it is used
17497         there.
17498
17499         * modules/havelib (Files): Add config.rpath.
17500
17501 2005-10-05  Simon Josefsson  <jas@extundo.com>
17502
17503         * m4/memxor.m4: New file.
17504
17505 2005-10-05  Simon Josefsson  <jas@extundo.com>
17506
17507         * lib/memxor.c (memxor): Fix compiler error.
17508
17509         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
17510         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
17511
17512         * lib/memxor.h, lib/memxor.c: New files.
17513
17514         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
17515         we assume all systems have it, suggested by Jim Meyering
17516         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
17517         any systems lack sys/socket.h; mingw32 is known to lack it, but we
17518         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
17519         same reasons.
17520
17521 2005-10-05  Simon Josefsson  <jas@extundo.com>
17522
17523         * config/srclist.txt: Add glibc bug 1423 for md5.h.
17524
17525 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
17526
17527         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
17528         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
17529         needed, since the source code now assumes these .h files.
17530
17531 2005-10-05  Derek Price  <derek@ximbiot.com>
17532
17533         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
17534
17535 2005-10-05  Bruno Haible  <bruno@clisp.org>
17536
17537         * modules/stdint (License): Change to LGPL.
17538
17539 2005-10-04  Simon Josefsson  <jas@extundo.com>
17540
17541         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
17542         D. Baushke" <mdb@gnu.org>.
17543
17544 2005-10-04  Bruno Haible  <bruno@clisp.org>
17545
17546         * lib/verify.h (verify_true): Provide alternative definition for C++.
17547
17548 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
17549
17550         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
17551         (SSIZE_MAX): New macro, if not already defined.
17552         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
17553         than 2 GiB.
17554
17555 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
17556
17557         Sync from coreutils.
17558         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
17559         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
17560         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
17561         ULLONG_MAX doesn't work with 2.7.2.1.
17562
17563 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
17564
17565         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
17566         From Ben Pfaff.
17567
17568         * modules/exclude (Depends-on): Depend on verify.
17569         * modules/strtoimax (Depends-on): Likewise.
17570         * modules/utimecmp (Depends-on): Likewise.
17571
17572 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
17573
17574         * lib/exclude.c: Include verify.h.
17575         (verify): Remove.  All callers changed to use verify.h's version.
17576         * lib/strtoimax.c: Likewise.
17577         * lib/utimecmp.c: Likewis.e
17578
17579         Sync from coreutils.
17580         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
17581         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
17582         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
17583         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
17584         bother returning ENOSYS if settimeofday or stime fails; just let
17585         them return whatever errno they want to return.
17586         * lib/utimens.c: Include unistd.h, for dup2.
17587         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
17588         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
17589
17590 2005-10-02  Jim Meyering  <jim@meyering.net>
17591
17592         Sync from coreutils.
17593         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
17594         from glibc-2.2.5 that fails for read-only files.
17595
17596 2005-10-02  Jim Meyering  <jim@meyering.net>
17597
17598         Sync from coreutils.
17599         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
17600         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
17601         `#if HAVE_CONFIG_H'.
17602         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
17603         Remove AT_FDCWD test.
17604         Do not consume the fd unless successful.
17605         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
17606         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
17607         block, so that we don't even try to compile it if settimeofday is
17608         available.  This works around a compilation failure on OSF1 V5.1,
17609         due to stime requiring a `long int*' while tv_sec is `int'.
17610
17611 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
17612
17613         Sync from coreutils.
17614         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
17615         against `yes', rather than just testing for nonempty.
17616
17617 2005-10-01  Simon Josefsson  <jas@extundo.com>
17618
17619         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
17620         and Darwin.
17621
17622         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
17623         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
17624         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
17625         freeaddrinfo and gai_strerror are declared by the POSIX headers.
17626         Check if struct addrinfo is declared.
17627
17628 2005-10-01  Simon Josefsson  <jas@extundo.com>
17629
17630         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
17631         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
17632         AI_* and EAI_* definitions.  Protect function declarations.
17633
17634 2005-10-01  Jim Meyering  <jim@meyering.net>
17635
17636         Sync from coreutils.
17637
17638         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
17639         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
17640         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
17641         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
17642         in the inet and nsl libraries.  Required on Solaris 5.7.
17643
17644 2005-10-01  Jim Meyering  <jim@meyering.net>
17645
17646         Sync from coreutils.
17647         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
17648         in the inet and nsl libraries.  Required on Solaris 5.7.
17649
17650 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
17651
17652         * lib/getdelim.c (getdelim): Remove unused variables.
17653
17654 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
17655
17656         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
17657         so that the code works even with ancient cpp.  Portability problem
17658         with GCC 2.7.2.1 reported by Thomas M.Ott.
17659
17660 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
17661
17662         * modules/regex (Depends-on): Add strcase.
17663
17664         * modules/gethostname (Licence): Change from GPL to LGPL, since
17665         gethostname.c is a trivial implementation of a standard library
17666         function.
17667         * modules/poll (License): Change from GPL to LGPL, since it's
17668         derived from LGPL code.
17669
17670 2005-09-27  Jim Meyering  <jim@meyering.net>
17671
17672         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
17673         HAVE_CONFIG_H.
17674
17675         * lib/intprops.h (signed_type_or_expr__): Define.
17676         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
17677         for unsigned types.
17678
17679 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
17680
17681         * lib/verify.h (verify_expr): Remove, replacing with:
17682         (verify_true): New macro that returns true instead of void.
17683         (verify_type__): Remove.
17684         (verify): Use verify_true rather than verify_type__.
17685
17686 2005-09-26  Bruno Haible  <bruno@clisp.org>
17687
17688         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
17689         is necessary.
17690         (lib_SOURCES): Remove mbchar.c.
17691         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
17692         (Files): Add m4/mbrtowc.m4.
17693         * modules/mbiter: Likewise.
17694         * modules/mbuiter: Likewise.
17695
17696 2005-09-26  Bruno Haible  <bruno@clisp.org>
17697
17698         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
17699         compile mbchar.c if they are not both present.
17700         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
17701         * m4/mbiter.m4 (gl_MBITER): Likewise.
17702         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
17703         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
17704         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
17705
17706 2005-09-25  Jim Meyering  <jim@meyering.net>
17707
17708         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
17709         also uses socklen_t.
17710
17711 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
17712
17713         * lib/utimens.c (ENOSYS): Define if not already defined.
17714         (futimens): Support having a null PATH if the file descriptor
17715         is nonnegative.
17716
17717         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
17718         Remove.
17719         (__attribute): Define to empty unless GCC 3.1 or later.
17720         This works around a core dump on OpenBSD 3.4, which has GCC
17721         2.95.3, which dumps core when given __attribute__(()).  It also
17722         simplifies other tests, since we really don't want to bother with
17723         worrying about which ancient version of GCC supported what.
17724         Original problem reported by Yoann Vandoorselaere, with part of
17725         the fix suggested by Derek Price.
17726
17727 2005-09-24  Jim Meyering  <jim@meyering.net>
17728
17729         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
17730         so we can once again use a positive bitfield width of 1 -- now we
17731         don't have to explain why we were using a bitfield width of 2.
17732
17733 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
17734
17735         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
17736         and similarly for the other external symbols.  Problem reported
17737         by James Gallager.
17738
17739         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
17740         bug reported by Jim Meyering.
17741
17742         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
17743         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
17744         not needed, since socklen is a prerequisite module.
17745
17746 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
17747
17748         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
17749         Problem reported by Eric Blake.
17750         (getaddrinfo): Initialize se so that it's not garbage.
17751         Redo internal storage allocation so that it doesn't make unportable
17752         assumptions about alignment.
17753         Fix a memory leak.
17754
17755         * lib/utimens.c (futimens): Use futimesat if available.
17756         Prefer it to futimes since it doesn't have the futimes bug.
17757
17758         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
17759         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
17760         Instead, declare a function that returns a pointer to an array,
17761         and use verify_type__ to declare the size of the array.
17762         Problem and germ of a solution reported by Bruno Haible.
17763         (verify_type__): Use 2, not 1, for bitfield size, to avoid
17764         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
17765
17766 2005-09-23  Jim Meyering  <jim@meyering.net>
17767
17768         Sync from coreutils.
17769         Correct build failure (socklen_t not defined) on at least
17770         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
17771         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
17772
17773 2005-09-23  Jim Meyering  <jim@meyering.net>
17774
17775         * modules/getaddrinfo (Depends-on): Add socklen.
17776
17777 2005-09-23  Bruno Haible  <bruno@clisp.org>
17778
17779         * tests/test-verify.c: New file.
17780
17781 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
17782
17783         Sync from coreutils.
17784
17785         * modules/argmatch (Depends-on): Add verify.
17786         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
17787         unistd-safer.
17788         * modules/save-cwd (Depends-on): Likewise.
17789
17790         * modules/openat (Files): Add lib/openat-die.c.
17791         (Depends-on): Remove error, exitfail.
17792         Add dirname.
17793
17794         * modules/verify: New file.
17795         * MODULES.html.sh (Diagnostics <assert.h>): New section,
17796         with "verify" module.
17797
17798 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
17799
17800         Sync from coreutils.
17801
17802         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
17803         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
17804         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
17805         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
17806         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
17807         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
17808         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
17809         Don't bother checking for string.h, stdlib.h, unistd.h.
17810         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
17811         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
17812         module's job.
17813         * m4/jm-macros.m4 (gl_MACROS): Likewise.
17814         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
17815
17816         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
17817         (gl_GETDATE): Use it.
17818
17819         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
17820
17821 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
17822
17823         Sync from coreutils.
17824
17825         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
17826         stat-time.h.
17827         * lib/argmatch.h: Include verify.h
17828         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
17829         (ARGMATCH_ASSERT): Remove; unused.
17830         * lib/canonicalize.c: Assume STDC_HEADERS.
17831         * lib/exclude.c: Include "strcase.h".
17832         * lib/regex_internal.h [!defined _LIBC]: Likewise.
17833         * lib/getusershell.c: Include stdio--.h rather than stdio.h
17834         and stdio-safer.h.
17835         (getusershell): Call fopen, not fopen_safer.
17836         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
17837         Do not include unistd-safer.h.
17838         (save_cwd): Don't call fd_safer; no longer needed
17839         now that we include fcntl--.h.
17840
17841         * lib/getdate.y (relative_time): New type.
17842         (RELATIVE_TIME_0): New constant.
17843         (parser_control): Use relative_time instead of doing it ourselves.
17844         (%union): Add new relative_time rel member.
17845         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
17846         Now typeless.
17847         (relunit, relunit_snumber): Now of type rel.
17848         (zone, rel, relunit, get_date): Adjust to above changes.
17849
17850         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
17851         Do not include unistd-safer.h.
17852         (getloadavg): Don't call fd_safer; no longer needed
17853         now that we include fcntl--.h.
17854
17855         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
17856         (make_dir_parents): Treat ENOSYS like EEXIST.
17857
17858         Improve quality of diagnostics on restore_cwd failure.
17859         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
17860         (make_dir_parents): Last arg is now int * (for errno), not bool *.
17861         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
17862         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
17863         each time through the loop.  Do not diagnose restore_cwd failure;
17864         that is the caller's job (and perhaps the caller does not care).
17865
17866         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
17867         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
17868         If the file already exists but is not a directory, don't bother
17869         to try to make its parents.
17870         Close potential file descriptor leak if we can't chdir("/") (!).
17871         Don't always return true if chdir($PWD) fails; return true only
17872         if the requested action was done successfully (except for the
17873         chdir($PWD)).
17874         Don't log final directory unless we actually made it.
17875         Refactor to avoid duplicate code to fix up permissions.
17876         Don't attempt to fix up parent permissions if chdir($PWD) fails.
17877
17878         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
17879         to make it a bit faster and (I hope) clearer.
17880         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
17881         Fix bug in formats like %2N.
17882
17883         * lib/verify.h: New file.
17884
17885 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
17886
17887         Sync from coreutils.
17888         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
17889
17890 2005-09-22  Jim Meyering  <jim@meyering.net>
17891
17892         Sync from coreutils.
17893
17894         * m4/lstat.m4 (gl_FUNC_LSTAT):
17895         Use AC_LIBSOURCES to require lstat.c and lstat.h.
17896         Remove obsolete comment.
17897         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
17898         * m4/xstrtod.m4: Likewise.
17899
17900         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
17901
17902 2005-09-22  Jim Meyering  <jim@meyering.net>
17903
17904         Sync from coreutils.
17905
17906         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
17907
17908         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
17909         the .tm_year member, since otherwise gcc-4.0 would now warn about
17910         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
17911
17912         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
17913         order to avoid an unsuppressible warning from gcc on 64-bit systems.
17914
17915         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
17916         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
17917         when run in a time zone for which daylight savings time is in effect
17918         for the starting date.
17919
17920         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
17921         stop us from restricting permissions of just-created absolute-named
17922         directories.
17923         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
17924         to restore initial working directory.
17925         * lib/mkdir-p.c (make_dir_parents): New parameter:
17926         different_working_dir, to tell caller if/when we change the working
17927         directory and are unable to return to the initial one.
17928         * lib/mkdir-p.h (make_dir_parents): Update prototype.
17929         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
17930         `return false'.  This fixes a bug introduced on 2004-07-30.
17931
17932         * lib/openat.c (fdopendir): Be sure to close the supplied
17933         file descriptor before returning.  This makes our replacement
17934         implementation a little closer to Solaris's, where fdopendir
17935         ties the file descriptor to the returned DIR* pointer.
17936         * lib/openat.c (unlinkat): New function.
17937         * lib/openat.h (unlinkat): Add prototype.
17938         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
17939         (openat_restore_fail): Rename from openat_restore_die.
17940         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
17941
17942         Provide an alternative to exiting immediately upon save_cwd or
17943         restore_cwd failure.  Now, an application can arrange e.g.,
17944         to perform a longjump in that case.
17945         * lib/openat.c: Include dirname.h.
17946         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
17947         (rpl_openat, fdopendir, fstatat): Call openat_save_die
17948         and openat_restore_die rather than calling error directly.
17949         Don't include "error.h" or "exitfail.h"; they're no longer needed.
17950
17951         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
17952         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
17953         define.
17954
17955         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
17956         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
17957                             int utc, int nanoseconds);
17958         Background:
17959         date should not have to allocate a megabyte of virtual memory to
17960         handle a format argument like +%1048575T.  When implemented with
17961         strftime, it must allocate such a buffer, use strftime to fill it
17962         in, print it, then free it.
17963         With fprintftime, it simply prints everything and exits.
17964         With no need for memory allocation, that's one fewer way to fail.
17965         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
17966         optional field width, not before, so we accept %9:z, not %:9z.
17967         (my_strftime): Be sure to use L_('x') for literals.
17968
17969         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
17970         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
17971         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
17972         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
17973         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
17974         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
17975         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
17976         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
17977         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
17978         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
17979         * lib/xgethostname.c, lib/xreadlink.c:
17980         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
17981
17982         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
17983         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
17984         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
17985         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
17986         and don't include <sys/file.h>).
17987
17988 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
17989
17990         Sync from coreutils.
17991
17992         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
17993         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
17994         [!LDAV_DONE]: Avoid unused variable warning.
17995
17996 2005-09-21  Bruno Haible  <bruno@clisp.org>
17997
17998         * lib/unicodeio.h (unicode_to_mb): New declaration.
17999
18000 2005-09-20  Derek Price  <derek@ximbiot.com>
18001
18002         * lib/getaddrinfo.c: Don't include <netdb.h> included from
18003         getaddrinfo.h.
18004
18005 2005-09-20  Bruno Haible  <bruno@clisp.org>
18006
18007         * gnulib-tool: Remove trailing slashes from the values specified for
18008         --source-base, --m4-base, --tests-base, --aux-dir.
18009         Suggested by Simon Josefsson <jas@extundo.com>.
18010
18011 2005-09-20  Bruno Haible  <bruno@clisp.org>
18012
18013         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
18014         func_modules_to_filelist, func_import, func_create_testdir): Make all
18015         sorting results locale-independent, so that gnulib-cache.m4 doesn't
18016         change when gnulib-tool is invoked in a different locale.
18017
18018 2005-09-19  Simon Josefsson  <jas@extundo.com>
18019
18020         * m4/socklen.m4: Fix typo.
18021
18022 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
18023
18024         Use a consistent style for including <config.h>.
18025         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
18026         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
18027         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
18028         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
18029         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
18030         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
18031         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
18032         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
18033         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
18034         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
18035         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
18036         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
18037         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
18038         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
18039         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
18040         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
18041         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
18042         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
18043         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
18044         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
18045         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
18046         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
18047         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
18048         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
18049         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
18050         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
18051         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
18052         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
18053         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
18054         lib/xstrtoumax.c, lib/yesno.c:
18055         Standardize inclusion of config.h.
18056         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
18057         lib/inttostr.h:  Removed inclusion of config.h from header files.
18058         * lib/inttostr.c:  Adjusted in-tree users.
18059         * lib/timespec.h: Remove superfluous warning to include config.h.
18060         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
18061         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
18062         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
18063         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
18064         config.h with HAVE_CONFIG_H.
18065
18066 2005-09-19  Jim Meyering  <jim@meyering.net>
18067
18068         * modules/pathmax (License): Change to LGPL.
18069
18070 2005-09-19  Derek Price  <derek@ximbiot.com>
18071
18072         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
18073
18074 2005-09-19  Bruno Haible  <bruno@clisp.org>
18075
18076         * gnulib-tool (import): Provide default for --tests-base.
18077
18078 2005-09-19  Bruno Haible  <bruno@clisp.org>
18079
18080         * doc/quote.texi: New file, extracted from gnulib.texi.
18081         * doc/ctime.texi: New file, extracted from gnulib.texi.
18082         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
18083         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
18084         * doc/gnulib.texi: Include them.
18085
18086 2005-09-18  Bruno Haible  <bruno@clisp.org>
18087
18088         Portability fix.
18089         * gnulib-tool (func_readlink): New function.
18090         (func_ln_if_changed): Use it.
18091
18092 2005-09-18  Bruno Haible  <bruno@clisp.org>
18093
18094         * gnulib-tool: Support --with-tests also with --import.
18095         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
18096         (func_import): Use variables $testsbase and $inctests. Emit a
18097         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
18098         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
18099         SUBDIRS += $testsdir.
18100         (func_create_testdir): Update.
18101
18102 2005-09-18  Bruno Haible  <bruno@clisp.org>
18103
18104         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
18105         instead of $dry_run.
18106         (func_cp_if_changed, func_mv_if_changed): Remove functions.
18107         (func_ln_if_changed): Don't handle dry-run here.
18108         (func_import): In dry-run mode, detect more precisely which actions
18109         would be performed, and don't use "...ing" verbs.
18110
18111 2005-09-18  Bruno Haible  <bruno@clisp.org>
18112
18113         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
18114         (func_import): Use join on two temporary files instead of three nested
18115         loops, in order to determine which files are new or old.
18116
18117 2005-09-18  Bruno Haible  <bruno@clisp.org>
18118
18119         * gnulib-tool (func_import): Comment out code that spits out the
18120         new files with --dry-run.
18121
18122 2005-09-18  Bruno Haible  <bruno@clisp.org>
18123
18124         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
18125
18126 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
18127
18128         * lib/stat-time.h: New file.
18129         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
18130         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
18131         in a different way.
18132         (timespec_cmp): New function.
18133         * lib/utimecmp.c: Include stat-time.h.
18134         (SYSCALL_RESOLUTION): Depend on whether various struct stat
18135         members exist, not on the obsolescent ST_MTIM_NSEC.
18136         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
18137
18138 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
18139
18140         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
18141
18142 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
18143
18144         * MODULES.html.sh (File system functions): Add stat-time.
18145         * modules/stat-time: New file.
18146         * modules/timespec (Files): Remove m4/st_mtim.m4; this
18147         is now done in a different way, by the stat-time module.
18148         * modules/utimecmp (Depends-on): Add stat-time.
18149
18150 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
18151
18152         * m4/st_mtim.m4: Remove.  Superseded by...
18153         * m4/stat-time.m4: New file.
18154         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
18155         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
18156
18157 2005-09-15  Derek Price  <derek@ximbiot.com>
18158
18159         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
18160
18161 2005-09-15  Derek Price  <derek@ximbiot.com>
18162
18163         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
18164         * lib/regex_internal.c: Ditto, using this...
18165         (__GNUC_PREREQ): ...new macro.
18166         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
18167         using...
18168         (__GNUC_PREREQ): ...this new macro.
18169
18170         * lib/strstr.h: Include string.h. Define strstr as a macro here.
18171
18172 2005-09-15  Derek Price  <derek@ximbiot.com>
18173             Paul Eggert  <eggert@cs.ucla.edu>
18174
18175         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
18176         changes, consolidating in...
18177         * lib/regex_internal.h: ...this file.
18178
18179 2005-09-13  Jim Meyering  <jim@meyering.net>
18180
18181         * lib/canon-host.c: Filter through gnu indent and reword comments
18182         slightly.
18183         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
18184
18185 2005-09-13  Derek Price  <derek@ximbiot.com>
18186
18187         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
18188         failure.
18189         Reported by Jim Meyering  <jim@meyering.net>.
18190
18191 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
18192
18193         * lib/base64.c: Typo.
18194         (base64_encode): Put b64str in initialized data section.
18195
18196 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
18197
18198         Merge glibc and coreutils changes into gnulib, plus a few
18199         extra fixes.
18200         * lib/md5.c: Use #error rather than a string.
18201         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
18202         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
18203         (__attribute__): Define to empty for non recent-GCC.
18204         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
18205         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
18206         Renamed from their non-__ counterparts, with new macros replacing
18207         them if not _LIBC.  Add __THROW attribute.
18208         (rol): Remove.
18209         (struct md5_ctx): Align buffer if using GCC.
18210         * lib/sha1.h (struct sha1_ctx): Likewise.
18211         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
18212         The old name was backwards.
18213         (NOTSWAP): Remove; not used.
18214         (rol): New macro, moved here from md5.h.
18215         (sha1_process_block): Remove a FIXME that doesn't make sense.
18216
18217 2005-09-12  Derek Price  <derek@ximbiot.com>
18218
18219         Return usable errors from canon-host.
18220         * lib/canon-host.h: New file.
18221         * lib/canon-host.c (canon_host): Wrap...
18222         (canon_host_r): ...this new function, which now relies exclusively on
18223         getaddrinfo.
18224         (ch_strerror): New function.
18225         (last_cherror): New global.
18226         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
18227         interface.
18228         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
18229         void *.
18230         (freeaddrinfo): Free ai->ai_canonname when set.
18231
18232 2005-09-12  Derek Price  <derek@ximbiot.com>
18233
18234         Make canon-host require getaddrinfo.
18235         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
18236         AC_LIBSOURCE canon-host.h.  Call...
18237         (gl_PREREQ_CANON_HOST): ...this new function, which requires
18238         gl_GETADDRINFO.
18239         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
18240
18241 2005-09-12  Derek Price  <derek@ximbiot.com>
18242
18243         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
18244         LGPL.
18245         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
18246
18247 2005-09-12  Derek Price  <derek@ximbiot.com>
18248
18249         * lib/gai_strerror.c: Include config.h when available.  Include
18250         getaddrinfo.h before other headers to test interface.
18251         Reported by Larry Jones <lawrence.jones@ugs.com>.
18252
18253 2005-09-12  Derek Price  <derek@ximbiot.com>
18254             Paul Eggert  <eggert@cs.ucla.edu>
18255
18256         * modules/glob (Files): Add glob-libc.h.
18257
18258 2005-09-12  Derek Price  <derek@ximbiot.com>
18259             Paul Eggert  <eggert@cs.ucla.edu>
18260
18261         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
18262         glob_.h, glob-libc.h.
18263         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
18264
18265 2005-09-12  Derek Price  <derek@ximbiot.com>
18266             Paul Eggert  <eggert@cs.ucla.edu>
18267
18268         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
18269         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
18270         protecting things that should be done only in gnulib contexts.
18271         * lib/glob_.h: New file, containing only the glob things needed for
18272         gnulib.
18273         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
18274         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
18275         (glob, globfree, glob_pattern_p): Now defined simply in terms of
18276         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
18277         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
18278         and to respect the namespace rules better.
18279
18280 2005-09-08  Simon Josefsson  <jas@extundo.com>
18281
18282         * modules/socklen: New file.
18283
18284 2005-09-08  Simon Josefsson  <jas@extundo.com>
18285
18286         * m4/socklen.m4: New file.
18287
18288 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
18289
18290         * modules/utimens (Files): Add m4/utimbuf.m4, since
18291         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
18292         Reported by Sergey Poznyakoff.
18293
18294 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
18295
18296         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
18297         definitions, since that's the preferred style in glibc.
18298         Fix a minor spacing issue, and update copyright notice to match
18299         glibc's.
18300
18301 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
18302
18303         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
18304
18305 2005-09-06  Simon Josefsson  <jas@extundo.com>
18306
18307         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
18308         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
18309
18310 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
18311
18312         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
18313         warning.
18314
18315 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
18316
18317         * config/srclist.txt: Add glibc bug 1302.
18318
18319 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
18320
18321         Change bitset word type from unsigned int to unsigned long int,
18322         as this has better performance on typical 64-bit hosts.
18323         Port bitset code to hosts with unusual word sizes.
18324         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
18325         (build_collating_symbol):
18326         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
18327         argument is a bitset.  This is merely a style issue, but it makes
18328         it clearer that an entire array is expected.
18329         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
18330         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
18331         Port to the case where bitset_word is not the same as unsigned int.
18332         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
18333         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
18334         Likewise.
18335         * lib/regexec.c (check_dst_limits_calc_pos_1,
18336         check_subexp_matching_top):
18337         (build_trtable, group_nodes_into_DFAstates):
18338         Likewise.
18339         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
18340         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
18341         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
18342         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
18343         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
18344         * lib/regcomp.c (optimize_subexps, lower_subexp):
18345         Work even if bitset_word has holes in its bitwise representation.
18346         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
18347         * lib/regexec.c (check_dst_limits_calc_pos_1,
18348         check_subexp_matching_top):
18349         Likewise.
18350         * lib/regex_internal.c (re_string_reconstruct):
18351         Don't assume UCHAR_MAX == 255.
18352         * lib/regex_internal.h (bitset_set_all): Likewise.
18353         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
18354         All uses changed.
18355         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
18356         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
18357         All uses changed.
18358         (BITSET_WORD_MAX): New macro.
18359         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
18360         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
18361         (bitset_empty, bitset_copy):
18362         Prefer sizeof (bitset) to multiplying it out ourselves.
18363         (bitset_not_merge): Remove; unused.
18364         (bitset_contain): Return bool, not unsigned int with one bit on.
18365         All callers changed.
18366         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
18367         alignment than re_node_set; do this by defining a new internal
18368         type struct dests_alloc and using it to allocate memory.
18369
18370 2005-09-05  Bruno Haible  <bruno@clisp.org>
18371
18372         * gnulib-tool (func_import): Fix comparison in handling of symbolic
18373         links.
18374
18375 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
18376
18377         * modules/size_max (Makefile.am): Add size_max.h
18378
18379 2005-09-04  Derek Price  <derek@ximbiot.com>
18380
18381         * gnulib-tool (func_import): Fix reversed $symbolic logic.
18382
18383 2005-09-03  Simon Josefsson  <jas@extundo.com>
18384
18385         * gnulib-tool: Fix typo.
18386
18387 2005-09-03  Simon Josefsson  <jas@extundo.com>
18388
18389         * config/srclist.txt: Add glibc bug 1293.
18390
18391 2005-09-03  Derek Price  <derek@ximbiot.com>
18392
18393         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
18394         From Larry Jones <lawrence.jones@ugs.com>.
18395
18396 2005-09-02  Simon Josefsson  <jas@extundo.com>
18397
18398         * modules/socklen: New file.
18399
18400 2005-09-02  Simon Josefsson  <jas@extundo.com>
18401
18402         * modules/havelib: New module.
18403
18404         * modules/gettext, modules/iconv, modules/lock, modules/readline:
18405         Use havelib.
18406
18407 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
18408
18409         Check for arithmetic overflow when calculating sizes, to prevent
18410         some buffer-overflow issues.  These patches are conservative, in the
18411         sense that when I couldn't determine whether an overflow was possible,
18412         I inserted a run-time check.
18413         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
18414         macros.
18415         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
18416         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
18417         (re_xnrealloc, re_x2nrealloc): New inline functions.
18418         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
18419         parse_bracket_exp):
18420         (build_equiv_class, build_charclass): Check for arithmetic overflow
18421         in size expression calculations.
18422         * lib/regex_internal.c (re_string_realloc_buffers):
18423         (build_wcs_upper_buffer, re_node_set_add_intersect):
18424         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
18425         (re_dfa_add_node, register_state): Likewise.
18426         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
18427         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
18428         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
18429         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
18430
18431 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
18432
18433         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
18434         m4/ulonglong.m4.  Problem reported by Martin Lambers.
18435
18436 2005-09-02  Bruno Haible  <bruno@clisp.org>
18437
18438         Support for lib vs. lib64 distinction on biarch platforms.
18439         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
18440         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
18441         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
18442
18443 2005-09-02  Bruno Haible  <bruno@clisp.org>
18444
18445         * gnulib-tool (import): In the other first-use case, provide defaults
18446         as well.
18447
18448 2005-09-02  Bruno Haible  <bruno@clisp.org>
18449
18450         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
18451         patches not yet found in the latest gettext release.
18452
18453 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
18454
18455         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
18456         to avoid a collision with bits/local_lim.h in glibc.
18457         All uses changed.  Problem reported by Dmitry V. Levin in
18458         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
18459
18460         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
18461         bugs in int versus size_t comparisons.
18462         (re_string_context_at): Fix bug where the code assumed that
18463         Idx is signed.
18464
18465         Use bool where appropriate.
18466         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
18467         All callers changed.
18468         (calc_eclosure_iter): Likewise, for ROOT arg.
18469         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
18470         (build_charclass_op): Likewise, for NON_MATCH arg.
18471         * lib/regex_internal.c (re_string_allocate, re_string_construct):
18472         (re_string_construct_common): Likewise, for ICASE arg.
18473         * lib/regexec.c (re_search_2_stub, re_search_stub):
18474         Likewise, for RET_LEN arg.
18475         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
18476         (set_regs): Likewise, for FL_BACKTRACK arg.
18477         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
18478         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
18479         (calc_eclosure_iter, parse_bracket_exp):
18480         Use bool for internal variables that are booleans.
18481         * lib/regexec.c (re_search_internal, check_matching,
18482         proceed_next_node):
18483         (set_regs, build_sifted_states, sift_states_bkref):
18484         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
18485         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
18486         (find_collation_sequence_value):
18487         Likewise.
18488         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
18489         (re_node_set_compare):
18490         Return bool, not int. All callers changed.
18491         * lib/regexec.c (check_halt_node_context, check_dst_limits):
18492         (build_trtable, check_node_accept): Likewise.
18493         * lib/regex_internal.h: Include stdbool.h.
18494
18495         Fix bugs uncovered when converting to bool.
18496         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
18497         failure instead of charging ahead blindly.
18498         * lib/regex_internal.c (register_state): Likewise.
18499         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
18500         for freeing internal storage.
18501         (group_nodes_into_DFA_states): Use unsigned int, not int, for
18502         bitset pieces used as boolean, to avoid undefined behavior
18503         on hosts that do int overflow checking.
18504
18505 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
18506
18507         * config/srclist.txt: Add glibc bugs 1285-1287.
18508
18509 2005-09-01  Jim Meyering  <jim@meyering.net>
18510
18511         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
18512         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
18513         Require gl_STAT_MACROS, too.
18514
18515 2005-09-01  Bruno Haible  <bruno@clisp.org>
18516
18517         * gnulib-tool (import): In the first-use case, provide defaults.
18518
18519 2005-09-01  Bruno Haible  <bruno@clisp.org>
18520
18521         * gnulib-tool (func_import): Remove the .tmp files.
18522
18523 2005-09-01  Bruno Haible  <bruno@clisp.org>
18524
18525         * gnulib-tool (func_import): Fix handling of symbolic links.
18526
18527 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
18528
18529         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
18530         old glibc regex code mishandles strings longer than 2**31 bytes.
18531         This patch fixes this when the regex code is used in gnulib
18532         (i.e., outside glibc).
18533
18534         This patch should not affect the use of the regex code inside
18535         glibc.  No doubt this problem also needs to be handled for glibc
18536         as well, but the result will be an incompatible change to the
18537         glibc ABI, and the old ABI will have to be supported too.  That
18538         can be the the subject for another patch.
18539
18540         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
18541         governing whether the rest of this patch is active.  By default,
18542         the macro is disabled and the patch has no effect.
18543         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
18544         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
18545         (struct re_pattern_buffer, re_search, re_search_2, re_match):
18546         (re_match_2, re_set_registers): Use the new types.
18547         * lib/regex_internal.h (Idx, re_hashval_t): New types.
18548         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
18549         New macros.
18550         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
18551         (re_string_context_at, bin_tree_t, re_dfastate_t):
18552         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
18553         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
18554         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
18555         (re_string_char_size_at, re_string_wchar_at):
18556         (re_string_elem_size_at):
18557         Use the new types and macros to port to 64-bit hosts.
18558         Use unsigned types for internal values, so that the code
18559         mostly works even for arrays larger than SSIZE_MAX.
18560         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
18561         (search_duplicated_node, calc_eclosure_iter, fetch_number):
18562         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
18563         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
18564         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
18565         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
18566         (calc_inveclosure, parse_dup_op, build_range_exp):
18567         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
18568         (fetch_number, create_token_tree, mark_opt_subexp):
18569         Likewise.
18570         * lib/regex_internal.c (re_string_construct_common,
18571         create_ci_newstate):
18572         (create_cd_newstate, re_string_allocate, re_string_construct):
18573         (re_string_realloc_buffers, build_wcs_upper_buffer):
18574         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
18575         (re_string_reconstruct, re_string_peek_byte_case):
18576         (re_string_fetch_byte_case, re_string_context_at):
18577         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
18578         (re_node_set_init_copy, re_node_set_add_intersect):
18579         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
18580         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
18581         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
18582         (re_acquire_state, re_acquire_state_context, register_state):
18583         Likewise.
18584         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
18585         search_cur_bkref_entry):
18586         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
18587         (re_search_internal, re_search_2_stub, re_search_stub)
18588         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
18589         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
18590         (update_cur_sifted_state, check_dst_limits):
18591         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
18592         (check_subexp_limits, sift_states_bkref, merge_state_array):
18593         (check_subexp_matching_top, get_subexp, get_subexp_sub):
18594         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
18595         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
18596         (expand_bkref_cache, check_node_accept_bytes):
18597         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
18598         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
18599         (acquire_init_state_context, check_halt_node_context):
18600         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
18601         (sift_states_backward, clean_state_log_if_needed):
18602         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
18603         (find_recover_state, transit_state_sb, transit_state_mb):
18604         (transit_state_bkref, build_trtable, match_ctx_clean):
18605         Likewise.
18606         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
18607         to work around an assumption that REG_MISSING is negative.
18608
18609         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
18610         (seek_collating_symbol_entry) [defined _LIBC]:
18611         (lookup_collation_sequence_value) [defined _LIBC]:
18612         (build_range_exp, build_collating_symbol) [defined _LIBC]:
18613         Use prototypes rather than old-style function definitions.
18614         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
18615         (transit_state_sb) [0]:
18616         (find_collation_sequence_value) [defined _LIBC]: Likewise.
18617
18618         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
18619         rm_eo.
18620
18621         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
18622         (optimize_subexps, lower_subexp):
18623         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
18624         since the signed shift might overflow.  Use 1u<<31 instead.
18625         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
18626         Likewise.
18627         * lib/regexec.c (check_dst_limits_calc_pos_1,
18628         check_subexp_matching_top): Likewise.
18629
18630         * lib/regcomp.c (optimize_subexps, lower_subexp):
18631         Use CHAR_BIT rather than 8, for clarity.
18632         * lib/regexec.c (check_dst_limits_calc_pos_1):
18633         (check_subexp_matching_top): Likewise.
18634         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
18635         have to worry about portability issues when shifting it left.
18636         Remove no-longer-needed test for table_size > 0.
18637         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
18638         in a word, as the resulting behavior is undefined.
18639         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
18640         in one case, a <= should have been an <, and in another case the
18641         whole test was missing.
18642         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
18643         the standard name CHAR_BIT.
18644         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
18645         this is not true on one's complement and signed-magnitude hosts.
18646
18647         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
18648         next_last_offset.
18649         (struct re_dfa_t): Remove unused member states_alloc.
18650         * lib/regcomp.c (init_dfa): Don't initialize unused members.
18651
18652 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
18653
18654         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
18655         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
18656         and large-file glibc and in 32-bit large-file Solaris.
18657
18658 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
18659
18660         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
18661         lengths fit in regoff_t; this isn't true if regoff_t is the same
18662         width as size_t.
18663         * lib/regex.c (re_search_internal): 5th arg is LAST_START
18664         (= START + RANGE) instead of RANGE.  This avoids overflow
18665         problems when regoff_t is the same width as size_t.
18666         All callers changed.
18667         (re_search_2_stub): Check for overflow when adding the
18668         sizes of the two strings.
18669         (re_search_stub): Check for overflow when adding START
18670         to RANGE; if it occurs, substitute the extreme value.
18671
18672 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
18673
18674         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
18675
18676 2005-08-31  Jim Meyering  <jim@meyering.net>
18677
18678         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
18679         a pointer-to-const.
18680         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
18681         (register_state): Likewise.
18682         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
18683         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
18684         (group_nodes_into_DFAstates): Likewise.
18685
18686 2005-08-31  Jim Meyering  <jim@meyering.net>
18687
18688         * check-module: Add a FIXME comment.
18689
18690 2005-08-31  Eric Blake  <ebb9@byu.net>
18691
18692         * modules/unistd-safer (Files): Add unistd--.h.
18693         * modules/stdio-safer (Files): Add stdio--.h.
18694
18695 2005-08-31  Derek Price  <derek@ximbiot.com>
18696
18697         * lib/getdelim.c (getdelim): Return EOF on EOF.
18698         Reported by Larry Jones <lawrence.jones@ugs.com>.
18699
18700 2005-08-31  Bruno Haible  <bruno@clisp.org>
18701
18702         Avoid unnecessary diffs in the generated lib/Makefile.am.
18703         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
18704         the generated files.
18705         (func_import): Don't set cmd.
18706
18707 2005-08-31  Bruno Haible  <bruno@clisp.org>
18708
18709         * lib/strstr.c: Include <stddef.h>, for NULL.
18710         * lib/strcasestr.c: Likewise.
18711         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
18712
18713 2005-08-31  Bruno Haible  <bruno@clisp.org>
18714
18715         * gnulib-tool: New option --macro-prefix.
18716         (func_import): Use macro_prefix.
18717         (import): Handle option --macro-prefix.
18718
18719 2005-08-31  Bruno Haible  <bruno@clisp.org>
18720
18721         * gnulib-tool (import): Rename most ac_* variables to cached_*.
18722         Also use new variables cached_lgpl, cached_libtool.
18723
18724 2005-08-31  Bruno Haible  <bruno@clisp.org>
18725
18726         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
18727         always instantiating them.
18728
18729 2005-08-31  Bruno Haible  <bruno@clisp.org>
18730
18731         * gnulib-tool (func_import): Read the previous cached settings
18732         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
18733         earlier added by gnulib but are now dropped. Warn when a gnulib file
18734         overwrites a non-gnulib file.
18735
18736 2005-08-31  Bruno Haible  <bruno@clisp.org>
18737
18738         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
18739         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
18740         projects that don't keep autogenerated files in CVS. Put into
18741         actioncmd only the specified modules, not the transitive closure.
18742
18743 2005-08-31  Bruno Haible  <bruno@clisp.org>
18744
18745         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
18746         Create directories that shall be filled.
18747         (import): Don't look for gl_* macros in configure.ac. Recurse across
18748         all directories containing a gnulib-cache.m4 files, if meaningful.
18749
18750 2005-08-31  Bruno Haible  <bruno@clisp.org>
18751
18752         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
18753         (import): Set seen_libtool when we see gl_LIBTOOL.
18754
18755 2005-08-31  Bruno Haible  <bruno@clisp.org>
18756
18757         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
18758         declaration macro definitions from generated gnulib.m4.
18759
18760 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
18761
18762         * lib/iconvme.h: Add prototype for iconv_alloc.
18763
18764 2005-08-29  Simon Josefsson  <jas@extundo.com>
18765
18766         * lib/iconvme.c: Fix errno.
18767
18768 2005-08-29  Bruno Haible  <bruno@clisp.org>
18769
18770         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
18771         that it works when the directory contains spaces.
18772
18773 2005-08-29  Bruno Haible  <bruno@clisp.org>
18774
18775         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
18776
18777 2005-08-29  Bruno Haible  <bruno@clisp.org>
18778
18779         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
18780         Emit more advice.
18781
18782 2005-08-29  Bruno Haible  <bruno@clisp.org>
18783         and Stepan Kasal  <kasal@ucw.cz>
18784
18785         * check-module: If more parameters are given, check each of them
18786         separately; add more exceptions, as noted by Jim Meyering.
18787         (check_module): New procedure.
18788         (%exempt_header): Now contains all exceptions.
18789
18790 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
18791
18792         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
18793
18794 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
18795
18796         * lib/iconvme.c: Split iconv_string into iconv_alloc.
18797
18798 2005-08-28  Bruno Haible  <bruno@clisp.org>
18799
18800         * m4/gnulib-tool.m4: New file.
18801
18802 2005-08-27  Jim Meyering  <jim@meyering.net>
18803
18804         * modules/unistd-safer (Files): Add pipe-safer.c.
18805         * modules/fcntl-safer (Files): Add creat-safer.c.
18806
18807 2005-08-27  Jim Meyering  <jim@meyering.net>
18808
18809         * m4/stdlib-safer.m4: New file.  From coreutils.
18810         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
18811         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
18812         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
18813         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
18814         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
18815
18816 2005-08-27  Jim Meyering  <jim@meyering.net>
18817
18818         * lib/fopen-safer.c: Merge minor changes from coreutils.
18819         * lib/dup-safer.c: Likewise.
18820         * lib/fd-safer.c: Likewise.
18821
18822         Merge from coreutils.
18823         * lib/stdio--.h: New file.
18824         * lib/stdlib--.h: New file.
18825         * lib/mkstemp-safer.c: New file.
18826
18827         GNU tar needs these.
18828         * lib/pipe-safer.c: New file.
18829         * lib/creat-safer.c: New file.
18830         * lib/fcntl--.h (creat): Define to creat_safer.
18831         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
18832         * lib/unistd--.h (pipe): Define to pipe_safer.
18833         * lib/unistd-safer.h: Declare pipe_safer.
18834
18835 2005-08-26  Simon Josefsson  <jas@extundo.com>
18836
18837         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
18838         Haible <bruno@clisp.org>.
18839
18840 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
18841
18842         * lib/regex_internal.h: Remove all references to
18843         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
18844         or better.
18845         (bitset_not, bitset_merge, bitset_not_merge):
18846         (bitset_mask, re_string_allocate, re_string_construct):
18847         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
18848         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
18849         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
18850         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
18851         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
18852         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
18853         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
18854         (re_acquire_state_context):
18855         Remove unnecessary forward decls.
18856         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
18857         Put __attribute at function definition,
18858         now that the function decl has been removed.
18859         * lib/regex_internal.c (re_string_peek_byte_case):
18860         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
18861         Likewise.
18862
18863 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
18864
18865         * m4/regex.m4: Add AC_PREREQ(2.50).
18866         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
18867
18868 2005-08-25  Simon Josefsson  <jas@extundo.com>
18869
18870         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
18871         __fsetlocking.
18872
18873 2005-08-25  Simon Josefsson  <jas@extundo.com>
18874
18875         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
18876         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
18877         GLIBC specific code.
18878
18879 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
18880
18881         Make regex safe for g++.  This fixes one real bug (an "err"
18882         that should have been "*err").  g++ problem reported by
18883         Sam Steingold.
18884         * lib/regex_internal.h (re_calloc): New macro, consistent with
18885         re_malloc etc.  All callers of calloc changed to use re_calloc.
18886         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
18887         not int.  All callers changed.
18888         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
18889         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
18890         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
18891         (find_recover_state): Change "err" to "*err"; this fixes what
18892         appears to be a real bug.
18893         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
18894         versus int.
18895
18896 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
18897
18898         * modules/regex (Depends-on): Add malloc, since the code
18899         assumes that !malloc(0) means failure.
18900
18901 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
18902
18903         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
18904
18905         alloca modernization/simplification for regex.
18906         * lib/regex.c: Remove portability cruft for alloca.  This no longer
18907         needs to be at the start of the file, and can be moved into
18908         regex_internal.h and simplified.
18909         * lib/regex_internal.h: Include <alloca.h>.
18910         (__libc_use_alloca) [!defined _LIBC]: New macro.
18911         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
18912         now works outside glibc.
18913
18914 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
18915
18916         * config/srclist.txt: Add glibc bugs 1241, 1245.
18917
18918 2005-08-25  Jim Meyering  <jim@meyering.net>
18919
18920         * lib/open-safer.c: Include <config.h>.
18921         Otherwise, we'd lose LARGEFILE support in any file using
18922         e.g. "fcntl--.h"
18923
18924 2005-08-25  Bruno Haible  <bruno@clisp.org>
18925
18926         * m4/minmax.m4: Require autoconf 2.52.
18927         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
18928         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
18929         alternatives of translit over the alphabet.
18930         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
18931
18932 2005-08-24  Simon Josefsson  <jas@extundo.com>
18933
18934         * tests/test-getpass.c: New file.
18935
18936 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
18937
18938         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
18939         for GNU regex features.
18940
18941 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
18942
18943         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
18944         * lib/regex.h (regerror): Likewise.
18945
18946         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
18947         requires this.  (The code never needed it.)
18948
18949         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
18950         All uses of recently-renamed identifiers changed to use the new,
18951         POSIX-compliant names.  The code will build and run just fine
18952         without these changes, but it's better to eat our own dog food
18953         and use the standard-conforming names.
18954
18955         * lib/regex.h: Fix a multitude of POSIX name space violations.
18956         These changes have an effect only for programs that define
18957         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
18958         do not change anything for programs compiled in the normal way.
18959         Also, there is no effect on the ABI.
18960
18961         (_REGEX_SOURCE): New macro.
18962         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
18963         defined and _GNU_SOURCE is not; this fixes a name space violation.
18964
18965         Rename the following macros to obey POSIX requirements.
18966         The old names are still visible as macros if _REGEX_SOURCE is defined.
18967         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
18968         RE_BACKSLASH_ESCAPE_IN_LISTS.
18969         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
18970         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
18971         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
18972         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
18973         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
18974         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
18975         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
18976         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
18977         (REG_INTERVALS): renamed from RE_INTERVALS.
18978         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
18979         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
18980         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
18981         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
18982         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
18983         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
18984         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
18985         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
18986         RE_UNMATCHED_RIGHT_PAREN_ORD.
18987         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
18988         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
18989         (REG_DEBUG): renamed from RE_DEBUG.
18990         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
18991         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
18992         unusual, since we can't clash with the POSIX REG_ICASE.
18993         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
18994         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
18995         (REG_NO_SUB): renamed from RE_NO_SUB.
18996         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
18997         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
18998         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
18999         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
19000         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
19001         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
19002         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
19003         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
19004         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
19005         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
19006         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
19007         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
19008         RE_SYNTAX_POSIX_MINIMAL_BASIC.
19009         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
19010         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
19011         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
19012         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
19013         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
19014         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
19015         (REG_FIXED): Renamed from REGS_FIXED.
19016         (REG_NREGS): Renamed from RE_NREGS.
19017
19018         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
19019         of other REG_* macros, since POSIX says the user is allowed to
19020         #undef these macros selectively.
19021
19022         (reg_errcode_t): Update comment stating what other tables need
19023         to be consistent.
19024
19025         Rename the following enum values to obey POSIX requirements.
19026         The old names are still visible as macros.
19027         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
19028         is not defined, since GNU is supposed to be a superset of POSIX as
19029         much as possible, and since we want reg_errcode_t to be a signed
19030         type for implementation consistency.
19031         (_REG_NOERROR): Renamed from REG_NOERROR.
19032         (_REG_NOMATCH): Renamed from REG_NOMATCH.
19033         (_REG_BADPAT): Renamed from REG_BADPAT.
19034         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
19035         (_REG_ECTYPE): Renamed from REG_ECTYPE.
19036         (_REG_EESCAPE): Renamed from REG_EESCAPE.
19037         (_REG_ESUBREG): Renamed from REG_ESUBREG.
19038         (_REG_EBRACK): Renamed from REG_EBRACK.
19039         (_REG_EPAREN): Renamed from REG_EPAREN.
19040         (_REG_EBRACE): Renamed from REG_EBRACE.
19041         (_REG_BADBR): Renamed from REG_BADBR.
19042         (_REG_ERANGE): Renamed from REG_ERANGE.
19043         (_REG_ESPACE): Renamed from REG_ESPACE.
19044         (_REG_BADRPT): Renamed from REG_BADRPT.
19045         (_REG_EEND): Renamed from REG_EEND.
19046         (_REG_ESIZE): Renamed from REG_ESIZE.
19047         (_REG_ERPAREN): Renamed from REG_ERPAREN.
19048         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
19049         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
19050         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
19051         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
19052
19053         (_REG_RE_NAME, _REG_RM_NAME): New macros.
19054         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
19055         changed.  But support the old name if the new one is not defined
19056         and if _REGEX_SOURCE.
19057
19058         Change the following member names in struct re_pattern_buffer.
19059         The old names are still supported if !_REGEX_SOURCE.
19060         The new names are always supported, regardless of _REGEX_SOURCE.
19061         (re_buffer): Renamed from buffer.
19062         (re_allocated): Renamed from allocated.
19063         (re_used): Renamed from used.
19064         (re_syntax): Renamed from syntax.
19065         (re_fastmap): Renamed from fastmap.
19066         (re_translate): Renamed from translate.
19067         (re_can_be_null): Renamed from can_be_null.
19068         (re_regs_allocated): Renamed from regs_allocated.
19069         (re_fastmap_accurate): Renamed from fastmap_accurate.
19070         (re_no_sub): Renamed from no_sub.
19071         (re_not_bol): Renamed from not_bol.
19072         (re_not_eol): Renamed from not_eol.
19073         (re_newline_anchor): Renamed from newline_anchor.
19074
19075         Change the following member names in struct re_registers.
19076         The old names are still supported if !_REGEX_SOURCE.
19077         The new names are always supported, regardless of _REGEX_SOURCE.
19078         (rm_num_regs): Renamed from num_regs.
19079         (rm_start): Renamed from start.
19080         (rm_end): Renamed from end.
19081
19082         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
19083         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
19084         Prepend __ to parameter names.
19085
19086         Undo yesterday's changes.
19087
19088 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
19089
19090         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
19091         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
19092         lib/regex.c.
19093
19094 2005-08-24  Jim Meyering  <jim@meyering.net>
19095
19096         Sync from coreutils.
19097         * m4/fcntl-safer.m4: New file.
19098
19099         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
19100         and object files for this module.
19101
19102 2005-08-24  Jim Meyering  <jim@meyering.net>
19103
19104         Sync from coreutils.
19105         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
19106
19107 2005-08-24  Jim Meyering  <jim@meyering.net>
19108
19109         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
19110         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
19111
19112 2005-08-24  Jim Meyering  <jim@meyering.net>
19113
19114         * modules/fcntl-safer: New module.
19115         * modules/fts (Depends-on): Add fcntl-safer.
19116         * MODULES.html.sh (File descriptor based Input/Output):
19117         Add fcntl-safer.
19118
19119 2005-08-24  Bruno Haible  <bruno@clisp.org>
19120
19121         Support for unit test modules.
19122         * modules/README: Mention tests modules.
19123         * modules/TEMPLATE-TESTS: New file.
19124         * gnulib-tool: New options --extract-tests-module, --with-tests and
19125         --tests-base (unused for the moment).
19126         (testsbase, inctests): New variables.
19127         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
19128         (func_verify_module): Exclude TEMPLATE-TESTS.
19129         (func_verify_nontests_module, func_verify_tests_module): New functions.
19130         (func_get_dependencies): Add implicit dependency for tests modules.
19131         (func_get_tests_module): New function.
19132         (func_modules_transitive_closure): When --with-tests was specified,
19133         include the unit tests as well, unless explicitly avoided.
19134         (func_emit_lib_Makefile_am): Ignore the tests modules here.
19135         (func_emit_tests_Makefile_am): New function.
19136         (func_create_testdir): When --with-tests was specified, emit a
19137         tests/ directory.
19138         * MODULES.html.sh (Future developments): Update.
19139
19140 2005-08-24  Bruno Haible  <bruno@clisp.org>
19141
19142         * modules/tls-tests: New file.
19143         * tests/test-tls.c: New file, from GNU gettext.
19144
19145 2005-08-24  Bruno Haible  <bruno@clisp.org>
19146
19147         * modules/lock-tests: New file.
19148         * tests/test-lock.c: New file, from GNU gettext.
19149
19150 2005-08-24  Bruno Haible  <bruno@clisp.org>
19151
19152         * lib/lock.h: Add multiple inclusion guard.
19153         * lib/tls.h: Add multiple inclusion guard.
19154
19155 2005-08-24  Bruno Haible  <bruno@clisp.org>
19156
19157         * gnulib-tool: Add support for the --aux-dir option to
19158         --create-testdir, --create-megatestdir, --test, --megatest.
19159         (func_create_testdir, func_create_megatestdir): Optionally emit a
19160         AC_CONFIG_AUX_DIR directive.
19161         (create-testdir, create-megatestdir, test, megatest): Provide a
19162         default value for $auxdir.
19163
19164 2005-08-24  Bruno Haible  <bruno@clisp.org>
19165
19166         * gnulib-tool (import): Use compound statement instead of subshell
19167         where possible.
19168
19169 2005-08-24  Bruno Haible  <bruno@clisp.org>
19170
19171         * gnulib-tool (import): Change --aux-dir default to "build-aux".
19172
19173 2005-08-24  Bruno Haible  <bruno@clisp.org>
19174
19175         * gnulib-tool (func_version): Update.
19176
19177 2005-08-24  Bruno Haible  <bruno@clisp.org>
19178
19179         * gnulib-tool (func_import, func_create_testdir,
19180         func_create_megatestdir): Quote all autoconf macro arguments.
19181
19182 2005-08-24  Bruno Haible  <bruno@clisp.org>
19183
19184         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
19185         option --force, because --force causes the aclocal.m4 of each
19186         subdirectory to be newer than the corresponding config.h.in.
19187
19188 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
19189
19190         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
19191         All contents moved to gl_REGEX.
19192         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
19193         assume that it does.
19194
19195 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
19196
19197         * lib/regex.h (REG_NOSYS)
19198         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
19199         Define, since POSIX requires it as of 2001.
19200         (_REG_ENOSYS)
19201         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
19202         New private symbol, used to keep the enum signed in all cases.
19203         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
19204         Youngman in
19205         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
19206
19207         * lib/regex_internal.c (re_string_skip_chars, register_state):
19208         (calc_state_hash):
19209         Remove forward decls; no longer needed now that we use prototypes.
19210         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
19211         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
19212         (clean_state_log_if_needed): Likewise.
19213
19214 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
19215
19216         * config/srclist.txt: Add glibc bugs 1231-1233.
19217
19218 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
19219
19220         Fix problems reported by Sam Steingold in
19221         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
19222         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
19223         assumed that reg_errcode_t is a signed type, which is not
19224         necessarily true if _XOPEN_SOURCE is not defined.
19225         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
19226         since some compilers warn about it otherwise.
19227
19228 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
19229
19230         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
19231         (init_word_char, create_initial_state, duplicate_node_closure):
19232         (fetch_token, peek_token_bracket, build_range_exp):
19233         (build_collating_symbol): Remove forward decls; no longer needed
19234         now that we use prototypes.
19235
19236         * lib/regcomp.c:
19237         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
19238         (re_compile_fastmap_iter, regcomp, regerror, regfree):
19239         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
19240         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
19241         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
19242         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
19243         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
19244         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
19245         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
19246         (build_range_exp, build_collating_symbol, parse_bracket_exp):
19247         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
19248         (build_charclass, build_charclass_op, fetch_number, create_tree):
19249         (create_token_tree, mark_opt_subexp, duplicate_tree):
19250         Use prototypes rather than old-style definitions.
19251
19252         * lib/regex_internal.c:
19253         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
19254         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
19255         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
19256         (re_string_reconstruct, re_string_peek_byte_case):
19257         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
19258         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
19259         (re_node_set_init_copy, re_node_set_add_intersect):
19260         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
19261         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
19262         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
19263         (re_acquire_state, re_acquire_state_context, register_state):
19264         (create_ci_newstate, create_cd_newstate, free_state):
19265         Likewise.
19266         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
19267         re_search_2):
19268         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
19269         (re_search_internal, prune_impossible_nodes):
19270         (acquire_init_state_context, check_matching, static):
19271         (check_halt_node_context, check_halt_state_context, proceed_next_node):
19272         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
19273         (update_regs, sift_states_backward, build_sifted_states):
19274         (clean_state_log_if_needed, merge_state_array):
19275         (update_cur_sifted_state, add_epsilon_src_nodes):
19276         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
19277         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
19278         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
19279         (find_recover_state, check_subexp_matching_top, transit_state_mb):
19280         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
19281         (check_arrival, check_arrival_add_next_nodes):
19282         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
19283         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
19284         (check_node_accept_bytes, check_node_accept, extend_buffers):
19285         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
19286         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
19287         (sift_ctx_init):
19288         Likewise.
19289
19290         * lib/regex_internal.h:
19291         (re_string_allocate, re_string_construct, re_string_reconstruct):
19292         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
19293         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
19294         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
19295         (re_string_context_at, re_string_peek_byte_case):
19296         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
19297         is defined, since we now use prototypes always.
19298
19299         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
19300         C89 or better.  All uses removed.
19301
19302 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
19303
19304         * config/srclist.txt: Add glibc bugs 1220-1227.
19305
19306 2005-08-20  Jim Meyering  <jim@meyering.net>
19307
19308         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
19309         of unused local, dfa.
19310
19311 2005-08-20  Bruno Haible  <bruno@clisp.org>
19312
19313         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
19314
19315 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
19316
19317         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
19318         (re_node_set_insert_last, re_dfa_add_node):
19319         Rename local variables to avoid GCC shadowing warnings.
19320
19321 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
19322
19323         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
19324         [defined lint]: Suppress bogus uninitialized-variable warnings.
19325
19326         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
19327         and let the caller return REG_ESPACE if out of space.  This
19328         removes an uninitialied-variable warning with GCC 4.0.1, and also
19329         avoids taking the address of a local variable.  All callers
19330         changed.
19331
19332 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
19333
19334         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
19335         $LIBCSRC/posix/regexec.c.
19336         Add glibc bug 1217 for regcomp.c.
19337
19338 2005-08-19  Jim Meyering  <jim@meyering.net>
19339
19340         * lib/regexec.c (proceed_next_node): Redo local variables to
19341         avoid GCC shadowing warnings.
19342
19343 2005-08-18  Bruno Haible  <bruno@clisp.org>
19344
19345         * lib/strstr.c (strstr): Fix return value in multibyte case.
19346         * lib/strcasestr.c (strcasestr): Likewise.
19347
19348 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
19349
19350         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
19351
19352 2005-08-17  Jim Meyering  <jim@meyering.net>
19353
19354         Make the %s format (seconds since the epoch) work for a negative
19355         number and when used with a zero-padded field width, e.g. %015s.
19356
19357         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
19358         label so that it precedes the code to set `digits'.  Otherwise,
19359         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
19360         print `00-22'.  Now, it prints `-0022', as it should.
19361
19362 2005-08-17  Bruno Haible  <bruno@clisp.org>
19363
19364         * modules/strstr (Files): Add m4/mbrtowc.m4.
19365         (Depends-on): Add mbuiter.
19366
19367 2005-08-17  Bruno Haible  <bruno@clisp.org>
19368
19369         * modules/strcasestr: New file.
19370         * MODULES.html.sh (String handling, based on ANSI C 89): Add
19371         strcasestr.
19372
19373 2005-08-17  Bruno Haible  <bruno@clisp.org>
19374
19375         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
19376
19377 2005-08-17  Bruno Haible  <bruno@clisp.org>
19378
19379         * modules/mbuiter: New file.
19380         * MODULES.html.sh (Extended multibyte and wide character utilities):
19381         Add mbuiter.
19382
19383 2005-08-17  Bruno Haible  <bruno@clisp.org>
19384
19385         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
19386         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
19387
19388 2005-08-17  Bruno Haible  <bruno@clisp.org>
19389
19390         * m4/strcasestr.m4: New file.
19391
19392 2005-08-17  Bruno Haible  <bruno@clisp.org>
19393
19394         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
19395         * lib/strstr.c: Completely rewritten, with multibyte locale support.
19396
19397 2005-08-17  Bruno Haible  <bruno@clisp.org>
19398
19399         * lib/strcasestr.h: New file.
19400         * lib/strcasestr.c: New file.
19401
19402 2005-08-17  Bruno Haible  <bruno@clisp.org>
19403
19404         * lib/strcasecmp.c: Use mbuiter.h.
19405
19406 2005-08-17  Bruno Haible  <bruno@clisp.org>
19407
19408         * lib/mbuiter.h: New file.
19409
19410 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
19411
19412         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
19413         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
19414         and gl_GETOPT are both invoked via different paths (as happens
19415         with GNU tar CVS because it uses both argp and getopt), the former
19416         wins.
19417
19418 2005-08-16  Bruno Haible  <bruno@clisp.org>
19419
19420         * modules/tls: New file.
19421         * MODULES.html.sh (Multithreading): Add tls.
19422
19423 2005-08-16  Bruno Haible  <bruno@clisp.org>
19424
19425         * modules/strnlen1: New file.
19426         * MODULES.html.sh (String handling): Add strnlen1.
19427
19428 2005-08-16  Bruno Haible  <bruno@clisp.org>
19429
19430         * modules/strcase (Files): Add m4/mbrtowc.m4.
19431         (Depends-on): Add strnlen1, mbchar.
19432
19433 2005-08-16  Bruno Haible  <bruno@clisp.org>
19434
19435         * modules/mbiter: New file.
19436         * MODULES.html.sh (Extended multibyte and wide character utilities):
19437         Add mbiter.
19438
19439 2005-08-16  Bruno Haible  <bruno@clisp.org>
19440
19441         * modules/mbfile: New file.
19442         * MODULES.html.sh (Extended multibyte and wide character utilities):
19443         Add mbfile.
19444
19445 2005-08-16  Bruno Haible  <bruno@clisp.org>
19446
19447         * modules/mbchar: New file.
19448         * MODULES.html.sh (Extended multibyte and wide character utilities):
19449         New section.
19450
19451 2005-08-16  Bruno Haible  <bruno@clisp.org>
19452
19453         * m4/tls.m4: New file, from GNU gettext.
19454
19455 2005-08-16  Bruno Haible  <bruno@clisp.org>
19456
19457         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
19458         always.
19459         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
19460
19461 2005-08-16  Bruno Haible  <bruno@clisp.org>
19462
19463         * m4/mbiter.m4: New file.
19464
19465 2005-08-16  Bruno Haible  <bruno@clisp.org>
19466
19467         * m4/mbfile.m4: New file.
19468
19469 2005-08-16  Bruno Haible  <bruno@clisp.org>
19470
19471         * m4/mbchar.m4: New file.
19472
19473 2005-08-16  Bruno Haible  <bruno@clisp.org>
19474
19475         * lib/tls.h: New file, from GNU gettext.
19476         * lib/tls.c: New file, from GNU gettext.
19477
19478 2005-08-16  Bruno Haible  <bruno@clisp.org>
19479
19480         * lib/strnlen1.h: New file.
19481         * lib/strnlen1.c: New file.
19482
19483 2005-08-16  Bruno Haible  <bruno@clisp.org>
19484
19485         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
19486         (mbi_init): Update.
19487         (mbi_avail, mbi_advance): Let the iteration end before the terminating
19488         NUL byte, not after it.
19489
19490 2005-08-16  Bruno Haible  <bruno@clisp.org>
19491
19492         * lib/strcase.h (strcasecmp): Add note in comments.
19493         * lib/strncasecmp.c: Use code from strcasecmp.c.
19494         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
19495         (strcasecmp): Work correctly in multibyte locales.
19496
19497 2005-08-16  Bruno Haible  <bruno@clisp.org>
19498
19499         * lib/mbiter.h: New file.
19500
19501 2005-08-16  Bruno Haible  <bruno@clisp.org>
19502
19503         * lib/mbfile.h: New file.
19504
19505 2005-08-16  Bruno Haible  <bruno@clisp.org>
19506
19507         * lib/mbchar.h: New file.
19508         * lib/mbchar.c: New file.
19509
19510 2005-08-16  Bruno Haible  <bruno@clisp.org>
19511
19512         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
19513         the valid ones. Makes the comparison operations transitive:
19514         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
19515         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
19516
19517 2005-08-15  Simon Josefsson  <jas@extundo.com>
19518
19519         * modules/ssize_t (License): Change to 'unlimited'.
19520
19521         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
19522
19523 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
19524
19525         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
19526         Add comments for each pending glibc patch.
19527
19528 2005-08-15  Bruno Haible  <bruno@clisp.org>
19529
19530         * lib/regex.h (__restrict_arr): Don't define to __restrict if
19531         __cplusplus is defined.
19532
19533 2005-08-14  Jim Meyering  <jim@meyering.net>
19534
19535         Sync from coreutils.
19536
19537         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
19538         Use the hash-table-based cycle-detection code not just when
19539         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
19540         Reported by James Youngman in
19541         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
19542         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
19543         FTS_TIGHT_CYCLE_CHECK.
19544         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
19545         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
19546         once again.
19547         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
19548         * lib/fts.c (fd_safer): Remove decl.
19549         Include fcntl--.h rather than unistd-safer.h
19550         (fts_safe_changedir): Don't call fd_safer; no longer needed
19551         now that we include fcntl--.h.
19552
19553 2005-08-12  Simon Josefsson  <jas@extundo.com>
19554
19555         * modules/getndelim2: Use ssize_t module.
19556         * modules/getnline: Likewise.
19557         * modules/safe-read: Likewise.
19558         * modules/xreadlink: Likewise.
19559
19560         * modules/ssize_t: New file.
19561
19562 2005-08-12  Simon Josefsson  <jas@extundo.com>
19563
19564         * m4/readline.m4: Look for termcap, curses or ncurses if required.
19565
19566 2005-08-12  Simon Josefsson  <jas@extundo.com>
19567
19568         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
19569         ssize_t.
19570
19571 2005-08-12  Simon Josefsson  <jas@extundo.com>
19572
19573         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
19574         readline, getdelim and check_version.
19575         (Support for systems lacking ISO C 99: Sizes of integer types):
19576         Add size_max.
19577
19578 2005-08-12  Bruno Haible  <bruno@clisp.org>
19579
19580         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
19581
19582 2005-08-11  Simon Josefsson  <jas@extundo.com>
19583
19584         * modules/readline: New file.
19585
19586         * modules/strnlen (Files): Add strnlen.h.
19587
19588 2005-08-11  Simon Josefsson  <jas@extundo.com>
19589
19590         * m4/readline.m4: New file.
19591
19592 2005-08-11  Simon Josefsson  <jas@extundo.com>
19593
19594         * lib/readline.h, readline.c: New file.
19595
19596 2005-08-11  Simon Josefsson  <jas@extundo.com>
19597
19598         * doc/gnulib.texi (Initial import, Finishing touches): Mention
19599         gl_AVOID.
19600
19601 2005-08-11  Bruno Haible  <bruno@clisp.org>
19602
19603         * lib/strnlen.h (strnlen): Change parameter name to match comment.
19604
19605 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
19606
19607         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
19608
19609 2005-08-10  Simon Josefsson  <jas@extundo.com>
19610
19611         * tests/test-iconvme.c: New file.
19612
19613 2005-08-10  Simon Josefsson  <jas@extundo.com>
19614
19615         * m4/strnlen.m4: New file.
19616
19617         * m4/strndup.m4: Don't check for strnlen declaration, done in
19618         strnlen.m4.
19619
19620 2005-08-10  Simon Josefsson  <jas@extundo.com>
19621
19622         * lib/strndup.c: Use strnlen.h.
19623
19624         * lib/strnlen.h: New file.
19625
19626 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
19627
19628         * README: Typos.
19629
19630 2005-08-02  Simon Josefsson  <jas@extundo.com>
19631
19632         * modules/readline: New file.
19633
19634 2005-08-02  Simon Josefsson  <jas@extundo.com>
19635
19636         * modules/getdelim: New file.
19637
19638         * modules/getline: Rewrite, don't use getndelim2.
19639
19640 2005-08-02  Simon Josefsson  <jas@extundo.com>
19641
19642         * m4/getline.m4: Separate out getdelim stuff into separate module.
19643
19644         * m4/getdelim.m4: New file.
19645
19646 2005-08-02  Simon Josefsson  <jas@extundo.com>
19647
19648         * lib/getline.h, getline.c: Rewrite.
19649
19650         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
19651
19652 2005-07-31  Bruno Haible  <bruno@clisp.org>
19653
19654         * lib/lock.h (gl_lock_initializer): New macro.
19655         (gl_lock_define_initialized): Use it.
19656         (gl_rwlock_initializer): New macro.
19657         (gl_rwlock_define_initialized): Use it.
19658         (gl_recursive_lock_initializer): New macro.
19659         (gl_recursive_lock_define_initialized): Use it.
19660
19661 2005-07-30  Karl Berry  <karl@gnu.org>
19662
19663         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
19664         Report from Ben Pfaff, regarding getopt.
19665
19666 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
19667
19668         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
19669         normal way.
19670         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
19671         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
19672         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
19673         (gl_GETOPT): Use the new macros.  Most of the implementation
19674         is moved to the new macros.  This is for programs like Emacs
19675         that don't want all the functionality of gl_GETOPT.
19676
19677 2005-07-26  Bruno Haible  <bruno@clisp.org>
19678
19679         * m4/lock.m4: Update from GNU gettext.
19680
19681 2005-07-26  Bruno Haible  <bruno@clisp.org>
19682
19683         * lib/lock.h: Update from GNU gettext.
19684         * lib/lock.c: Update from GNU gettext.
19685
19686 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
19687
19688         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
19689         obsolescent AC_TRY_RUN.  Include the default includes files, for
19690         'exit'.
19691
19692 2005-07-24  Bruno Haible  <bruno@clisp.org>
19693
19694         * modules/visibility: New file.
19695         * MODULES.html.sh (Misc): Add visibility.
19696
19697 2005-07-24  Bruno Haible  <bruno@clisp.org>
19698
19699         * m4/visibility.m4: New file.
19700
19701 2005-07-24  Bruno Haible  <bruno@clisp.org>
19702
19703         * doc/visibility.texi: New file.
19704
19705 2005-07-22  Bruno Haible  <bruno@clisp.org>
19706
19707         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
19708         $(ALLOCA_H), redundant through BUILT_SOURCES.
19709         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
19710         redundant through BUILT_SOURCES.
19711         * modules/byteswap (Makefile.am): Remove explicit dependency on
19712         $(BYTESWAP_H), redundant through BUILT_SOURCES.
19713         * modules/fnmatch (Makefile.am): Remove explicit dependency on
19714         $(FNMATCH_H), redundant through BUILT_SOURCES.
19715         * modules/getopt (Makefile.am): Remove explicit dependency on
19716         $(GETOPT_H), redundant through BUILT_SOURCES.
19717         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
19718         redundant through BUILT_SOURCES.
19719         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
19720         redundant through BUILT_SOURCES.
19721         * modules/stdbool (Makefile.am): Remove explicit dependency on
19722         $(STDBOOL_H), redundant through BUILT_SOURCES.
19723         * modules/stdint (Makefile.am): Remove explicit dependency on
19724         $(STDINT_H), redundant through BUILT_SOURCES.
19725         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
19726         Remove explicit dependency on $(SYSEXITS_H).
19727         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
19728
19729 2005-07-18  Simon Josefsson  <jas@extundo.com>
19730
19731         * lib/check-version.c (check_version): Accept identical versions too.
19732
19733 2005-07-18  Bruno Haible  <bruno@clisp.org>
19734
19735         * modules/lock: New file.
19736         * MODULES.html.sh (Multithreading): New section.
19737
19738 2005-07-18  Bruno Haible  <bruno@clisp.org>
19739
19740         * m4/lock.m4: New file, from GNU gettext.
19741
19742 2005-07-18  Bruno Haible  <bruno@clisp.org>
19743
19744         * lib/lock.h: New file, from GNU gettext.
19745         * lib/lock.c: New file, from GNU gettext.
19746
19747 2005-07-18  Bruno Haible  <bruno@clisp.org>
19748
19749         * lib/lock.h (gl_once_t): New type.
19750         (gl_once_define, gl_once): New macros.
19751         * lib/lock.c (fresh_once): New variable.
19752         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
19753         functions.
19754
19755 2005-07-16  Simon Josefsson  <jas@extundo.com>
19756
19757         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
19758         workaround, suggested by Bruno.
19759
19760 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
19761
19762         * modules/xalloc (Depends-on): Add xalloc-die.
19763         * modules/xvasprintf (Depends-on): Add xalloc-die.
19764
19765 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
19766
19767         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
19768         with a minor change.
19769
19770 2005-07-15  Bruno Haible  <bruno@clisp.org>
19771
19772         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
19773         When using lib/poll.c, define poll as rpl_poll.
19774
19775 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
19776
19777         * modules/argp (Depends-on): Remove unlocked-io.
19778
19779 2005-07-14  Derek Price  <derek@ximbiot.com>
19780
19781         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
19782         for glob symlink bug.
19783
19784 2005-07-14  Bruno Haible  <bruno@clisp.org>
19785
19786         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
19787         Instead, test for *_unlocked function declarations directly.
19788
19789 2005-07-11  Simon Josefsson  <jas@extundo.com>
19790
19791         * modules/size_max: New file.
19792
19793         * modules/xsize: Depend on size_max module for size_max.m4.
19794
19795 2005-07-11  Simon Josefsson  <jas@extundo.com>
19796
19797         * lib/size_max.h: New file.
19798
19799 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
19800
19801         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
19802         copyright symbol and the year.
19803         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
19804         (version_etc_va): Use parameterized copyright notice.
19805         Reword to conform to the current GNU coding standards.
19806
19807 2005-07-11  Karl Berry  <karl@gnu.org>
19808
19809         * doc/gnulib.texi (Quoting): new node.
19810         (Initial import): more info, from Patrice.
19811
19812 2005-07-11  Bruno Haible  <bruno@clisp.org>
19813
19814         * gnulib-tool (func_usage): Document option --avoid.
19815         (Command line options): Handle --avoid.
19816         (func_acceptable): New function.
19817         (func_modules_transitive_closure): Use it.
19818
19819 2005-07-11  Bruno Haible  <bruno@clisp.org>
19820
19821         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
19822         Reported by Jim Meyering.
19823
19824 2005-07-10  Bruno Haible  <bruno@clisp.org>
19825
19826         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
19827         Needed when size_t is smaller than 'unsigned int'.
19828         Reported by Paul Eggert.
19829
19830 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
19831
19832         * modules/argp (Depends-on): Add unlocked-io
19833
19834 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
19835
19836         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
19837         block of defines.
19838
19839 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
19840
19841         * config/srclist.txt: Comment out regcomp.c, since we have a porting
19842         fix now.
19843
19844 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
19845         and Paul Eggert  <eggert@cs.ucla.edu>
19846
19847         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
19848         in wint_t, not wchar_t.  Remove now-unnecessary cast.
19849
19850 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
19851
19852         * modules/regex (Files): Add lib/regex_internal.c,
19853         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
19854         (Depends-on): Add extensions.
19855         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
19856
19857 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
19858
19859         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
19860         pathconf.
19861         * m4/same.m4 (gl_SAME): Likewise.
19862         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
19863
19864         * m4/regex.m4: Adjust to new libc regex implementation.
19865         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
19866         all the .c and .h parts of (the new) regex.
19867         Quote the m4 stuff better.
19868         Check for RE_ICASE bug of old gnulib.
19869         Check for REG_STARTEND of recent libc.
19870         Rename local variables from jm_* to gl_*.
19871         Quote operand of "test -f".
19872         Say "recent enough" version of libc, not "version 2".
19873         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
19874         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
19875         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
19876         Remove check for btowc, isascii.
19877         Require AM_LANGINFO_CODESET.
19878
19879 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
19880
19881         * lib/regex.c, regex.h: Sync from libc.
19882         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
19883         * lib/regexec.c:
19884         New files, synced from libc, except that regex_internal.h
19885         currently has a small porting fix.
19886
19887 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
19888
19889         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
19890         regex_internal.c, regexec.c.
19891         Add regex_internal.h too, but as a comment, since the libc version
19892         is currently broken in gnulib mode.
19893
19894 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
19895
19896         Support programs like Emacs that use gnulib but not gettext.
19897         * MODULES.html.sh (Internationalization functions): Add gettext-h.
19898         * modules/gettext-h: New file.
19899         * modules/gettext (Files): Remove lib/gettext.h.
19900         (Depends-on): Add gettext-h.
19901         (Makefile.am): Remove lib_SOURCES.
19902         * modules/argmatch, modules/c-stack, modules/closeout:
19903         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
19904         * modules/execute, modules/file-type, modules/getaddrinfo:
19905         * modules/getopt, modules/human, modules/javacomp:
19906         * modules/javaexec, modules/mkdir-p, modules/obstack:
19907         * modules/openat, modules/pagealign_alloc, modules/pipe:
19908         * modules/quotearg, modules/regex, modules/rpmatch:
19909         * modules/unicodeio, modules/userspec, modules/version-etc:
19910         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
19911         * modules/xsetenv:
19912         Depend on gettext-h, not gettext.
19913
19914 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
19915
19916         * gnulib-tool (func_import): Add support for 'public domain' license.
19917         * modules/alloca, modules/atexit, modules/memmove:
19918         Now public domain, not GPL.
19919         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
19920         * modules/realloc, modules/strerror, modules/strtod:
19921         Now LGPL, not GPL.
19922
19923 2005-07-05  Bruno Haible  <bruno@clisp.org>
19924
19925         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
19926         autoconf CVS. Needed for mingw.
19927
19928 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
19929
19930         Remove the dependency of the strftime module on the tzset module.
19931         * modules/strftime (Depends-on): Remove dependency on tzset.
19932
19933 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
19934
19935         Remove the dependency of the strftime module on the tzset module.
19936         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
19937         gl_FUNC_TZSET_CLOBBER.
19938
19939 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
19940
19941         Remove the dependency of the strftime module on the tzset module.
19942         * lib/strftime.c (my_strftime)
19943         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
19944         Copy the input structure, to work around some of the bug with
19945         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
19946         Solaris releases, you should also use the tzset module, but we won't
19947         require it as a dependency any more since we don't want LGPLed code
19948         to depend on GPLed code.
19949
19950 2005-07-02  Jim Meyering  <jim@meyering.net>
19951
19952         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
19953         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
19954         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
19955         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
19956
19957 2005-07-02  Jim Meyering  <jim@meyering.net>
19958
19959         * lib/backupfile.c (backup_args): Change a `0' to NULL.
19960
19961 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
19962
19963         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
19964         declares only 'struct timespec;' (!).
19965
19966 2005-07-01  Jim Meyering  <jim@meyering.net>
19967
19968         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
19969         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
19970         * lib/save-cwd.c, tempname.c:
19971         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
19972         and don't include <sys/file.h>).
19973
19974 2005-06-29  Jim Meyering  <jim@meyering.net>
19975
19976         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
19977         type name.  Use the variable name instead.
19978         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
19979         Likewise.
19980
19981 2005-06-28  Simon Josefsson  <jas@extundo.com>
19982
19983         * modules/check-version (Files): Add check-version.m4.
19984
19985 2005-06-28  Simon Josefsson  <jas@extundo.com>
19986
19987         * m4/check-version.m4: New file, suggested by Jim Meyering
19988         <jim@meyering.net>.
19989
19990 2005-06-28  Simon Josefsson  <jas@extundo.com>
19991
19992         * lib/check-version.h, lib/check-version.c: New files.
19993
19994 2005-06-28  Simon Josefsson  <jas@extundo.com>
19995
19996         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
19997         collision with global variable.  Better indentation.  Don't
19998         increment buffer pointer beyond buffer end.  Based on comments
19999         from Paul Eggert <eggert@cs.ucla.edu>.
20000
20001         * lib/base64.h: Indent.
20002
20003 2005-06-28  Simon Josefsson  <jas@extundo.com>
20004
20005         * doc/gnulib.texi (Library version handling): New section.
20006
20007 2005-06-28  Jim Meyering  <jim@meyering.net>
20008
20009         * check-module (find_included_lib_files): Hard-code another
20010         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
20011         but modules/fts-lgpl (correctly) does not list those files.
20012
20013         * modules/canonicalize (Files): Add lib/pathmax.h.
20014
20015 2005-06-25  Simon Josefsson  <jas@extundo.com>
20016
20017         * modules/check-version: New file.
20018
20019 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
20020
20021         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
20022         initializer of struct addrinfo, as an indication that we don't
20023         care how many members the structure has.
20024
20025 2005-06-24  Derek Price  <derek@ximbiot.com>
20026         and Bruno Haible  <bruno@clisp.org>
20027
20028         Remove stat module & update lstat.
20029         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
20030         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
20031         * m4/stat.m4: Remove this file.
20032
20033 2005-06-24  Derek Price  <derek@ximbiot.com>
20034         and Bruno Haible  <bruno@clisp.org>
20035
20036         Remove stat module & update lstat.
20037         * lib/stat.c: Remove this file...
20038         (slash_aware_lstat): ...moving this content and its support...
20039         * lib/lstat.c (rpl_lstat): ...into here.
20040         * lib/lstat.h: New file.
20041
20042 2005-06-24  Derek Price  <derek@ximbiot.com>
20043         and Bruno Haible  <bruno@clisp.org>
20044
20045         Remove stat module & update lstat.
20046         * config/srclist.txt (libc sources): Remove stat.
20047
20048 2005-06-24  Derek Price  <derek@ximbiot.com>
20049         and Bruno Haible  <bruno@clisp.org>
20050
20051         Remove stat module & update lstat.
20052         * MODULES.html.sh (stat): Remove.
20053         * MODULES.html: Regenerated.
20054         * modules/lstat (Description): Correct function name.
20055         (Files): Add "lstat.h".
20056         (Depends-on): Remove stat, add xalloc, stat-macros.
20057         * modules/stat: Remove this file.
20058         (Include): Add "lstat.h", remove <sys/stat.h>.
20059
20060 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
20061
20062         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
20063         (ranged_convert): Don't save conversion in a temporary struct.
20064         This causes a warning with GCC 4.0.0, and anyway in the typical
20065         case it's not worth the extra 100 bytes or so of code.
20066         (ranged_convert, __mktime_internal): When calling a function via a
20067         pointer P, use P () rather than (*P) (), as we now assume C89 or
20068         better.
20069
20070 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
20071
20072         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
20073         "who -r" failed to give output.  Problem reported by Tim Waugh.
20074
20075         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
20076         (xcalloc): Use it to avoid needless tests.
20077         Problem reported by Jim Meyering.
20078
20079 2005-06-20  Derek Price  <derek@ximbiot.com>
20080
20081         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
20082         unnecessary for Autoconfs > 2.59c.
20083
20084 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20085
20086         * lib/argp.h (__option_is_short): Check upper limit of
20087         __key. Isprint() requires its argument to have the value
20088         of an unsigned char or EOF.
20089
20090 2005-06-16  Jim Meyering  <jim@meyering.net>
20091
20092         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
20093         when either N or S is zero.
20094
20095 2005-06-16  Derek Price  <derek@ximbiot.com>
20096
20097         * m4/bison.m4: Declare YACC & YFLAGS precious.
20098
20099 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
20100
20101         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
20102         multibyte string or pattern, fall back on unibyte matching.
20103         Problem reported by James Youngman.
20104
20105 2005-06-08  Bruno Haible  <bruno@clisp.org>
20106
20107         * modules/csharpcomp: New file.
20108         * MODULES.html.sh (C#): Add csharpcomp.
20109
20110 2005-06-08  Bruno Haible  <bruno@clisp.org>
20111
20112         * m4/csharpcomp.m4: New file, from GNU gettext.
20113
20114 2005-06-08  Bruno Haible  <bruno@clisp.org>
20115
20116         * lib/csharpcomp.h: New file, from GNU gettext.
20117         * lib/csharpcomp.c: New file, from GNU gettext.
20118         * lib/csharpcomp.sh.in: New file, from GNU gettext.
20119
20120 2005-06-08  Bruno Haible  <bruno@clisp.org>
20121
20122         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
20123         warning on mingw.
20124
20125 2005-06-07  Derek Price  <derek@ximbiot.com>
20126
20127         Sync from CVS.
20128         * lib/glob_.h: Indent nested #ifdef.
20129
20130 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
20131
20132         Sync from coreutils.
20133         Use "file name" when talking about file names, instead of "filename"
20134         or "path", as per the GNU coding standards.
20135         * lib/mkdir-p.c: Renamed from makepath.c.
20136         (make_dir_parents): Renamed from make_path.  All callers changed.
20137         * lib/mkdir-p.h: Likewise.  All includers changed.
20138         * lib/filenamecat.c: Renamed from path-concat.c.
20139         (file_name_concat): Renamed from path_concat.  All callers changed.
20140         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
20141         * lib/filenamecat.h: Likewise.  All includers changed.
20142         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
20143         in comments or local variable names.
20144         * lib/basename.c: Likewise.
20145         * lib/canonicalize.c, canonicalize.h: Likewise.
20146         * lib/dirname.c, dirname.h: Likewise.
20147         * lib/euidaccess.c: Likewise.
20148         * lib/exclude.c: Likewise
20149         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
20150         * lib/fsusage.c, fsuage.h: Likewise.
20151         * lib/fts.c, fts_.h: Likewise.
20152         * lib/getcwd.c: Likewise.
20153         * lib/getloadavg.c: Likewise.
20154         * lib/mkstemp.c: Likewise.
20155         * lib/mountlist.c, mountlist.h: Likewise.
20156         * lib/openat.c, openat.h: Likewise.
20157         * lib/readlink-stub.c: Likewise.
20158         * lib/readutmp.c, readutmp.h: Likewise.
20159         * lib/rename.c: Likewise.
20160         * lib/rmdir.c: Likewise.
20161         * lib/same.c: Likewise.
20162         * lib/savedir.c: Likewise.
20163         * lib/stripslash.c: Likewise.
20164         * lib/tempname.c: Likewise.
20165         * lib/xreadlink.c: Likewise.
20166         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
20167         All uses changed.
20168         * lib/exclude.h: Likewise.
20169
20170         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
20171         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
20172         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
20173         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
20174         * lib/pathmax.h: Include <limits.h> unconditionally, since other
20175         files have been getting away with it for years (MORE/BSD 4.3
20176         is extinct now).
20177         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
20178         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
20179
20180         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
20181         Define to 256, not 255, as per modern POSIX.
20182
20183 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
20184
20185         Sync from coreutils.
20186         Use "file name" when talking about file names, instead of "filename"
20187         or "path", as per the GNU coding standards.
20188         * MODULES.html.sh: mkdir-p renamed from makepath.
20189         filenamecat renamed from path-concat.
20190         * modules/filenamecat: Renamed from modules/path-concat.
20191         (Files): filenamecat.h and filenamecat.c renamed from
20192         path-concat.h and path-concat.c.
20193         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
20194         (Include): filenamecat.h, not path-concat.h.
20195         * modules/mkdir-p: Renamed from modules/makepath.
20196         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
20197         makepath.c.
20198         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
20199         (Include): mkdir-p.h, not makepath.h.
20200
20201 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
20202
20203         Sync from coreutils.
20204         * m4/mkdir-p.m4: Renamed from makepath.m4.
20205         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
20206         Rename files from makepath.c to mkdir-p.c, and from
20207         makepath.h to mkdir-p.h.
20208         * m4/filenamecat.m4: Renamed from path-concat.m4.
20209         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
20210         Rename files from path-concat.c to filenamecat.c,
20211         and from path-concat.h to filenamecat.h.
20212         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
20213         "file name" in local variables or comments.
20214         * m4/rename.m4: Likewise.
20215
20216 2005-06-01  Bruno Haible  <bruno@clisp.org>
20217
20218         * modules/csharpexec: New file.
20219         * MODULES.html.sh (C#): New section.
20220
20221 2005-06-01  Bruno Haible  <bruno@clisp.org>
20222
20223         * m4/csharp.m4: New file, from GNU gettext.
20224         * m4/csharpexec.m4: New file, from GNU gettext.
20225
20226 2005-06-01  Bruno Haible  <bruno@clisp.org>
20227
20228         * lib/csharpexec.h: New file, from GNU gettext.
20229         * lib/csharpexec.c: New file, from GNU gettext.
20230         * lib/csharpexec.sh.in: New file, from GNU gettext.
20231
20232 2005-05-31  Derek Price  <derek@ximbiot.com>
20233             Paul Eggert  <eggert@cs.ucla.edu>
20234
20235         Sync from cvs.
20236         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
20237
20238 2005-05-31  Derek Price  <derek@ximbiot.com>
20239             Paul Eggert  <eggert@cs.ucla.edu>
20240
20241         Sync from cvs.
20242         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
20243
20244 2005-05-29  Derek Price  <derek@ximbiot.com>
20245
20246         * config/srclist.txt (glob_.h, glob.c): Add these files.
20247
20248 2005-05-29  Derek Price  <derek@ximbiot.com>
20249
20250         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
20251         * modules/glob: New file.
20252         * modules/getlogin_r: Add link to POSIX spec in description.
20253
20254 2005-05-29  Derek Price  <derek@ximbiot.com>
20255             Paul Eggert  <eggert@cs.ucla.edu>
20256
20257         * m4/glob.m4: New file.
20258
20259 2005-05-29  Derek Price  <derek@ximbiot.com>
20260             Paul Eggert  <eggert@cs.ucla.edu>
20261
20262         * lib/glob_.h, lib/glob.c: New files.
20263
20264 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
20265
20266         * modules/fts (Files): Remove m4/inttypes-pri.m4.
20267         * modules/fts-lgpl (Depends-on): Remove gettext.
20268
20269 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
20270
20271         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
20272         and don't require gt_INTTYPES_PRI.
20273
20274 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
20275
20276         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
20277
20278         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
20279         the configuration hassle isn't worth it.
20280         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
20281         (LONGEST_MODIFIER, PRIuMAX): Remove.
20282
20283 2005-05-27  Bruno Haible  <bruno@clisp.org>
20284
20285         * lib/getlogin_r.h: Remove second include of <stddef.h>.
20286
20287 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
20288
20289         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
20290         _POSIX_PTHREAD_SEMANTICS for Solaris.
20291
20292 2005-05-25  Derek Price  <derek@ximbiot.com>
20293
20294         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
20295
20296 2005-05-25  Derek Price  <derek@ximbiot.com>
20297             Paul Eggert  <eggert@cs.ucla.edu>
20298
20299         * modules/getlogin_r, m4/getlogin_r.m4: New files.
20300         * lib/getlogin_r.c, getlogin_r.h: New files.
20301
20302 2005-05-25  Bruno Haible  <bruno@clisp.org>
20303             Derek Price  <derek@ximbiot.com>
20304
20305         * lib/getlogin_r.h: Simplify API documentation.
20306
20307 2005-05-23  Derek Price  <derek@ximbiot.com>
20308
20309         * modules/minmax (Files): Add m4/minmax.m4.
20310         (configure.ac): Add gl_MINMAX.
20311
20312 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
20313
20314         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
20315         so that unistd-safer.h (GPL'ed code) need not be included.
20316
20317 2005-05-22  Bruno Haible  <bruno@clisp.org>
20318
20319         * m4/minmax.m4: New file.
20320         Based on a patch by Derek Price <derek@ximbiot.com>.
20321
20322 2005-05-22  Bruno Haible  <bruno@clisp.org>
20323
20324         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
20325         (INT64_MIN): Fix definition.
20326         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
20327
20328         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
20329         NEED_SIGNED_INT_TYPES.
20330
20331         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
20332         HAVE_SYSTEM_INTTYPES.
20333
20334 2005-05-22  Bruno Haible  <bruno@clisp.org>
20335
20336         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
20337         Also include <sys/param.h> if it defines MIN, MAX.
20338         Based on a patch by Derek Price <derek@ximbiot.com>.
20339
20340 2005-05-21  Jim Meyering  <jim@meyering.net>
20341
20342         * modules/fts (Files): Add m4/inttypes-pri.m4.
20343         (Depends-on): Add lstat and remove gettext.  Alphabetize.
20344
20345 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
20346
20347         New fts module.
20348         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
20349         (setup_dir, free_dir): New functions.
20350         (enter_dir, leave_dir): Define trivial
20351         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
20352         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
20353         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
20354         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
20355         Move to fts-cycle.c.
20356         (fts_open): Use setup_dir.
20357         (fts_close): Use free_dir.
20358         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
20359         This adds a label and some gotos, but the alternatives were messier.
20360         Check for memory allocation failure when entering a dir.
20361         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
20362         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
20363         (FTS): New member fts_cycle, that is a union that contains the
20364         old active_dir_ht and cycle_state.  All uses changed to mention
20365         fts_cycle.ht and fts_cycle.state.
20366         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
20367         fts.c, with the following changes:
20368         (setup_dir, free_dir): New functions.
20369         (enter_dir): Now returns bool.  Return true if successful, false
20370         if memory exhausted.  All callers changed.
20371         Do not bother partly cleaning up on
20372         memory allocation failure; that is free_dir's job.
20373         However, free ad if hash_insert fails, to avoid memory leak.
20374         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
20375         fts->fts_options to see which union member to use.
20376
20377 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
20378
20379         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
20380         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
20381
20382 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
20383
20384         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
20385
20386 2005-05-20  Jim Meyering  <jim@meyering.net>
20387
20388         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
20389         Now a macro, to pacify GCC.
20390
20391 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
20392
20393         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
20394         of -1.
20395
20396 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
20397
20398         * lib/chown.c (rpl_chown): Return -1 on failure.
20399
20400 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
20401
20402         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
20403         Don't check for stddef.h.
20404         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
20405         don't use its results.
20406         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
20407         since we include them unconditionally.  Don't require
20408         AM_STDBOOL_H, since stdbool is a prerequisite.
20409         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
20410         since we assume C89 or better.
20411         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
20412         as we don't use their results.
20413         Don't check for fchdir, memmove, memset, strrchr, as we use
20414         them unconditionally.
20415         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
20416         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
20417
20418 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
20419
20420         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
20421         Include <stddef.h> unconditionally, since we assume C89 now.
20422         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
20423         * lib/fts.c: Include fts_.h first, to check interface.
20424         Do not include intprops.h; no longer needed.
20425         Include cycle-check.h and hash.h, since fts_.h no longer does.
20426         Remove unnecessary casts of closedir to void.
20427         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
20428         decide whether to decrement nlinks.
20429         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
20430         (FTS): Use struct hash_table * instead of Hash_table, so that
20431         we no longer need to include hash.h here.
20432
20433 2005-05-18  Jim Meyering  <jim@meyering.net>
20434
20435         * modules/dirfd (License): Change to LGPL.  Most of the code
20436         is already in the public domain.
20437
20438 2005-05-18  Jim Meyering  <jim@meyering.net>
20439
20440         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
20441         Reported by Yoann Vandoorselaere.
20442
20443 2005-05-17  Jim Meyering  <jim@meyering.net>
20444
20445         * m4/fts.m4: New file, from coreutils.
20446
20447 2005-05-17  Jim Meyering  <jim@meyering.net>
20448
20449         * lib/fts.c, lib/fts_.h: New files, from coreutils.
20450
20451 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
20452
20453         Sync from coreutils.
20454         * m4/unlinkdir.m4: New file.
20455
20456 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
20457
20458         Sync from coreutils.
20459         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
20460         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
20461         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
20462         White space changes only.
20463         * lib/makepath.c (make_path): Port to hosts where leading "//" is
20464         special.
20465         * lib/yesno.c: Include getline.h, not ctype.h.
20466         (yesno): Don't remove leading white space; POSIX doesn't allow it.
20467         Use getline to remove arbitrary restriction on response length.
20468
20469 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
20470
20471         * config/srclist-update: Spell out "Street" in FSF postal
20472         mail address; this is the style the FSF seems to prefer.
20473
20474         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
20475         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
20476         this updates FSF postal mail address.
20477
20478         Sync from coreutils.
20479         * modules/unlinkdir: New file.
20480         * modules/yesno (Depends-on): Add getline.
20481         * MODULES.html.sh (File system functions): Add unlinkdir.
20482
20483 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
20484
20485         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
20486         lib/strsep.h:
20487         Change the initial comment to refer to GPL, not LGPL.
20488         gnulib-tool will change it to LGPL as needed.
20489
20490         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
20491         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
20492         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
20493         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
20494         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
20495         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
20496         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
20497         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
20498         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
20499         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
20500         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
20501         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
20502         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
20503         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
20504         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
20505         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
20506         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
20507         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
20508         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
20509         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
20510         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
20511         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
20512         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
20513         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
20514         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
20515         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
20516         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
20517         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
20518         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
20519         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
20520         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
20521         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
20522         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
20523         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
20524         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
20525         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
20526         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
20527         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
20528         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
20529         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
20530         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
20531         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
20532         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
20533         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
20534         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
20535         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
20536         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
20537         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
20538         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
20539         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
20540         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
20541         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
20542         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
20543         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
20544         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
20545         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
20546         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
20547         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
20548         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
20549         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
20550         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
20551         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
20552         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
20553         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
20554         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
20555         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
20556         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
20557         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
20558         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
20559         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
20560         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
20561         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
20562         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
20563         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
20564         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
20565         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
20566         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
20567         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
20568         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
20569         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
20570         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
20571         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
20572         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
20573         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
20574         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
20575         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
20576         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
20577         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
20578         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
20579         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
20580         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
20581         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
20582         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
20583         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
20584         lib/yesno.c, lib/yesno.h:
20585         Update FSF postal mail address.
20586
20587 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
20588
20589         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
20590         tests/test-memmem.c, tests/test-stpncpy.c:
20591         Update FSF postal mail address.
20592
20593 2005-05-13  Bruno Haible  <bruno@clisp.org>
20594
20595         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
20596         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
20597         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
20598         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
20599         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
20600         Add support for 64-bit integers in the MSVC compiler.
20601
20602 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
20603
20604         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
20605
20606 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
20607
20608         * gnulib-tool (func_import): Sort and uniquify recommended includes.
20609
20610 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
20611
20612         * doc/getdate.texi (General date syntax): Don't say that date
20613         date --iso-8601=ns generates acceptable dates; it doesn't yet.
20614         Problem reported by Nic Ferrier.
20615
20616 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
20617
20618         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
20619         specified in ai_socktype. Fix invalid ai_protocol
20620         check. ai_protocol is usually set to 0 or depending on
20621         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
20622         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
20623         ai_socktype / ai_protocol in the returned addrinfo structure.
20624
20625 2005-05-10  Simon Josefsson  <jas@extundo.com>
20626
20627         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
20628         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
20629
20630 2005-05-10  Karl Berry  <karl@gnu.org>
20631
20632         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
20633         (from http://www.gnu.org/licenses).
20634         * doc/COPYING.LIB: also rename to COPYING.LESSER.
20635         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
20636         fdl.texi suffices.
20637
20638 2005-05-10  Karl Berry  <karl@gnu.org>
20639
20640         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
20641         (COPYING.DOC): remove.
20642
20643         * config/srclist-update: new FSF address.
20644
20645 2005-05-10  Derek Price  <derek@ximbiot.com>
20646
20647         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
20648         possible.
20649
20650 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
20651             Bruno Haible  <bruno@clisp.org>
20652
20653         * modules/inet_ntop: New file.
20654         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
20655         inet_ntop.
20656
20657 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
20658             Bruno Haible  <bruno@clisp.org>
20659
20660         * m4/inet_ntop.m4: New file.
20661
20662 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
20663             Bruno Haible  <bruno@clisp.org>
20664
20665         * lib/inet_ntop.h: New file.
20666         * lib/inet_ntop.c: New file, from glibc with modifications.
20667
20668 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
20669
20670         * modules/time_r (License): Change to LGPL.
20671         * modules/extensions (License): Change to LGPL.  Actually,
20672         the license is more permissive than that, but currently gnulib-tool
20673         doesn't know how to handle more-permissive licenses.
20674
20675         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
20676         Problem reported by Dave Love.
20677
20678 2005-05-08  Jim Meyering  <jim@meyering.net>
20679
20680         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
20681         blank.
20682
20683 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
20684
20685         * modules/argmatch (Depends-on): Add stdbool.
20686         * modules/backupfile (Depends-on): Likewise.
20687         * modules/chdir-long (Depends-on): Likewise.
20688         * modules/closeout (Depends-on): Likewise.
20689         * modules/cycle-check (Depends-on): Likewise.
20690         * modules/dirname (Depends-on): Likewise.
20691         * modules/fnmatch (Depends-on): Likewise.
20692         * modules/fsusage (Depends-on): Likewise.
20693         * modules/fwriteerror (Depends-on): Likewise.
20694         * modules/getcwd (Depends-on): Likewise.
20695         * modules/getloadavg (Depends-on): Likewise.
20696         * modules/hard-locale (Depends-on): Likewise.
20697         * modules/makepath (Depends-on): Likewise.
20698         * modules/mountlist (Depends-on): Likewise.
20699         * modules/nanosleep (Depends-on): Likewise.
20700         * modules/posixtm (Depends-on): Likewise.
20701         * modules/quotearg (Depends-on): Likewise.
20702         * modules/readtokens (Depends-on): Likewise.
20703         * modules/readtokens0 (Depends-on): Likewise.
20704         * modules/readutmp (Depends-on): Likewise.
20705         * modules/save-cwd (Depends-on): Likewise.
20706         * modules/strftime (Depends-on): Likewise.
20707         * modules/userspec (Depends-on): Likewise.
20708         * modules/utimecmp (Depends-on): Likewise.
20709         * modules/xgetcwd (Depends-on): Likewise.
20710         * modules/xnanosleep (Depends-on): Likewise.
20711         * modules/xstrtod (Depends-on): Likewise.
20712         * modules/yesno (Depends-on): Likewise.
20713
20714 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
20715
20716         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
20717         needless checks.
20718
20719 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
20720
20721         Merge from coreutils.  Among other things,
20722         add bulletproofing for cases where stdin, stdout, or stderr are closed.
20723         * lib/fd-safer.c: New file.
20724         * lib/fcntl-safer.h, open-safer.c: Remove.
20725         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
20726         * lib/dup-safer.c: Include unistd-safer.h first.
20727         Don't include errno.h.
20728         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
20729         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
20730         * lib/file-type.c: Rely on file-type.h change.
20731         * lib/getloadavg.c: Include unistd-safer.h.
20732         (getloadavg): Use safer open.
20733         * lib/getusershell.c: Include "stdio-safer.h".
20734         (getusershell): Use safer fopen.
20735         * lib/long-options.c (long_options): Use NULL rather than 0.
20736         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
20737         'free'.
20738         * lib/modechange.c: Likewise.
20739         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
20740         (MODE_DONE): New constant.
20741         (struct mode_change): Remove 'next' member.
20742         (make_node_op_equals): New function; like the old one of the
20743         same name, except it allocates an array.
20744         (mode_compile, mode_create_from_ref): Use it.
20745         (mode_compile): Allocate result as an array, not a linked list.
20746         Parse octal string ourself, so that we catch mistakes like "+0".
20747         (mode_adjust): Arg is an array, not a linked list.
20748         * lib/modechange.c: Include stat-macros.h, xalloc.h.
20749         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
20750         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
20751         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
20752         Remove.  This is now stat-macros.h's job.
20753         (talloc): Remove.  All callers replaced by xalloc, so that
20754         our invokers don't have to worry about reporting memory failures.
20755         (make_node_op_equals): Remove.
20756         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
20757         New constants.
20758         (struct mode_change): Moved here from modechange.h.
20759         (mode_append_entry): Remove.
20760         (mode_compile): Remove MASKED_OPS arg, since it encouraged
20761         apps to have incorrect behavior.  Use simpler algorithm for head
20762         and tail.  Don't futz with umask; that's now the job of mode_adjust.
20763         Detect more invalid usages rather than having somewhat-random behavior.
20764         Don't insert an "a=" action, as that leads to incorrect behavior.
20765         (mode_compile, mode_create_from_ref): Return NULL on error instead
20766         of an enum, since now there's only one way to have an error.  All
20767         callers changed.
20768         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
20769         at the correct time.  Simplify calculation of "+u" and its ilk.
20770         Don't mishandle "+X".
20771         (mode_free): Remove "register" and localize decls.
20772         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
20773         (struct mode_change): Move to modechange.c; callers don't
20774         need to see this stuff.
20775         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
20776         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
20777         (mode_change, mode_adjust): Reflect the new signatures noted above.
20778         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
20779         that might redefine system include files.
20780         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
20781         (my_usleep): Use NULL rather than (void *) 0.
20782         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
20783         Use siginterrupt to specify that system calls should be interrupted.
20784         (rpl_nanosleep): Move initialization of suspended closer to call of
20785         my_usleep.
20786         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
20787         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
20788         (desirable_utmp_entry): New function.
20789         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
20790         using x2nrealloc, to simplify logic.
20791         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
20792         size calculation.  Do not assume utmp file is a regular file.
20793         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
20794         (READ_UTMP_CHECK_PIDS): New constant.
20795         * lib/save-cwd.c: Include unistd-safer.h.
20796         (save_cwd): Use fd_safer.
20797         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
20798         [!_LIBC] Include "stat-macros.h" instead.
20799         * lib/unistd-safer.h (fd_safer): New decl.
20800
20801 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
20802
20803         * modules/getloadavg (Depends-on): Add unistd-safer.
20804         * modules/getusershell (Depends-on): Add stdio-safer.
20805         * modules/lstat (Depends-on): Remove xalloc.
20806         * modules/mkstemp (Depends-on): Add stat-macros.
20807         * modules/modechange (Depends-on): Remove xstrtol.
20808         Add stat-macros, xalloc.
20809         * modules/save-cwd (Depends-on): Add unistd-safer.
20810         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
20811         * modules/unistd-safer (Files): Add lib/fd-safer.c
20812         (Makefile.am): Remove lib_SOURCES.
20813
20814         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
20815         Remove fcntl-safer; unistd-safer supersedes it.
20816
20817 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
20818
20819         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
20820         AC_HEADER_STAT.
20821         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
20822         (gl_PREREQ_CHOWN): Remove.
20823         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
20824         it.  Don't require AC_HEADER_STAT.
20825         (gl_PREREQ_LSTAT): Remove.
20826         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
20827         Don't require AC_HEADER_STAT.
20828         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
20829         (gl_PREREQ_RMDIR): Remove.
20830         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
20831         mention stat-macros.h or AC_HEADER_STAT, since we'll make
20832         the stat-macros module a prerequisite.
20833         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
20834         * m4/filemode.m4 (gl_FILEMODE): Likewise.
20835         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
20836         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
20837         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
20838         variable names.
20839         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
20840         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
20841         variable prefixes.
20842         * m4/fcntl-safer.m4: Remove.
20843         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
20844         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
20845         Invoke gl_PREREQ_FD_SAFER.
20846         (gl_PREREQ_FD_SAFER): New macro.
20847         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
20848         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
20849         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
20850         Remove duplicate call to AC_LIBOBJ(readutmp).
20851         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
20852
20853         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
20854         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
20855
20856 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
20857
20858         * MODULES.html.sh (Misc): Add byteswap.
20859
20860 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
20861
20862         * modules/getcwd (Depends-on): Add extensions.
20863         * modules/openat (Depends-on): Likewise.
20864
20865 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
20866
20867         * modules/byteswap: New file.
20868
20869 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
20870
20871         * m4/byteswap.m4: New file.
20872
20873 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
20874
20875         * lib/byteswap_.h: New file.
20876
20877 2005-04-25  Karl Berry  <karl@gnu.org>
20878
20879         * m4/gettext.m4: Update from GNU gettext 0.14.4.
20880
20881 2005-04-25  Albert Chin  <china@thewrittenword.com>
20882
20883         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
20884         Toolkit C bug.
20885
20886 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
20887
20888         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
20889         (func_ln_if_changed) Remove forcibly for no error message
20890         in case file does not exist.
20891
20892 2005-04-19  Simon Josefsson  <jas@extundo.com>
20893
20894         * gnulib-tool (Options): Make --symlink mean --symbolic.
20895
20896 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
20897
20898         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
20899
20900 2005-04-16  Simon Josefsson  <jas@extundo.com>
20901
20902         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
20903
20904 2005-04-15  Simon Josefsson  <jas@extundo.com>
20905
20906         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
20907
20908 2005-04-15  Simon Josefsson  <jas@extundo.com>
20909
20910         * gnulib-tool: Rename --symlink to --symbolic.
20911
20912 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
20913
20914         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
20915         symbolic links to files instead of copying/moving.  Add --aux-dir,
20916         specifying directory relative --dir where auxiliary build tools
20917         are placed.
20918
20919 2005-04-14  Bruno Haible  <bruno@clisp.org>
20920
20921         * modules/allocsa (License): Change to LGPL.
20922         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
20923
20924 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
20925
20926         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
20927         that "UTC +1 second" continues to work.  Problem reported
20928         by Dmitry V. Levin.
20929         (relunit_snumber): New rule.
20930         (relunit): Use it.
20931
20932 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
20933
20934         * lib/getdate.y (universal_time_zone_table): New constant.
20935         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
20936         universal_time_zone_table.
20937         (lookup_zone): Prefer universal_time_zone_table to
20938         local_time_zone_table, so that "GMT" time stamps are allowed in
20939         London during the summer.  Problem reported by Ian Abbott.
20940
20941 2005-04-12  Jim Meyering  <jim@meyering.net>
20942
20943         * lib/human.c (humblock): Set *options even when returning due to
20944         xstrtoumax conversion failure.  Thanks to a used-uninitialized
20945         warning from gcc-4.
20946
20947 2005-04-09  Jim Meyering  <jim@meyering.net>
20948
20949         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
20950         -Wuninitialized: initialize tm0.tm_year.
20951
20952 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
20953
20954         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
20955         count, since there's no maximum.  All uses changed.
20956         Add member dsts_seen.
20957         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
20958         not being INT_MAX.
20959         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
20960         Use pc_rels_seen to decide whther a date is absolute.
20961
20962         * lib/getdate.y (number): Don't overwrite year.
20963         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
20964         check.
20965
20966 2005-04-02  Simon Josefsson  <jas@extundo.com>
20967
20968         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
20969         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
20970
20971 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
20972
20973         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
20974         where no absolute path name can be longer than PATH_MAX.
20975
20976 2005-03-27  Jim Meyering  <jim@meyering.net>
20977
20978         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
20979
20980 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
20981
20982         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
20983         "one's complement" -> "ones' complement" in comment, as per Knuth.
20984         "value of type" -> "type or expression" in comment.
20985         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
20986
20987 2005-03-26  Jim Meyering  <jim@meyering.net>
20988
20989         Comment nits.
20990         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
20991         Correct typos: s/or/of/.
20992
20993 2005-03-26  Jim Meyering  <jim@meyering.net>
20994
20995         * modules/check-include-files: Move to ../ and rename to...
20996         * check-module: ...this.
20997
20998 2005-03-25  Jim Meyering  <jim@meyering.net>
20999
21000         * modules/xvasprintf (Files): Add xalloc.h.
21001
21002 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
21003
21004         * modules/gettext (Files): config/config.rpath ->
21005         build-aux/config.rpath
21006         * modules/iconv (Files): Likewise.
21007         Problem reported by Oskar Liljeblad.
21008
21009 2005-03-23  Jim Meyering  <jim@meyering.net>
21010
21011         * modules/check-include-files: New script to check for
21012         missing dependencies, multiple includes, etc.
21013
21014         * modules/c-strtold (Depends-on): Add xalloc.
21015         * modules/c-strtod (Depends-on): Add xalloc.
21016         * modules/hash (Depends-on): Add xalloc.
21017         (Files): Remove lib/xalloc.h.
21018
21019         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
21020         * modules/userspec (Files): Add lib/inttostr.h.
21021
21022 2005-03-23  Jim Meyering  <jim@meyering.net>
21023
21024         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
21025
21026 2005-03-22  Jim Meyering  <jim@meyering.net>
21027
21028         * modules/stat-macros: New module.
21029         * modules/canonicalize, modules/euidaccess, modules/file-type,
21030         * modules/filemode, modules/lchown, modules/makepath,
21031         * modules/rmdir, modules/stat: Depend on new stat-macros module
21032         rather than listing lib/stat-macros.h manually.
21033         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
21034
21035 2005-03-22  Jim Meyering  <jim@meyering.net>
21036
21037         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
21038
21039 2005-03-22  Bruno Haible  <bruno@clisp.org>
21040
21041         * config/srclist.txt: Replace target directory 'config' with
21042         'build-aux'.
21043         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
21044         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
21045         ../build-aux/.
21046
21047 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
21048
21049         * modules/chdir-long (Depends-on): Add mempcpy.
21050
21051         * modules/acl, modules/backupfile, modules/c-strtod,
21052         modules/c-strtold, modules/canon-host, modules/canonicalize,
21053         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
21054         modules/exclude, modules/exitfail, modules/file-type,
21055         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
21056         modules/getdate, modules/getline, modules/getpagesize,
21057         modules/getpass, modules/getugroups, modules/group-member,
21058         modules/hard-locale, modules/hash, modules/human, modules/idcache,
21059         modules/inttostr, modules/long-options, modules/makepath,
21060         modules/md5, modules/memcasecmp, modules/memcoll,
21061         modules/modechange, modules/mountlist, modules/path-concat,
21062         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
21063         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
21064         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
21065         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
21066         modules/strftime, modules/strndup, modules/strverscmp,
21067         modules/timespec, modules/unlocked-io, modules/userspec,
21068         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
21069         modules/yesno:
21070         Remove lib_SOURCES line from Makefile.am section, as this is now
21071         done automatically by the corresponding Autoconf macro.
21072
21073 2005-03-21  Jim Meyering  <jim@meyering.net>
21074
21075         Changes imported from coreutils.
21076
21077         * lib/cycle-check.c: Don't include xalloc.h.
21078
21079         * lib/path-concat.c: Don't include assert.h.
21080         (path_concat): Remove assertion that would have triggered
21081         for ABASE starting with more than one slash.
21082         Reported by Andreas Schwab.
21083
21084         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
21085         properly when ABASE is an absolute file name.
21086         Correct the description of this function.
21087         Include <assert.h>.
21088         Add an assertion and a test driver.
21089         This fixes a bug introduced on 2004-07-02.
21090         Andreas Schwab reported the resulting failure of cp --parents:
21091         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
21092
21093 2005-03-21  Jim Meyering  <jim@meyering.net>
21094
21095         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
21096         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
21097
21098 2005-03-21  Jim Meyering  <jim@meyering.net>
21099         and  Paul Eggert  <eggert@cs.ucla.edu>
21100
21101         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
21102         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
21103         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
21104         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
21105         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
21106         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
21107         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
21108         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
21109         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
21110         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
21111         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
21112         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
21113         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
21114         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
21115         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
21116         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
21117         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
21118         for these modules.
21119
21120 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
21121
21122         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
21123         (which shouldn't happen), generate nothing instead of returning 0
21124         immediately, so that nstrftime (NULL, ...) doesn't return 0.
21125
21126 2005-03-16  Bruno Haible  <bruno@clisp.org>
21127
21128         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
21129         HAVE_LONGLONG_64BIT.
21130
21131 2005-03-16  Bruno Haible  <bruno@clisp.org>
21132
21133         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
21134         HAVE_LONGLONG_64BIT.
21135
21136 2005-03-16  Bruno Haible  <bruno@clisp.org>
21137
21138         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
21139         HAVE_LONGLONG_64BIT.
21140
21141 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
21142
21143         * lib/strftime.c (my_strftime): Prepend space to format so that we can
21144         reliably distinguish strftime failure from empty output on POSIX
21145         hosts.
21146
21147 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
21148
21149         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
21150         (iconv_string): Don't guess a size-zero buffer, as that might cause
21151         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
21152         result would be 'too large', where 'too large' is (heuristically)
21153         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
21154         overflow concerns.  This will prevent some unwanted malloc failures
21155         when the inputs are very large.
21156
21157 2005-03-15  Karl Berry  <karl@gnu.org>
21158
21159         * config/srclist.txt (config.rpath): from gettext.
21160         * config/config.rpath: update.
21161
21162 2005-03-15  Bruno Haible  <bruno@clisp.org>
21163
21164         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
21165         to 'negate'.
21166
21167         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
21168         variable.
21169
21170         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
21171         results.
21172
21173 2005-03-14  Simon Josefsson  <jas@extundo.com>
21174
21175         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
21176         <fx@gnu.org>.
21177
21178 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
21179
21180         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
21181         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
21182         intprops.h.
21183         * lib/strtol.c: Likewise.
21184
21185 2005-03-14  Jim Meyering  <jim@meyering.net>
21186
21187         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
21188         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
21189         to be nonzero so that we (and caller) can detect the difference
21190         between a valid zero-length expansion and an error return, even
21191         when the underlying strftime fails before writing anything into
21192         that location.
21193
21194 2005-03-14  Bruno Haible  <bruno@clisp.org>
21195
21196         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
21197         Update from GNU gettext 0.14.3.
21198
21199 2005-03-10  Jim Meyering  <jim@meyering.net>
21200
21201         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
21202
21203 2005-03-10  Jim Meyering  <jim@meyering.net>
21204
21205         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
21206         so that this module works on systems without fchdir.
21207
21208 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
21209
21210         Factor int-properties macros into a single file, except for
21211         glibc-related files.
21212         * lib/intprops.h: New file.
21213         * lib/getloadavg.c: Include it instead of limits.h.
21214         (INT_STRLEN_BOUND): Remove.
21215         * lib/human.c: Include intprops.h.
21216         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
21217         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
21218         302/1000.
21219         * lib/inttostr.h: Include intprops.h instead of limits.h.
21220         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
21221         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
21222         for consistency with intprops.h.
21223         (time_t_is_integer, twos_complement_arithmetic): Use them.
21224         * lib/sig2str.h: Include <signal.h>, intprops.h.
21225         (INT_STRLEN_BOUND): Remove.
21226         * lib/strftime.c (TYPE_SIGNED): Remove.
21227         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
21228         * lib/strtol.c: Adjust comments to match intprops.h.
21229         * lib/userspec.c: Include intprops.h.
21230         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
21231         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
21232         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
21233         instead of rolling our own expressions.
21234         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
21235
21236         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
21237         instead of int.
21238         (my_strftime): Do not mishandle years close to INT_MAX, by doing
21239         the right thing even if adding 1900 would overflow.  Similarly
21240         for tm_mon + 1 and tm_yday + 1.
21241         Make %Y always equivalent to %C%y, and similarly for %G and %g.
21242         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
21243         (DO_SIGNED_NUMBER): New macro.
21244         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
21245
21246 2005-03-07  Bruno Haible  <bruno@clisp.org>
21247
21248         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
21249
21250 2005-03-07  Bruno Haible  <bruno@clisp.org>
21251
21252         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
21253
21254 2005-03-04  Derek R. Price  <derek@ximbiot.com>
21255
21256         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
21257         (func_import): Only replace files via --import when they have actually
21258         changed.
21259
21260 2005-03-03  Derek R. Price  <derek@ximbiot.com>
21261
21262         * m4/mmap-anon.m4: New file.
21263         * m4/pagealign_alloc.m4: New file.
21264
21265 2005-03-03  Derek R. Price  <derek@ximbiot.com>
21266             Bruno Haible  <bruno@clisp.org>
21267
21268         * modules/pagealign_alloc: New file.
21269         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
21270
21271 2005-03-03  Derek R. Price  <derek@ximbiot.com>
21272             Bruno Haible  <bruno@clisp.org>
21273
21274         * lib/pagealign_alloc.h: New file.
21275         * lib/pagealign_alloc.c: New file.
21276
21277 2005-03-03  Bruno Haible  <bruno@clisp.org>
21278
21279         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
21280         Use an all-permissive copyright notice, recommended by RMS.
21281
21282 2005-03-02  Bruno Haible  <bruno@clisp.org>
21283
21284         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
21285         of AIX, the replacement has to be done only after <string.h> is
21286         included, therefore not in config.h. stpncpy.h does the replacement,
21287         and stpncpy.c uses it.
21288
21289 2005-03-02  Bruno Haible  <bruno@clisp.org>
21290
21291         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
21292         stpncpy.c uses it.
21293
21294 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
21295
21296         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
21297         The workaround isn't strictly needed for POSIX conformance, and
21298         it's too much of a pain to configure and maintain.  We'll ask
21299         people to fix their kernels instead.
21300         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
21301         (NANOSLEEP_BUG_WORKAROUND): Remove.
21302         (xnanosleep): Remove the workaround.
21303
21304 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
21305
21306         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
21307         Reported by Derek Price.
21308         (Include): Add "timespec.h".
21309
21310         * modules/xnanosleep (Depends-on): Remove gethrxtime.
21311
21312 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
21313
21314         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
21315         to detect nanosleep bug.
21316
21317 2005-03-01  Bruno Haible  <bruno@clisp.org>
21318
21319         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
21320
21321 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
21322
21323         * modules/gethrxtime: New file.
21324         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
21325         (Depends-on): Add gethrxtime.
21326         (configure.ac): Add gl_XNANOSLEEP.
21327         (Makefile.am): Remove lib_SOURCES line.
21328
21329 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
21330
21331         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
21332         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
21333
21334 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
21335
21336         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
21337         * lib/timespec.h (gettime): Return void, since it always
21338         succeeds now.  All uses changed.
21339         * lib/gettime.c (gettime) Likewise.
21340         [HAVE_NANOTIME]: Prefer nanotime.
21341         Assume gettimeofday succeeds, as POSIX requires.
21342         Assime time () succeeds, since other code already does.
21343         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
21344         (timespec_subtract): Remove.
21345         (NANOSLEEP_BUG_WORKAROUND): New constant.
21346         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
21347         things considerably.  Use it only on GNU/Linux hosts, since the
21348         workaround shouldn't be needed elsewhere.
21349
21350 2005-02-24  Bruno Haible  <bruno@clisp.org>
21351
21352         * modules/gettext (Files): Add m4/glibc2.m4.
21353
21354 2005-02-24  Bruno Haible  <bruno@clisp.org>
21355
21356         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
21357         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
21358         * m4/progtest.m4:
21359         Update from GNU gettext 0.14.2.
21360         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
21361
21362 2005-02-24  Bruno Haible  <bruno@clisp.org>
21363
21364         * lib/localcharset.c: Update from GNU gettext 0.14.2.
21365         * lib/config.charset: Update from GNU gettext 0.14.2.
21366
21367 2005-02-24  Bruno Haible  <bruno@clisp.org>
21368
21369         * lib/gettext.h: Update from GNU gettext 0.14.2.
21370
21371 2005-02-23  Simon Josefsson  <jas@extundo.com>
21372
21373         * m4/iconvme.m4: New file.
21374
21375 2005-02-23  Jim Meyering  <jim@meyering.net>
21376
21377         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
21378         change.
21379         Thanks to Bruno Haible for catching it.
21380
21381 2005-02-22  Simon Josefsson  <jas@extundo.com>
21382
21383         * modules/iconvme: New file.
21384
21385         * MODULES.html.sh: Add iconvme.
21386
21387 2005-02-22  Simon Josefsson  <jas@extundo.com>
21388
21389         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
21390
21391 2005-02-22  Simon Josefsson  <jas@extundo.com>
21392
21393         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
21394
21395 2005-02-22  Jim Meyering  <jim@meyering.net>
21396
21397         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
21398         s/ifndef/ifdef/.
21399
21400 2005-02-20  Neil Conway  <neilc@samurai.com>
21401
21402         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
21403         returned by OSX/Darwin if the specified buffer is not large
21404         enough for the hostname.
21405
21406 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21407
21408         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
21409         pass it to _help, otherwise the latter coredumps trying to
21410         dereference state.root_argp.
21411
21412 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
21413
21414         * modules/chdir-long (Depends-on): Add memrchr.
21415         * modules/memrchr (Files): Add lib/memrchr.h.
21416         (Include): "memrchr.h".
21417
21418 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
21419
21420         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
21421
21422 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
21423
21424         * lib/memrchr.h: New file.
21425         * lib/chdir-long.c: Include it.
21426         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
21427         Don't bother including stddef.h.
21428
21429 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
21430
21431         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
21432         inclusion.
21433         Include <sys/types.h>, for dev_t.
21434         (ME_DUMMY, ME_REMOTE): Move from here....
21435         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
21436         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
21437         Dmitry V. Levin.
21438         Include mountlist.h first, to test the interface.
21439
21440 2005-01-29  Bruno Haible  <bruno@clisp.org>
21441
21442         * lib/progname.c (program_name): Initialize.
21443         Needed when linking statically on MacOS X.
21444
21445 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
21446
21447         Sync from coreutils.
21448         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
21449         (Depends-on): Add c-strtod.
21450         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
21451
21452 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
21453
21454         Sync from coreutils.
21455         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
21456
21457         Remove files that are specific to coreutils.
21458         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
21459
21460 2005-01-28  Bruno Haible  <bruno@clisp.org>
21461
21462         * modules/javacomp: New file.
21463         * MODULES.html.sh (Java): Add javacomp.
21464
21465 2005-01-28  Bruno Haible  <bruno@clisp.org>
21466
21467         * m4/javacomp.m4: New file, from GNU gettext.
21468
21469 2005-01-28  Bruno Haible  <bruno@clisp.org>
21470
21471         * lib/javacomp.sh.in: New file, from GNU gettext.
21472         * lib/javacomp.h: New file, from GNU gettext.
21473         * lib/javacomp.c: New file, from GNU gettext.
21474
21475 2005-01-26  Simon Josefsson  <jas@extundo.com>
21476
21477         * lib/gai_strerror.c: Use GPL in header.
21478
21479 2005-01-26  Bruno Haible  <bruno@clisp.org>
21480
21481         * modules/javaexec: New file.
21482         * MODULES.html.sh (Java): Add javaexec.
21483
21484 2005-01-26  Bruno Haible  <bruno@clisp.org>
21485
21486         * m4/javaexec.m4: New file, from GNU gettext.
21487
21488 2005-01-26  Bruno Haible  <bruno@clisp.org>
21489
21490         * lib/javaexec.sh.in: New file, from GNU gettext.
21491         * lib/javaexec.h: New file, from GNU gettext.
21492         * lib/javaexec.c: New file, from GNU gettext.
21493
21494 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21495
21496         * modules/lchown (Depends-on): Remove lchown.h
21497
21498 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21499
21500         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
21501         must be defined if the header file was not found, in order
21502         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
21503
21504 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21505
21506         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
21507         initializers for struct pentry_state.
21508         (__argp_error): Check return value of __asprintf
21509         (__argp_failure): Translate error message
21510
21511         * lib/argp-parse.c: Removed braces around the expansion of N_()
21512
21513 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
21514
21515         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
21516         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
21517         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
21518         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
21519         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
21520         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
21521         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
21522         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
21523         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
21524         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
21525         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
21526         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
21527         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
21528         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
21529         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
21530         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
21531         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
21532         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
21533         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
21534         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
21535         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
21536         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
21537         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
21538         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
21539         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
21540         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
21541         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
21542         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
21543         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
21544         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
21545         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
21546         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
21547         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
21548         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
21549         xstrtol.m4, xstrtoumax.m4, yesno.m4:
21550         Use an all-permissive copyright notice, recommended by RMS.
21551
21552 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
21553
21554         * modules/chdir-long (Depends-on): Remove mempcpy.
21555
21556 2005-01-21  Jim Meyering  <jim@meyering.net>
21557
21558         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
21559         same value as for Solaris 9.
21560
21561         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
21562         component length.  This included changing the parameter to be
21563         of type `char *' rather than `char const *'.
21564         * lib/chdir-long.h (chdir_long): Update prototype.
21565
21566         * lib/openat.c (fdopendir, fstatat): New functions.
21567         * lib/openat.h: Include headers required for use of DIR and struct
21568         stat.
21569         [AT_SYMLINK_NOFOLLOW]: Define.
21570         (fdopendir, fstatat): Add prototypes.
21571
21572 2005-01-21  Bruno Haible  <bruno@clisp.org>
21573
21574         * modules/classpath: New file.
21575         * MODULES.html.sh (Java): Add classpath.
21576
21577 2005-01-21  Bruno Haible  <bruno@clisp.org>
21578
21579         * lib/classpath.h: New file, from GNU gettext.
21580         * lib/classpath.c: New file, from GNU gettext.
21581
21582 2005-01-20  Simon Josefsson  <jas@extundo.com>
21583
21584         * modules/version-etc-fsf: New file.
21585
21586 2005-01-20  Simon Josefsson  <jas@extundo.com>
21587
21588         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
21589         * lib/version-etc.c: Remove version_etc_copyright.
21590         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
21591         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
21592
21593 2005-01-20  Simon Josefsson  <jas@extundo.com>
21594
21595         * lib/base64.h (isbase64): Add.
21596
21597         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
21598         using a unsigned prototype, don't inline.
21599         (base64_decode): Use it.
21600
21601 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
21602
21603         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
21604         it.
21605
21606 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
21607
21608         * lib/save-cwd.c (save_cwd): Remove code to support the case
21609         where fchdir is missing or flaky.
21610
21611 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
21612
21613         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
21614
21615 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
21616
21617         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
21618         AC_LIBSOURCES now does this.
21619         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
21620         with new ullong_max module.
21621
21622 2005-01-19  Bruno Haible  <bruno@clisp.org>
21623
21624         * modules/sh-quote: New file.
21625         * MODULES.html.sh (Executing programs): Add sh-quote.
21626
21627 2005-01-19  Bruno Haible  <bruno@clisp.org>
21628
21629         * lib/sh-quote.h: New file, from GNU gettext.
21630         * lib/sh-quote.c: New file, from GNU gettext.
21631
21632 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
21633
21634         Merge from coreutils.
21635         * m4/ullong_max.m4: New file.
21636         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
21637         (gl_MACROS): Assume localeconv exists.
21638
21639 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
21640
21641         Merge changes from coreutils, as described below in several
21642         changelogs dated today.
21643
21644         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
21645         (O_DIRECTORY): Remove; not needed here, since "." must be
21646         a directory.  All uses removed.
21647         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
21648         universal on Suns, and we also need to test for IRIX.
21649         Revamp code to use 'if' rather than '#if'.
21650         Avoid unnecessary comparison of cwd->desc to 0.
21651
21652         * lib/utimens.c (futimens): Robustify the previous patch, by checking
21653         for known valid error numbers rather than observed invalid ones.
21654
21655 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
21656
21657         * modules/ullong_max: New file.
21658
21659         * modules/chdir-long, modules/openat: New files.
21660         * modules/save-cwd (Depends-on): Depend on chdir-long.
21661         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
21662
21663 2005-01-18  Jim Meyering  <jim@meyering.net>
21664
21665         Merge from coreutils.
21666         * m4/chdir-long.m4, m4/openat.m4: New files.
21667         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
21668         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
21669         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
21670         is sane and DOES follow symlinks.  Besides, testing 20 different
21671         systems found no broken chown implementations.
21672         Prompted by a change in rsync's copy of this macro.
21673         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
21674
21675         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
21676
21677         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
21678         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
21679         NULL-means-set-to-current-time semantics.
21680         Remove temporary file immediately, rather than waiting
21681         for configure's at-exit trap code to do it.
21682
21683 2005-01-18  Jim Meyering  <jim@meyering.net>
21684
21685         * lib/version-etc.c (version_etc_copyright): Update copyright date.
21686
21687         * lib/utimens.c (futimens): Account for the fact that futimes
21688         can also fail with errno == ENOSYS or errno == ENOENT.
21689         Patch from Dmitry V. Levin.
21690
21691         Change the name of the robust chdir function from chdir to chdir_long.
21692         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
21693         (restore_cwd): Use chdir_long, not chdir.
21694         * lib/chdir-long.c: Renamed from chdir.c.
21695         * lib/chdir-long.h: Renamed from chdir.h.
21696         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
21697         Hurd.
21698
21699 2005-01-18  Bruno Haible  <bruno@clisp.org>
21700
21701         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
21702         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
21703         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
21704         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
21705         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
21706         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
21707         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
21708         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
21709         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
21710         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
21711         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
21712         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
21713         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
21714         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
21715         Use an all-permissive copyright notice, recommended by RMS.
21716
21717 2005-01-18  Bob Proulx  <bob@proulx.com>
21718
21719         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
21720         simplify offsetof() macro construct to avoid compile failure with
21721         native HP-UX 11.0 ANSI C compiler.
21722
21723 2005-01-17  Bruno Haible  <bruno@clisp.org>
21724
21725         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
21726         redundant because stpncpy.m4 takes care of it.
21727
21728 2005-01-17  Bruno Haible  <bruno@clisp.org>
21729
21730         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
21731
21732 2005-01-17  Bruno Haible  <bruno@clisp.org>
21733
21734         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
21735         used.
21736
21737 2005-01-17  Bruno Haible  <bruno@clisp.org>
21738
21739         * lib/fwriteerror.h (fwriteerror): Change specification to include
21740         fclose.
21741         * lib/fwriteerror.c: Include <stdbool.h>.
21742         (fwriteerror): At the end, close the file stream. Record whether
21743         stdout was already closed.
21744
21745 2005-01-17  Bruno Haible  <bruno@clisp.org>
21746
21747         * lib/execute.c (environ): Declare if needed.
21748         * lib/pipe.c (environ): Likewise.
21749         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
21750
21751 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21752
21753         * modules/argp: Depend on vsnprintf
21754
21755 2005-01-10  Jim Meyering  <jim@meyering.net>
21756
21757         * modules/closeout (Depends-on): Add atexit.
21758
21759 2005-01-06  Bruno Haible  <bruno@clisp.org>
21760
21761         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
21762
21763 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
21764
21765         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
21766         definitions to be after all include files, to avoid collisions.
21767         Problem reported by Bob Proulx.
21768
21769 2005-01-04  Jim Meyering  <jim@meyering.net>
21770
21771         Changes imported from coreutils.
21772         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
21773         as the mkstemp template, use a temporary directory and an
21774         8.3-friendly template to avoid trouble on systems like DJGPP.
21775         Reported by Juan M. Guerrero via Stepan Kasal.
21776         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
21777         close. Remove the temporary directory right away, rather than waiting
21778         for configure's at-exit trap code to do it.
21779         Suggestion from Stepan Kasal.
21780
21781 2005-01-01  Simon Josefsson  <jas@extundo.com>
21782
21783         * gnulib-tool: Print #include directives when --import'ing.
21784
21785 2004-12-28  Simon Josefsson  <jas@extundo.com>
21786
21787         * tests/test-base64.c: Include required header files.  Remove
21788         unused variables.
21789
21790 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
21791
21792         * modules/error (Depends-on): Remove gettext.
21793
21794 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
21795
21796         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
21797         not needed.  This removes a dependency on the gettext module.
21798         [defined _LIBC]: Do not include <libintl.h>; not needed.
21799
21800 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
21801
21802         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
21803         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
21804
21805 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
21806
21807         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
21808         HAVE_DECL_STRTOLD.
21809
21810 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
21811
21812         * modules/getdate (Depends-on): Remove alloca-opt.
21813
21814 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
21815
21816         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
21817
21818 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
21819
21820         * lib/argp-parse.c: Include <stddef.h>.
21821         (alignof, alignto): New macros.
21822         (parser_init): Don't assume that void * is aligned sufficiently
21823         for struct option.
21824
21825         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
21826         need to extend the stack.
21827         (YYINITDEPTH): New macro, so that the initial stack isn't overly
21828         large.
21829
21830 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
21831
21832         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
21833
21834 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
21835
21836         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
21837         (2004-10-24) change.  Apparently this was a false alarm.
21838
21839         * modules/getdate: Depend on alloca-opt, not alloca.
21840
21841 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
21842
21843         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
21844         Remove now-obsolete comment about AIX.
21845         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
21846         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
21847         (YYMAXDEPTH): New macro.
21848
21849 2004-12-18  Simon Josefsson  <jas@extundo.com>
21850
21851         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
21852
21853 2004-12-18  Bruno Haible  <bruno@clisp.org>
21854
21855         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
21856
21857 2004-12-18  Bruno Haible  <bruno@clisp.org>
21858
21859         * lib/fatal-signal.c (fatal_signals): Make non-const.
21860         (init_fatal_signals): New function.
21861         (uninstall_handlers, install_handlers): Ignore signals that were set to
21862         SIG_IGN.
21863         (at_fatal_signal): Call init_fatal_signals.
21864         (init_fatal_signal_set): Likewise. Ignore signals that were set to
21865         SIG_IGN.
21866         Reported by Paul Eggert.
21867
21868 2004-12-18  Bruno Haible  <bruno@clisp.org>
21869
21870         * doc/alloca.texi: New file.
21871         * doc/alloca-opt.texi: New file.
21872
21873 2004-12-17  Jim Meyering  <jim@meyering.net>
21874
21875         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
21876         Otherwise, install-sh could exit with improper exit status when
21877         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
21878
21879 2004-12-16  Simon Josefsson  <jas@extundo.com>
21880
21881         * tests/test-base64.c: Add license.
21882
21883 2004-12-15  Stepan Kasal  <address@hidden>
21884
21885         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
21886
21887 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
21888
21889         * modules/getcwd (Files): Add m4/d-ino.m4.
21890         Suggested by Mark D. Baushke.
21891
21892 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
21893
21894         * lib/getdate.y (textint): New member "negative".
21895         (time_zone_hhmm): New function.
21896         Expect 14 shift-reduce conflicts, not 13.
21897         (o_colon_minutes): New rule.
21898         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
21899         (yylex): Set the "negative" member of signed numbers.
21900
21901 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
21902
21903         * doc/getdate.texi (Time of day items, Time zone items):
21904         Describe new formats +00:00, UTC+00:00.
21905
21906 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
21907
21908         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
21909         spurious "-l"s.  Problem reported by Stepan Kasal.
21910
21911 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
21912
21913         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
21914         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
21915
21916 2004-12-04  Simon Josefsson  <jas@extundo.com>
21917
21918         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
21919         Vandoorselaere <yoann@prelude-ids.org>.
21920
21921 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
21922
21923         Changes imported from coreutils.
21924         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
21925         exist.
21926         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
21927
21928 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
21929
21930         Changes imported from coreutils.
21931         * lib/hard-locale.c: Assume <locale.h> exists.
21932         Include "strdup.h".
21933         (GLIBC_VERSION): New macro.
21934         (hard_locale): Assume setlocale exists.
21935         Rewrite to avoid #ifdef.
21936         Use strdup rather than malloc + strcpy.
21937         * lib/human.c: Assume <locale.h> exists.
21938         (human_readable): Assume localeconv exists.
21939
21940 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
21941
21942         * modules/hard-locale (Depends-on): Add strdup.
21943
21944 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
21945
21946         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
21947         convert T2, not T.  (Imported from libc.)
21948
21949 2004-11-30  Simon Josefsson  <jas@extundo.com>
21950
21951         * modules/restrict (License): Change to LGPL.
21952
21953 2004-11-30  Simon Josefsson  <jas@extundo.com>
21954
21955         * m4/restrict.m4: Add copyright and copying conditions.
21956
21957 2004-11-30  Simon Josefsson  <jas@extundo.com>
21958
21959         * m4/base64.m4: New file.
21960
21961 2004-11-30  Simon Josefsson  <jas@extundo.com>
21962
21963         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
21964         base64.
21965
21966         * tests/test-base64.c: New file.
21967
21968         * modules/base64: New file.
21969
21970 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
21971
21972         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
21973         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
21974
21975         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
21976
21977 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
21978
21979         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
21980         (__getcwd.c): Don't restore errno; glibc doesn't.
21981         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
21982         first, falling back to our code only if its results look suspicious.
21983         Ensure that the resulting buffer is only as large as necessary.
21984
21985         * lib/readutmp.c: Include readutmp.h first.
21986         Include <errno.h>, since readutmp.h no longer does that.
21987         * lib/readutmp.h: Don't include <errno.h>,
21988         <sys/param.h>, <time.h>; not needed to establish interface.
21989         (errno): Remove decl.
21990         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
21991         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
21992         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
21993
21994 2004-11-28  Simon Josefsson  <jas@extundo.com>
21995
21996         * lib/base64.h, base64.c: New file.
21997
21998 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
21999
22000         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
22001
22002 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
22003
22004         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
22005         (Depends-on): Remove pathmax, same.  Add mempcpy.
22006         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
22007         (Makefile.am): Append getcwd.h to lib_SOURCES.
22008         (Include): Add getcwd.h.
22009         (Maintainer): Change from Jim Meyering to "all, glibc",
22010         since getdate now uses intended-for-glibc code.
22011         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
22012         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
22013
22014 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
22015
22016         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
22017         HP's ANSI C compiler.
22018         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
22019         Declaring int functions causes warnings on some modern systems and
22020         shouldn't be needed to compile on ancient ones.
22021         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
22022         defined.
22023
22024         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
22025         with the following changes.
22026         (__set_errno): Parenthesize properly.
22027         Include <stdbool.h>.
22028         (MIN, MAX, MATCHING_INO): New macros.
22029         (__getcwd): Define with prototype, not K&R form.
22030         Use heuristics to allocate default buffer on stack if possible.
22031         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
22032         behavior, and to avoid the PATH_MAX limit when computing
22033         ../../../../...
22034         Use MATCHING_INO to compare inode number to file.
22035         Check for arithmetic overflow in size calculations.
22036         Fix bug in reallocation of dot array that caused getcwd to fail
22037         on directories nested deeper than 75.
22038         Be more careful about saving errno on error.
22039         Do not use realloc; use only free+malloc, as this is a bit
22040         more flexible and avoids a needless copy operation.
22041         Do not inspect st_dev and st_ino for symbolic links; POSIX
22042         doesn't specify the latter.
22043         Check for closedir errors.
22044         Avoid needless casts.
22045         Use "#ifdef weak_alias" around weak_alias, to be like other
22046         glibc code.
22047         The following changes to getcwd.c have effect only when used in
22048         gnulib; they have no effect inside glibc proper.
22049         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
22050         as alloca isn't used.
22051         (alloca, __alloca): Likewise.
22052         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
22053         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
22054         unconditionally, as gnulib assumes C89 or better.
22055         Do not include <sys/param.h>.
22056         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
22057         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
22058         better.
22059         (NULL) [!defined NULL]: Remove; we assume C89 or better.
22060         Include <dirent.h> in a way that is compatible with modern Autoconf.
22061         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
22062         New macros, if not already defined.
22063         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
22064         Use "_LIBC", not "defined _LIBC", for consistency.
22065         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
22066         a mempcpy module.
22067         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
22068         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
22069         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
22070         credit only to Jim Meyering and adjust the copyright dates.
22071         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
22072         <stdlib.h>, <unistd.h>, "pathmax.h".
22073         Instead, include "xgetcwd.h" (first) and "getcwd.h".
22074         (INITIAL_BUFFER_SIZE): Remove.
22075         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
22076
22077 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
22078
22079         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
22080         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
22081         Use the _ONCE methods, for efficiency.
22082         Check for fcntl.h.  In test program, include <errno.h>
22083         and <fcntl.h> if available.  Remove old K&R cruft from
22084         test program.  Check for common errors in GNU/Linux,
22085         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
22086         don't do AC_LIBOBJ, as that's getcwd.m4's job.
22087         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
22088         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
22089         name accordingly.
22090         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
22091         accommodate new getcwd.c.
22092         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
22093         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
22094         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
22095         that's all we need now.
22096
22097 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
22098
22099         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
22100         argp-parse.c depends on getopt internals, that means we should
22101         always use our getopt, to be on the safe side.
22102         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
22103         order not to spoil the result of an eventual previous invocation
22104         of gl_GETOPT_SUBSTITUTE.
22105
22106 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
22107
22108         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
22109         redefinition warnings. To avoid them, include the defines
22110         in `#if !defined __need_getopt ... #endif'. The only place
22111         where __getopt_argv_const is used is in definitions
22112         of getopt_long and getopt_long_only below, which are as well
22113         protected by `#ifndef __need_getopt'.
22114         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
22115         __need_getopt after including <stdio.h> and <unistd.h> These
22116         headers might have defined it.
22117
22118 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
22119
22120         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
22121
22122 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
22123
22124         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
22125         (futimens): New function, which uses futimes if available.
22126         (futimens, utimens): Support timespec==NULL, with same semantics
22127         as utime and utimens.
22128         * lib/utimens.h (futimens): New decl.
22129
22130 2004-11-23  Jim Meyering  <jim@meyering.net>
22131
22132         * lib/getopt_.h: Remove trailing blanks.
22133
22134 2004-11-23  Jim Meyering  <jim@meyering.net>
22135
22136         * lib/__fpending.c: Add comment.
22137
22138 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
22139
22140         * modules/canonicalize (Depends-on): Add xreadlink.
22141         Problem reported by James Youngman.
22142
22143 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
22144
22145         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
22146         New macros.
22147         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
22148         optopt): Use them instead of invoking ## directly; otherwise, the
22149         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
22150
22151 2004-11-19  Bruno Haible  <bruno@clisp.org>
22152
22153         * lib/strtok_r.c: Move comments from here...
22154         * lib/strtok_r.h: ... to here.
22155
22156 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
22157
22158         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
22159         implementations that mishandle size_t overflow.
22160
22161 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
22162
22163         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
22164         might fail.  Problem reported by Yoann Vandoorselaere.
22165         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
22166         implementations that mishandle size_t overflow.
22167
22168 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
22169
22170         * modules/canon-host (Depends-on): Add strdup.
22171
22172 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
22173
22174         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
22175
22176 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
22177
22178         * lib/canon-host.c: Include "strdup.h".
22179         (canon_host): Use getaddrinfo if available, so that IPv6 works.
22180         Use strdup instead of malloc/strcpy to duplicate strings.
22181
22182         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
22183         (human_space_before_unit): New constant.
22184         * lib/human.c (human_readable): Support it.
22185
22186         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
22187         (xgetcwd): Set errno correctly when failing.
22188         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
22189         the failure is actually due to a PATH_MAX problem.
22190
22191         Further getopt changes to make it more likely that glibc will
22192         buy the changes back.
22193         * lib/getopt.c (POSIXLY_CORRECT): New constant.
22194         (getopt): Use it, so to preserve glibc semantic
22195         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
22196         when compiling for libc.
22197         * lib/getopt_.h (__getopt_argv_const): Bring it back.
22198         (getopt_long, getopt_long_only): Use it.
22199
22200         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
22201         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
22202         (getopt): Argv is now char * const *, as per standard.
22203         (_getopt_internal_r, _getopt_internal): Argv is now char **,
22204         not char *__getopt_argv_const *.
22205         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
22206         _getopt_long_only_r): Likewise.
22207         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
22208         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
22209         _getopt_long_r, _getopt_long_only_r): Likewise.
22210         * lib/getopt_.h (__getopt_argv_const): Remove.
22211         (getopt): Argv is now char * const *, as per standard.
22212
22213         * lib/getdate.y (tORDINAL): New token.
22214         (day, relunit): Allow it for relative times.
22215         (relative_time_table): Use tORDINAL for ordinals.
22216
22217 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
22218
22219         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
22220         Document that "second" isn't allowed as an ordinal number.
22221
22222 2004-11-16  Jim Meyering  <jim@meyering.net>
22223
22224         * modules/closeout (Depends-on): Add fpending.
22225
22226 2004-11-15  Jim Meyering  <jim@meyering.net>
22227
22228         * lib/closeout.c: Include "__fpending.h" once again.
22229         Include <stdbool.h>.
22230         (close_stdout): Don't fail just because stdout was closed initially,
22231         since some programs don't write to stdout in the normal course of
22232         operation (other than --version and --help), and we don't want this
22233         function to make e.g. `touch file >&-' fail.
22234         But do fail if it was closed and someone has tried to write to it.
22235         E.g., `printf foo >&-' must fail.
22236
22237 2004-11-13  Jim Meyering  <jim@meyering.net>
22238
22239         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
22240
22241 2004-11-12  Simon Josefsson  <jas@extundo.com>
22242
22243         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
22244         small doc fix is still pending.
22245
22246 2004-11-11  Simon Josefsson  <jas@extundo.com>
22247
22248         * modules/strtok_r: New file.
22249
22250         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
22251         strtok_r.
22252
22253 2004-11-11  Simon Josefsson  <jas@extundo.com>
22254
22255         * m4/strtok_r.m4: New file.
22256
22257         * m4/getopt.m4: Replace opterr.
22258
22259 2004-11-11  Simon Josefsson  <jas@extundo.com>
22260
22261         * lib/strtok_r.h, strtok_r.c: New file.
22262
22263 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
22264
22265         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
22266         of replacing opterr, getopt, etc.  This should handle the
22267         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
22268
22269 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
22270
22271         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
22272         we can stop lying to compilers about the constness of argv when we
22273         are compiled outside glibc.
22274         (getopt, getopt_long, getopt_long_only): Use it.
22275         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
22276         _getopt_internal, getopt): Likewise.
22277         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
22278         _getopt_long_only_r): Likewise.
22279         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
22280         _getopt_long_r, _getopt_long_only_r): Likewise.
22281
22282         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
22283         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
22284         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
22285         the other external symbols.
22286         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
22287         declaration, since the above renaming now works around collisions.
22288
22289 2004-11-11  Jim Meyering  <jim@meyering.net>
22290
22291         * lib/linebreak.c: Remove trailing blanks.
22292         * lib/alloca_.h: Likewise.
22293         * lib/acosl.c: Likewise.
22294         * lib/euidaccess.c: Likewise.
22295         * lib/allocsa.h: Likewise.
22296
22297 2004-11-10  Simon Josefsson  <jas@extundo.com>
22298
22299         * m4/getaddrinfo.m4: New file.
22300
22301 2004-11-10  Simon Josefsson  <jas@extundo.com>
22302
22303         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
22304
22305 2004-11-10  Simon Josefsson  <jas@extundo.com>
22306
22307         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
22308         getaddrinfo.
22309
22310         * modules/getaddrinfo: New file.
22311
22312 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
22313
22314         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
22315
22316 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
22317
22318         * lib/mktime.c (SHR): New macro, which is a portable
22319         substitute for >> that should work even on Crays.
22320         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
22321         Problem reported by Mark D. Baushke in
22322         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
22323         * lib/getdate.y (SHR): Likewise.
22324         (tm_diff): Use it.
22325         * lib/strftime.c (SHR): Likewise.
22326         (tm_diff): Use it.
22327         * lib/quotearg.c (struct quoting_options): Use unsigned int for
22328         quote_these_too, so that right shifts are well defined.  All uses
22329         changed.
22330
22331 2004-11-10  Jim Meyering  <jim@meyering.net>
22332
22333         Ensure that no close failure goes unreported.
22334         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
22335         return early when it seems there's nothing to flush.
22336         Don't include __fpending.h.
22337
22338 2004-11-10  Jim Meyering  <jim@meyering.net>
22339
22340         * modules/closeout (Depends-on): Remove fpending.
22341
22342 2004-11-10  Jim Meyering  <jim@meyering.net>
22343
22344         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
22345
22346 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
22347
22348         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
22349         gl_FUNC_STRFTIME.
22350         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
22351         and AC_REQUIRE when possible, to avoid duplicate checks.
22352         Check for <wchar.h>.
22353
22354 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
22355
22356         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
22357
22358 2004-11-09  Bruno Haible  <bruno@clisp.org>
22359
22360         * m4/sockpfaf.m4: New file.
22361
22362 2004-11-05  Bruno Haible  <bruno@clisp.org>
22363
22364         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
22365         Reported by Mark D. Baushke <mdb@cvshome.org>.
22366
22367 2004-11-04  Bruno Haible  <bruno@clisp.org>
22368
22369         2004-09-11  Bruno Haible  <bruno@clisp.org>
22370                 * allocsa.valgrind: New file.
22371         2004-02-06  Bruno Haible  <bruno@clisp.org>
22372                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
22373                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
22374                 Reported by Christopher Seip <chris.seip@hp.com>.
22375
22376 2004-11-04  Bruno Haible  <bruno@clisp.org>
22377
22378         * modules/allocsa (Files): Add lib/allocsa.valgrind.
22379         (Makefile.am): Distribute it.
22380
22381 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
22382
22383         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
22384         with errno == ERANGE if the buffer is too small.
22385         Problem reported by Mark D. Baushke.
22386
22387 2004-11-03  Albert Chin  <china@thewrittenword.com>
22388             Paul Eggert  <eggert@cs.ucla.edu>
22389
22390         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
22391         equivalent, substitute $ac_type for equivalent type rather than
22392         blindly using uint32_t *always* which won't work if uint32_t is not
22393         available.  Define _UINT32_T to work around typedef of uint32_t if
22394         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
22395         2.5.1.
22396
22397 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
22398
22399         * m4/jm-macros.m4: Sync from coreutils.
22400         (gl_MACROS): Check for mbrlen, for pathchk.
22401         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
22402
22403 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
22404
22405         * lib/xreadlink.c (MAXSIZE): New macro.
22406         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
22407         size does not exceed MAXSIZE.  Avoid cast.
22408         As suggested by Mark D. Baushke in
22409         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
22410         if readlink fails with buffer size just under MAXSIZE, try again
22411         with MAXSIZE.
22412
22413 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
22414
22415         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
22416
22417 2004-11-02  Derek R. Price  <derek@ximbiot.com>
22418         and  Paul Eggert  <eggert@cs.ucla.edu>
22419
22420         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
22421         (get_date): Overparenthesize to avoid GCC warning.
22422
22423 2004-11-02  Bruno Haible  <bruno@clisp.org>
22424
22425         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
22426         returns void.
22427
22428 2004-11-02  Bruno Haible  <bruno@clisp.org>
22429
22430         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
22431         function returns void.
22432
22433 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
22434
22435         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
22436         fflush_unlocked, flockfile, funlockfile, funlockfile,
22437         fputs_unlocked, putc_unlocked.
22438
22439 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
22440
22441         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
22442         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
22443         already declared.
22444
22445 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
22446
22447         * modules/getdate (Files): Add doc/getdate.texi.
22448         (Depends-on): Add setenv, xalloc.
22449
22450 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
22451
22452         * lib/getdate.y: Add support for TZ="foo" within a date string.
22453         Fix some bugs near time_t boundaries.  Reject dates with
22454         out-of-range components, e.g., "Sept 31".
22455         Include <stdlib.h>, "setenv.h", "xalloc.h".
22456         (ISDIGIT_LOCALE): Remove; unused.
22457         Note that the TZ and time functions used here are not reentrant.
22458         (mktime_ok, get_tz): New functions.
22459         (TZBUFSIZE): New constant.
22460         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
22461         This requires that we sometimes generate our own TZ="XXX..." setting.
22462
22463 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
22464
22465         * doc/getdate.texi: New file, from coreutils with modifications for
22466         the new TZ parsing.
22467
22468 2004-10-27  Derek R. Price  <derek@ximbiot.com>
22469
22470         * lib/mktime.c (not_equal_tm): Remove redundant check.
22471
22472 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
22473
22474         * modules/regex (lib_SOURCES): Add regex.c.
22475         Reported by James Youngman in
22476         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
22477
22478 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
22479
22480         * lib/getdate.y: Use Bison 1.875 features, and some minor
22481         code cleanups.  This change does not affect semantics.
22482         Don't include <stdlib.h>; no longer needed.
22483         Don't include unlocked-io.h; only the "#if TEST" code uses
22484         stdio, and performance isn't crucial there.
22485         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
22486         Bison 1.875 features as described below.
22487         All uses of "PC." replaced by "pc->".
22488         (YYSTYPE): Add a forward declaration.
22489         (yylex, yyerror): Use full prototypes in forward decls.
22490         Use "%pure-parser" rather than obsolescent "%pure_parser".
22491         Use %parse-param and %lex-param instead of obsolescent
22492         YYPARSE_PARAM and YYLEX_PARAM.
22493         (meridian_table, month_and_day_table, time_units_table,
22494         relative_time_table, time_zone_table, military_table,
22495         lookup_zone, lookup_word, get_date):
22496         Use NULL instead of 0 where appropriate.
22497         (to_hour): Avoid abort (), to avoid a dependency on
22498         stdlib.h.
22499         (yyerror, yylex): Now accepts parser_control * arg.
22500         (main) [TEST]: Use '\0' rather than 0 for char.
22501
22502 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
22503
22504         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
22505
22506 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
22507
22508         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
22509         It's now the caller's responsibility to handle the case where
22510         !HAVE_GETPAGESIZE && !defined getpagesize.
22511
22512         * lib/mktime.c (leapyear): Arg is long int, not int.
22513
22514 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
22515
22516         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
22517
22518 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
22519
22520         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
22521         missing.  Problem reported by James Youngman.
22522
22523 2004-10-16  Simon Josefsson  <jas@extundo.com>
22524
22525         * gnulib-tool: Fix comments.  Fix parse problem.
22526         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
22527
22528 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
22529
22530         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
22531         implementation of getopt_long.  Problem reported by Alexander Taler in:
22532         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
22533
22534 2004-10-15  Bruno Haible  <bruno@clisp.org>
22535
22536         * gnulib-tool: Untabify. Initialize supplied_libname.
22537         (func_usage): More homogenous output.
22538         (func_modules_transitive_closure, func_modules_to_filelist,
22539         func_emit_lib_Makefile_am): New functions.
22540         (func_import): New function, extracted from big case statement. Use
22541         func_get_license, func_modules_transitive_closure,
22542         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
22543         opt_lgpl. Don't use test -a, as it's not portable.
22544         (func_create_testdir): Use func_modules_transitive_closure,
22545         func_modules_to_filelist, func_emit_lib_Makefile_am.
22546
22547 2004-10-15  Bruno Haible  <bruno@clisp.org>
22548
22549         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
22550
22551 2004-10-15  Bruno Haible  <bruno@clisp.org>
22552
22553         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
22554         the portions belonging to each module.
22555         Suggested by Derek Robert Price <derek@ximbiot.com>.
22556
22557 2004-10-12  Simon Josefsson  <jas@extundo.com>
22558
22559         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
22560         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
22561         to real functions.
22562
22563 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22564
22565         * modules/vsnprintf: New file.
22566
22567 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22568
22569         * m4/vsnprintf.m4: New file.
22570
22571 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22572
22573         * lib/vsnprintf.h: New file.
22574         * lib/vsnprintf.c: New file.
22575
22576 2004-10-11  Bruno Haible  <bruno@clisp.org>
22577
22578         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
22579         vsnprintf.
22580
22581 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
22582
22583         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
22584
22585 2004-10-07  Bruno Haible  <bruno@clisp.org>
22586
22587         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
22588         fits into the provided buffer.
22589
22590 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
22591
22592         * lib/diacrit.c, diacrit.h: Add GPL notice.
22593
22594         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
22595         notice.
22596         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
22597         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
22598         This avoids a potential constant-folding bug.
22599
22600 2004-10-05  Bruno Haible  <bruno@clisp.org>
22601
22602         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
22603         for the declaration of strsep.
22604
22605 2004-10-05  Bruno Haible  <bruno@clisp.org>
22606
22607         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
22608
22609 2004-10-04  Simon Josefsson  <jas@extundo.com>
22610
22611         * modules/memmem: New file.
22612         * tests/test-memmem.c: New file.
22613         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
22614
22615 2004-10-04  Simon Josefsson  <jas@extundo.com>
22616
22617         * m4/memmem.m4: New file.
22618
22619 2004-10-04  Simon Josefsson  <jas@extundo.com>
22620
22621         * lib/memmem.h: New file.
22622         * lib/memmem.c: New file, taken from glibc.
22623
22624 2004-10-04  Simon Josefsson  <jas@extundo.com>
22625
22626         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
22627         '#ifdef USE_UNLOCKED_IO'.
22628
22629 2004-10-04  Simon Josefsson  <jas@extundo.com>
22630
22631         * config/srclist.txt: Add memmem from glibc.
22632
22633 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
22634
22635         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
22636
22637         * modules/argmatch, modules/argp, modules/closeout, modules/error,
22638         modules/exclude, modules/getdate, modules/getline,
22639         modules/getndelim2, modules/getpass, modules/getpass-gnu,
22640         modules/getusershell, modules/linebuffer, modules/md5,
22641         modules/mountlist, modules/posixtm, modules/readtokens,
22642         modules/readutmp, modules/regex, modules/sha1,
22643         modules/version-etc, modules/yesno:
22644         Remove dependency on unlocked-io.
22645
22646 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
22647
22648         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
22649
22650         * m4/unlocked-io.m4: Add copyright notice.
22651         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
22652
22653 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
22654
22655         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
22656         * lib/xmalloc.c (xmemdup): Likewise.
22657         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
22658         XFREE): Remove these long-obsolescent macros.
22659         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
22660         * lib/xstrdup.c: Remove.
22661
22662         * lib/regex.c (re_comp): Cast gettext return value to char *,
22663         Problem reported by Martin Neitzel via Mark D. Baushke.
22664
22665 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
22666
22667         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
22668         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
22669         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
22670         regex.c, sha1.c, version-etc.c, yesno.c:
22671         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
22672         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
22673         the includer's responsibility.
22674
22675         Sync from coreutils.
22676
22677         * lib/modechange.c (mode_compile): Don't decrement a pointer that
22678         points to the start of a string, as the C Standard says the
22679         resulting behavior is undefined.
22680
22681         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
22682         simple -> simple_backups, numbered_existing ->
22683         numbered_existing_backups, numbered -> numbered_backups
22684         to avoid shadowing problems.  All uses changed.
22685         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
22686         * lib/backupfile.c (check_extension, numbered_backup):
22687         Rename locals to avoid shadowing 'basename'.
22688         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
22689         once.
22690
22691         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
22692         * lib/.cvsignore: Add getopt.h.
22693
22694 2004-10-04  Bruno Haible  <bruno@clisp.org>
22695
22696         * modules/README: New file.
22697         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
22698         not a module.
22699
22700 2004-10-02  Jim Meyering  <jim@meyering.net>
22701
22702         * lib/dirfd.h, getpagesize.h: Add copyright notice.
22703
22704 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22705
22706         * modules/strsep: New file.
22707
22708 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22709
22710         * m4/strsep.m4: New file.
22711
22712 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
22713
22714         * lib/strsep.h: New file.
22715         * lib/strsep.c: New file.
22716
22717 2004-10-01  Simon Josefsson  <jas@extundo.com>
22718
22719         * lib/snprintf.c (snprintf): Handle size==0.
22720
22721 2004-10-01  Simon Josefsson  <jas@extundo.com>
22722             Bruno Haible  <bruno@clisp.org>
22723
22724         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
22725         (snprintf): Declare 'args'.
22726
22727 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
22728
22729         * lib/snprintf.c: Remove comments as to why each header is needed.
22730
22731 2004-10-01  Bruno Haible  <bruno@clisp.org>
22732
22733         * MODULES.html.sh: Add strsep.
22734
22735 2004-09-30  Simon Josefsson  <jas@extundo.com>
22736
22737         * modules/snprintf: New file.
22738
22739 2004-09-30  Simon Josefsson  <jas@extundo.com>
22740
22741         * m4/snprintf.m4: New file.
22742
22743 2004-09-30  Simon Josefsson  <jas@extundo.com>
22744
22745         * lib/snprintf.h, lib/snprintf.c: New files.
22746
22747 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
22748
22749         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
22750         (hol_entry_help): Never translate an empty string.
22751         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
22752         * lib/argp.h (OPTION_NO_TRANS): New option.
22753
22754 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
22755
22756         * modules/argp (Maintainer): Replace Simon Josefsson
22757         by Sergey Poznyakoff.
22758
22759 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
22760
22761         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
22762         changes merged back into glibc.
22763
22764 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
22765
22766         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
22767
22768 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
22769
22770         * lib/xvasprintf.c: Include xalloc.h.
22771         (xvasprintf): Use xalloc_die, not xmalloc_die.
22772
22773 2004-09-29  Bruno Haible  <bruno@clisp.org>
22774
22775         * modules/alloca-opt: New file, derived from modules/alloca.
22776         * modules/allocsa: Depend on alloca-opt instead of alloca.
22777         * modules/setenv: Likewise.
22778         * modules/vasnprintf: Likewise.
22779         * MODULES.html.sh: Add alloca-opt.
22780
22781 2004-09-28  Simon Josefsson  <jas@extundo.com>
22782
22783         * gnulib-tool: New parameter --lgpl, to asseert that modules are
22784         LGPL, and to replace license template from GPL to LGPL.
22785
22786 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
22787
22788         * modules/dummy: Change license to LGPL.
22789
22790 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
22791
22792         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
22793
22794 2004-09-24  Simon Josefsson  <jas@extundo.com>
22795
22796         * modules/minmax (License): Change from GPL to LGPL.
22797
22798 2004-09-23  Simon Josefsson  <jas@extundo.com>
22799
22800         * gnulib-tool (--import): Typo.
22801
22802 2004-09-23  Simon Josefsson  <jas@extundo.com>
22803
22804         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
22805
22806 2004-09-22  Bruno Haible  <bruno@clisp.org>
22807
22808         * modules/*: Add 'License' field.
22809         * gnulib-tool: Accept --extract-license option.
22810         (func_get_license): New function.
22811
22812 2004-09-21  Bruno Haible  <bruno@clisp.org>
22813
22814         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
22815         Reported by Simon Josefsson.
22816
22817 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
22818
22819         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
22820         gl_AC_TYPE_LONG_LONG.
22821
22822 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
22823
22824         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
22825
22826 2004-09-18  Simon Josefsson  <jas@extundo.com>
22827         and  Paul Eggert  <eggert@cs.ucla.edu>
22828
22829         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
22830         calls with autoreconf.  Define GL_LIB.
22831
22832 2004-09-14  Karl Berry  <karl@gnu.org>
22833
22834         * config/srclist.txt: unsync setenv.c, sigh.
22835
22836 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
22837
22838         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
22839         Problem reported by Bruno Haible in:
22840         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
22841
22842 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
22843
22844         * config/srclist.txt: Comment out argp-pvh.c.
22845
22846 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
22847
22848         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
22849         in case some system header has #define'd it.  Problem reported by
22850         Soeren D. Schulze in
22851         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
22852
22853 2004-09-09  Karl Berry  <karl@gnu.org>
22854
22855         * regex.[ch]: delete from the root.  These were supposed to be
22856                 synced with emacs cvs, but this has not happened for about
22857                 a year, and anyway nothing else uses emacs regex.[ch].
22858                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
22859                 lib/regex[.ch] is untouched.
22860
22861 2004-09-09  Bruno Haible  <bruno@clisp.org>
22862
22863         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
22864
22865 2004-09-09  Bruno Haible  <bruno@clisp.org>
22866
22867         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
22868         modifications.
22869         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
22870
22871 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
22872
22873         * modules/xvasprintf: New file.
22874         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
22875
22876 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
22877
22878         * lib/xvasprintf.h: New file.
22879         * lib/xvasprintf.c: New file.
22880         * lib/xasprintf.c: New file.
22881
22882 2004-09-08  Bruno Haible  <bruno@clisp.org>
22883
22884         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
22885
22886 2004-09-08  Bruno Haible  <bruno@clisp.org>
22887
22888         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
22889         length is > INT_MAX.
22890         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
22891         more.
22892
22893 2004-09-08  Bruno Haible  <bruno@clisp.org>
22894
22895         * lib/stdint_.h: New file, taken from GNU clisp.
22896
22897 2004-09-08  Bruno Haible  <bruno@clisp.org>
22898             Oskar Liljeblad  <oskar@osk.mine.nu>
22899
22900         * modules/stdint: New file.
22901         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
22902
22903 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
22904
22905         Import from coreutils.
22906         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
22907         strings on unbounded length.  alloca's performance benefits aren't
22908         that important here.
22909         (V_STRDUP): Remove.
22910         (parse_with_separator): New function, with most of the internals
22911         of the old parse_user_spec.  Allow user to omit both user and group,
22912         for compatibility with FreeBSD.
22913         Clone only the user name, not the entire spec.
22914         Do not set *uid, *gid unless entirely successful.
22915         Avoid memory leak in some failing cases.
22916         Fix regression for USER.GROUP reported by Dmitry V. Levin in
22917         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
22918         (parse_user_spec): Rewrite to use parse_with_separator.
22919
22920 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
22921
22922         * modules/userspec: Don't depend on alloca.
22923
22924 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
22925
22926         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
22927
22928 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
22929
22930         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
22931         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
22932         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
22933
22934 2004-08-16  Simon Josefsson  <jas@extundo.com>
22935
22936         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
22937         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
22938         Add --dry-run for --import.
22939         Let user provided command line parameters override configure.ac
22940         settings.
22941
22942 2004-08-12  Simon Josefsson  <jas@extundo.com>
22943
22944         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
22945         as discussed with Paul Eggert in threads rooted at
22946         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
22947         and
22948         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
22949         Before, the test was empty, and relied on ELIDE_CODE in source
22950         code.)
22951         (gl_PREREQ_GETOPT): New macro.
22952         (gl_GETOPT): Use them.
22953
22954 2004-08-12  Simon Josefsson  <jas@extundo.com>
22955
22956         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
22957         * lib/getopt_.h: Renamed from getopt.h.
22958
22959 2004-08-12  Simon Josefsson  <jas@extundo.com>
22960
22961         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
22962         Change default library name from libfoo to libgnu.
22963         Now, if you have a configure.ac that says:
22964                 gl_SOURCE_BASE(gl)
22965                 gl_M4_BASE(gl/m4)
22966                 gl_MODULES(error getopt etcetera)
22967                 gl_INIT
22968         you can import all you need by running:
22969                 ../gnulib/gnulib-tool --import
22970
22971         * modules/getopt (Files): Rename getopt.h to getopt_.h.
22972         (Makefile.am): Rewrite, use logic from argz.
22973         (Include): Use <getopt.h> instead of "getopt.h".
22974
22975 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
22976
22977         * modules/argp (Files): Add m4/unlocked-io.m4.
22978         (Depends-on): Add extensions.
22979
22980 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
22981
22982         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
22983         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
22984         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
22985         Check for program_invocation_name, program_invocation_short_name,
22986         flockfile, funlockfile, features.h, _getopt_long_only_r.
22987
22988 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
22989
22990         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
22991         its complicated substitute.
22992         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
22993         and program_invocation_name.
22994         (__argp_basename) [!_LIBC]: Remove; the only use was
22995         replaced by its body.
22996         (__argp_short_program_name): Change condition from
22997         !defined __argp_short_program_name to
22998         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
22999         to match argp-namefrob.h.
23000         (__argp_failure): Don't assume strerror_r returns char *.
23001         * lib/argp-parse.c (N_): Define unconditionally.
23002         (argp_default_options): Fill out initializers with 0 to avoid
23003         gcc warnings.
23004
23005 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
23006
23007         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
23008         getopt1.c.
23009
23010 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
23011
23012         Merge from coreutils.
23013
23014         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
23015
23016         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
23017         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
23018
23019 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
23020
23021         Merge from coreutils.
23022
23023         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
23024         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
23025         for Reliant Unix 5.43.
23026
23027         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
23028         (union fooround): Use uintmax_t, not long int.
23029         The rest is a merge from libc:
23030         [defined _LIBC]: Include <shlib-compat.h>.
23031         (_obstack) [defined _LIBC]: Remove after 2.3.4.
23032
23033         * lib/settime.c (settime): Recode to avoid warning with
23034         Sun Forte C 6U2.
23035
23036         * lib/strverscmp.c: Convert to UTF-8.
23037
23038 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
23039
23040         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
23041         m4/uintmax_t.m4.
23042
23043 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
23044
23045         * modules/xalloc-die: New file.
23046         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
23047
23048         * modules/md5 (Files): Add m4/uint32_t.m4.
23049         * modules/sha1: Renamed from modules/sha.
23050         (Files):
23051         Rename lib/sha.h to lib/sha1.h.
23052         Rename lib/sha.c to lib/sha1.c.
23053         Rename m4/sha.m4 to m4/sha1.m4.
23054         (lib_SOURCES): Likewise.
23055         (configure.ac): Rename gl_SHA to gl_SHA1.
23056         (Include): sha.h -> sha1.h.
23057
23058 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
23059
23060         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
23061         * m4/sha1.m4: Renamed from sha.m4.
23062         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
23063
23064 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
23065
23066         * lib/obstack.h (obstack_empty_p):
23067         Don't assume that chunk->contents is suitably aligned.
23068         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
23069         Likewise. Problem reported by Benno in
23070         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
23071
23072         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
23073         readable.  This could be improved further but it'd take some work.
23074
23075 2004-08-08  Simon Josefsson  <jas@extundo.com>
23076
23077         * modules/xgethostname (Depends-on): Remove exit and error (not
23078         used).
23079
23080         * modules/getpass-gnu: Add getpass.h.
23081         (Depends-on): Add stdbool.
23082         * modules/getpass: Add getpass.h.
23083
23084 2004-08-08  Simon Josefsson  <jas@extundo.com>
23085
23086         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
23087         Check getpass declaration.
23088
23089 2004-08-08  Simon Josefsson  <jas@extundo.com>
23090
23091         * lib/xgethostname.c: Don't include error.h (not used).
23092
23093         * lib/getpass.h: Add.
23094         * lib/getpass.c: Include getpass.h first.
23095
23096 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
23097
23098         * lib/xalloc-die.c: New file.
23099         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
23100         All uses removed.
23101         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
23102         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
23103         xalloc-die.c.
23104         (_, N_, xalloc_die): Move to xalloc-die.c.
23105         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
23106         so that we needn't mess with xalloc_msg_memory_exhausted.
23107
23108         * lib/sha1.h: Renamed from sha.h.
23109         (SHA1_H): Renamed from _SHA_H.
23110         (sha1_ctx): Renamed from sha_ctx.
23111         (sha1_init_ctx): Renamed from sha_init_ctx.
23112         (sha1_process_block): Renamed from sha_process_block.
23113         (sha1_process_bytes): Renamed from sha_process_bytes.
23114         (sha1_finish_ctx): Renamed from sha_finish_ctx.
23115         (sha1_read_ctx): Renamed from sha_read_ctx.
23116         (sha1_stream): Renamed from sha_stream.
23117         (sha1_buffer): Renamed from sha_buffer.
23118         * lib/sha1.c: Likewise; renamed from sha.c.
23119         Do not include <sys/types.h>.
23120         Include <stddef.h> rather than <stdlib.h>.
23121
23122 2004-08-08  Bruno Haible  <bruno@clisp.org>
23123
23124         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
23125         FILESYSTEM_PREFIX_LEN.
23126         * lib/progreloc.c: Likewise.
23127         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
23128
23129 2004-08-06  Simon Josefsson  <jas@extundo.com>
23130
23131         * modules/progname (Depends-on): Don't depend on stdbool.
23132
23133 2004-08-06  Simon Josefsson  <jas@extundo.com>
23134
23135         * modules/getsubopt: New file.
23136         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
23137         getsubopt.
23138
23139 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
23140
23141         More merge from coreutils.
23142
23143         * m4/utimens.m4, m4/utimecmp.m4: New files.
23144         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
23145         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
23146         prereq.m4, sha.m4: Import changes from coreutils.
23147
23148 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
23149
23150         More merge from coreutils.
23151         * modules/raise, modules/readtokens0, modules/utimens:
23152         * modules/utimecmp, module/xnanosleep: New files.
23153         * modules/strftime: Add lib/strftime.h.
23154         Change include from <time.h> to "strftime.h".
23155         * modules/yesno: Add lib/yesno.h.
23156         * modules/backupfile: Remove lib/addext.c.
23157         * modules/euidaccess: Add stat-macros.h.
23158         * modules/canonicalize, modules/euidaccess,
23159         modules/filemode, modules/lchown, modules/makepath,
23160         modules/rmdir, modules/stat: Likewise.
23161
23162 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
23163
23164         Merge from tar.
23165         * lib/argp-help.c (make_hol, hol_append): Don't assume that
23166         SIZE_MAX is a valid preprocessor constant.
23167         (__argp_basename): Change from "#ifndef _LIBC"
23168         to "#ifndef __argp_short_program_name", so that
23169         we don't compile these functions for tar.
23170
23171         More merges from coreutils.
23172         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
23173         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
23174         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
23175         * lib/addext.c: Remove; no longer needed.
23176         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
23177         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
23178         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
23179         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
23180         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
23181         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
23182         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
23183         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
23184         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
23185         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
23186         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
23187         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
23188         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
23189         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
23190         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
23191         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
23192         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
23193         Import changes from coreutils.
23194
23195 2004-08-05  Simon Josefsson  <jas@extundo.com>
23196
23197         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
23198
23199 2004-08-05  Simon Josefsson  <jas@extundo.com>
23200
23201         * m4/getsubopt.m4: New file.
23202
23203 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
23204
23205         Merge from coreutils.
23206
23207         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
23208         * m4/getcwd-path-max.m4: New files.
23209
23210         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
23211         FILESYSTEM_PREFIX_LEN ->
23212         FILE_SYSTEM_PREFIX_LEN.
23213         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
23214         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
23215         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
23216         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
23217
23218         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
23219         prerequisite modules now handle the DOS stuff.
23220         Don't check for unistd.h.
23221
23222 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
23223
23224         Merge from coreutils.
23225
23226         * lib/.gdb-history: Remove; this doesn't belong here.
23227
23228         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
23229         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
23230         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
23231         * lib/getcwd.c: New files.
23232
23233         * lib/dirname.h: Include <stdbool.h>.
23234         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
23235         for consistency with POSIX terminology.  All uses changed.
23236         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
23237         (strip_trailing_slashes): Use bool for booleans.
23238         * lib/stripslash.c (strip_trailing_slashes): Likewise.
23239
23240         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
23241         sometimes returns a positive errno value even when it succeeds.
23242         (print_errno_message) [!LIBC]: Fall back on strerror if
23243         __strerror_r fails.
23244
23245         * lib/path-concat.c (mempcpy): Don't define if a system header defines
23246         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
23247         (longest_relative_suffix): New function.
23248         (path_concat): Use it.  Assume first argument is not NULL.
23249         Port to DOS.  Omit redundant separators.
23250         Report an error instead of returning NULL.
23251         Use mempcpy instead of memcpy.
23252         (xpath_concat): Remove: not declared or used.
23253
23254         * lib/same.h: Include <stdbool.h>
23255         (same_name): Return bool, not int.
23256         * lib/same.c (same_name): Likewise.
23257         (errno): Don't declare; we assume C89 or better now.
23258
23259         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
23260         if not already defined.
23261
23262         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
23263         * lib/dup-safer.c (errno): Likewise.
23264
23265 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
23266
23267         Merge from coreutils.
23268         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
23269         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
23270         * modules/path-concat: Don't depend on strdup.
23271
23272 2004-08-03  Simon Josefsson  <jas@extundo.com>
23273
23274         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
23275         * lib/progname.h: Don't include stdbool.h.
23276
23277 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
23278
23279         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
23280         * MODULES.html.sh (func_all_modules): Remove fatal.
23281
23282 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
23283
23284         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
23285
23286 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
23287
23288         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
23289         working.
23290
23291 2004-08-02  Simon Josefsson  <jas@extundo.com>
23292
23293         * lib/getsubopt.h: New file, with comments from Bruno Haible.
23294         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
23295         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
23296
23297 2004-08-01  Simon Josefsson  <jas@extundo.com>
23298
23299         * lib/xgetdomainname.c: Include stdlib.h, for free().
23300
23301 2004-07-19  Bruno Haible  <bruno@clisp.org>
23302
23303         * MODULES.html.sh (func_all_modules): Add dummy.
23304
23305 2004-07-16  Simon Josefsson  <jas@extundo.com>
23306
23307         * modules/dummy: New file.
23308
23309 2004-07-16  Simon Josefsson  <jas@extundo.com>
23310
23311         * lib/dummy.c: New file.
23312
23313 2004-07-16  Bruno Haible  <bruno@clisp.org>
23314
23315         * lib/backupfile.h: Add extern "C" for C++.
23316         * lib/closeout.h: Likewise.
23317         * lib/copy-file.h: Likewise.
23318         * lib/findprog.h: Likewise.
23319         * lib/full-write.h: Likewise.
23320         * lib/pathname.h: Likewise.
23321         * lib/progname.h: Likewise.
23322         * lib/stpcpy.h: Likewise.
23323         * lib/stpncpy.h: Likewise.
23324         * lib/strcase.h: Likewise.
23325         * lib/strstr.h: Likewise.
23326         * lib/xalloc.h: Likewise.
23327
23328         * lib/mbswidth.h: Add extern "C" for C++.
23329         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
23330
23331 2004-07-13  Robert Millan  <robertmh@gnu.org>
23332
23333         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
23334
23335 2004-07-09  Simon Josefsson  <jas@extundo.com>
23336
23337         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
23338         failed without this.)
23339
23340 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
23341
23342         * modules/chown (Files): Add lib/fchown-stub.c, since
23343         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
23344
23345 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
23346
23347         * lib/fchown-stub.c: New file.
23348
23349 2004-06-24  Jim Meyering  <jim@meyering.net>
23350
23351         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
23352
23353 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
23354
23355         * modules/argz: Omit "#include".
23356
23357         * MODULES.html.sh (func_all_modules): Add calloc, to match
23358         2004-06-01 addition of calloc module.
23359
23360 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
23361
23362         * m4/argz.m4: New file, which is autoupdated from libtool.
23363
23364 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
23365
23366         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
23367         libtool.
23368
23369 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
23370
23371         * config/srclist-update: Don't insist on "USA." before the
23372         close-comment, as libtool omits the period and puts the */ on a
23373         separate line.
23374         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
23375         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
23376
23377 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
23378
23379         * modules/argz: New file.
23380         * MODULES.html.sh (func_all_modules): Add argz.
23381
23382 2004-06-12  Jim Meyering  <jim@meyering.net>
23383         and  Paul Eggert  <eggert@cs.ucla.edu>
23384
23385         * modules/hash (Files): Add lib/xalloc.h.
23386         * modules/pipe (Depends-on): Add wait-process.
23387         * modules/stat (Depends-on): Add xalloc.
23388         * modules/userspec (Files): Add lib/userspec.h.
23389         * modules/xstrto
23390
23391         Upgrade from gettext-0.13.
23392         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
23393         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
23394         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
23395
23396 2004-06-10  Jim Meyering  <jim@meyering.net>
23397
23398         * lib/calloc.c: New file.
23399
23400 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
23401
23402         * lib/getdate.y (yylex): Allow space between sign and number.
23403         Problem reported by Dan Jacobson.
23404
23405 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
23406
23407         Merge from coreutils CVS.
23408
23409         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
23410         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
23411         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
23412         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
23413         xstrtol.m4: Fix copyright date and/or serial number.
23414
23415         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
23416         See if we need an fchown replacement.
23417         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
23418         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
23419         and use the replacement function if we detect either defect.
23420
23421         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
23422         gl_UTIMECMP.
23423
23424 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
23425         and  Jim Meyering  <jim@meyering.net>
23426
23427         Merge from coreutils CVS.
23428
23429         * lib/stat-macros.h: New file, with contents from file-type.h
23430         and coreutils' system.h.
23431         * lib/file-type.c: Include "stat-macros.h".
23432         * lib/file-type.h (file_type): Move all macro definitions to new file,
23433         stat-macros.h.
23434
23435         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
23436         Wrap old code with this conditional.
23437         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
23438         function that does not dereference symlinks.
23439         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
23440
23441         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
23442         dependency problems.
23443         (xreadlink): Accept new arg SIZE, for efficiency.
23444         All decls and uses changed.
23445         * lib/xreadlink.h: Include <stddef.h>, for size_t.
23446
23447         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
23448         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
23449
23450         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
23451         sysexits.h.
23452
23453 2004-06-01  Jim Meyering  <jim@meyering.net>
23454
23455         * m4/calloc.m4: New file.
23456
23457 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
23458
23459         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
23460         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
23461         Also, fix a typo in a diagnostic.
23462
23463 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
23464
23465         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
23466         or AC_FUNC_REALLOC.
23467
23468 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
23469
23470         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
23471         macros to be defined.
23472         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
23473         the allocator returns NULL because the requested size is zero.
23474
23475 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
23476
23477         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
23478         var.  Add comment explaining why libc still defines it.  This
23479         merges the following patch from glibc:
23480         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
23481
23482 2004-05-20  Andreas Schwab  <schwab@suse.de>
23483
23484         * m4/free.m4: Replace free if it not known to work, not the other
23485         way round.
23486
23487 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
23488
23489         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
23490         present in glibc since revision 1.1 of this file.
23491         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
23492         obstack_alignment_mask, obstack_alloc, obstack_base,
23493         obstack_blank, obstack_blank_fast, obstack_chunk_size,
23494         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
23495         obstack_grow0, obstack_init, obstack_int_grow,
23496         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
23497         obstack_next_free, obstack_object_size, obstack_ptr_grow,
23498         obstack_ptr_grow_fast, obstack_room): Remove declarations of
23499         nonexistent functions.
23500
23501 2004-05-18  Karl Berry  <karl@gnu.org>
23502
23503         * config/srclist.txt: break link for vasnprintf.c.
23504
23505 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
23506
23507         Port obstack to the AS/400, where pointers are 16 bytes wide and
23508         you cannot cast an integer to a valid pointer.  This patch is
23509         currently waiting to be integrated into glibc; see
23510         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
23511
23512         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
23513         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
23514         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
23515         (struct obstack): temp member is now a union of a pointer and
23516         an integer, instead of an integer.  All integer uses changed.
23517         This does not affect the physical layout of struct obstack,
23518         except on hosts (like the AS/400) where the size or alignment of
23519         void * is greater than that of ptrdiff_t.
23520         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
23521         __STDC__)]: Store temporary in pointer member of union, not
23522         integer member.
23523         * lib/obstack.c: Include <stddef.h>, for offsetof.
23524         (struct fooalign): Remove; it doesn't need a name.
23525         (union fooround): Change double to long double, and add void *.
23526         (DEFAULT_ALIGNMENT): Use offsetof to compute.
23527         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
23528         not a macro.  Hence the values are always int; so remove all
23529         casts-to-int in uses.
23530
23531 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
23532
23533         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
23534         we can get this patch merged into glibc.
23535
23536 2004-05-17  Derek R. Price  <derek@ximbiot.com>
23537             Paul Eggert  <eggert@cs.ucla.edu>
23538
23539         * m4/argp: Depend on alloca.
23540
23541 2004-05-17  Derek R. Price  <derek@ximbiot.com>
23542             Paul Eggert  <eggert@cs.ucla.edu>
23543
23544         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
23545         freecoding.
23546
23547 2004-05-17  Bruno Haible  <bruno@clisp.org>
23548
23549         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
23550         precision that consists of a '.' followed by an empty digit string.
23551         Patch by Tor Lillqvist <tml@iki.fi>.
23552
23553 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
23554
23555         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
23556         for backward compatibility with older code.  We need our own
23557         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
23558         it under some other name, and our alloca.h will define it.
23559
23560 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
23561             Derek Price  <derek@ximbiot.com>
23562
23563         * lib/alloca.c: Include <alloca.h>, to get our interface.
23564         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
23565         include <alloca.h> first.  Use C89 prototype for alloca; this
23566         requires including <stddef.h> for size_t.  Use extern "C" if C++.
23567         Use #elif for simplicity, since we can assume C89 now.
23568         Don't try to source the system alloca.h since it will not be found
23569         and to prevent recursively including its replacement.
23570         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
23571         * lib/regex.c: Likewise.
23572
23573 2004-05-16  Derek Price  <derek@ximbiot.com>
23574             Paul Eggert  <eggert@cs.ucla.edu>
23575
23576         getline cleanup.  This changes the getndelim2 API: both order of
23577         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
23578         no delimiter).
23579
23580         * lib/getline.c: Don't include stddef.h or stdio.h, since our
23581         interface does that.
23582         (getline): Always use getdelim, so that we don't have two
23583         copies of this code.
23584         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
23585         if available.
23586         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
23587         (GETNDELIM2_MAXIMUM): New macro.
23588         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
23589         instead of the old practice of delim2==0.  All callers changed.
23590         Return -1 on overflow, instead of returning junk.
23591         Do not set *linesize unless allocation succeeds.
23592         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
23593         that we include sys/types.h.
23594         * lib/getnline.h: Likewise.
23595         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
23596         (getndelim2): Reorder arguments.
23597         * lib/getnline.c (getnline, getndelim):
23598         Don't discard the NMAX argument.
23599         (getnline): Invoke getndelim, to avoid code duplication.
23600         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
23601         of (size_t) -1 by callers of the getnline family.
23602
23603 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
23604
23605         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
23606         Check for gettimeofday.
23607         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
23608         Check for settimeofday, stime.
23609
23610 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
23611
23612         * lib/nanosleep.c (suspended): Change its type from int to
23613         sig_atomic_t volatile.
23614         (first_call): Make it private to rpl_nanosleep, and have it
23615         be zero initially as that's a bit faster.
23616         (my_usleep): Round up fractional times instead of truncating them,
23617         as this is the usual meaning for 'sleep'.
23618
23619         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
23620         doesn't work.
23621         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
23622         (ENOSYS): Define if not defined.
23623         (settime): Fall back on stime if it exists and settimeofday fails.
23624         But don't bother with fallbacks if a method fails with errno == EPERM.
23625
23626 2004-05-11  Jim Meyering  <jim@meyering.net>
23627
23628         Prior to this change, the save_cwd caller required read access to the
23629         current directory on most systems (ones with the fchdir function).
23630
23631         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
23632         fails, try write-only, and finally, resort to using xgetcwd.
23633
23634 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
23635
23636         * lib/obstack.c, obstack.h: Import changes from libc.
23637
23638 2004-04-28  Bruno Haible  <bruno@clisp.org>
23639
23640         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
23641         also implicitly appends .exe to executables.
23642         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
23643         accepts Windows pathnames.
23644         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
23645         Treat Cygwin like Windows, since it now accepts Windows pathnames.
23646         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
23647         Treat Cygwin like Windows, since it now accepts Windows pathnames.
23648         Reported by Derek Robert Price <derek@ximbiot.com>.
23649
23650 2004-04-21  Karl Berry  <karl@gnu.org>
23651
23652         * config/srclist.txt (localcharset.c): break sync.
23653
23654 2004-04-20  Paul Eggert  <eggert@twinsun.com>
23655
23656         * m4/host-os.m4: Add a copyright notice.
23657
23658 2004-04-20  Jim Meyering  <jim@meyering.net>
23659
23660         Change UTILS_ to gl_ in AC_DEFINE'd names.
23661         Change utils_- and jm_-prefixed variables, too.
23662         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
23663         UTILS_FUNC_MKDIR_TRAILING_SLASH.
23664         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
23665
23666         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
23667         Don't emit trailing blanks.
23668         Also rename jm_-prefixed variables to have gl_ prefix.
23669
23670         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
23671         Also rename jm_-prefixed variables to have gl_ prefix.
23672
23673         * m4/jm-macros.m4: Reflect the renamings.
23674         * m4/prereq.m4: Likewise.
23675
23676 2004-04-20  Jim Meyering  <jim@meyering.net>
23677
23678         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
23679         memory.
23680
23681 2004-04-20  Jim Meyering  <jim@meyering.net>
23682             Bruno Haible  <bruno@clisp.org>
23683
23684         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
23685         memory when realloc fails.
23686
23687 2004-04-19  Jim Meyering  <jim@meyering.net>
23688
23689         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
23690         now that readutmp.c may call `free (0)'.
23691
23692 2004-04-19  Bruno Haible  <bruno@clisp.org>
23693
23694         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
23695         * m4/inttypes_h.m4: Likewise.
23696         * m4/stdint_h.m4: Likewise.
23697         * m4/intmax_t.m4: Likewise.
23698         * m4/uintmax_t.m4: Likewise.
23699
23700 2004-04-18  Jim Meyering  <jim@meyering.net>
23701
23702         * m4/prereq.m4: Don't forbid jm_ prefix.
23703
23704         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
23705         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
23706         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
23707         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
23708         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
23709         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
23710         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
23711         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
23712         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
23713         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
23714         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
23715         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
23716         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
23717         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
23718         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
23719         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
23720         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
23721         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
23722         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
23723
23724 2004-04-18  Jim Meyering  <jim@meyering.net>
23725
23726         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
23727         failure, don't leak memory and do call END_UTMP_ENT.
23728
23729 2004-04-16  Jim Meyering  <jim@meyering.net>
23730
23731         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
23732         coreutils' stat program.
23733         (gl_PREREQ): Don't require jm_PREREQ_STAT.
23734
23735 2004-04-11  Paul Eggert  <eggert@twinsun.com>
23736
23737         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
23738         C89.
23739         (CHAR_BIT): Remove, since we assume C89.
23740         Include <stdint.h> if available, as per current Autoconf CVS advice.
23741
23742 2004-03-31  Jim Meyering  <jim@meyering.net>
23743
23744         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
23745         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
23746         * m4/xalloc.m4: Likewise.
23747
23748 2004-03-30  Paul Eggert  <eggert@twinsun.com>
23749
23750         Merge from coreutils.
23751
23752         * m4/inttostr.m4: New file.
23753         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
23754         Require AM_STDBOOL_H and gl_TIMESPEC instead.
23755         Require gl_CLOCK_TIME.
23756         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
23757
23758 2004-03-30  Paul Eggert  <eggert@twinsun.com>
23759
23760         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
23761         not bool, to be more consistent with Unix conventions.
23762         Suggested by Bruno Haible.
23763
23764         Merge from coreutils.
23765
23766         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
23767         * lib/umaxtostr.c: New files.
23768
23769         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
23770         the usual <time.h> dance.
23771         (get_date): Change signature to support fractional time stamps.
23772         All callers changed.
23773         * lib/getdate.y: Include "getdate.h" first, as we can now
23774         assume C89 and don't need to worry about 'const'.
23775         Similarly, include "unlocked-io.h" near start, not in middle.
23776         Include <limits.h>.
23777         (textint.value): Use long int rather than int.
23778         (textint.digits): Use size_t rather than int.
23779         (BILLION, LOG10_BILLION): New constants.
23780         (parser_control): New member rel_ns.  Members day_ordinal,
23781         time_zone, month, day, hour, minutes, rel_year, rel_month,
23782         rel_day, rel_hour, rel_minutes, rel_seconds
23783         are now long int, not int.  Member seconds is now struct timespec,
23784         not int.  New member timespec_seen.  Members dates_seen, days_seen,
23785         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
23786         not int.
23787         (%union.intval): Now long int, not int.
23788         New member timespec.
23789         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
23790         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
23791         (spec): Now is a timespec or an item list.
23792         (timespec, items): New nonterminals.
23793         (time, rel, relunit, number, get_date):
23794         Add support for fractional seconds.
23795         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
23796         (gmtime, localtime, mktime): Remove decls; not needed with C89.
23797         (to_hour): First arg is now long int, not int.
23798         (to_year): Returns long int, not int.
23799         Don't treat year -70 like 70.
23800         (tm_diff): Returns long int, not int.
23801         (lookup_word): Use bool instead of int when appropriate.
23802         (yylex): Use size_t for count, not int.
23803         Detect overflow when parsing large integer constants.
23804         Add support for fractions.
23805         (get_date): Make pointers 'const' if possible.
23806         Use more-portable code to detect integer overflow.
23807         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
23808         Don't use ctime; it's not reliable if the year has >4 digits.
23809
23810         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
23811         This is for compatibility with BSD.
23812
23813         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
23814         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
23815         From coreutils' system.h.
23816
23817         * lib/userspec.c: Don't include "posixver.h".
23818         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
23819         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
23820         compatible extension.  Simplify code by removing a boolean int
23821         that was always nonzero if a string was nonnull.
23822
23823 2004-03-30  Jim Meyering  <jim@meyering.net>
23824
23825         Merge from coreutils.
23826
23827         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
23828         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
23829         on some systems one must include <grp.h> before it.
23830         Reported by Christian Krackowizer.
23831
23832 2004-03-30  Jim Meyering  <jim@meyering.net>
23833
23834         Merge from coreutils.
23835
23836         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
23837
23838         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
23839         an empty input stream.
23840
23841         * lib/readtokens.c: Include <stdbool.h>.
23842         (readtoken): Use `size_t' rather than int/long.
23843         All callers adjusted.
23844         Use `bool' rather than `int' where appropriate.
23845         Use memset rather than an explicit loop.
23846         Use x2nrealloc rather than xrealloc.
23847         Allow the use of `\0' as a delimiter.
23848         (readtokens): Likewise.
23849         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
23850
23851 2004-03-30  Jim Meyering  <jim@meyering.net>
23852
23853         * m4/realloc.m4: Remove file, since now it does no more than
23854         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
23855         the `configure.ac' section of module/realloc.
23856         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
23857
23858 2004-03-30  Bruno Haible  <bruno@clisp.org>
23859
23860         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
23861         nonnull.
23862
23863 2004-03-29  Paul Eggert  <eggert@twinsun.com>
23864
23865         Merge changes to getloadavg.c from coreutils and Emacs.
23866
23867         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
23868         Define to an expression, not to the empty string.
23869         Include cloexec.h and xalloc.h.
23870         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
23871         Use set_cloexec_flag rather than rolling our own.
23872         * lib/cloexec.c, lib/cloexec.h: New files.
23873
23874 2004-03-29  Paul Eggert  <eggert@twinsun.com>
23875
23876         * m4/cloexec.m4: New file.
23877
23878 2004-03-18  Paul Eggert  <eggert@twinsun.com>
23879
23880         * lib/getopt.h: Sync with libc CVS.
23881
23882 2004-03-18  Paul Eggert  <eggert@twinsun.com>
23883             Bruno Haible  <bruno@clisp.org>
23884
23885         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
23886         mbswidth.
23887
23888 2004-03-18  Paul Eggert  <eggert@twinsun.com>
23889             Bruno Haible  <bruno@clisp.org>
23890
23891         * lib/mbswidth.h: Include <wchar.h> only if
23892         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
23893         <wchar.h>.
23894         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
23895
23896 2004-03-09  Paul Eggert  <eggert@twinsun.com>
23897
23898         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
23899         Sync with libc CVS.
23900         * lib/getopt_int.h: New file, also synced from libc.
23901
23902 2004-03-09  Paul Eggert  <eggert@twinsun.com>
23903
23904         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
23905         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
23906         Bring back getopt.c, getopt.h, getopt1.c.
23907
23908 2004-03-07  Paul Eggert  <eggert@twinsun.com>
23909
23910         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
23911         All uses changed.  Check for sa_sigaction member; this fixes
23912         a bug first reported by Jason Andrade in
23913         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
23914
23915 2004-03-07  Paul Eggert  <eggert@twinsun.com>
23916
23917         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
23918         '#if' expressions.  Unlike the code it replaces, it does not
23919         depend on (defined _SC_PAGESIZE).  However, it does depend on
23920         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
23921         first reported by Jason Andrade in
23922         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
23923
23924 2004-02-25  Simon Josefsson  <jas@extundo.com>
23925
23926         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
23927
23928 2004-02-25  Simon Josefsson  <jas@extundo.com>
23929
23930         * lib/strdup.h: New file.
23931         * lib/strdup.c: Include it.
23932         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
23933         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
23934
23935 2004-02-23  Karl Berry  <karl@gnu.org>
23936
23937         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
23938         (from fencepost.gnu.org:/gd/gnuorg).
23939
23940 2004-02-23  Karl Berry  <karl@gnu.org>
23941
23942         * config/srclistvars.sh (GNUORG) [karl]: redefine.
23943         * config/srclist.txt: add maintain/standards documents.
23944
23945 2004-02-18  Bruno Haible  <bruno@clisp.org>
23946
23947         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
23948         Reported by Derek Robert Price <derek@ximbiot.com>.
23949
23950 2004-02-16  Karl Berry  <karl@gnu.org>
23951
23952         * config/mkinstalldirs, install-sh: update from automake.
23953
23954 2004-02-06  Karl Berry  <karl@gnu.org>
23955
23956         * m4/po.m4: update from gettext 0.14.1.
23957
23958 2004-02-06  Karl Berry  <karl@gnu.org>
23959
23960         * lib/config.charset: update from gettext 0.14.1.
23961
23962 2004-02-05  Paul Eggert  <eggert@twinsun.com>
23963
23964         Add comments and code, prompted by suggestions from Bruno Haible
23965         for sh-quote.
23966         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
23967         describing the enum quoting_style values.
23968         * lib/quotearg.c (quotearg_alloc): New function.
23969         (quotearg_buffer_restyled): Treat lone { and } as special.
23970         Treat = as special.  Work around bug with older shells
23971         that "see" a '\' that is really the 2nd byte of a multibyte char.
23972         Quote empty string with shell_quoting_style.
23973
23974 2004-02-03  Bruno Haible  <bruno@clisp.org>
23975
23976         * m4/pipe.m4: New file, from GNU gettext.
23977
23978 2004-02-03  Bruno Haible  <bruno@clisp.org>
23979
23980         * lib/pipe.h: New file, from GNU gettext.
23981         * lib/pipe.c: New file, from GNU gettext.
23982
23983 2004-01-27  Bruno Haible  <bruno@clisp.org>
23984
23985         * m4/execute.m4: New file, from GNU gettext.
23986
23987 2004-01-27  Bruno Haible  <bruno@clisp.org>
23988
23989         * lib/execute.h: New file, from GNU gettext.
23990         * lib/execute.c: New file, from GNU gettext.
23991         * lib/w32spawn.h: New file, from GNU gettext.
23992
23993 2004-01-24  Paul Eggert  <eggert@twinsun.com>
23994
23995         Merge from diffutils.
23996
23997         * lib/file-type.c (file_type): Add typed memory objects.
23998         * lib/file-type.h (S_TYPEISTMO): New macro.
23999
24000         * lib/c-stack.h (c_stack_action): Remove argv argument.
24001         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
24002         (die): Don't calculate message unless segv_action returns.
24003         (get_stack_location, min_address_from_argv, max_address_from_argv,
24004         volatile stack_base, volatile_stack_size): Remove.
24005         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
24006         that every segmentation violation is a stack overflow.  (Ouch!)
24007         See Debian bug 136249 (still outstanding) for more info about why
24008         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
24009
24010 2004-01-24  Paul Eggert  <eggert@twinsun.com>
24011
24012         Exit-status fix from coreutils.
24013
24014         Use exit_failure consistently in place of EXIT_FAILURE,
24015         so that program exit statuses are consistent on failure.
24016
24017         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
24018         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
24019         * lib/argmatch.h: Comment fix to match the above.
24020         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
24021         Now a macro referring to exit_failure, instead of a separate
24022         variable.  Include "exitfail.h" to get it.
24023         * lib/xstrtol.h: Include "exitfail.h".
24024         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
24025
24026         * lib/long-options.c (parse_long_options): Use prototype
24027         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
24028         for clarity.
24029
24030 2004-01-21  Jim Meyering  <jim@meyering.net>
24031
24032         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
24033         so as not to conflict with a different-sized __mktime_internal
24034         function in GNU libc.
24035         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
24036         Problem building statically-linked `ls' reported by Michael Brunnbauer.
24037
24038 2004-01-20  Karl Berry  <karl@gnu.org>
24039
24040         * config/config.guess: update from config.
24041
24042         * config/srclistvars.sh: GNUWWWLICENSES for karl.
24043
24044 2004-01-20  Bruno Haible  <bruno@clisp.org>
24045
24046         Safer stack allocation.
24047         * lib/setenv.c: Include allocsa.h.
24048         (alloca): Remove fallback definition.
24049         (freea): Remove macro.
24050         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
24051         instead of freea.
24052
24053 2004-01-20  Bruno Haible  <bruno@clisp.org>
24054
24055         * m4/eealloc.m4: New file, from GNU gettext.
24056
24057 2004-01-20  Bruno Haible  <bruno@clisp.org>
24058
24059         * m4/allocsa.m4: New file, from GNU gettext.
24060
24061 2004-01-20  Bruno Haible  <bruno@clisp.org>
24062
24063         * lib/xallocsa.h: New file, from GNU gettext.
24064         * lib/xallocsa.c: New file, from GNU gettext.
24065
24066 2004-01-20  Bruno Haible  <bruno@clisp.org>
24067
24068         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
24069
24070 2004-01-20  Bruno Haible  <bruno@clisp.org>
24071
24072         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
24073         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
24074         specially.
24075
24076 2004-01-20  Bruno Haible  <bruno@clisp.org>
24077
24078         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
24079         patch.
24080
24081 2004-01-20  Bruno Haible  <bruno@clisp.org>
24082
24083         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
24084
24085 2004-01-20  Bruno Haible  <bruno@clisp.org>
24086
24087         * lib/eealloc.h: New file.
24088
24089 2004-01-20  Bruno Haible  <bruno@clisp.org>
24090
24091         * lib/binary-io.h: Avoid warnings on Cygwin.
24092
24093 2004-01-20  Bruno Haible  <bruno@clisp.org>
24094
24095         * lib/allocsa.h: New file, from GNU gettext.
24096         * lib/allocsa.c: New file, from GNU gettext.
24097
24098 2004-01-18  Karl Berry  <karl@gnu.org>
24099
24100         * doc/gpl.texi, doc/lgpl.texi: new files.
24101
24102 2004-01-18  Karl Berry  <karl@gnu.org>
24103
24104         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
24105         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
24106
24107 2004-01-15  Paul Eggert  <eggert@twinsun.com>
24108
24109         Merge from coreutils.
24110
24111         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
24112         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
24113         (gl_DEFAULT_POSIX2_VERSION): Move
24114         the documentation from 'configure' into 'config.hin',
24115         so that 'configure --help' isn't burdened by it and
24116         we don't have to worry about its formatting there.
24117         Reword the documentation so that it's more succinct
24118         and can be run together into a single paragraph.
24119         * m4/same.m4 (gl_SAME): Check for pathconf.
24120
24121 2004-01-15  Paul Eggert  <eggert@twinsun.com>
24122
24123         Merge from coreutils.
24124
24125         * lib/posixver.c: Include posixver.h.
24126
24127         * lib/same.c: Include <stdbool.h>, <limits.h>.
24128         (_POSIX_NAME_MAX): Define if not defined.
24129         (MIN): New macro.
24130         (same_name): If file names are silently truncated, report
24131         that the file names are the same if they are the same after
24132         the silent truncation.
24133
24134         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
24135         conversion function.
24136         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
24137         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
24138         longer needed.
24139
24140 2004-01-15  Jim Meyering  <jim@meyering.net>
24141
24142         Merge from coreutils.
24143
24144         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
24145         if no library is required.
24146         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
24147         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
24148         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
24149         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
24150         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
24151         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
24152         value, $ac_cv_search_crypt, if it's "none required".
24153         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
24154         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
24155         not gl_FUNC_GETLOADAVG.
24156         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
24157         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
24158
24159 2004-01-15  Jim Meyering  <jim@meyering.net>
24160
24161         Merge from coreutils.
24162
24163         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
24164         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
24165         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
24166
24167         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
24168         optional configure-time default.
24169
24170         * lib/version-etc.c (version_etc_copyright): Update copyright date.
24171
24172         * lib/xreadlink.c (xreadlink): Correct outdated comment.
24173
24174 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
24175
24176         Merge from coreutils.
24177
24178         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
24179         value, $ac_cv_search_nanosleep, if it's "none required".
24180
24181 2004-01-14  Paul Eggert  <eggert@twinsun.com>
24182
24183         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
24184         with like-named macro in fnmatch.c.
24185         (EXT): Use an internal constant instead.
24186
24187         Merge fnmatch patches from glibc.
24188         * lib/fnmatch.c (mbsinit): Remove define.
24189         Add libc_hidden_ver (__fnmatch, fnmatch).
24190         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
24191         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
24192
24193 2004-01-14  Karl Berry  <karl@gnu.org>
24194
24195         * config/install-sh: update from automake.
24196
24197 2004-01-13  Karl Berry  <karl@gnu.org>
24198
24199         * config/install-sh: update from automake.
24200
24201 2004-01-09  Karl Berry  <karl@gnu.org>
24202
24203         * config/install-sh: update from automake.
24204
24205 2004-01-05  Karl Berry  <karl@gnu.org>
24206
24207         * config/config.{sub,guess}: update from config.
24208
24209 2003-12-31  Karl Berry  <karl@gnu.org>
24210
24211         * config/depcomp: update from automake.
24212
24213 2003-12-14  Karl Berry  <karl@gnu.org>
24214
24215         * lib/config.charset: update from gettext-runtime.
24216
24217 2003-12-03  Paul Eggert  <eggert@twinsun.com>
24218
24219         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
24220         Bug reported by Alfred M. Szmidt.
24221
24222 2003-12-03  Bruno Haible  <bruno@clisp.org>
24223
24224         * m4/gettext.m4: Upgrade from gettext-0.13.
24225         * m4/po.m4: Upgrade from gettext-0.13.
24226         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
24227         * m4/intmax.m4: New file, from gettext-0.13.
24228         * m4/printf-posix.m4: New file, from gettext-0.13.
24229
24230 2003-11-29  Karl Berry  <karl@gnu.org>
24231
24232         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
24233
24234 2003-11-25  Paul Eggert  <eggert@twinsun.com>
24235             Bruno Haible  <bruno@clisp.org>
24236
24237         * lib/printf-parse.h: Don't include sys/types.h.
24238         (ARG_NONE): New macro.
24239         (char_directive): Change type of *arg_index fields to size_t.
24240         * lib/printf-parse.c: Don't include sys/types.h.
24241         (SSIZE_MAX): Remove macro.
24242         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
24243         Remove unnecessary overflow check.
24244         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
24245         fields.
24246
24247 2003-11-25  Bruno Haible  <bruno@clisp.org>
24248
24249         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
24250
24251 2003-11-25  Bruno Haible  <bruno@clisp.org>
24252
24253         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
24254         gt_TYPE_SSIZE_T.
24255
24256 2003-11-24  Paul Eggert  <eggert@twinsun.com>
24257
24258         * modules/alloca: Remove dependency on xalloc.
24259
24260 2003-11-24  Paul Eggert  <eggert@twinsun.com>
24261
24262         * lib/alloca.c: Remove dependency on xalloc module.
24263         (xalloc_die): Remove.
24264         (memory_full) [!defined emacs]: New macro.
24265         [!defined emacs]: Don't include xalloc.h.
24266         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
24267         address arithmetic overflows.  Change datatypes a bit to avoid
24268         unnecessary casts.
24269
24270 2003-11-22  Jim Meyering  <jim@meyering.net>
24271
24272         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
24273         s/size/size_t/.
24274
24275 2003-11-21  Karl Berry  <karl@gnu.org>
24276
24277         * config/config.{sub,guess}: update from config.
24278
24279 2003-11-18  Karl Berry  <karl@gnu.org>
24280
24281         * config/config.{sub,guess}: update from config.
24282
24283         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
24284
24285 2003-11-17  Paul Eggert  <eggert@twinsun.com>
24286
24287         * README: Mention that S+T cannot overflow if S is the size of
24288         an existing object and T is sufficiently small.
24289
24290 2003-11-17  Jim Meyering  <jim@meyering.net>
24291
24292         On systems without utime and without a utimes function capable of
24293         dealing with a NULL struct utimbuf* argument, this utime replacement
24294         could -- in unusual circumstances -- leak a file descriptor.
24295         * lib/utime.c: Include <unistd.h> and <errno.h>.
24296         (utime_null): Be sure to close `fd' and to preserve errno.
24297         Reported by Geoff Collyer via Arnold Robbins.
24298
24299 2003-11-17  Bruno Haible  <bruno@clisp.org>
24300
24301         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
24302         (Depends-on): Add xsize.
24303
24304 2003-11-17  Bruno Haible  <bruno@clisp.org>
24305
24306         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
24307
24308 2003-11-17  Bruno Haible  <bruno@clisp.org>
24309
24310         * lib/vasnprintf.c (alloca): Remove fallback definition.
24311         (freea): Remove definition.
24312         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
24313         Reported by Paul Eggert.
24314
24315 2003-11-16  Paul Eggert  <eggert@twinsun.com>
24316             Bruno Haible  <bruno@clisp.org>
24317
24318         Protect against address arithmetic overflow.
24319         * lib/printf-args.h: Include stddef.h.
24320         (arguments): Change type of field 'count' to size_t.
24321         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
24322         'unsigned int' where appropriate.
24323         * lib/printf-parse.h: Include sys/types.h.
24324         (char_directive): Change type of *arg_index fields to ssize_t.
24325         (char_directives): Change type of fields 'count', max_*_length to
24326         size_t.
24327         * lib/printf-parse.c: Include sys/types.h and xsize.h.
24328         (SSIZE_MAX): Define fallback value.
24329         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
24330         instead of 'int' where appropriate. Check a_allocated, d_allocated
24331         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
24332         * lib/vasnprintf.c: Include xsize.h.
24333         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
24334         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
24335         overflow. Avoid wraparound when converting a width or precision from
24336         decimal to binary.
24337
24338 2003-11-16  Bruno Haible  <bruno@clisp.org>
24339
24340         Update from GNU gettext.
24341         * lib/printf-parse.c: Generalize to it can be compiled for wide
24342         strings.
24343         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
24344         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
24345         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
24346         SNPRINTF): New macros.
24347         Don't include <alloca.h> if the file is used inside libintl.
24348         (local_wcslen): New function, for Solaris 2.5.1.
24349         (VASNPRINTF): Use it instead of wcslen.
24350
24351 2003-11-16  Bruno Haible  <bruno@clisp.org>
24352
24353         * lib/xsize.h (xmax): New function.
24354         (xsum, xsum3, xsum4): Declare as "pure" functions.
24355
24356 2003-11-12  Paul Eggert  <eggert@twinsun.com>
24357
24358         * modules/xalloc (Files): Undo latest change, since xalloc.h
24359         no longer needs SIZE_MAX or PTRDIFF_MAX.
24360
24361 2003-11-12  Paul Eggert  <eggert@twinsun.com>
24362
24363         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
24364         gl_PTRDIFF_MAX.
24365
24366 2003-11-12  Paul Eggert  <eggert@twinsun.com>
24367
24368         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
24369         "return", to pacify some unknown compiler.  Problem reported
24370         by Joerg Schilling.
24371
24372 2003-11-12  Paul Eggert  <eggert@twinsun.com>
24373
24374         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
24375         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
24376         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
24377         heuristic is just as accurate as far as we know, and it removes a
24378         dependency on size_max.m4 and ptrdiff_max.m4.
24379
24380 2003-11-11  Bruno Haible  <bruno@clisp.org>
24381
24382         * modules/xsize (Files): Add m4/size_max.m4.
24383         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
24384
24385 2003-11-11  Bruno Haible  <bruno@clisp.org>
24386
24387         * m4/size_max.m4: New file.
24388         * m4/ptrdiff_max.m4: New file.
24389         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
24390         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
24391         (gl_XALLOC): Invoke it.
24392
24393 2003-11-11  Bruno Haible  <bruno@clisp.org>
24394
24395         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
24396         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
24397         defined.
24398
24399 2003-11-10  Paul Eggert  <eggert@twinsun.com>
24400
24401         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
24402         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
24403         rejected some allocations of exactly SIZE_MAX - 2 bytes.
24404         From Bruno Haible.
24405         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
24406         not (size_t) -1, since it's defined here.
24407
24408 2003-11-09  Karl Berry  <karl@gnu.org>
24409
24410         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
24411
24412 2003-11-06  Paul Eggert  <eggert@twinsun.com>
24413
24414         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
24415         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
24416         Reject sizes of exactly SIZE_MAX bytes.
24417         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
24418         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
24419
24420 2003-11-05  Bruno Haible  <bruno@clisp.org>
24421
24422         * lib/xsize.h: Include limits.h, to avoid a possible collision with
24423         SIZE_MAX defined in <limits.h> on Solaris.
24424
24425 2003-11-04  Jim Meyering  <jim@meyering.net>
24426
24427         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
24428         variable names, rather than @VAR@.
24429         * modules/poll: Likewise.
24430
24431 2003-11-04  Bruno Haible  <bruno@clisp.org>
24432
24433         * modules/xsize: New file.
24434         * modules/linebreak: Depend on xsize.
24435         * MODULES.html.sh (func_all_modules): Add xsize.
24436
24437 2003-11-04  Bruno Haible  <bruno@clisp.org>
24438
24439         * m4/xsize.m4: New file.
24440
24441 2003-11-04  Bruno Haible  <bruno@clisp.org>
24442
24443         * lib/xsize.h: New file.
24444         * lib/linebreak.c: Include xsize.h.
24445         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
24446         argument for overflow.
24447         Suggested by Paul Eggert.
24448
24449 2003-11-03  Karl Berry  <karl@gnu.org>
24450
24451         * config/config.{guess,sub}: update from config.
24452
24453 2003-11-03  Jim Meyering  <jim@meyering.net>
24454
24455         * modules/userspec (lib_SOURCES): Add userspec.h.
24456         (Include): Add "userspec.h".
24457         Improve description.
24458
24459 2003-11-03  Jim Meyering  <jim@meyering.net>
24460
24461         * lib/userspec.c: Include "userspec.h".
24462         * lib/userspec.h: New file.
24463
24464 2003-11-03  Bruno Haible  <bruno@clisp.org>
24465
24466         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
24467
24468 2003-11-03  Bruno Haible  <bruno@clisp.org>
24469
24470         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
24471         available, to avoid (extremely rare) race condition.
24472         Suggested by Paul Eggert.
24473
24474 2003-11-02  Karl Berry  <karl@gnu.org>
24475
24476         * config/srclist.txt (vasprintf.c): sync broken, sigh.
24477
24478 2003-10-31  Paul Eggert  <eggert@twinsun.com>
24479
24480         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
24481         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
24482         (read_filesystem_list): Set and use me_type_malloced.
24483         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
24484         whatever the type happens to be), for brevity and consistency.
24485         Check for size calculation overflow on Alphas running OSF/1.
24486
24487 2003-10-31  Jim Meyering  <jim@meyering.net>
24488
24489         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
24490
24491         * lib/linebuffer.c: Include <string.h> for declaration of memset.
24492
24493 2003-10-30  Paul Eggert  <eggert@twinsun.com>
24494             Bruno Haible  <bruno@clisp.org>
24495
24496         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
24497         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
24498
24499 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
24500
24501         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
24502         netbsd*-gnu*.  Suggested by Robert Millan.
24503
24504 2003-10-29  Paul Eggert  <eggert@twinsun.com>
24505
24506         * modules/group-member: Depend on stdbool.
24507
24508 2003-10-29  Paul Eggert  <eggert@twinsun.com>
24509
24510         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
24511
24512 2003-10-29  Paul Eggert  <eggert@twinsun.com>
24513
24514         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
24515         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
24516         after the 'gnu' in these cases.  This fixes some bugs in the
24517         previous change, and is based on suggestions by Robert Millan.
24518
24519 2003-10-29  Paul Eggert  <eggert@twinsun.com>
24520
24521         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
24522         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
24523         no longer needed.
24524         * lib/quotearg.c (quotearg_n_options): Use it.
24525         * lib/group-member.c: Include <stdbool.h>.
24526         (free_group_info): Arg is now const *; don't free arg.
24527         (get_group_info): Now returns bool and accepts struct group_info *,
24528         rather than returning a malloc'ed struct group_info *.
24529         All uses changed.  Check for overflow in internal size calculation.
24530
24531         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
24532         rather than xmalloc/xrealloc.
24533         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
24534         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
24535         conformance bug: the old code used a pointer after freeing the
24536         storage that it addressed.
24537         * lib/hash.c (hash_initialize): Simplify the code by using
24538         xalloc_oversized rather than doing it by hand.
24539         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
24540         the buffer preserved.  Use free and xmalloc instead.
24541         * lib/quotearg.c (quotearg_n_options): Likewise.
24542         Use a simpler test for size overflow.  Don't use xalloc_oversized
24543         because unsigned int might be wider than size_t (!); this suggests
24544         that we should switch from unsigned int to size_t for slot numbers.
24545
24546 2003-10-28  Paul Eggert  <eggert@twinsun.com>
24547
24548         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
24549         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
24550         NetBSD kernels.  Requested by Richard Stallman.
24551
24552 2003-10-27  Paul Eggert  <eggert@twinsun.com>
24553
24554         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
24555         to allocate the returned structure.  Do not allocate a subarray,
24556         as x2nrealloc will do that.
24557         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
24558         instead of xnrealloc.
24559         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
24560
24561 2003-10-27  Bruno Haible  <bruno@clisp.org>
24562
24563         * lib/stdbool_.h: Better support for BeOS.
24564
24565 2003-10-26  Paul Eggert  <eggert@twinsun.com>
24566
24567         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
24568         now uses inline.
24569
24570 2003-10-26  Paul Eggert  <eggert@twinsun.com>
24571
24572         * lib/xalloc.h (xalloc_oversized): New static inline function, for
24573         callers that want to do their own size-overflow checking.  Include
24574         <stdbool.h>, since xalloc_oversized returns bool.
24575         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
24576         to use xalloc_oversized.
24577
24578         Add two functions x2realloc, x2nrealloc, for programs that grow
24579         arrays dynamically by doubling their sizes.
24580         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
24581         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
24582         New functions.
24583
24584         Port to C99 semantics for 'inline' of external functions.
24585         Bug reported by Bruno Haible.
24586         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
24587         with the old contents of xnmalloc.
24588         (xnmalloc, xmalloc): Use it.
24589         (xnrealloc_inline): New static inline function,
24590         with the old contents of xnrealloc.
24591         (xnrealloc, xrealloc): Use it.
24592
24593         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
24594         that.
24595
24596 2003-10-26  Karl Berry  <karl@gnu.org>
24597
24598         * config/srclist.txt (COPYING.DOC): no longer available from
24599         /gd/gnuorg; don't know where the ultimate source is.
24600
24601 2003-10-25  Paul Eggert  <eggert@twinsun.com>
24602
24603         Fix several address-calculation bugs in the hash modules,
24604         plus some minor code cleanup.
24605
24606         * lib/hash.h: Include <stdbool.h>, for bool.
24607         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
24608         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
24609         hash_get_n_entries, hash_get_max_bucket_length,
24610         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
24611         hash_rehash): Use size_t rather than unsigned.
24612         * lib/hash.c (struct hash_table, hash_get_n_buckets,
24613         hash_get_n_buckets_used, hash_get_n_entries,
24614         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
24615         hash_get_entries, hash_do_for_each, hash_string, is_prime,
24616         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
24617         Likewise.
24618         (SIZE_MAX): Define if not defined.
24619         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
24620         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
24621         hash_print):
24622         Use const * when possible.
24623         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
24624         (check_tuning): Fix bug: if tuning parameters were very close to
24625         0 or 1, rounding errors could have caused subscript violations.
24626         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
24627         (hash_initialize): Add 'fail:' label
24628         to free table and return NULL, and use it to simplify code.
24629         Use calloc rather than clearing the storage ourself.
24630         (hash_initialize, hash_rehash): Check for arithmetic overflow in
24631         buffer size calculations.
24632         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
24633         Include <stddef.h>, for size_t.
24634         * lib/hash-pjw.c (hash_pjw): Likewise.
24635         Switch to method described by Bruno Haible.
24636         Include <limits.h>, for CHAR_BIT.
24637         (SIZE_BITS): New macro.
24638
24639 2003-10-23  Paul Eggert  <eggert@twinsun.com>
24640
24641         * m4/getline.m4 (AM_FUNC_GETLINE):
24642         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
24643         hosts.  Problem reported by Derek Robert Price in
24644         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
24645         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
24646         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
24647
24648 2003-10-21  Paul Eggert  <eggert@twinsun.com>
24649
24650         * lib/getndelim2.c (getndelim2): When size calculation overflows,
24651         ceiling the allocation at NMAX bytes rather than silently
24652         discarding input bytes before NMAX is reached.  This makes
24653         a difference only if NMAX exceeds SIZE_MAX / 2.
24654
24655         * lib/obstack.c: Merge from glibc.
24656         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
24657         Add libc_hidden_def (_obstack_newchunk).
24658         (_obstack_free) [! defined _LIBC]: Remove.
24659         [defined _LIBC]: Make a strong alias from obstack_free, rather than
24660         a clone of the function body.
24661         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
24662         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
24663
24664         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
24665         glibc.
24666         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
24667         arg to memcpy.
24668
24669         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
24670         (obstack_ptr_grow_fast, obstack_int_grow_fast):
24671         Don't use lvalue casts, as GCC plans to remove support for them
24672         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
24673         was also present in the non-GCC version, indicating that this
24674         code had always been buggy and had never been widely used.
24675         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
24676         Use the fast variant of each macro, rather than copying the
24677         definiens of the fast variant; that way, we'll be more likely to
24678         catch future bugs in the fast variants.
24679
24680 2003-10-20  Bruno Haible  <bruno@clisp.org>
24681
24682         * modules/wait-process: New file.
24683         * MODULES.html.sh (func_all_modules): Add wait-process.
24684
24685 2003-10-20  Bruno Haible  <bruno@clisp.org>
24686
24687         * m4/wait-process.m4: New file.
24688
24689 2003-10-20  Bruno Haible  <bruno@clisp.org>
24690
24691         * lib/wait-process.h: New file, from GNU gettext.
24692         * lib/wait-process.c: New file, from GNU gettext.
24693
24694 2003-10-19  Jim Meyering  <jim@meyering.net>
24695
24696         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
24697         HPUX 10.20.
24698
24699 2003-10-18  Karl Berry  <karl@gnu.org>
24700
24701         * config/config.guess: update from config.
24702
24703 2003-10-16  Paul Eggert  <eggert@twinsun.com>
24704
24705         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
24706         (getgroups): First arg is int, not size_t.
24707         Don't let 'free' mangle errno.
24708
24709 2003-10-16  Paul Eggert  <eggert@twinsun.com>
24710
24711         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
24712
24713 2003-10-16  Karl Berry  <karl@gnu.org>
24714
24715         * config/config.{guess,sub}: update from config.
24716
24717 2003-10-16  Jim Meyering  <jim@meyering.net>
24718
24719         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
24720         memcpy.
24721
24722 2003-10-15  Paul Eggert  <eggert@twinsun.com>
24723
24724         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
24725         (SIZE_MAX): Remove.
24726         (new_exclude, add_exclude_file): Initial size no longer needs to
24727         be a power of 2.
24728         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
24729         our own address arithmetic overflow checking.
24730
24731         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
24732         (fnmatch): Do not alloca more than 2000 wide characters;
24733         instead, use malloc for large buffers.
24734         Check for address arithmetic overflow, and return -1
24735         with errno set to ENOMEM in that case.
24736         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
24737         (NEW_PATTERN): Do not alloca more than 8000 bytes;
24738         instead, return -1.  Check for address arithmetic overflow.
24739
24740 2003-10-14  Paul Eggert  <eggert@twinsun.com>
24741
24742         Handle invalid suffixes and overflow independently, so that
24743         callers can treat them independently as needed.  Fix some bugs in
24744         suffix handling, e.g., "100k@" was not diagnosed as an invalid
24745         suffix for a human-readable blocksize.  The major caller-visible
24746         change is the addition of a new
24747         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
24748         that both overflow and suffix chars were found.
24749
24750         * lib/human.c (humblock): Don't check separately for invalid suffix
24751         char; that is xstrtoumax's job (now that its bug is fixed).
24752         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
24753         INTMAX_MAX]: New macros.
24754         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
24755         TYPE_MAXIMUM): New macros.
24756         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
24757         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
24758         if overflow occurs, as it's what __strtol does and it's more useful
24759         in practice.
24760         (__xstrtol): If __strtol reports some error other than ERANGE,
24761         reflect it to the caller as LONGINT_INVALID.  If it reports
24762         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
24763         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
24764         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
24765         value.
24766         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
24767         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
24768         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
24769         [defined UINTMAX_MAX]: New macros.
24770
24771 2003-10-14  Bruno Haible  <bruno@clisp.org>
24772
24773         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
24774
24775 2003-10-14  Bruno Haible  <bruno@clisp.org>
24776
24777         * m4/sig_atomic_t: New file, from GNU gettext.
24778         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
24779
24780 2003-10-14  Bruno Haible  <bruno@clisp.org>
24781
24782         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
24783         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
24784         Also use volatile where needed.
24785
24786 2003-10-12  Paul Eggert  <eggert@twinsun.com>
24787
24788         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
24789         Change maintainer from Bruno Haible to 'all'.
24790
24791 2003-10-12  Paul Eggert  <eggert@twinsun.com>
24792
24793         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
24794
24795 2003-10-12  Paul Eggert  <eggert@twinsun.com>
24796
24797         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
24798         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
24799         and define in terms of the other primitives.
24800         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
24801         (SIZE_MAX): Define if not already defined.
24802         (array_size_overflow): New function.
24803         (xalloc_die): Abort instead of exiting if 'error' returns.
24804         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
24805         (xmalloc, xrealloc): Use them.
24806         (xcalloc): Check for address arithmetic overflow.
24807         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
24808         a bit faster than strcpy.
24809
24810 2003-10-10  Simon Josefsson  <jas@extundo.com>
24811
24812         * modules/argp (Depends-on): Add restrict and strcase.
24813
24814 2003-10-10  Simon Josefsson  <jas@extundo.com>
24815
24816         * m4/argp.m4: Add AC_C_INLINE.
24817
24818 2003-10-08  Paul Eggert  <eggert@twinsun.com>
24819
24820         Merge getpass from libc, plus a few fixes.
24821
24822         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
24823         Include <stdbool.h>.
24824         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
24825         __fsetlocking to empty.
24826         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
24827         do include <bits/libc-lock.h>.
24828         Do not include <fcntl.h>; not needed.
24829         [_LIBC]: Include <wchar.h>.
24830         (NOTCANCEL_MODE): New macro.
24831         (flockfile, funlockfile) [_LIBC]: New macros.
24832         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
24833         [!_LIBC]: New macros.
24834         (call_fclose): New function.
24835         (getpass): Use it.  Save tty stream separately; this simplifies the
24836         code and makes it more reliable if stdin happens to equal stdout.
24837         Invoke __fsetlocking on tty.
24838         Handle thread cancellation if needed.
24839         Namespace cleanup (use __tcgetattr, __getline).
24840         Use bool for Booleans.
24841         [USE_IN_LIBIO]: Handle wide streams.
24842         [!_LIBC]: Unconditionally do the fseek, since we don't know what
24843         stream might go where.
24844
24845         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
24846         doesn't have to include <stdio.h> before us.
24847         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
24848         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
24849         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
24850         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
24851         if not declared, so that we can use getpass.c code from libc without
24852         rewriting it.
24853         (flockfile, ftrylockfile, funlockfile): New macros.
24854
24855 2003-10-08  Paul Eggert  <eggert@twinsun.com>
24856
24857         * modules/getpass: Depend on stdbool.
24858
24859 2003-10-08  Paul Eggert  <eggert@twinsun.com>
24860
24861         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
24862
24863 2003-10-07  Karl Berry  <karl@gnu.org>
24864
24865         * config/config.{guess,sub}: update from config.
24866
24867 2003-10-06  Jim Meyering  <jim@meyering.net>
24868             Bruno Haible  <bruno@clisp.org>
24869
24870         This lets translators provide better translations for the
24871         "Written by ..." part of --version output.
24872         * lib/version-etc.h: Include stdarg.h.
24873         (version_etc_copyright): Declare as readonly.
24874         (version_etc): Make this function variadic with a NULL-terminated list
24875         of author name strings.
24876         (version_etc_va): New declaration.
24877         * lib/version-etc.c: Include stdarg.h, stdlib.h.
24878         (version_etc_copyright): Declare as readonly.
24879         (version_etc_va): New function. Provide a different translatable string
24880         for each possible number of authors < 10. Abbreviate when there are 10
24881         authors or more.
24882         (version_etc): Make this function variadic. Call version_etc_va.
24883         Suggestion from Gary V. Vaughan.
24884
24885         * lib/long-options.h (parse_long_options): Change prototype: the
24886         authors string is moved to the end and becomes variadic.
24887         * lib/long-options.c: Include stdarg.h.
24888         (parse_long_options): Make this function variadic, too.
24889         Call version_etc_va, not version_etc.
24890
24891 2003-10-06  Bruno Haible  <bruno@clisp.org>
24892
24893         * modules/version-etc-2: Remove file.
24894         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
24895
24896 2003-10-06  Bruno Haible  <bruno@clisp.org>
24897
24898         * modules/fatal-signal: New file.
24899         * MODULES.html.sh (func_all_modules): Add fatal-signal.
24900
24901 2003-10-06  Bruno Haible  <bruno@clisp.org>
24902
24903         * m4/fatal-signal.m4: New file.
24904         * m4/signalblocking.m4: New file, from GNU gettext.
24905
24906 2003-10-06  Bruno Haible  <bruno@clisp.org>
24907
24908         * lib/version-etc-2.h: Remove file.
24909         * lib/version-etc-2.c: Remove file.
24910
24911 2003-10-06  Bruno Haible  <bruno@clisp.org>
24912
24913         * lib/fatal-signal.h: New file, from GNU gettext.
24914         * lib/fatal-signal.c: New file, from GNU gettext.
24915
24916 2003-10-05  Paul Eggert  <eggert@twinsun.com>
24917
24918         * README: Rework advice for preventing empty .o files.
24919         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
24920         not <sys/types.h>.
24921
24922 2003-10-04  Karl Berry  <karl@gnu.org>
24923
24924         * lib/argp*: update from libc.
24925
24926 2003-10-04  Karl Berry  <karl@gnu.org>
24927
24928         * config/config.{guess,sub}: update from config.
24929
24930 2003-10-02  Bruno Haible  <bruno@clisp.org>
24931
24932         * modules/lchown (Include): Add lchown.h.
24933         * modules/time_r (Include): Use "..." syntax.
24934         * modules/xgetdomainname (Include): Add xgetdomainname.h.
24935
24936 2003-10-01  Simon Josefsson  <jas@extundo.com>
24937
24938         * MODULES.html.sh (func_all_modules): Move gethostname from section
24939         'based on' to section 'lacking' POSIX:2001.
24940
24941 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
24942
24943         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
24944         to output mode on the same stream.
24945
24946 2003-09-29  Paul Eggert  <eggert@twinsun.com>
24947
24948         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
24949         Fix arg typo in previous patch.
24950
24951 2003-09-28  Jim Meyering  <jim@meyering.net>
24952
24953         * lib/error.c: Correct cpp indentation.
24954
24955 2003-09-27  Paul Eggert  <eggert@twinsun.com>
24956
24957         * modules/free: New file.
24958
24959 2003-09-27  Paul Eggert  <eggert@twinsun.com>
24960
24961         * m4/free.m4: New file.
24962
24963 2003-09-27  Paul Eggert  <eggert@twinsun.com>
24964
24965         * lib/minmax.h (MIN, MAX)
24966         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
24967         Omit the special code that used __typeof__, since we worry that
24968         it could be more trouble than it's worth.  See:
24969         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
24970         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
24971
24972         * lib/free.c: New file.
24973
24974 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
24975
24976         Trivial fixes to Makefile.am parts of module listings.
24977         * modules/strstr: Append strstr.h to lib_SOURCES.
24978         * modules/strcase: Likewise, for strcase.h.
24979
24980 2003-09-27  Karl Berry  <karl@gnu.org>
24981
24982         * config/mkinstalldirs: update from automake.
24983
24984 2003-09-26  Paul Eggert  <eggert@twinsun.com>
24985
24986         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
24987         (error_tail): Do not loop, reallocating temporary buffer, since
24988         the output cannot contain more wide characters than the input
24989         contains bytes, the size must be big enough already.  This avoids
24990         one potential size overflow calculation.  Check for size overflow
24991         when calculating temporary buffer size.  Free temporary buffer
24992         when done, if it was allocated with malloc; this plugs a memory
24993         leak.  Remove casts from void * to pointers, that are no longer
24994         needed now that we're assuming C89 or better.
24995
24996         Merge error changes from glibc.
24997
24998         * lib/error.c, error.h: Update copyright notice header to match glibc.
24999         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
25000         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
25001         Disable cancellation while printing error.
25002         * lib/error.h: Prepend __ to parameter names.
25003
25004 2003-09-26  Jim Meyering  <jim@meyering.net>
25005
25006         * lib/error.c (error_tail): Move some declarations
25007         into inner scope where the local variables are used.
25008
25009 2003-09-26  Bruno Haible  <bruno@clisp.org>
25010
25011         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
25012         stpncpy().
25013         Don't define stpncpy through config.h; it's now done through stpncpy.h.
25014
25015 2003-09-26  Bruno Haible  <bruno@clisp.org>
25016
25017         * lib/stpncpy.h (gnu_stpncpy): New declaration.
25018         (stpncpy): Define as alias for gnu_stpncpy.
25019         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
25020
25021 2003-09-25  Simon Josefsson  <jas@extundo.com>
25022
25023         * lib/xgetdomainname.h: New file.
25024         * lib/xgetdomainname.c: New file.
25025
25026 2003-09-25  Simon Josefsson  <jas@extundo.com>
25027             Bruno Haible  <bruno@clisp.org>
25028
25029         * modules/getdomainname: New file.
25030         * modules/xgetdomainname: New file.
25031         * MODULES.html.sh (func_all_modules): Add getdomainname,
25032         xgetdomainname.
25033
25034 2003-09-25  Simon Josefsson  <jas@extundo.com>
25035             Bruno Haible  <bruno@clisp.org>
25036
25037         * m4/getdomainname.m4: New file.
25038
25039 2003-09-25  Simon Josefsson  <jas@extundo.com>
25040             Bruno Haible  <bruno@clisp.org>
25041
25042         * lib/getdomainname.h: New file.
25043         * lib/getdomainname.c: New file.
25044
25045 2003-09-25  Karl Berry  <karl@gnu.org>
25046
25047         * lib/argp-fmtstream.c, argp-help.c: update from libc.
25048
25049 2003-09-25  Karl Berry  <karl@gnu.org>
25050
25051         * config/install-sh: update from automake.
25052
25053 2003-09-25  Bruno Haible  <bruno@clisp.org>
25054
25055         * modules/version-etc-2: New file, from modules/version-etc with
25056         modifications.
25057         * MODULES.html.sh (func_all_modules): Add version-etc-2.
25058
25059 2003-09-25  Bruno Haible  <bruno@clisp.org>
25060
25061         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
25062         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
25063
25064 2003-09-24  Simon Josefsson  <jas@extundo.com>
25065
25066         * modules/xgethostname: Add xgethostname.h.
25067
25068 2003-09-24  Paul Eggert  <eggert@twinsun.com>
25069
25070         * lib/linebuffer.c (freebuffer): Don't free the argument, just
25071         the buffer associated with the argument.  Bug reported by
25072         Simon Josefsson.
25073
25074 2003-09-24  Paul Eggert  <eggert@twinsun.com>
25075
25076         * README: Document assumptions that 'int' is at least 32 bits
25077         wide, that integer arithmetic is 2's complement without overflow,
25078         that there are no holes in integer values, that adding sizes of
25079         two nonoverlapping objects can't overflow, and that all-bits-zero
25080         yields scalar zero.  Fix spelling and capitalization typos.
25081
25082 2003-09-19  Karl Berry  <karl@gnu.org>
25083
25084         * lib/argp.h: update from libc.
25085
25086 2003-09-17  Paul Eggert  <eggert@twinsun.com>
25087
25088         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
25089         to avoid spurious warnings like "AC_RUN_IFELSE was called before
25090         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
25091
25092 2003-09-17  Paul Eggert  <eggert@twinsun.com>
25093
25094         * gnulib-tool: Use "test -h", not "test -L", for portability
25095         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
25096         (tags_regexp): Remove, since \| doesn't conform to POSIX.
25097         (sed_extract_prog): Issue s commands one-by-one, rather than
25098         using \| in one s command.
25099
25100 2003-09-16  Paul Eggert  <eggert@twinsun.com>
25101
25102         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
25103         input error, instead of returning NULL the next time we are called
25104         (and therefore losing track of errno).
25105
25106 2003-09-16  Bruno Haible  <bruno@clisp.org>
25107
25108         * gnulib-tool (func_create_testdir): Warn about duplicated
25109         dependencies.
25110
25111 2003-09-15  Paul Eggert  <eggert@twinsun.com>
25112
25113         * modules/argmatch, modules/fatal, modules/obstack,
25114         modules/xalloc, modules/xgethostname: Sort dependencies by
25115         importance, not alphabetically.
25116
25117 2003-09-15  Paul Eggert  <eggert@twinsun.com>
25118
25119         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
25120         fails, so that the caller gets the proper errno.
25121
25122         * lib/readutmp.c (read_utmp): Likewise.
25123         Check for fstat error.  Close stream and free storage
25124         when failing.
25125
25126 2003-09-14  Karl Berry  <karl@gnu.org>
25127
25128         * config/srclist.txt (strdup.c): disable for c89 changes.
25129
25130 2003-09-14  Jim Meyering  <jim@meyering.net>
25131
25132         * lib/getloadavg.c: Correct cpp indentation.
25133         * lib/strdup.c: Likewise.
25134         * lib/vasnprintf.c: Likewise.
25135
25136 2003-09-14  Bruno Haible  <bruno@clisp.org>
25137
25138         * modules/fwriteerror: New file.
25139         * MODULES.html.sh (func_all_modules): Add fwriteerror.
25140
25141 2003-09-14  Bruno Haible  <bruno@clisp.org>
25142
25143         * lib/fwriteerror.h: New file.
25144         * lib/fwriteerror.c: New file.
25145
25146 2003-09-12  Paul Eggert  <eggert@twinsun.com>
25147
25148         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
25149         modules/xgethostname, modules/xalloc: Depend on exit.
25150
25151 2003-09-12  Paul Eggert  <eggert@twinsun.com>
25152
25153         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
25154
25155         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
25156         and AC_MINIX, too, so that their extensions are available.
25157
25158         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
25159         This macro has been superseded by gl_BACKUPFILE.
25160
25161         More patches to assume C89 or better.
25162
25163         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
25164
25165         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
25166         unconditionally.
25167         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
25168         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
25169         Include <string.h>, <stdlib.h> unconditionally.
25170         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
25171         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
25172         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
25173         headers or for string.h.
25174         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
25175         or strtoul.
25176
25177         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
25178         headers.
25179         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
25180         * m4/userspec.m4 (gl_USERSPEC): Likewise.
25181         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
25182         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
25183         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
25184         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
25185         memcpy, memset.
25186         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
25187         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
25188         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
25189         strtol.
25190         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
25191         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
25192         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
25193         strtoul.
25194
25195 2003-09-12  Paul Eggert  <eggert@twinsun.com>
25196
25197         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
25198         * lib/obstack.c [!defined _LIBC]: Likewise.
25199         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
25200         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
25201         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
25202
25203         More changes to assume C89 or better.
25204
25205         * lib/error.c (error_tail): Assume vprintf.
25206
25207         * lib/argmatch.c (getenv): Remove decl.
25208         * lib/progreloc.c (get_full_program_name): Define via prototype.
25209         * lib/setenv.c (clearenv): Likewise.
25210         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
25211         needed.
25212         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
25213         (malloc, memcpy): Remove decls.
25214         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
25215         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
25216         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
25217         (memcpy): Remove macro.
25218         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
25219         (__P): Remove.  All uses removed.
25220         (PTR): Remove.  All uses changed to void *.
25221         (CHAR_BIT, NULL): Remove.
25222         (spaces, zeros, memset_space, memset_zero)
25223         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
25224         Remove.
25225         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
25226         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
25227         Define with prototype.
25228         Remove now-unnecessary prototype decl.
25229         (extra_args_spec): Assume ANSI C.  All uses changed.
25230         (extra_args_spec_iso): Remove.
25231         (my_strftime, emacs_strftimeu): Define via prototype.
25232         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
25233         unconditionally.
25234         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
25235         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
25236         (strtoul, strtol): Remove decls.
25237         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
25238         LONG_MAX): Remove.
25239         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
25240         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
25241         (LOCALE_PARAM_PROTO): New macro.
25242         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
25243         (INTERNAL (strtol), strtol): Define with a prototype.
25244         (PARAMS): Remove.  All uses removed.
25245         * lib/tempname.c: Include <string.h> unconditionally.
25246         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
25247         * lib/xgethostname.c (main): Define with a prototype.
25248         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
25249         Include <stdlib.h> unconditionally.
25250         (calloc, malloc, realloc, free): Remove decls.
25251         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
25252         Include <stdlib.h> unconditionally.  Sort include file names.
25253         (strtod): Remove.
25254         (xstrtod): Define with a prototype.
25255         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
25256         (strtol, strtoul): Remove decls.
25257
25258 2003-09-11  Paul Eggert  <eggert@twinsun.com>
25259
25260         More patches to assume C89 or better.
25261         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
25262         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
25263         string.h, memchr, STDC_HEADERS.
25264
25265 2003-09-11  Paul Eggert  <eggert@twinsun.com>
25266
25267         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
25268         Include <stdlib.h>, <string.h> unconditionally.
25269         Remove now-unnecessary cast to char *.
25270         * lib/strnlen.c: Include <string.h> unconditionally.
25271         * lib/yesno.c (yesno): Define with a prototype.
25272
25273 2003-09-11  Bruno Haible  <bruno@clisp.org>
25274
25275         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
25276
25277 2003-09-10  Jim Meyering  <jim@meyering.net>
25278
25279         * lib/error.c: Correct indentation of cpp directives.
25280
25281 2003-09-10  Bruno Haible  <bruno@clisp.org>
25282
25283         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
25284         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
25285         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
25286         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
25287         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
25288         <stdlib.h> and <string.h> checks.
25289         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
25290         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
25291
25292 2003-09-10  Bruno Haible  <bruno@clisp.org>
25293
25294         * lib/strcspn.c: Include <string.h> unconditionally.
25295         * lib/strpbrk.c: Include <string.h> unconditionally.
25296         * lib/strstr.c: Include <string.h> unconditionally.
25297         * lib/unicodeio.c: Include <string.h> unconditionally.
25298         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
25299         * lib/unsetenv.c: Likewise.
25300         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
25301         * lib/yesno.c: Include <stdlib.h> unconditionally.
25302         (rpmatch): Add prototype.
25303
25304 2003-09-09  Paul Eggert  <eggert@twinsun.com>
25305
25306         More patches to assume C89 or better.
25307         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
25308         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
25309         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
25310         or for string.h.
25311         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
25312         stdlib.h.
25313         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
25314         C headers.
25315         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
25316         string.h.
25317         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
25318         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
25319         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
25320         or for string.h.
25321         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
25322         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
25323         C headers.
25324         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
25325         memcpy.
25326         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
25327         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
25328         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
25329         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
25330         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
25331         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
25332         string.h, free.
25333         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
25334         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
25335         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
25336         C headers, or for string.h.
25337         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
25338         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
25339         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
25340         headers, memory.h, stdlib.h, string.h, strings.h.
25341         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
25342         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
25343         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
25344         strchr.
25345         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
25346         headers, memory.h, string.h.
25347         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
25348         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
25349         free.
25350         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
25351         headers.
25352         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
25353         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
25354         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
25355         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
25356         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
25357
25358 2003-09-09  Paul Eggert  <eggert@twinsun.com>
25359
25360         More K&R removal.
25361
25362         * lib/acosl.c (main): Use a prototype.
25363         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
25364         tanl.c: Likewise.
25365
25366         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
25367
25368         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
25369         (getopt, etopt_long, getopt_long_only, _getopt_internal)
25370         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
25371         with a prototype.
25372         * lib/getopt.c (const): Remove macro.
25373         Include <string.h> unconditionally.
25374         (my_index): Remove; all uses changed to strchr.
25375         (strlen): Remove decl.
25376         (exchange): Remove forward decl; no longer needed.
25377         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
25378         Define with prototype.
25379         * lib/getopt1.c (const): Remove macro.
25380         (getopt_long, getopt_long_only, main): Define with prototype.
25381
25382         * lib/getugroups.c: Include <string.h> unconditionally.
25383
25384         * lib/getusershell.c: Include <stdlib.h> unconditionally.
25385         (getusershell, setusershell, endusershell, readname, main):
25386         Define with prototypes.
25387
25388         * lib/group-member.c: Include group-member.h first.
25389         Include <stdlib.h> unconditionally.
25390
25391         * lib/hard-locale.c: Include hard-locale.h first.
25392         Include <stdlib.h>, <string.h> unconditionally.
25393
25394         * lib/hash.c (free, malloc): Remove decls.
25395         Include <stdlib.h> unconditionally.
25396
25397         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
25398         (getenv): Do not declare.
25399
25400         * lib/idcache.c: Include <string.h> unconditionally.
25401
25402         * lib/long-options.c: Include long-options.h first, to test interface.
25403         Include <stdlib.h> unconditionally.
25404
25405         * lib/makepath.c: Include makepath.h first, to test interface.
25406         Include <stdlib.h> and <string.h> unconditionally.
25407
25408         * lib/linebuffer.c: Include <stdlib.h>.
25409         (free): Remove decl.
25410
25411         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
25412         stddef.h. rpl_malloc returns void *, not char *.
25413         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
25414         prototype.
25415
25416         * lib/md5.h: Include <limits.h> unconditionally.
25417         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
25418         (__P): Remove; all uses removed.
25419         * lib/md5.c: Include "md5.h" first.
25420         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
25421         md5_buffer, md5_process_bytes, md5_process_block):
25422         Define with prototypes.
25423         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
25424         * lib/sha.c: Include "sha.h" first.
25425         Include <stdlib.h>, <string.h> unconditionally.
25426
25427         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
25428         * lib/memcmp.c (__ptr_t): Likewise.
25429         * lib/memrchr.c (__ptr_t): Likewise.
25430         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
25431         Include <string.h> unconditionally.
25432         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
25433         * lib/memchr.c: Include <stdlib.h> unconditionally.
25434         * lib/memchr.c (LONG_MAX): Remove.
25435         * lib/memrchr.c (LONG_MAX): Likewise.
25436         * lib/memchr.c (__memchr): Define via a prototype.
25437         * lib/memrchr.c (__memrchr): Likewise.
25438         * lib/memcmp.c (__P): Remove, and remove all uses.
25439         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
25440         Remove forward decls; no longer needed.
25441         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
25442         Use types required by C89 in prototype.
25443
25444         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
25445         * lib/savedir.c: Likewise.
25446         * lib/mkdir.c (free): Remove decl.
25447         * lib/rmdir.c (rmdir): Define with a prototype.
25448         * lib/savedir.c: Include savedir.h first, to test interface.
25449
25450         * lib/mktime.c (STDC_HEADERS): Remove.
25451         Include <stdlib.h>, <string.h> unconditionally.
25452
25453         * lib/modechange.c: Include <stdlib.h> unconditionally.
25454         (malloc): Remove decl.
25455
25456         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
25457         (free): Remove decl.
25458
25459         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
25460         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
25461         (This type really should be intptr_t, but that's a C99ism.)
25462         (_obstack_memcpy): Remove: all uses changed to memcpy.
25463         Include <string.h> unconditionally.
25464         (struct obstack): Assume __STDC__ for types of members
25465         chunkfun, freefun, extra_arg.
25466         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
25467         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
25468         obstack_begin, obstack_specify_allocation,
25469         obstack_specify_allocation_with_arg, obstack_chunkfun,
25470         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
25471         Remove unprototyped decls and the macros that use them.
25472         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
25473         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
25474         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
25475         (defined __STDC__ && __STDC__)]:
25476         Remove nonprototyped code.
25477         Include <stdlib.h> unconditionally.
25478         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
25479         _obstack_allocated_p, _obstack_free, obstack_free,
25480         _obstack_memory_used, print_and_abort):
25481         Define using prototypes.
25482         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
25483         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
25484         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
25485         obstack_next_free, obstack_object_size, obstack_room) [0]:
25486         Remove unused, unprototyped code.
25487
25488         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
25489
25490         * lib/physmem.c (physmem_total, physmem_available, main): Define
25491         with prototypes.
25492
25493         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
25494         (main): Define with a prototype.
25495
25496         * lib/posixver.c (getenv): Remove decl.
25497
25498         * lib/putenv.c (malloc): Returns void *, not char *.
25499         Include <string.h> unconditionally.
25500         (strchr, memcpy, NULL): Do not define.
25501
25502         * lib/readtokens.c: Include readtokens.h first, to test interface.
25503         Include <stdlib.h>, <string.h> unconditionally.
25504         (init_tokenbuffer): Define with a prototype.
25505
25506         * lib/regex.c (PARAMS): Remove.  All uses removed.
25507         All uses of _RE_ARGS removed, too.
25508         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
25509         unconditionally.
25510         (bzero): Assume memset exists.
25511         (memcmp, memcpy, NULL): Remove.
25512         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
25513         char, or assignments to local vars of type signed char.
25514         (init_syntax_once, PREFIX(extract_number_and_incr),
25515         PREFIX(print_partial_compiled_pattern),
25516         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
25517         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
25518         PREFIX(regex_grow_registers), PREFIX(regex_compile),
25519         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
25520         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
25521         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
25522         wcs_compile_range, byte_compile_range, truncate_wchar,
25523         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
25524         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
25525         count_mbs_length, wcs_re_match_2_internal,
25526         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
25527         PREFIX(alt_match_null_string_p),
25528         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
25529         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
25530         regfree, PREFIX(extract_number)): Define with prototype.  Remove
25531         now-unnecessary declaration, if any.
25532         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
25533         regcomp, regexec):
25534         Remove now-unnecessary casts among pointer types.
25535         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
25536
25537         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
25538         (free): Remove decl.
25539
25540         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
25541
25542         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
25543         (free): Remove decl.
25544
25545         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
25546         * lib/xgetcwd.c: Likewise.
25547
25548         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
25549         (free): Remove decl.
25550
25551         * lib/strchrnul.c (strchrnul): Define with a prototype.
25552         Fix bug: c_in was not converted to char before searching.
25553
25554         The following changes are not K&R related:
25555
25556         * lib/group-member.h: Include <sys/types.h>, so that this file is
25557         self-contained.
25558         * lib/makepath.h: Likewise.
25559
25560         * lib/getusershell.c (readname, default_index, line_size, readname):
25561         Use size_t, not int, for sizes.
25562         (readname): If the size overflows, report an error instead of
25563         looping forever.
25564
25565 2003-09-09  Paul Eggert  <eggert@twinsun.com>
25566
25567         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
25568         libc.
25569
25570 2003-09-09  Paul Eggert  <eggert@twinsun.com>
25571
25572         * README: New section: portability guidelines.
25573
25574 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
25575
25576         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
25577         C89 spec.
25578
25579 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
25580
25581         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
25582
25583 2003-09-08  Paul Eggert  <eggert@twinsun.com>
25584
25585         Assume C89 or better; remove K&R cruft.
25586         A few of these changes were first proposed by Derek Robert Price
25587         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
25588
25589         * lib/addext.c: Include <string.h> unconditionally.
25590         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
25591         Don't declare getenv or malloc.
25592
25593         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
25594         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
25595         (NULL): Remove.
25596         (find_stack_direction, alloca): Use prototypes.
25597
25598         * lib/atexit.c (atexit): Define using a prototype.
25599
25600         * lib/basename.c, dirname.c, stripslash.c:
25601         Include <string.h> unconditionally.
25602
25603         * lib/bcopy.c: Include <stddef.h>.
25604         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
25605
25606         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
25607
25608         * lib/error.h (error, error_at_line, error_print_progname)
25609         [! (defined (__STDC__) && __STDC__)]: Remove decls.
25610         * lib/error.c: Include error.h first, to check interface.
25611         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
25612         (VA_START): Remove; all uses changeed to va_start.
25613         (exit, strerror): Remove decls.
25614         (error_print_progname): Prototype uncondionally.
25615         Don't include <errno.h>; no longer needed.
25616         (private_strerror): Remove.
25617         (error_tail): Always define.
25618         (error, error_at_line): Assume C89 or better; always use prototypes.
25619         * lib/fatal.c: Include "fatal.h" first, to test interface.
25620         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
25621         (VA_START): Remove; all uses changed to va_start.
25622         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
25623         this case.
25624         (exit): Remove decl.
25625         (fatal): Prototype unconditionally.  Assume va_start works.
25626         Abort at end, to pacify gcc.
25627
25628         * lib/euidaccess.c (main): Define with a prototype.
25629
25630         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
25631
25632         * lib/exitfail.c: Include <stdlib.h> unconditionally.
25633
25634         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
25635         prototypes.
25636         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
25637         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
25638         (getenv): Remove decl.
25639         (fnmatch): Define using a prototype.
25640         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
25641         (FCT): Define using a prototype.
25642
25643         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
25644
25645         * lib/gethostname.c: Include <stddef.h>.
25646         (gethostname): Define with prototype.  Length is size_t, not int.
25647
25648 2003-09-08  Paul Eggert  <eggert@twinsun.com>
25649
25650         Assume C89 or better; remove K&R cruft.
25651         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
25652         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
25653         string.h, getenv, malloc.
25654         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
25655         headers.
25656         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
25657         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
25658         do not check for strerror.
25659         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
25660         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
25661         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
25662         do not check for doprnt or vprintf.
25663         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
25664         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
25665
25666 2003-09-08  Paul Eggert  <eggert@twinsun.com>
25667
25668         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
25669         getversion.c should have been removed then, but was accidentally
25670         preserved.
25671
25672         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
25673         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
25674
25675 2003-09-08  Karl Berry  <karl@gnu.org>
25676
25677         * config/config.sub, config.guess, srclistvars.sh: update from savannah
25678                 config, forget about prep.
25679
25680         * config/depcomp, missing: update from automake.
25681
25682 2003-09-07  Paul Eggert  <eggert@twinsun.com>
25683
25684         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
25685         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
25686
25687 2003-09-07  Paul Eggert  <eggert@twinsun.com>
25688
25689         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
25690         copy_tm_result.  Bug reported by Simon Josefsson in
25691         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
25692
25693 2003-09-06  Paul Eggert  <eggert@twinsun.com>
25694
25695         * m4/time_r.m4: New file.
25696         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
25697         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
25698         is. Check for timegm declaration.
25699         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
25700         Do not check for gmtime_r.
25701         Replace mktime if __mktime_internal does not exist and if mktime
25702         hasn't been replaced already.
25703
25704 2003-09-06  Paul Eggert  <eggert@twinsun.com>
25705
25706         * lib/time_r.c, lib/time_r.h: New files.
25707
25708         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
25709         __localtime_r.
25710         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
25711         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
25712
25713         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
25714         __gmtime_r.
25715         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
25716         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
25717         Include <time_r.h>.
25718
25719         * lib/timegm.c: Switch to glibc implementation, with the following
25720         changes:
25721         [defined HAVE_CONFIG_H]: Include <config.h>.
25722         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
25723         (__mktime_internal) [!defined _LIBC]: New decl.
25724         (__gmtime_r) [!defined _LIBC]: New macro and function.
25725         (timegm): Use a prototype, since gnulib assumes C89.
25726         Do not bother declaring tmp to be const, as it's not really usefu.
25727         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
25728         (timegm): Declare only if HAVE_DECL_TIMEGM.
25729
25730 2003-09-06  Paul Eggert  <eggert@twinsun.com>
25731
25732         * MODULES.html.sh (func_all_modules): Add time_r.
25733         * modules/time_r: New file.
25734         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
25735         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
25736
25737 2003-09-03  Paul Eggert  <eggert@twinsun.com>
25738
25739         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
25740         Bug reported by Lute Kamstra in
25741         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
25742
25743         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
25744         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
25745         course with correspondingly smaller numbers for tomorrow and
25746         yesterday.  From Tadayoshi Funaba.  Originally installed into
25747         sh-utils on 1999-08-07, but the patch got lost (I guess during the
25748         coreutils merge?).
25749
25750 2003-08-31  Simon Josefsson  <jas@extundo.com>
25751
25752         * modules/timegm: New file.
25753         * MODULES.html.sh (func_all_modules): Add timegm.
25754
25755 2003-08-31  Simon Josefsson  <jas@extundo.com>
25756
25757         * m4/timegm.m4: New file.
25758
25759 2003-08-31  Simon Josefsson  <jas@extundo.com>
25760
25761         * lib/timegm.h: New file.
25762         * lib/timegm.c: New file.  Based on
25763         wget-1.8.2/src/http.c:mktime_from_utc.
25764
25765 2003-08-31  Karl Berry  <karl@gnu.org>
25766
25767         * lib/argp.h: update from libc.
25768
25769 2003-08-28  Bruno Haible  <bruno@clisp.org>
25770
25771         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
25772         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
25773         followed by '#define fnmatch fnmatch_posix' gives an error.
25774
25775 2003-08-28  Bruno Haible  <bruno@clisp.org>
25776
25777         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
25778         warning on QNX, which defines O_BINARY to 000000.
25779
25780 2003-08-27  Jim Meyering  <jim@meyering.net>
25781
25782         * m4/mkstemp.m4: Require that the system mkstemp be able to create
25783         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
25784         would fail after 32.  Reported by Danny Levinson.  Details here:
25785         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
25786
25787 2003-08-24  Bruno Haible  <bruno@clisp.org>
25788
25789         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
25790         MSVC7 <stdio.h> is included later.
25791
25792 2003-08-22  Simon Josefsson  <jas@extundo.com>
25793
25794         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
25795
25796 2003-08-20  Karl Berry  <karl@gnu.org>
25797
25798         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
25799
25800 2003-08-20  Bruno Haible  <bruno@clisp.org>
25801
25802         * modules/progname: New file.
25803         * MODULES.html.sh (func_all_modules): Add progname.
25804
25805 2003-08-20  Bruno Haible  <bruno@clisp.org>
25806
25807         * lib/progname.h: New file, from GNU gettext.
25808         * lib/progname.c: New file, from GNU gettext.
25809         * lib/progreloc.c: New file, from GNU gettext.
25810
25811 2003-08-19  Jim Meyering  <jim@meyering.net>
25812
25813         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
25814         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
25815
25816 2003-08-19  Bruno Haible  <bruno@clisp.org>
25817
25818         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
25819         more.
25820
25821 2003-08-19  Bruno Haible  <bruno@clisp.org>
25822
25823         * lib/xstrdup.c: Assume <string.h> exists.
25824
25825 2003-08-18  Paul Eggert  <eggert@twinsun.com>
25826
25827         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
25828         in makefile rules.
25829
25830 2003-08-18  Jim Meyering  <jim@meyering.net>
25831
25832         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
25833         * m4/lib-ld.m4: Likewise.
25834
25835 2003-08-18  Jim Meyering  <jim@meyering.net>
25836
25837         * lib/setenv.h: Indent nested cpp directive.
25838         * lib/vasnprintf.c: Remove trailing blanks.
25839
25840 2003-08-17  Simon Josefsson  <jas@extundo.com>
25841
25842         * modules/xstrndup: New file.
25843         * MODULES.html.sh (func_all_modules): Add xstrndup.
25844
25845 2003-08-17  Simon Josefsson  <jas@extundo.com>
25846
25847         * modules/argp: Fix autoconf macro name. Add more dependencies.
25848
25849 2003-08-17  Simon Josefsson  <jas@extundo.com>
25850
25851         * m4/xstrndup.m4: New file.
25852
25853 2003-08-17  Simon Josefsson  <jas@extundo.com>
25854
25855         * m4/argp.m4: New file.
25856
25857 2003-08-17  Simon Josefsson  <jas@extundo.com>
25858             Bruno Haible  <bruno@clisp.org>
25859
25860         * lib/xstrndup.h: New file.
25861         * lib/xstrndup.c: New file.
25862
25863 2003-08-17  Bruno Haible  <bruno@clisp.org>
25864
25865         * modules/strndup (Files, Include): Add lib/strndup.h.
25866
25867 2003-08-17  Bruno Haible  <bruno@clisp.org>
25868
25869         * modules/euidaccess (Files): Add lib/euidaccess.h.
25870
25871 2003-08-17  Bruno Haible  <bruno@clisp.org>
25872
25873         * lib/strndup.h: New file.
25874
25875 2003-08-17  Bruno Haible  <bruno@clisp.org>
25876
25877         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
25878         like AC_GNU_SOURCE.
25879         * modules/extensions (configure.ac): Comment out the invocation of
25880         gl_USE_SYSTEM_EXTENSIONS.
25881
25882 2003-08-16  Paul Eggert  <eggert@twinsun.com>
25883
25884         Merges from coreutils, etc.
25885         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
25886         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
25887         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
25888         fixing a typo.
25889         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
25890         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
25891
25892 2003-08-16  Paul Eggert  <eggert@twinsun.com>
25893
25894         Document merge from coreutils.
25895         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
25896         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
25897         * modules/utime: Add m4/utimes-null.m4.
25898
25899 2003-08-16  Paul Eggert  <eggert@twinsun.com>
25900
25901         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
25902         space, undoing this 2003-08-12 change:
25903         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
25904
25905 2003-08-16  Paul Eggert  <eggert@twinsun.com>
25906
25907         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
25908         strtoul.c from libc, undoing this 2003-08-12 change:
25909         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
25910
25911 2003-08-16  Jim Meyering  <jim@meyering.net>
25912
25913         Merges from coreutils.
25914         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
25915         prefix.  Adjust cache variables similarly.  Create 500 rather than
25916         just 300 files, to exercise bug on Darwin6.5, too.
25917         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
25918         $missing_dir.
25919         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
25920         AM_SYS_POSIX_TERMIOS.
25921         Reported by mkc@mathdogs.com.
25922         Also change use of $am_cv_sys_posix_termios
25923         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
25924         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
25925         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
25926         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
25927         in /proc/mounts until it finds one with matching device number.  This
25928         is unnecessary when the FILE argument *is* a mount point.  No stat call
25929         is necessary in that case.  So, disable the statvfs-testing code on
25930         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
25931         as RedHat bug# 84846.
25932         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
25933         to 1MB, so as not to render systems with no stack size limit (e.g.,
25934         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
25935         Include <unistd.h>.  On some systems,
25936         it is required for the definition of _SC_PAGESIZE.
25937
25938 2003-08-16  Jim Meyering  <jim@meyering.net>
25939
25940         Merge from coreutils.
25941         * lib/xstrtoimax.c: #else #if -> #elif.
25942         * lib/xstrtoumax.c: Likewise.
25943
25944 2003-08-16  Jim Meyering  <jim@meyering.net>
25945
25946         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
25947         * m4/utimes.m4: Removed.
25948         * m4/utimes-null.m4: Renamed from utimes.m4.
25949
25950         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
25951         to 1MB, so as not to render systems with no stack size limit (e.g.,
25952         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
25953         Include <unistd.h>.  On some systems,
25954         it is required for the definition of _SC_PAGESIZE.
25955
25956 2003-08-16  Jim Meyering  <jim@meyering.net>
25957         and Paul Eggert  <eggert@cs.ucla.edu>
25958
25959         Merges from coreutils, etc.
25960
25961         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
25962         using the latest version from cvs.  This avoids problems with #line
25963         directives using a vendor (Sun) compiler.
25964         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
25965         Don't set GETGROUPS_LIB here; now it's
25966         done via getgroups.m4's wrapper function.
25967         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
25968         rather than just in sh-util/configure.in, so that the
25969         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
25970         same.
25971         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
25972         AC_FUNC_GETLOADAVG where to find getloadavg.c.
25973         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
25974         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
25975         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
25976         Remove code that is now done by the newly-required macros.
25977         Append $(EXEEXT) to DF_PROG.
25978         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
25979         Do not invoke or require the following here,
25980         since prereq.m4 or some gnulib .m4 now does this for us:
25981         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
25982         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
25983         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
25984         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
25985         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
25986         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
25987         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
25988         AC_FUNC_OBSTACK.
25989         Do not replace the following functions, as this is now the job
25990         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
25991         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
25992         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
25993         atexit getpass, strdup, getpagesize.
25994         Replace 'raise'.
25995         Do not check for the following functions, as this is now the job
25996         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
25997         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
25998         setregid.
25999         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
26000         Check for sys/sysctl.h.
26001         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
26002         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
26003         of checking for ssize_t ourselves.
26004
26005         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
26006         Require every macro that gnulib/modules/* suggests for us.
26007         (jm_PREREQ_ADDEXT): New macro.
26008         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
26009         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
26010
26011         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
26012         (gl_PHYSMEM): Use it.
26013         Also check for `table' function.
26014         Check for new headers and functions.
26015         Add check for sys/sysmp.h.
26016         With suggestions from Kaveh Ghazi.
26017         Ignore headers that are present but cannot be compiled.  This
26018         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
26019         C 5.4.
26020
26021 2003-08-15  Paul Eggert  <eggert@twinsun.com>
26022
26023         Document merge from coreutils.
26024         * modules/userspec: Depend on posixver.
26025         * modules/strftime: Depend on tzset.
26026
26027 2003-08-15  Paul Eggert  <eggert@twinsun.com>
26028
26029         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
26030         rather than tab, after '#' in shell-script copyright notices.
26031         Suggested by Bruno Haible.
26032
26033 2003-08-15  Paul Eggert  <eggert@twinsun.com>
26034
26035         * config/srclist-update: Use three spaces, rather than tab, after '#'
26036         in shell-script copyright notices.  Suggested by Bruno Haible.
26037         Remove unnecessary parenthesization in regular expression.
26038
26039 2003-08-15  Jim Meyering  <jim@meyering.net>
26040
26041         Merge from coreutils.
26042         * lib/xgethostname.c: Include <stdlib.h>.
26043         (xghostname): Don't exit for anything other than memory-related
26044         failure; just return NULL.
26045         * lib/userspec.c: Include "posixver.h".
26046         (parse_user_spec): Accept `.' as a separator only
26047         in pre-POSIX-200112 mode.
26048         * lib/strtoimax.c: Use #elif rather than #else #if.
26049         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
26050         Remove function, now that we can rely on a working tzset function.
26051         [!_LIBC]: Ensure that the required autoconf test has been run.
26052         [!defined _NL_CURRENT && HAVE_STRFTIME]:
26053         Use underlying_strftime for %r.
26054         * lib/sha.c: Merge in some clean-up and optimization changes from
26055         glibc.
26056         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
26057         Ensure that it is a multiple of 64.
26058         Rearrange loop exit tests so as to avoid performing an
26059         additional fread after encountering an error or EOF.
26060         * lib/realloc.c: Update copyright date.
26061
26062 2003-08-15  Jim Meyering  <jim@meyering.net>
26063         and Paul Eggert  <eggert@twinsun.com>
26064
26065         Merge from coreutils.
26066         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
26067         member but strut utmpx does not.  Needed for AIX 4.3.3.
26068         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
26069
26070 2003-08-15  Jim Meyering  <jim@meyering.net>
26071         and Paul Eggert  <eggert@cs.ucla.edu>
26072
26073         Merges from coreutils, etc.
26074         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
26075         Require gl_FUNC_TZSET_CLOBBER.
26076         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
26077         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
26078         members.
26079
26080 2003-08-14  Paul Eggert  <eggert@twinsun.com>
26081
26082         Help the merge from coreutils.
26083         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
26084         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
26085         * m4/tzset.m4: Use it too.
26086
26087 2003-08-14  Paul Eggert  <eggert@twinsun.com>
26088
26089         * modules/tzset: New file.
26090
26091 2003-08-14  Jim Meyering  <jim@meyering.net>
26092
26093         Merges from coreutils.
26094         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
26095         variable names, rather than @FNMATCH_H@.
26096         * modules/alloca: Likewise for $(ALLOCA_H).
26097
26098         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
26099         the three copies of the literal target, `fnmatch.h'.
26100         * modules/alloca (alloca.h): Likewise.
26101
26102 2003-08-14  Jim Meyering  <jim@meyering.net>
26103
26104         Merge from coreutils.
26105         * m4/tzset.m4: New file.
26106         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
26107         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
26108         otherwise, AIX 5.1 systems would end up using the latter.
26109         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
26110         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
26111         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
26112         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
26113
26114 2003-08-14  Jim Meyering  <jim@meyering.net>
26115
26116         Merge from coreutils.
26117         * lib/obstack.h: Whitespace changes.
26118         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
26119         and xcalloc return values.
26120         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
26121         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
26122         hang on OSF/1 5.1 for DIR on both local and remote file systems.
26123         Reported by (and fix confirmed by) Nelson H. F. Beebe.
26124         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
26125         error from mntctl.
26126         Use mntctl's return value to drive the entry-processing loop, since
26127         we can't rely on the value of the vmt_length member in the last
26128         entry.  On some systems doing so could result in exhausting
26129         virtual memory.  Based in part on a patch from Mike Jetzer.
26130
26131 2003-08-14  Jim Meyering  <jim@meyering.net>
26132         and Paul Eggert  <eggert@twinsun.com>
26133
26134         Merges from coreutils, plus other fixes.
26135         * lib/physmem.c: Merge in portability changes from gcc/libiberty
26136         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
26137         for credits and details.  Thanks to Kaveh Ghazi for helping
26138         to keep these files in sync.
26139         (ARRAY_SIZE): Define it.
26140         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
26141         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
26142         (memcasecmp): Don't assume size_t fits in unsigned int.
26143         Remove casts and duplicate code.
26144         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
26145         (memcpy): Remove definition.
26146         Merge in some clean-up and optimization changes from glibc.
26147         [BLOCKSIZE]: Move definition to top of file.
26148         Ensure that it is a multiple of 64.
26149         Rearrange loop exit tests so as to avoid performing an
26150         additional fread after encountering an error or EOF.
26151         * lib/md5.h (md5_uintptr): Define.
26152         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
26153         return to the initial working directory.  Preserve errno
26154         for caller.
26155         * lib/idcache.c: Include "xalloc.h".
26156         (xmalloc, xrealloc): Remove decls.
26157         (getuser): Remove casts no longer required in C89.
26158         * lib/human.c: Include stdio.h, for sprintf.
26159         * lib/group-member.c: Include "xalloc.h".
26160         (xmalloc, xrealloc): Remove decls.
26161         (get_group_info): Remove casts no longer required in C89.
26162         * lib/getusershell.c (readname): Remove casts no longer required in
26163         C89.
26164         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
26165         * lib/getline.c: Whitespace fix, from coreutils.
26166
26167 2003-08-13  Paul Eggert  <eggert@twinsun.com>
26168
26169         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
26170         Check for isascii.
26171
26172         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
26173         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
26174         Undo previous (whitespace-only) change.
26175
26176 2003-08-13  Paul Eggert  <eggert@twinsun.com>
26177
26178         * lib/exclude.c: Include <ctype.h>
26179         (IN_CTYPE_DOMAIN): New macro.
26180         (is_space): New fn.
26181         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
26182         and empty lines.
26183
26184         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
26185         Undo previous (whitespace-only) change.
26186
26187 2003-08-13  Paul Eggert  <eggert@twinsun.com>
26188
26189         * config/srclist-update: Change update back to the old behavior,
26190         leaving whitespace alone.  Use one 'sed' command rather than a
26191         pipeline.
26192         (fixlicense): Now a variable, not a function.
26193         (remove_trailing_blanks): Remove.
26194         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
26195         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
26196         Undo previous (whitespace-only) change.
26197
26198 2003-08-12  Paul Eggert  <eggert@twinsun.com>
26199
26200         Merge from coreutils.
26201         * modules/euidaccess: Add lib_SOURCES, include for new
26202         file euidaccess.h
26203
26204 2003-08-12  Paul Eggert  <eggert@twinsun.com>
26205
26206         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
26207         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
26208         Normalize leading white space and remove trailing white space.
26209
26210         Merge from coreutils
26211         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
26212
26213         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
26214         0.12.1.  These files are now being upgraded automatically by
26215         ../config/srclist-update.
26216
26217 2003-08-12  Paul Eggert  <eggert@twinsun.com>
26218
26219         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
26220         Normalize leading white space and remove trailing white space.
26221         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
26222         notice, as per ../config/srclist-update.
26223
26224         Merge from coreutils.
26225         * lib/euidaccess.h: New file.
26226         * lib/euidaccess.c: Include it.
26227         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
26228         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
26229         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
26230
26231 2003-08-12  Paul Eggert  <eggert@twinsun.com>
26232
26233         * config/srclist-update: Add copyright notice.
26234         (remove_id_lines, remove_trailing_blanks): New constants.
26235         (fixfile): Use them to normalize spacing a bit in copied files.
26236         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
26237         Normalize leading white space and remove trailing white space.
26238
26239         * config/texinfo.tex: Sync with texinfo.
26240
26241         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
26242         strtoul.c from libc, to merge coreutils whitespace changes.
26243
26244         * config/srclist.txt: Get the following m4 files from gettext:
26245         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
26246         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
26247         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
26248         wint_t.m4.
26249
26250 2003-08-12  Karl Berry  <karl@gnu.org>
26251
26252         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
26253         been made.
26254
26255 2003-08-11  Paul Eggert  <eggert@twinsun.com>
26256
26257         * modules/gnu-source, m4/gnu-source.m4:
26258         Remove; we're assuming Autoconf 2.54 or later now.
26259         Suggested by Bruno Haible.
26260         * MODULES.html.sh (func_all_modules): Remove gnu-source.
26261
26262 2003-08-11  Bruno Haible  <bruno@clisp.org>
26263
26264         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
26265
26266 2003-08-11  Bruno Haible  <bruno@clisp.org>
26267
26268         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
26269         (vasnprintf): Use it instead of wcslen.
26270
26271 2003-08-11  Bruno Haible  <bruno@clisp.org>
26272
26273         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
26274         value to ensure that _Bool promotes to int. Use #define for _Bool when
26275         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
26276
26277 2003-08-10  Karl Berry  <karl@gnu.org>
26278
26279         * lib/regex.h: update from libc (whitespace fix).
26280
26281 2003-08-09  Paul Eggert  <eggert@twinsun.com>
26282
26283         Merge some files from coreutils.  These changes were
26284         originally made by Jim Meyering.
26285         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
26286         many older Unixes require this.
26287         * lib/alloca.c (alloca): Remove cast to argument of free;
26288         no longer needed in C89.
26289         * lib/alloca_.h, regex.h: Fix white space to match
26290         what GNU indent does.
26291
26292 2003-08-09  Paul Eggert  <eggert@twinsun.com>
26293
26294         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
26295         apparently Emacs's Unicode mode got confused before my 2003-08-05
26296         checkin.
26297
26298 2003-08-08  Paul Eggert  <eggert@twinsun.com>
26299
26300         * m4/extensions.m4: New file.
26301         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
26302         Require gl_USE_SYSTEM_EXTENSIONS.
26303         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
26304         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
26305
26306 2003-08-08  Paul Eggert  <eggert@twinsun.com>
26307
26308         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
26309         * modules/extensions, modules/gnu-source: New files.
26310         * modules/timespec, modules/unlocked-io: Depend on extensions.
26311
26312 2003-08-07  Paul Eggert  <eggert@twinsun.com>
26313
26314         * modules/restrict: New file.
26315         * MODULES.html.sh (func_all_modules): Add restrict.
26316         * modules/regex: Depend on restrict.
26317
26318 2003-08-07  Paul Eggert  <eggert@twinsun.com>
26319
26320         * m4/restrict.m4: New file.
26321         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
26322
26323 2003-08-07  Bruno Haible  <bruno@clisp.org>
26324
26325         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
26326         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
26327
26328 2003-08-07  Bruno Haible  <bruno@clisp.org>
26329
26330         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
26331         makes the module 'getndelim2' compatible with the module 'getline'.
26332
26333 2003-08-05  Paul Eggert  <eggert@twinsun.com>
26334
26335         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
26336         byte with "\201" to avoid glitches when editing that source file
26337         with multi-gnome-terminal.
26338
26339 2003-08-05  Paul Eggert  <eggert@twinsun.com>
26340
26341         * lib/bumpalloc.h: Remove.
26342
26343 2003-08-05  Paul Eggert  <eggert@twinsun.com>
26344
26345         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
26346         * modules/bumpalloc: Remove.
26347
26348 2003-08-04  Paul Eggert  <eggert@twinsun.com>
26349
26350         * lib/getloadavg.c: Change copyright notice and spacing to conform to
26351         GNU coding style.
26352
26353         Merge from coreutils.
26354         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
26355         1. From glibc.
26356         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
26357         from Karl Berry, implemented by Jim Meyering.
26358         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
26359         from Dmitry V. Levin.
26360         Remove anachronistic cast of xrealloc.
26361         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
26362         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
26363         type. Otherwise, it wouldn't compile with at least /bin/cc on
26364         ymp-cray-unicos9.0.2.X.
26365         Combine two mostly-identical uses of alloca into one.
26366         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
26367
26368 2003-08-04  Dave Love  <d.love@dl.ac.uk>
26369
26370         [From Emacs.]
26371
26372         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
26373         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
26374         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
26375         obsolete NLIST_NAME_UNION.
26376         [__GNU__]: Undef BSD and FSCALE.
26377         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
26378
26379 2003-08-03  Paul Eggert  <eggert@twinsun.com>
26380
26381         * lib/stdbool_.h (_Bool): Make it signed char, instead of
26382         an enum type, so that it's guaranteed to promote to int.  See:
26383         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
26384
26385 2003-08-03  Karl Berry  <karl@gnu.org>
26386
26387         * config/depcomp: update from automake.
26388
26389 2003-07-31  Paul Eggert  <eggert@twinsun.com>
26390
26391         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
26392         (strerror): Don't assume that a printable int fits in 14 bytes.
26393
26394 2003-07-31  Bruno Haible  <bruno@clisp.org>
26395
26396         * modules/getpass-gnu: New file.
26397         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
26398
26399 2003-07-31  Bruno Haible  <bruno@clisp.org>
26400
26401         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
26402
26403 2003-07-24  Karl Berry  <karl@gnu.org>
26404
26405         * config/missing: update from automake.
26406
26407 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
26408             Bruno Haible  <bruno@clisp.org>
26409
26410         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
26411         * lib/getline.c (getline, getdelim): Likewise.
26412         Remove _GNU_SOURCE define; now it's defined in config.h through
26413         m4/getline.m4.
26414
26415 2003-07-23  Karl Berry  <karl@gnu.org>
26416
26417         * config/config.sub: update from prep.
26418
26419 2003-07-22  Paul Eggert  <eggert@twinsun.com>
26420
26421         * modules/xalloc (Depends-on): Add exitfail.
26422         * modules/xmemcoll: Likewise.
26423
26424 2003-07-22  Paul Eggert  <eggert@twinsun.com>
26425
26426         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
26427         over-parenthesization in macros.
26428
26429         Sync with coreutils.
26430
26431         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
26432         required by C99.
26433
26434         Use `exit_failure' for xalloc and xmemcoll instead of their own
26435         private exit-failure variables.
26436         * lib/xalloc.h (xalloc_exit_failure): Remove.
26437         * lib/xmalloc.c: Likewise.  Include exitfail.h.
26438         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
26439         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
26440         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
26441         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
26442
26443 2003-07-20  Jim Meyering  <jim@meyering.net>
26444
26445         * modules/closeout (Depends-on): Add exitfail.
26446         Suggestion from Bruno Haible.
26447
26448 2003-07-19  Karl Berry  <karl@gnu.org>
26449
26450         * config/config.sub: update from prep.
26451
26452 2003-07-18  Paul Eggert  <eggert@twinsun.com>
26453
26454         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
26455         Remove.
26456         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
26457         to test that it can stand by itself.  Include "exitfail.h".
26458         Clients should set exit_failure instead.
26459         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
26460
26461 2003-07-18  Bruno Haible  <bruno@clisp.org>
26462
26463         * modules/getndelim2: New file.
26464         * modules/getline: Share files with module getndelim2.
26465         * modules/getnline: Depend on getndelim2 instead of sharing files with
26466         it. Add getnline.c to lib_SOURCES.
26467         * MODULES.html.sh (func_all_modules): Add getndelim2.
26468
26469 2003-07-18  Bruno Haible  <bruno@clisp.org>
26470
26471         * m4/getndelim2.m4: New file.
26472         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
26473         invoke gl_PREREQ_GETNDELIM2.
26474         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
26475         gl_PREREQ_GETNDELIM2.
26476         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
26477         gl_GETNDELIM2.
26478
26479 2003-07-18  Bruno Haible  <bruno@clisp.org>
26480
26481         * lib/getndelim2.h: New file.
26482         * lib/getndelim2.c: Make into a module of its own. Include config.h,
26483         getndelim2.h.
26484         (getndelim2): Make non-static. Change return type to ssize_t.
26485         * lib/getline.h: Change argument names.
26486         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
26487         * lib/getnline.c: Include getndelim2.h.
26488
26489 2003-07-18  Andreas Schwab  <schwab@suse.de>
26490
26491         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
26492
26493 2003-07-17  Karl Berry  <karl@gnu.org>
26494
26495         * config/config.sub: update from prep.
26496
26497 2003-07-17  Bruno Haible  <bruno@clisp.org>
26498
26499         * modules/getnline: New file.
26500         * modules/getline: Add lib/getndelim2.c to source file list.
26501         * MODULES.html.sh (func_all_modules): Add getnline.
26502
26503 2003-07-17  Bruno Haible  <bruno@clisp.org>
26504
26505         * m4/getnline.m4: New file.
26506
26507 2003-07-17  Bruno Haible  <bruno@clisp.org>
26508
26509         * m4/Makefile.am.in: Remove file.
26510         * m4/Makefile.am: Remove file.
26511         * m4/Makefile.in: Remove file.
26512
26513 2003-07-17  Bruno Haible  <bruno@clisp.org>
26514
26515         * lib/getnline.h: New file.
26516         * lib/getnline.c: New file.
26517         * lib/getndelim2.c: New file, extracted from getline.c.
26518         (getndelim2): Renamed from getdelim2, with added nmax argument.
26519         * lib/getline.c: Include getndelim2.c.
26520         (getdelim2): Moved out to getndelim2.c.
26521         (getline, getdelim): Update.
26522
26523 2003-07-17  Bruno Haible  <bruno@clisp.org>
26524
26525         * lib/Makefile.am: Remove file.
26526         * lib/Makefile.in: Remove file.
26527
26528 2003-07-17  Bruno Haible  <bruno@clisp.org>
26529
26530         * configure.in: Remove file.
26531         * Makefile.in: Remove file.
26532
26533 2003-07-17  Bruno Haible  <bruno@clisp.org>
26534
26535         * MODULES.html.sh: Put the </BODY> right before </HTML>.
26536
26537 2003-07-16  Karl Berry  <karl@gnu.org>
26538
26539         * config/srclist-update: was running fixlicense twice, which caused
26540                 texinfo.tex to be nullified for some reason.  Simplify,
26541                 $gplsrc is no longer needed as far as I can see?
26542
26543 2003-07-16  Jim Meyering  <jim@meyering.net>
26544
26545         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
26546
26547 2003-07-15  Paul Eggert  <eggert@twinsun.com>
26548
26549         * config/srclist.txt: Get the following files from gettext-runtime/intl
26550         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
26551         ref-del.sin.  From Bruno Haible.
26552         * config/srclist-update (fixfile): Change grep pattern again, since the
26553         previous fix didn't work (there was another trailing $).  Use
26554         '[$]' to escape the $s.
26555
26556 2003-07-15  Karl Berry  <karl@gnu.org>
26557
26558         * lib/vasnprintf.c: update from gettext.
26559
26560 2003-07-15  Karl Berry  <karl@gnu.org>
26561
26562         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
26563         gets expanded when surrounded by '$'.
26564
26565 2003-07-15  Jim Meyering  <jim@meyering.net>
26566
26567         * modules/save-cwd: Don't depend on error.  From Derek Price.
26568
26569 2003-07-15  Jim Meyering  <jim@meyering.net>
26570
26571         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
26572
26573 2003-07-14  Simon Josefsson  <jas@extundo.com>
26574
26575         * modules/mempcpy: New file.
26576         * MODULES.html.sh (func_all_modules): Add mempcpy.
26577
26578 2003-07-14  Simon Josefsson  <jas@extundo.com>
26579
26580         * m4/mempcpy.m4: New file.
26581
26582 2003-07-14  Simon Josefsson  <jas@extundo.com>
26583
26584         * lib/mempcpy.h: New file.
26585         * lib/mempcpy.c: New file.
26586
26587 2003-07-14  Paul Eggert  <eggert@twinsun.com>
26588
26589         * modules/getdate, modules/posixtm: Depend on mktime.
26590
26591 2003-07-14  Paul Eggert  <eggert@twinsun.com>
26592
26593         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
26594         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
26595         unicodeio.c, unicodeio.h, unlocked-io.h:
26596         Switch from LGPL to GPL.
26597
26598 2003-07-14  Paul Eggert  <eggert@twinsun.com>
26599
26600         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
26601         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
26602         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
26603         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
26604         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
26605         updated automatically by ../config/srclist-update.  This changes
26606         their license from LPGL to GPL.
26607
26608 2003-07-14  Paul Eggert  <eggert@twinsun.com>
26609
26610         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
26611         assumed to refer to the root of the most recent stable gettext version.
26612         * config/srclistvars.sh: Add defaults for eggert.
26613         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
26614         Match "This program" as well as "The program".  This is needed
26615         for gettext.
26616
26617 2003-07-14  Jim Meyering  <jim@meyering.net>
26618
26619         Don't emit diagnostics.  Let callers do that.
26620         * lib/save-cwd.c: Don't include "error.h".
26621         (save_cwd): Don't call error.  Ensure that errno is valid
26622         when returning nonzero.
26623
26624         * lib/save-cwd.h (restore_cwd): Update prototype.
26625         * lib/save-cwd.c (restore_cwd): Remove two parameters.
26626         Simplify.  Don't call error upon failure.  Let callers do that.
26627         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
26628         when auditing is enabled.  But don't bother updating the #if.
26629
26630 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
26631
26632         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
26633         it breaks C++ compilation.
26634         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
26635
26636 2003-07-10  Simon Josefsson  <jas@extundo.com>
26637
26638         * modules/strchrnul (Makefile.am): Add strchrnul.h.
26639
26640 2003-07-10  Jim Meyering  <jim@meyering.net>
26641
26642         * m4/clock_time.m4: Remove trailing blank.
26643         * m4/intmax_t.m4: Likewise.
26644
26645 2003-07-10  Jim Meyering  <jim@meyering.net>
26646
26647         * lib/vasnprintf.c: Remove trailing blanks.
26648         Make cpp indentation consistent.
26649
26650 2003-07-09  Paul Eggert  <eggert@twinsun.com>
26651
26652         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
26653         posixver.c, strftime.c, strnlen.c, strverscmp.c:
26654         Switch from LGPL to GPL.
26655
26656 2003-07-09  Paul Eggert  <eggert@twinsun.com>
26657
26658         * config/srclist.txt: Sort sublists.  Add
26659         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
26660         that differ from gnulib for one reason or another; we'd like this list
26661         to be smaller but for now let's document what we have.
26662
26663 2003-07-08  Paul Eggert  <eggert@twinsun.com>
26664
26665         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
26666         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
26667         and sweeter "eval x=$x".
26668         * config/srclist.txt: Get lib/argp* from glibc.
26669
26670 2003-07-07  Paul Eggert  <eggert@twinsun.com>
26671
26672         * lib/mktime.c: Fix some boundary cases and remove need for floating
26673         point.
26674
26675         Issue a compile-time diagnostic if time_t is floating point, or if
26676         two's complement arithmetic is not in effect, or if arithmetic
26677         right shift does not propagate the sign.  These assumptions were
26678         all in the original code but they weren't checked.
26679
26680         (TIME_T_MIDPOINT, verify): New macros.
26681         (__isleap): Remove; it has integer overflow problems.
26682         (leapyear): New function, without those problems.
26683         (ydhms_tm_diff): Remove; splitting into two parts.
26684         (ydhms_diff): New function, containing the arithmetic part of
26685         the old ydhms_tm_diff function.  Issue a compile-time
26686         diagnostic if we are not using C99 integer division.
26687         Avoid casts when possible.
26688         (guess_time_tm): New function, containing the checking part of
26689         the old ydhms_tm_diff function.  Return the new value, rather than
26690         the difference between it and the old.  Accept a new argument T
26691         so that *T specifies the old value.  Check for overflow in the result.
26692
26693         (__mktime_internal): Use a time_t offset, not a long int offset.
26694         This undoes the 2003-06-04 change, which is no longer needed now
26695         that we have better overflow checking.
26696         (localtime_offset): Likewise.
26697
26698         (__mktime_internal): Avoid harmful overflow on hosts where time_t
26699         and long are 64-bit but int is only 32-bit.
26700         (ydhms_diff): Use long int to store year1 and yday1.
26701         Issue a compile-time diagnostic if long int is not wide enough.
26702
26703         (__mktime_internal): Use long int to store adjusted year and yday.
26704         Use plain C rather than preprocessor commands, if that doesn't
26705         affect efficiency.
26706         Check for overflow (and try to repair) after each probe
26707         rather than checking only at the very end.  This avoids some bugs
26708         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
26709         does not equal GMT offset at maximum time).
26710         Use integer to check for overflow rather than floating point; this
26711         is more portable to non-IEEE hosts, and is a tad faster.
26712         When we detect that we are oscillating between two values,
26713         don't check whether tm_isdst has the requested value, since
26714         we already know the answer.  When tm_isdst has the wrong value,
26715         use a different heuristic to find the right one, based on the
26716         extreme values actually observed in practice in tz2003a,
26717         rather than the (overly optimistic) "previous 3 calendar quarters".
26718
26719         (not_equal_tm, print_tm, check_result): Use "const T" rather than
26720         "T const" to accommodate glibc style.
26721         (check_result): Use less-confusing report format.  "long" -> "long int.
26722         (main): Likewise.
26723         Don't loop if the iteration overflows time_t.
26724         Allow a negative step in the iteration.
26725
26726 2003-07-06  Karl Berry  <karl@gnu.org>
26727
26728         * config/depcomp: update from automake.
26729         * config/config.sub: update from prep.
26730
26731 2003-07-03  Karl Berry  <karl@gnu.org>
26732
26733         * config/config.guess: update from prep.
26734
26735 2003-07-01  Paul Eggert  <eggert@twinsun.com>
26736
26737         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
26738         xreadlink.c now includes it unconditionally.
26739
26740 2003-07-01  Paul Eggert  <eggert@twinsun.com>
26741
26742         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
26743         having it depend on HAVE_SYS_TYPES_H.
26744
26745 2003-07-01  Bruno Haible  <bruno@clisp.org>
26746
26747         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
26748         <sys/types.h> should be sufficient.
26749         Reported by Paul Eggert.
26750
26751 2003-06-26  Karl Berry  <karl@gnu.org>
26752
26753         * config/depcomp: update from automake.
26754
26755 2003-06-26  Bruno Haible  <bruno@clisp.org>
26756
26757         * modules/human: Depend on module stdbool.
26758
26759 2003-06-25  Bruno Haible  <bruno@clisp.org>
26760
26761         * modules/readlink: New file.
26762         * modules/xreadlink: Depend on it.
26763         * MODULES.html.sh (func_all_modules): Add readlink.
26764
26765 2003-06-25  Bruno Haible  <bruno@clisp.org>
26766
26767         * m4/readlink.m4: New file.
26768
26769 2003-06-25  Bruno Haible  <bruno@clisp.org>
26770
26771         * lib/readlink.c: New file.
26772
26773 2003-06-22  Karl Berry  <karl@gnu.org>
26774
26775         * config/srclist.txt: update mkinstalldirs from automake.
26776         * config/mkinstalldirs: update.
26777
26778 2003-06-22  Bruno Haible  <bruno@clisp.org>
26779
26780         Portability to mingw32.
26781         * m4/ssize_t.m4: New file, from GNU gettext.
26782         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
26783         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
26784
26785 2003-06-22  Bruno Haible  <bruno@clisp.org>
26786
26787         * modules/safe-read: Add m4/ssize_t.m4.
26788         * modules/xreadlink: Add m4/ssize_t.m4.
26789
26790 2003-06-20  Bruno Haible  <bruno@clisp.org>
26791
26792         Assume C89, so PARAMS isn't needed.
26793         * lib/unicodeio.h (PARAMS): Remove.
26794         * lib/unicodeio.c: Don't use PARAMS.
26795
26796 2003-06-18  Karl Berry  <karl@gnu.org>
26797
26798         * config/config.{guess,sub}: update from prep.
26799
26800 2003-06-18  Jim Meyering  <jim@meyering.net>
26801
26802         Merge changes from coreutils.
26803         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
26804         Remove explicit declarations of xmalloc and realloc.
26805         Include xalloc.h.
26806         (read_utmp): Remove anachronistic cast of xmalloc.
26807
26808 2003-06-17  Paul Eggert  <eggert@twinsun.com>
26809
26810         Assume C89, so PARAMS isn't needed.
26811         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
26812         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
26813         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
26814         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
26815         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
26816         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
26817         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
26818         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
26819         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
26820         lib/xstrtod.h, lib/xstrtol.h: Likewise.
26821         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
26822         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
26823         no longer needed. Anyway, config.h should always be included before any
26824         other file.
26825
26826 2003-06-11  Simon Josefsson  <jas@extundo.com>
26827
26828         * modules/sysexits: New file.
26829         * MODULES.html.sh (func_all_modules): Add sysexits.
26830
26831 2003-06-11  Simon Josefsson  <jas@extundo.com>
26832
26833         * lib/sysexit_.h: New file.
26834
26835 2003-06-11  Derek Price  <derek@ximbiot.com>
26836
26837         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
26838         necessary.
26839
26840 2003-06-11  Bruno Haible  <bruno@clisp.org>
26841
26842         * m4/sysexits.m4: New file.
26843
26844 2003-06-10  Simon Josefsson  <jas@extundo.com>
26845
26846         * lib/argp.h: New file, from glibc.
26847         * lib/argp-ba.c: New file, from glibc.
26848         * lib/argp-eexst.c: New file, from glibc.
26849         * lib/argp-fmtstream.c: New file, from glibc.
26850         * lib/argp-fmtstream.h: New file, from glibc.
26851         * lib/argp-fs-xinl.c: New file, from glibc.
26852         * lib/argp-help.c: New file, from glibc.
26853         * lib/argp-namefrob.h: New file, from glibc.
26854         * lib/argp-parse.c: New file, from glibc.
26855         * lib/argp-pv.c: New file, from glibc.
26856         * lib/argp-pvh.c: New file, from glibc.
26857         * lib/argp-xinl.c: New file, from glibc.
26858
26859 2003-06-10  Simon Josefsson  <jas@extundo.com>
26860
26861         * modules/strchrnul: New file.
26862
26863 2003-06-10  Simon Josefsson  <jas@extundo.com>
26864
26865         * modules/argp: New file.
26866
26867 2003-06-10  Simon Josefsson  <jas@extundo.com>
26868
26869         * m4/strchrnul.m4: New file.
26870
26871 2003-06-10  Simon Josefsson  <jas@extundo.com>
26872
26873         * lib/strchrnul.h: New file.
26874         * lib/strchrnul.c: New file.
26875
26876 2003-06-10  Bruno Haible  <bruno@clisp.org>
26877
26878         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
26879
26880 2003-06-07  Karl Berry  <karl@gnu.org>
26881
26882         * config/config.{guess,sub}: update from prep.
26883
26884 2003-06-07  Jim Meyering  <jim@meyering.net>
26885
26886         * modules/strtod: Use $(...) notation, not @...@ for
26887         AC_REPLACE'd variables.
26888         * modules/localcharset: Likewise.
26889
26890 2003-06-07  Jim Meyering  <jim@meyering.net>
26891
26892         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
26893         in place of my name in the copyright comment.
26894         Remove definition and uses of __P.
26895
26896         From coreutils.
26897         * lib/stat.c: Don't declare xmalloc explicitly.
26898         Instead, include "xalloc.h".
26899         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
26900         xrealloc, and xcalloc return values.
26901         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
26902         Improve comment.
26903         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
26904
26905 2003-06-07  Bruno Haible  <bruno@clisp.org>
26906
26907         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
26908         avoid AC_CONFIG_LINKS.
26909         * modules/fnmatch (Makefile.am): Use explicit creation rule for
26910         fnmatch.h, to avoid AC_CONFIG_LINKS.
26911         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
26912
26913 2003-06-07  Bruno Haible  <bruno@clisp.org>
26914
26915         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
26916         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
26917         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
26918         directory.
26919         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
26920         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
26921         directory.
26922
26923 2003-06-06  Jim Meyering  <jim@meyering.net>
26924
26925         Merge from coreutils.
26926         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
26927         Consolidate declarations and initializations of *_base* locals.
26928
26929         Merge from coreutils.
26930         This avoids a core dump on systems without GNU putenv,
26931         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
26932         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
26933         (unsetenv): New static function, from GNU libc.
26934         (rpl_putenv): Use it.
26935
26936         * lib/modechange.c: Remove trailing blanks.
26937
26938         Merge from coreutils.
26939         * lib/fsusage.c: Remove declaration of statfs.
26940         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
26941
26942         * lib/posixtm.c: Include <stdbool.h> unconditionally.
26943
26944 2003-06-06  Jim Meyering  <jim@meyering.net>
26945
26946         * lib/stdbool_.h: Renamed from stdbool.h.in.
26947
26948 2003-06-06  Jim Meyering  <jim@meyering.net>
26949             Bruno Haible  <bruno@clisp.org>
26950
26951         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
26952         Adjust Makefile.am snippet not to redirect directly to target.
26953         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
26954
26955 2003-06-05  Paul Eggert  <eggert@twinsun.com>
26956
26957         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
26958         mismatch, look in future quarters as well as past.  This fixes a
26959         bug when processing fall-backwards gaps immediately after a long
26960         period of daylight-saving time.
26961
26962         * lib/mktime.c: Assume freestanding C89 or better.
26963         (HAVE_LIMITS_H): Remove.  Assume it's 1.
26964         (__P): Remove; not used.
26965         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
26966         (mktime, not_equal_tm, print_tm, check_result,
26967         main): Use prototypes.  Use const * where appropriate.
26968         (main): Fix typo in testing code that uncovered by above changes.
26969         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
26970
26971 2003-06-04  Paul Eggert  <eggert@twinsun.com>
26972
26973         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
26974         locale.h, localeconv.  This merges changes from coreutils.
26975
26976         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
26977         It can be removed after the next Autoconf is released.
26978         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
26979         needed.
26980
26981 2003-06-04  Paul Eggert  <eggert@twinsun.com>
26982
26983         * lib/mktime.c: Fix Debian bug 177940
26984         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
26985         (localtime_offset): Now long int, not time_t, because we want it
26986         to be guaranteed to be signed.  All uses changed.
26987         (__mktime_internal): If overflow would occur when adding offset,
26988         don't add it.
26989
26990         Merge 'human' changes from coreutils.  Rewrite to support
26991         locale-specific notations like thousands separators.
26992         * lib/human.c: Simplify authorship notice.
26993         Include human.h immediately after config.h.
26994         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
26995         <limits.h>: Do not include, since human.h does.
26996         (SIZE_MAX, UINTMAX_MAX): New macros.
26997         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
26998         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
26999         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
27000         (power_letter): Renamed from suffixes.
27001         (generate_suffix_backwards): Remove.
27002         (adjust_value): Now takes int style (because of human.h changes)
27003         and long double value (for greater precision on some platforms).
27004         (group_number): New function.
27005         (human_readable): Use it.  Use integer options, not enum.
27006         Put the options before the sizes in the arg list.
27007         Support all the new options.
27008         The old human_readable function has been removed;
27009         use inttostr.h instead.
27010         (human_readable, default_block_size, humblock):
27011         Use uintmax_t, not int, for block sizes.
27012         (human_readable_inexact, block_size_types): Remove.
27013         (block_size_opts): New constant.
27014         (human_options): Renamed from human_block_size, with new signature
27015         that allows block sizes up to UINTMAX_MAX.  All callers changed.
27016         * lib/human.h: Add copyright and authorship notice.
27017         Include <limits.h> and <stdbool.h> unconditionally.
27018         (PARAMS): Remove.  All uses removed.
27019         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
27020         (enum human_inexact_style): Remove tag; now a nameless enum.
27021         (human_floor, human_ceiling, human_round_to_even): Now have
27022         values 2, 0, 1 rather than -1, 1, 0.
27023         (human_group_digits, human_suppress_point_zero, human_autoscale,
27024         human_base_1024, human_SI, human_B): New constants.
27025         (human_readable_inexact, human_block_size): Remove.
27026         (human_readable): Size args are now uintmax_t, not int.
27027         (human_options): New decl.
27028
27029         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
27030         unnecessary now that we assume C89 or better.  This change
27031         imported from coreutils.
27032
27033         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
27034         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
27035         in the 2003-05-30 sync from glibc.
27036
27037         .h files should stand alone, but we shouldn't include <sys/types.h>
27038         if we can get away with just <stddef.h>.
27039
27040         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
27041         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
27042         rather than <sys/types.h>, as we merely need size_t.
27043         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
27044         to get size_t.
27045         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
27046         Include <stdio.h>, to get FILE.
27047         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
27048         memcasecmp.h has included <stddef.h> and all we need is size_t.
27049         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
27050         our interface, instead of including <sys/types.h>
27051
27052 2003-06-04  Paul Eggert  <eggert@twinsun.com>
27053
27054         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
27055         now, as glibc mktime is buggy on non-glibc systems.
27056
27057 2003-06-03  Karl Berry  <karl@gnu.org>
27058
27059         * config/config.sub: update from prep.
27060
27061 2003-06-02  Paul Eggert  <eggert@twinsun.com>
27062
27063         [from coreutils]
27064         Fix some minor time-related bugs with POSIX time arguments.
27065         Some valid time stamps were being rejected (notably -1, and
27066         time stamps before 1900 on 64-bit hosts).  And some invalid
27067         time stamps were being accepted, e.g. September 31.
27068
27069         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
27070         that we can return (time_t) -1 successfully.
27071         * lib/posixtm.c: Likewise.
27072         [HAVE_STDBOOL_H]: Include <stdbool.h>.
27073         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
27074         (t): Remove static var.
27075         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
27076         of static var.  All uses changed.
27077         (year): Do not reject years before 1900; they can occur with
27078         64-bit time_t.
27079         (posix_time_parse): Do not check for out-of-range components;
27080         that is now the caller's responsibility, since our checks were
27081         only approximations.
27082         (posixtime): Use mktime to check for out-of-range components,
27083         since it knows them exactly.
27084         If mktime returns (time_t) -1, check whether an error actually occurred
27085         by invoking localtime on -1.
27086         (main) [TEST_POSIXTIME]: Check for input data errors, and report
27087         posixtime failures better.
27088         Improve the test data (in comments only).
27089
27090 2003-06-02  Karl Berry  <karl@gnu.org>
27091
27092         * config/mkinstalldirs (version): new variable.
27093         (--version): new option.
27094         (usage): improve message.
27095
27096 2003-05-30  Karl Berry  <karl@gnu.org>
27097
27098         * lib/mktime.c: update from libc.
27099
27100 2003-05-30  Bruno Haible  <bruno@clisp.org>
27101
27102         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
27103         * config/config.rpath: Upgrade to gettext-0.12.1.
27104
27105 2003-05-30  Bruno Haible  <bruno@clisp.org>
27106
27107         * m4/gettext.m4: Upgrade to gettext-0.12.1.
27108         * m4/nls.m4: New file, from gettext-0.12.1.
27109         * m4/po.m4: New file, from gettext-0.12.1.
27110         * m4/progtest.m4: Upgrade to gettext-0.12.1.
27111
27112 2003-05-30  Bruno Haible  <bruno@clisp.org>
27113
27114         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
27115         * lib/localcharset.h: Likewise.
27116         * lib/localcharset.c: Likewise.
27117
27118 2003-05-29  Karl Berry  <karl@gnu.org>
27119
27120         * config/config.rpath: update from gettext.
27121
27122 2003-05-28  Paul Eggert  <eggert@twinsun.com>
27123
27124         Assume the headers required for C89 freestanding compilers.
27125         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
27126         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
27127         * m4/human.m4 (gl_HUMAN): Likewise.
27128         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
27129         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
27130         * m4/userspec.m4 (gl_USERSPEC): Likewise.
27131         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
27132         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
27133         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
27134
27135 2003-05-28  Paul Eggert  <eggert@twinsun.com>
27136
27137         Assume the headers required for C89 freestanding compilers.
27138         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
27139         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
27140         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
27141         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
27142         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
27143         define, since <limits.h> is guaranteed to do that.
27144         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
27145         * lib/exclude.c: Include <stdbool.h> unconditionally.
27146         * lib/tempname.c: Include <stddef.h> unconditionally.
27147         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
27148         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
27149         <stddef.h> does that.
27150         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
27151         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
27152         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
27153         needed.
27154         * lib/xstrtol.c: Likewise.
27155         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
27156         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
27157
27158         * lib/addext.c (addext): Use assignment rather than cast, to avoid
27159         warnings on some platforms.
27160
27161         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
27162         arbitrarily.
27163
27164 2003-05-26  Jim Meyering  <jim@meyering.net>
27165
27166         Merge in a change from coreutils:
27167         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
27168         that is guaranteed to be `no'.  Use `no_such_member' to indicate
27169         that condition, rather than `-1' which is slightly misleading.
27170         Change the name of the cache variable to have the gl_ prefix.
27171         Prompted by a patch from Richard Dawe for DJGPP.
27172
27173 2003-05-24  Karl Berry  <karl@gnu.org>
27174
27175         * config/config.guess: update from prep.
27176
27177 2003-05-22  Karl Berry  <karl@gnu.org>
27178
27179         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
27180
27181 2003-05-20  Karl Berry  <karl@gnu.org>
27182
27183         * config/config.guess: update from prep.
27184
27185 2003-05-18  Karl Berry  <karl@gnu.org>
27186
27187         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
27188         might actually be set by the user.
27189
27190         * config/depcomp, install-sh, mdate-sh: update from automake.
27191
27192 2003-05-17  Bruno Haible  <bruno@clisp.org>
27193
27194         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
27195         invalid expansion for AC_EGREP_CPP.
27196         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
27197         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
27198         Suggested by Akim Demaille <akim@epita.fr> in
27199         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
27200
27201 2003-05-12  Jim Meyering  <jim@meyering.net>
27202
27203         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
27204         the space-padded-by-default conversion specifiers, %e, %k, %l.
27205
27206 2003-05-12  Bruno Haible  <bruno@clisp.org>
27207
27208         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
27209         the string is longer than 4 KB.
27210
27211 2003-05-11  Karl Berry  <karl@gnu.org>
27212
27213         * config/config.{guess,sub}: update from prep.
27214
27215 2003-05-09  Bruno Haible  <bruno@clisp.org>
27216
27217         * modules/error: Add m4/strerror_r.m4 to file list.
27218
27219 2003-05-03  Bruno Haible  <bruno@clisp.org>
27220
27221         Upgrade to Unicode-4.0.
27222         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
27223         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
27224         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
27225         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
27226         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
27227         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
27228         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
27229         Change width of U+E0100..U+E01EF from 1 to 0.
27230
27231 2003-04-25  Jim Meyering  <jim@meyering.net>
27232
27233         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
27234         of type size_t, not int.
27235
27236 2003-04-25  Bruno Haible  <bruno@clisp.org>
27237
27238         * lib/copy-file.c: Include <stddef.h>, for size_t.
27239
27240 2003-04-21  Paul Eggert  <eggert@twinsun.com>
27241
27242         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
27243         code which expansion is under static control.  Patch imported from
27244         Akim Demaille's patch to Bison; see
27245         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
27246
27247 2003-04-14  Bruno Haible  <bruno@clisp.org>
27248
27249         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
27250
27251 2003-04-11  Jim Meyering  <jim@meyering.net>
27252
27253         Merge changes from Coreutils.
27254
27255         2003-03-22  Jim Meyering  <jim@meyering.net>
27256
27257         * lib/strftime.c (widen): Cast alloca return value to proper type.
27258
27259         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
27260
27261         From GNU libc.
27262         * lib/strftime.c (my_strftime): Handle very large width
27263         specifications for numeric values correctly.  Improve checks for
27264         overflow.
27265
27266         2003-01-19  Jim Meyering  <jim@meyering.net>
27267
27268         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
27269         definitions.
27270         (nl_get_alt_digit) [! defined my_strftime]: Define.
27271         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
27272         _nl_get_alt_digit and _nl_get_walt_digit.
27273
27274         * lib/strftime.c (my_strftime): Merge in locale-related changes from
27275         libc. These changes have no effect outside of _LIBC.
27276
27277 2003-04-10  Bruno Haible  <bruno@clisp.org>
27278
27279         * modules/findprog: New file.
27280         * MODULES.html.sh (func_all_modules): Add it.
27281
27282 2003-04-10  Bruno Haible  <bruno@clisp.org>
27283
27284         * m4/findprog.m4: New file.
27285         * m4/eaccess.m4: New file.
27286
27287 2003-04-10  Bruno Haible  <bruno@clisp.org>
27288
27289         * lib/findprog.h: New file, from GNU gettext.
27290         * lib/findprog.c: New file, from GNU gettext.
27291
27292 2003-04-05  Jim Meyering  <jim@meyering.net>
27293
27294         Merge changes from Coreutils.
27295
27296         * lib/exclude.h (PARAMS): Remove definition and uses.
27297         * lib/exclude.c: Remove uses of `PARAMS'.
27298
27299         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
27300         Add test-cases for DOS filenames. Declare program_name.
27301         (main): Set up program_name.  Patch by Rich Dawe.
27302
27303         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
27304         error from mntctl.
27305         Use mntctl's return value to drive the entry-processing loop, since
27306         we can't rely on the value of the vmt_length member in the last
27307         entry.  On some systems doing so could result in exhausting
27308         virtual memory.  Based in part on a patch from Mike Jetzer.
27309
27310 2003-04-04  Bruno Haible  <bruno@clisp.org>
27311
27312         * modules/linebreak: New file.
27313         * MODULES.html.sh (func_all_modules): Add it.
27314
27315 2003-04-04  Bruno Haible  <bruno@clisp.org>
27316
27317         * m4/linebreak.m4: New file.
27318
27319 2003-04-04  Bruno Haible  <bruno@clisp.org>
27320
27321         * lib/linebreak.h: New file, from GNU gettext.
27322         * lib/linebreak.c: New file, from GNU gettext with slight
27323         modifications.
27324         * lib/lbrkprop.h: New file, from GNU gettext.
27325
27326 2003-04-03  Bruno Haible  <bruno@clisp.org>
27327
27328         * modules/utf8-ucs4: New file.
27329         * modules/utf16-ucs4: New file.
27330         * modules/ucs4-utf8: New file.
27331         * modules/ucs4-utf16: New file.
27332         * MODULES.html.sh (func_all_modules): Add them.
27333
27334 2003-04-03  Bruno Haible  <bruno@clisp.org>
27335
27336         * m4/utf-ucs4.m4: New file.
27337         * m4/ucs4-utf.m4: New file.
27338
27339 2003-04-03  Bruno Haible  <bruno@clisp.org>
27340
27341         * lib/utf8-ucs4.h: New file, from GNU gettext.
27342         * lib/utf16-ucs4.h: New file, from GNU gettext.
27343         * lib/ucs4-utf8.h: New file, from GNU gettext.
27344         * lib/ucs4-utf16.h: New file, from GNU gettext.
27345
27346 2003-04-02  Bruno Haible  <bruno@clisp.org>
27347
27348         * modules/binary-io: New file.
27349         * MODULES.html.sh (func_all_modules): Add it.
27350
27351 2003-04-02  Bruno Haible  <bruno@clisp.org>
27352
27353         * lib/binary-io.h: New file, from GNU gettext.
27354
27355 2003-04-01  Bruno Haible  <bruno@clisp.org>
27356
27357         * modules/pathname: New file.
27358         * MODULES.html.sh (func_all_modules): Add it.
27359
27360 2003-04-01  Bruno Haible  <bruno@clisp.org>
27361
27362         * lib/pathname.h: New file, from GNU gettext.
27363         * lib/concatpath.c: New file, from GNU gettext.
27364
27365 2003-03-30  Bruno Haible  <bruno@clisp.org>
27366
27367         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
27368
27369 2003-03-30  Bruno Haible  <bruno@clisp.org>
27370
27371         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
27372         function chown() doesn't exist.
27373
27374 2003-03-28  Bruno Haible  <bruno@clisp.org>
27375
27376         * modules/copy-file: New file.
27377         * MODULES.html.sh (func_all_modules): Add it.
27378
27379 2003-03-28  Bruno Haible  <bruno@clisp.org>
27380
27381         * m4/copy-file.m4: New file.
27382
27383 2003-03-28  Bruno Haible  <bruno@clisp.org>
27384
27385         * lib/copy-file.h: New file, from GNU gettext.
27386         * lib/copy-file.c: New file, from GNU gettext.
27387
27388 2003-03-18  Jim Meyering  <jim@meyering.net>
27389
27390         * lib/quote.c (quote_n): Fix typo in comment.
27391
27392 2003-03-18  Bruno Haible  <bruno@clisp.org>
27393
27394         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
27395         checking.
27396         * m4/onceonly_2_57.m4: Likewise.
27397
27398 2003-03-17  Bruno Haible  <bruno@clisp.org>
27399
27400         * m4/onceonly.m4: Require autoconf 2.54 or newer.
27401         (m4_quote): Remove macro.
27402         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
27403
27404 2003-03-14  Jim Meyering  <jim@meyering.net>
27405
27406         Merge changes from Coreutils.
27407         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
27408         to be const, in order to avoid warnings.
27409         (obstack_room): Likewise.
27410         (obstack_empty_p): Likewise.
27411
27412 2003-03-14  Bruno Haible  <bruno@clisp.org>
27413
27414         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
27415         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
27416
27417 2003-03-13  Paul Eggert  <eggert@twinsun.com>
27418
27419         Merge changes from Bison.
27420         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
27421         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
27422         when compiling Bison 1.875's `bitset bset = obstack_alloc
27423         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
27424         * lib/hash.c: Include <stdbool.h> unconditionally.
27425
27426 2003-03-13  Paul Eggert  <eggert@twinsun.com>
27427
27428         * m4/onceonly.m4 (m4_quote): New macro.
27429         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
27430         Quote AC_FOREACH variable-expansions properly.
27431
27432 2003-03-13  Paul Eggert  <eggert@twinsun.com>
27433
27434         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
27435
27436 2003-03-09  Paul Eggert  <eggert@twinsun.com>
27437
27438         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
27439         Reported by Bruce Becker; see:
27440         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
27441
27442 2003-03-03  Paul Eggert  <eggert@twinsun.com>
27443             Bruno Haible  <bruno@clisp.org>
27444
27445         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
27446         Reported by John Hughes, see
27447         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
27448
27449 2003-02-20  Bruno Haible  <bruno@clisp.org>
27450
27451         * MODULES.html.sh (func_all_modules): Add poll.
27452
27453 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
27454
27455         * modules/poll: New file.
27456
27457 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
27458
27459         * lib/poll_.h: New file.
27460         * lib/poll.c: New file.
27461
27462 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
27463
27464         * m4/poll.m4: New file.
27465
27466 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
27467
27468         * modules/mathl: New file.
27469
27470 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
27471
27472         * lib/mathl.h: New file.
27473         * lib/acosl.c: New file.
27474         * lib/asinl.c: New file.
27475         * lib/atanl.c: New file.
27476         * lib/ceill.c: New file.
27477         * lib/cosl.c: New file.
27478         * lib/expl.c: New file.
27479         * lib/floorl.c: New file.
27480         * lib/frexpl.c: New file.
27481         * lib/ldexpl.c: New file.
27482         * lib/logl.c: New file.
27483         * lib/sincosl.c: New file.
27484         * lib/sinl.c: New file.
27485         * lib/sqrtl.c: New file.
27486         * lib/tanl.c: New file.
27487         * lib/trigl.c: New file.
27488         * lib/trigl.h: New file.
27489
27490 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
27491
27492         * m4/mathl.m4: New file.
27493
27494 2003-02-18  Bruno Haible  <bruno@clisp.org>
27495
27496         * MODULES.html.sh (func_all_modules): Add mathl.
27497
27498 2003-02-17  Bruno Haible  <bruno@clisp.org>
27499
27500         * modules/mkdtemp: New module.
27501         * MODULES.html.sh (func_all_modules): Add it.
27502
27503 2003-02-17  Bruno Haible  <bruno@clisp.org>
27504
27505         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
27506
27507 2003-02-17  Bruno Haible  <bruno@clisp.org>
27508
27509         * lib/mkdtemp.h: New file, from GNU gettext.
27510         * lib/mkdtemp.c: New file, from GNU gettext.
27511
27512 2003-02-02  Jim Meyering  <jim@meyering.net>
27513
27514         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
27515         e.g. glibc-2.2.93.
27516
27517 2003-01-31  Bruno Haible  <bruno@clisp.org>
27518
27519         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
27520         'rpl_rename'.
27521         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
27522         'rpl_strnlen'.
27523         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
27524         'rpl_strtod'.
27525         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
27526         'rpl_utime'.
27527
27528 2003-01-31  Bruno Haible  <bruno@clisp.org>
27529
27530         * lib/rename.c: #undef rename before defining rpl_rename.
27531         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
27532
27533 2003-01-30  Bruno Haible  <bruno@clisp.org>
27534
27535         * modules/vasnprintf, modules/vasprintf: New modules.
27536         * MODULES.html.sh (func_all_modules): Add them.
27537
27538 2003-01-30  Bruno Haible  <bruno@clisp.org>
27539
27540         * m4/signed.m4: New file, from GNU gettext.
27541         * m4/longdouble.m4: New file, from GNU gettext.
27542         * m4/wchar_t.m4: New file, from GNU gettext.
27543         * m4/wint_t.m4: New file, from GNU gettext.
27544         * m4/vasnprintf.m4: New file.
27545         * m4/vasprintf.m4: New file.
27546
27547 2003-01-30  Bruno Haible  <bruno@clisp.org>
27548
27549         * lib/printf-args.h: New file, from GNU gettext.
27550         * lib/printf-args.c: New file, from GNU gettext.
27551         * lib/printf-parse.h: New file, from GNU gettext.
27552         * lib/printf-parse.c: New file, from GNU gettext.
27553         * lib/vasnprintf.h: New file, from GNU gettext.
27554         * lib/vasnprintf.c: New file, from GNU gettext.
27555         * lib/asnprintf.c: New file, from GNU gettext.
27556         * lib/vasprintf.h: New file, from GNU gettext with modifications.
27557         * lib/vasprintf.c: New file, from GNU gettext.
27558         * lib/asprintf.c: New file, from GNU gettext.
27559
27560 2003-01-29  Bruno Haible  <bruno@clisp.org>
27561
27562         * modules/stpncpy: New module.
27563         * MODULES.html.sh (func_all_modules): Add it.
27564
27565 2003-01-29  Bruno Haible  <bruno@clisp.org>
27566
27567         * m4/stpncpy.m4: New file.
27568
27569 2003-01-29  Bruno Haible  <bruno@clisp.org>
27570
27571         * lib/stpncpy.h: New file, from GNU gettext with modifications.
27572         * lib/stpncpy.c: New file, from GNU gettext with modifications.
27573
27574 2003-01-28  Bruno Haible  <bruno@clisp.org>
27575
27576         * modules/c-ctype: New module.
27577         * MODULES.html.sh (func_all_modules): Add it.
27578
27579 2003-01-28  Bruno Haible  <bruno@clisp.org>
27580
27581         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
27582         Paul Eggert.
27583         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
27584         Paul Eggert.
27585
27586 2003-01-27  Bruno Haible  <bruno@clisp.org>
27587
27588         * modules/xsetenv: New module.
27589         * MODULES.html.sh (func_all_modules): Add it.
27590
27591 2003-01-27  Bruno Haible  <bruno@clisp.org>
27592
27593         * lib/xsetenv.h: New file, from GNU gettext.
27594         * lib/xsetenv.c: New file, from GNU gettext.
27595
27596 2003-01-23  Jim Meyering  <jim@meyering.net>
27597
27598         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
27599         from working on systems without dirfd (at least Irix and OSF1/Tru64).
27600
27601 2003-01-23  Bruno Haible  <bruno@clisp.org>
27602
27603         * modules/minmax: New module.
27604         * MODULES.html.sh (func_all_modules): Add it.
27605
27606 2003-01-23  Bruno Haible  <bruno@clisp.org>
27607
27608         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
27609         Eggert.
27610
27611 2003-01-22  Bruno Haible  <bruno@clisp.org>
27612
27613         * modules/exit: New module.
27614         * MODULES.html.sh (func_all_modules): Add it.
27615
27616 2003-01-22  Bruno Haible  <bruno@clisp.org>
27617
27618         * lib/exit.h: New file, from GNU gettext.
27619
27620 2003-01-19  Bruno Haible  <bruno@clisp.org>
27621
27622         * gnulib-tool: Recognize option --extract-maintainer.
27623         (func_get_maintainer): New function.
27624         * modules/*: Add Maintainer entry.
27625
27626 2003-01-16  Jim Meyering  <jim@meyering.net>
27627
27628         * m4/regex.m4: The `regex' struct is both input and output.
27629         Initialize it before each use.  Patch by Tim Waugh.
27630
27631 2003-01-16  Bruno Haible  <bruno@clisp.org>
27632
27633         * MODULES.html.sh: Add a table of contents. Add the module name as
27634         leftmost column. Add hyperlinks.
27635
27636 2003-01-15  Bruno Haible  <bruno@clisp.org>
27637
27638         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
27639
27640 2003-01-15  Bruno Haible  <bruno@clisp.org>
27641
27642         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
27643         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
27644         suffix.
27645
27646 2003-01-15  Bruno Haible  <bruno@clisp.org>
27647
27648         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
27649
27650 2003-01-15  Bruno Haible  <bruno@clisp.org>
27651
27652         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
27653         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
27654
27655 2003-01-14  Jim Meyering  <jim@meyering.net>
27656
27657         * lib/same.c (same_name): Tweak a comment.
27658
27659 2003-01-14  Bruno Haible  <bruno@clisp.org>
27660
27661         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
27662         when a string comparison is sufficient.
27663
27664 2003-01-14  Bruno Haible  <bruno@clisp.org>
27665
27666         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
27667         'unsigned int'.
27668
27669 2003-01-14  Bruno Haible  <bruno@clisp.org>
27670
27671         * lib/hash-pjw.c: Add comment about low quality of this function.
27672
27673 2003-01-13  Bruno Haible  <bruno@clisp.org>
27674
27675         * modules/stpcpy: Distribute lib/stpcpy.h.
27676         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
27677
27678 2003-01-13  Bruno Haible  <bruno@clisp.org>
27679
27680         * modules/*: Add a description.
27681         * modules/strpbrk: Fix Makefile.am snippet.
27682         * modules/strtoimax: Fix dependencies.
27683         * modules/strtoumax: Likewise.
27684
27685 2003-01-13  Bruno Haible  <bruno@clisp.org>
27686
27687         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
27688         * modules/alloca (Makefile.am): All object files depend on alloca.h.
27689         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
27690
27691 2003-01-13  Bruno Haible  <bruno@clisp.org>
27692
27693         * gnulib-tool (func_create_testdir): Store config/* files in the main
27694         directory.
27695         * config.rpath: Move to ...
27696         * config/config.rpath: ... here.
27697         * modules/gettext: Contains config/config.rpath, not config.rpath.
27698         * modules/iconv: Likewise.
27699
27700 2003-01-12  Paul Eggert  <eggert@twinsun.com>
27701
27702         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
27703         to avoid collisions with libcurses and libreadline.
27704
27705         * m4/getstr.m4: Remove.
27706         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
27707
27708 2003-01-12  Paul Eggert  <eggert@twinsun.com>
27709
27710         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
27711         to avoid collisions with libcurses and libreadline.
27712
27713         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
27714         * lib/getstr.h, getstr.c: Remove.
27715         * lib/getline.c: Include "getline.h", to check interface.
27716         Move body of old getstr.c here: this defines MIN_CHUNK and
27717         declares getdelim2, which is renamed from getstr.
27718         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
27719
27720         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
27721         All uses changed.
27722         * lib/linebuffer.h: Likewise.
27723         (readline): Remove backward-compatibility macro.
27724
27725 2003-01-12  Paul Eggert  <eggert@twinsun.com>
27726
27727         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
27728         to avoid collisions with libcurses and libreadline.
27729         * getstr: Remove.
27730         * MODULES.html.sh: Remove getstr.
27731         * modules/getline: Depend on unlocked-io, not getstr.
27732
27733 2003-01-12  Jim Meyering  <jim@meyering.net>
27734
27735         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
27736
27737 2003-01-10  Bruno Haible  <bruno@clisp.org>
27738
27739         * modules/alloca: Change Makefile.am requirements. Simplify Include
27740         requirements. Add lib/alloca_.h to file list.
27741
27742 2003-01-10  Bruno Haible  <bruno@clisp.org>
27743
27744         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
27745
27746 2003-01-10  Bruno Haible  <bruno@clisp.org>
27747
27748         * lib/alloca_.h: New file.
27749         * lib/getdate.y: Unconditionally include alloca.h.
27750         * lib/makepath.c: Likewise.
27751         * lib/setenv.c: Likewise.
27752         * lib/userspec.c: Likewise.
27753
27754 2003-01-09  Karl Berry  <karl@gnu.org>
27755
27756         * MODULES.html.sh: include `dirname $0` in PATH, to find
27757         gnulib-tool.
27758
27759 2003-01-09  Bruno Haible  <bruno@clisp.org>
27760
27761         * modules/stdbool: Change configure.ac, Makefile.am requirements.
27762         Simplify Include requirements. Add lib/stdbool.h.in to file list.
27763
27764 2003-01-09  Bruno Haible  <bruno@clisp.org>
27765
27766         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
27767
27768 2003-01-09  Bruno Haible  <bruno@clisp.org>
27769
27770         * lib/stdbool.h.in: New file.
27771
27772 2003-01-09  Bruno Haible  <bruno@clisp.org>
27773
27774         * gnulib-tool (func_all_modules): Ignore files ending in ~.
27775         * MODULES.html.sh: Likewise.
27776
27777 2003-01-08  Jim Meyering  <jim@meyering.net>
27778
27779         * lib/full-write.c: Undefine and define-away `const' after inclusion
27780         of errno.h, not before.  Suggestion from Bruno Haible.
27781
27782 2003-01-08  Bruno Haible  <bruno@clisp.org>
27783
27784         * modules/full-read: Depend on full-write.
27785
27786 2003-01-08  Bruno Haible  <bruno@clisp.org>
27787
27788         * lib/safe-read.c: Include specification header first, to ensure its
27789         selfcontainedness.
27790         * lib/full-write.c: Likewise.
27791
27792 2003-01-07  Jim Meyering  <jim@meyering.net>
27793
27794         * lib/full-write.c: Rework so that it may serve to define full_read,
27795         too.
27796         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
27797
27798 2003-01-07  Bruno Haible  <bruno@clisp.org>
27799
27800         * lib/strtoimax.c: Include <stdint.h> as an alternative to
27801         <inttypes.h>.
27802         * lib/xstrtol.h: Likewise.
27803         * lib/xstrtoimax.c: Likewise.
27804         * lib/xstrtoumax.c: Likewise.
27805         * lib/human.h: Likewise.
27806
27807         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
27808         on systems that have <inttypes.h> but not <stdint.h>.
27809
27810 2003-01-07  Bruno Haible  <bruno@clisp.org>
27811
27812         * MODULES.html.sh: Add copyright notice.
27813         (missed_files): Omit CVS directory entries.
27814         (func_module): Make it work with sed-3.02.
27815         * MODULES.txt: Remove file.
27816
27817 2003-01-06  Jim Meyering  <jim@meyering.net>
27818
27819         * lib/version-etc.c: Update year in translatable copyright string.
27820
27821 2003-01-03  Karl Berry  <karl@gnu.org>
27822
27823         * config/config.{guess,sub}: update from prep.
27824
27825 2003-01-02  Karl Berry  <karl@gnu.org>
27826
27827         * doc/COPYING.DOC: belatedly updated to 1.2.
27828
27829 2003-01-01  Karl Berry  <karl@gnu.org>
27830
27831         * gnulib-tool (func_verify_module): report module name $module in
27832         error message, not $1.
27833         * gnulib-tool (create-testdir): don't complain if destdir couldn't
27834         be created, only if it doesn't exist.
27835         * gnulib-tool (last_checkin_date): don't expand the $Date here.
27836
27837 2002-12-31  Paul Eggert  <eggert@twinsun.com>
27838
27839         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
27840
27841 2002-12-31  Paul Eggert  <eggert@twinsun.com>
27842
27843         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
27844         memcmp if strcoll doesn't work.
27845
27846 2002-12-31  Bruno Haible  <bruno@clisp.org>
27847
27848         * lib/utime.c (utime_null): No need to call ftruncate if the file was
27849         nonempty.
27850
27851 2002-12-31  Bruno Haible  <bruno@clisp.org>
27852
27853         * lib/memcoll.c (STRCOLL): New macro.
27854         (memcoll): Use it.
27855
27856 2002-12-31  Bruno Haible  <bruno@clisp.org>
27857
27858         * lib/localcharset.h: New file.
27859         * lib/localcharset.c: Include it.
27860         * lib/unicodeio.c: Likewise.
27861
27862 2002-12-31  Bruno Haible  <bruno@clisp.org>
27863
27864         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
27865         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
27866
27867 2002-12-31  Bruno Haible  <bruno@clisp.org>
27868
27869         * lib/getline.h: Include <stddef.h>, for size_t.
27870
27871         * lib/unicodeio.h: Include <stddef.h>, for size_t.
27872         * lib/unicodeio.c: Don't include <stddef.h>.
27873
27874 2002-12-31  Bruno Haible  <bruno@clisp.org>
27875
27876         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
27877         HAVE_TM_ZONE.
27878
27879 2002-12-24  Karl Berry  <karl@gnu.org>
27880
27881         * config/config.guess: update from prep.
27882
27883 2002-12-24  Bruno Haible  <bruno@clisp.org>
27884
27885         General infrasructure.
27886         * m4/README: Rewritten.
27887         * m4/onceonly.m4: New file.
27888         * m4/onceonly_2_57.m4: New file.
27889
27890         Module atexit.
27891         * m4/atexit.m4: New file.
27892
27893         Module strtod.
27894         * m4/strtod.m4: New file.
27895
27896         Module strtol.
27897         * m4/strtol.m4: New file.
27898
27899         Module strtoul.
27900         * m4/strtoul.m4: New file.
27901
27902         Module memchr.
27903         * m4/memchr.m4: New file.
27904
27905         Module memcmp.
27906         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
27907         (jm_FUNC_MEMCMP): Invoke it.
27908
27909         Module memcpy.
27910         * m4/memcpy.m4: New file.
27911
27912         Module memmove.
27913         * m4/memmove.m4: New file.
27914
27915         Module memset.
27916         * m4/memset.m4: New file.
27917
27918         Module strcspn.
27919         * m4/strcspn.m4: New file.
27920
27921         Module strpbrk.
27922         * m4/strpbrk.m4: New file.
27923
27924         Module strstr.
27925         * m4/strstr.m4: New file.
27926
27927         Module strerror.
27928         * m4/strerror.m4: New file.
27929
27930         Module mktime.
27931         * m4/mktime.m4: Renamed from jm-mktime.m4.
27932         (gl_PREREQ_MKTIME): New macro.
27933         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
27934
27935         Module malloc.
27936         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
27937         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
27938         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
27939
27940         Module realloc.
27941         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
27942         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
27943         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
27944
27945         Module strftime.
27946         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
27947         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
27948         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
27949         gl_TM_GMTOFF.
27950         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
27951
27952         Module xalloc.
27953         * m4/xalloc.m4: New file.
27954
27955         Module alloca.
27956         * m4/alloca.m4: New file.
27957
27958         Module putenv.
27959         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
27960         (jm_FUNC_PUTENV): Invoke it.
27961
27962         Module setenv.
27963         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
27964         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
27965         when invoked twice.
27966         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
27967         gt_FUNC_SETENV.
27968
27969         Module memrchr.
27970         * m4/memrchr.m4: New file.
27971
27972         Module stpcpy.
27973         * m4/stpcpy.m4: New file.
27974
27975         Module strcase.
27976         * m4/strcase.m4: New file.
27977
27978         Module strdup.
27979         * m4/strdup.m4: New file.
27980
27981         Module strnlen.
27982         * m4/strnlen.m4: New file.
27983
27984         Module strndup.
27985         * m4/strndup.m4: New file.
27986
27987         Module xstrtod.
27988         * m4/xstrtod.m4: New file.
27989
27990         Module xstrtol.
27991         * m4/xstrtol.m4: New file.
27992
27993         Module getdate.
27994         * m4/getdate.m4: New file.
27995
27996         Module unlocked-io.
27997         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
27998         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
27999         * m4/jm-glibc-io.m4n: Remove file.
28000
28001         Module long-options.
28002         * m4/long-options.m4: New file.
28003
28004         Module md5.
28005         * m4/md5.m4: New file.
28006
28007         Module sha.
28008         * m4/sha.m4: New file.
28009
28010         Module getstr.
28011         * m4/getstr.m4: New file.
28012
28013         Module getline.
28014         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
28015         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
28016         <sys/types.h>, for size_t. Use the function name gnu_getline, not
28017         simply getline. Infoke gl_PREREQ_GETLINE.
28018
28019         Module obstack.
28020         * m4/obstack.m4: New file.
28021
28022         Module hash.
28023         * m4/hash.m4: New file.
28024
28025         Module readtokens.
28026         * m4/readtokens.m4: New file.
28027
28028         Module strverscmp.
28029         * m4/strverscmp.m4: New file.
28030
28031         Module stdbool.
28032         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
28033         OSF/1.
28034
28035         Module strtoll.
28036         * m4/strtoll.m4: New file.
28037
28038         Module strtoull.
28039         * m4/strtoull.m4: New file.
28040
28041         Module strtoimax.
28042         * m4/strtoimax.m4: New file.
28043
28044         Module strtoumax.
28045         * m4/strtoumax.m4: New file.
28046
28047         Module xstrtoimax.
28048         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
28049         jm_AC_PREREQ_XSTRTOIMAX.
28050         Moved the strtol prerequisites to strtol.m4.
28051         Moved the strtoll prerequisites to strtoll.m4.
28052         Moved the strtoimax prerequisites to strtoimax.m4.
28053
28054         Module xstrtoumax.
28055         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
28056         jm_AC_PREREQ_XSTRTOUMAX.
28057         Moved the strtoul prerequisites to strtoul.m4.
28058         Moved the strtoull prerequisites to strtoull.m4.
28059         Moved the strtoumax prerequisites to strtoumax.m4.
28060
28061         Module chown.
28062         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
28063         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
28064
28065         Module dup2.
28066         * m4/dup2.m4: New file.
28067
28068         Module ftruncate.
28069         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
28070         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
28071
28072         Module getgroups.
28073         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
28074         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
28075
28076         Module gettimeofday.
28077         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
28078         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
28079         gl_PREREQ_GETTIMEOFDAY.
28080
28081         Module mkdir.
28082         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
28083         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
28084
28085         Module mkstemp.
28086         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
28087         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
28088         jm_AC_TYPE_UINTMAX_T.
28089         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
28090
28091         Module stat.
28092         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
28093         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
28094
28095         Module lstat.
28096         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
28097         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
28098
28099         Module timespec.
28100         * m4/timespec.m4 (gl_TIMESPEC): New macro.
28101         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
28102         * m4/st_mtim.m4: Indentation.
28103
28104         Module nanosleep.
28105         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
28106         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
28107         gl_PREREQ_NANOSLEEP.
28108
28109         Module regex.
28110         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
28111         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
28112         (gl_REGEX): New macro.
28113
28114         Module rename.
28115         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
28116         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
28117
28118         Module rmdir.
28119         * m4/rmdir.m4: New file.
28120
28121         Module utime.
28122         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
28123         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
28124         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
28125
28126         Module dirname.
28127         * m4/dirname.m4: New file.
28128
28129         Module getopt.
28130         * m4/getopt.m4: New file.
28131
28132         Module unistd-safer.
28133         * m4/unistd-safer.m4: New file.
28134
28135         Module fnmatch.
28136         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
28137         declaration.
28138         (gl_PREREQ_FNMATCH_EXTRA): New macro.
28139         (gl_FUNC_FNMATCH_POSIX): New macro.
28140         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
28141         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
28142         simply fnmatch.
28143
28144         Module exclude.
28145         * m4/exclude.m4: New file.
28146
28147         Module human.
28148         * m4/human.m4: New file.
28149
28150         Module acl.
28151         * m4/acl.m4: Nop.
28152
28153         Module backupfile.
28154         * m4/backupfile.m4: New file.
28155         * m4/d-ino.m4: Indentation.
28156
28157         Module fsusage.
28158         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
28159         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
28160         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
28161
28162         Module dirfd.
28163         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
28164         requirements.
28165
28166         Module euidaccess.
28167         * m4/euidaccess.m4: New file.
28168
28169         Module file-type.
28170         * m4/file-type.m4: New file.
28171
28172         Module fileblocks.
28173         * m4/fileblocks.m4: New file.
28174
28175         Module filemode.
28176         * m4/filemode.m4: New file.
28177
28178         Module isdir.
28179         * m4/isdir.m4: New file.
28180
28181         Module lchown.
28182         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
28183         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
28184
28185         Module makepath.
28186         * m4/makepath.m4: New file.
28187
28188         Module modechange.
28189         * m4/modechange.m4: New file.
28190
28191         Module mountlist.
28192         * m4/mountlist.m4: New file.
28193         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
28194         Indentation.
28195
28196         Module path-concat.
28197         * m4/path-concat.m4: New file.
28198
28199         Module pathmax.
28200         * m4/pathmax.m4: New file.
28201
28202         Module same.
28203         * m4/same.m4: New file.
28204
28205         Module save-cwd.
28206         * m4/save-cwd.m4: New file.
28207
28208         Module savedir.
28209         * m4/savedir.m4: New file.
28210
28211         Module xgetcwd.
28212         * m4/xgetcwd.m4: New file.
28213         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
28214
28215         Module xreadlink.
28216         * m4/xreadlink.m4: New file.
28217
28218         Module safe-read.
28219         * m4/safe-read.m4: New file.
28220
28221         Module safe-write.
28222         * m4/safe-write.m4: New file.
28223
28224         Module closeout.
28225         * m4/closeout.m4: New file.
28226
28227         Module stdio-safer.
28228         * m4/stdio-safer.m4: New file.
28229
28230         Module getpass.
28231         * m4/getpass.m4: New file.
28232
28233         Module getugroups.
28234         * m4/getugroups.m4: New file.
28235
28236         Module group-member.
28237         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
28238         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
28239
28240         Module idcache.
28241         * m4/idcache.m4: New file.
28242
28243         Module userspec.
28244         * m4/userspec.m4: New file.
28245
28246         Module gettime.
28247         * m4/clock_time.m4: New file.
28248         * m4/gettime.m4: New file.
28249
28250         Module settime.
28251         * m4/settime.m4: New file.
28252
28253         Module posixtm.
28254         * m4/posixtm.m4: New file.
28255
28256         Module gethostname.
28257         * m4/gethostname.m4: New file.
28258
28259         Module canon-host.
28260         * m4/canon-host.m4: New file.
28261
28262         Module gettext.
28263         * m4/codeset.m4: New file, from gettext-0.11.5.
28264         * m4/gettext.m4: New file, from gettext-0.11.5.
28265         * m4/glibc21.m4: New file, from gettext-0.11.5.
28266         * m4/iconv.m4: New file, from gettext-0.11.5.
28267         * m4/intdiv0.m4: New file, from gettext-0.11.5.
28268         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
28269         * m4/inttypes.m4: New file, from gettext-0.11.5.
28270         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
28271         * m4/isc-posix.m4: New file, from gettext-0.11.5.
28272         * m4/lcmessage.m4: New file, from gettext-0.11.5.
28273         * m4/lib-ld.m4: New file, from gettext-0.11.5.
28274         * m4/lib-link.m4: New file, from gettext-0.11.5.
28275         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
28276         * m4/progtest.m4: New file, from gettext-0.11.5.
28277         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
28278         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
28279         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
28280
28281         Module localcharset.
28282         * m4/localcharset.m4: New file.
28283
28284         Module hard-locale.
28285         * m4/hard-locale.m4: New file.
28286
28287         Module mbswidth.
28288         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
28289         onceonly macros.
28290         * m4/mbrtowc.m4: Add comment.
28291
28292         Module memcasecmp.
28293         * m4/memcasecmp.m4: New file.
28294
28295         Module memcoll.
28296         * m4/memcoll.m4: New file.
28297
28298         Module unicodeio.
28299         * m4/unicodeio.m4: New file.
28300
28301         Module rpmatch.
28302         * m4/rpmatch.m4: New file.
28303
28304         Module yesno.
28305         * m4/yesno.m4: New file.
28306
28307         Module exitfail.
28308         * m4/exitfail.m4: New file.
28309
28310         Module c-stack.
28311         * m4/c-stack.m4 (gl_C_STACK): New macro.
28312         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
28313
28314         Module error.
28315         * m4/error.m4 (gl_ERROR): New macro.
28316         (jm_PREREQ_ERROR): Use onceonly macros.
28317
28318         Module fatal.
28319         * m4/fatal.m4: New file.
28320
28321         Module getloadavg.
28322         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
28323         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
28324
28325         Module getpagesize.
28326         * m4/getpagesize.m4: New file.
28327
28328         Module getusershell.
28329         * m4/getusershell.m4: New file.
28330
28331         Module physmem.
28332         * m4/physmem.m4: New file.
28333
28334         Module posixver.
28335         * m4/posixver.m4: New file.
28336
28337         Module quotearg.
28338         * m4/quotearg.m4: New file.
28339
28340         Module quote.
28341         * m4/quote.m4: New file.
28342
28343         Module readutmp.
28344         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
28345
28346         Module sig2str.
28347         * m4/sig2str.m4: New file.
28348
28349         Other.
28350         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
28351         ulonglong.m4.
28352         * m4/intmax_t.m4: New file.
28353         * m4/d-type.m4: Indentation.
28354         * m4/jm-macros.m4: Update.
28355         * m4/prereq.m4 (jm_PREREQ): Update.
28356         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
28357         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
28358         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
28359         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
28360         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
28361         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
28362         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
28363         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
28364         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
28365         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
28366         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
28367         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
28368         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
28369         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
28370         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
28371         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
28372         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
28373         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
28374         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
28375
28376 2002-12-24  Bruno Haible  <bruno@clisp.org>
28377
28378         * MODULES.txt: Update according to m4/ changes.
28379
28380         Module gettext.
28381         * config.rpath: New file, from gettext-0.11.5.
28382
28383         * modules/*: New module descriptions.
28384         * gnulib-tool: New file.
28385         * MODULES.html.sh: New file.
28386
28387 2002-12-21  Karl Berry  <karl@gnu.org>
28388
28389         * doc/fdl.texi: update to version 1.2.
28390
28391 2002-12-19  Karl Berry  <karl@gnu.org>
28392
28393         * config/config.guess: update from prep.
28394
28395 2002-12-18  Bruno Haible  <bruno@clisp.org>
28396
28397         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
28398         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
28399
28400 2002-12-17  Bruno Haible  <bruno@clisp.org>
28401
28402         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
28403         stdlib.h, string.h.
28404
28405 2002-12-17  Bruno Haible  <bruno@clisp.org>
28406
28407         * lib/canon-host.c (strdup): Remove unused declaration.
28408
28409         * lib/fsusage.c: Include full_read.h.
28410         (get_fs_usage): Use full_read instead of safe_read.
28411
28412         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
28413
28414 2002-12-12  Karl Berry  <karl@gnu.org>
28415
28416         * config/config.guess: update from prep.
28417
28418 2002-12-11  Bruno Haible  <bruno@clisp.org>
28419
28420         * m4/setenv.m4: New file, from gettext-0.11.5.
28421
28422 2002-12-11  Bruno Haible  <bruno@clisp.org>
28423
28424         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
28425         not unsetenv().
28426         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
28427         modifications:
28428
28429         2002-12-11  Bruno Haible  <bruno@clisp.org>
28430
28431                 * setenv.c (alloca): Fall back to malloc.
28432                 (freea): New macro.
28433                 (setenv): Use freea() to free memory allocated with alloca().
28434
28435         2002-11-13  Bruno Haible  <bruno@clisp.org>
28436
28437                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
28438                 function declarations.
28439                 * unsetenv.c (unsetenv): Likewise.
28440
28441         2002-03-04  Bruno Haible  <bruno@clisp.org>
28442
28443                 Portability to AIX 4.3.3.
28444                 * unsetenv.c: New file, extracted from setenv.c.
28445                 * setenv.c: Move the unsetenv() function to unsetenv.c.
28446
28447         2001-12-20  Bruno Haible  <bruno@clisp.org>
28448
28449                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
28450                 use malloc instead. For SunOS 4.
28451
28452         2001-12-11  Bruno Haible  <bruno@clisp.org>
28453
28454                 * setenv.c: Declare alloca.
28455                 (compar_fn_t): New typedef.
28456                 (KNOWN_VALUE, STORE_VALUE): Use it.
28457
28458         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
28459         setenv.h.
28460
28461 2002-12-10  Paul Eggert  <eggert@twinsun.com>
28462
28463         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
28464         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
28465         Choose values that are less likely to collide with system fnmatch
28466         options.
28467         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
28468         defined (e.g., a pure POSIX system).
28469         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
28470         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
28471
28472 2002-12-06  Paul Eggert  <eggert@twinsun.com>
28473
28474         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
28475         a pain in practice to deal with generated m4 files.  This change
28476         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
28477
28478         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
28479         and jm-glibc-io.m4, as they are no longer a special case.
28480         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
28481         kludge and the auto-generation stuff.  Check only whether the
28482         functions are declared, not whether they exist, since older hosts
28483         that don't declare the functions can't use the optimization anyway.
28484
28485 2002-12-06  Jim Meyering  <jim@meyering.net>
28486
28487         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
28488
28489         Merge in changes from libc's misc/error.c, in preparation
28490         for the merge of gnulib's changes back into libc.
28491
28492         * lib/error.c (_): Define only if not already defined.
28493         Move definition to follow all #include directives.
28494         Include unlocked-io.h only if !_LIBC.
28495         [_LIBC]: Include <libio/libioP.h>.
28496         [USE_IN_LIBIO]: Include <libio/iolibio.h>
28497         (fflush): Tweak definition to use INTUSE.
28498         (putc): Define.
28499
28500 2002-12-05  Paul Eggert  <eggert@twinsun.com>
28501
28502         * lib/alloca.c [defined emacs]: Include "lisp.h".
28503         (xalloc_die) [defined emacs]: New macro.
28504         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
28505         [! defined emacs]: Include <xalloc.h>.
28506         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
28507         (pointer): Typedef to POINTER_TYPE *.
28508         (malloc): Remove decl; we now always use xmalloc.
28509         (alloca): Use old-style definition, since Emacs needs this.
28510         Check for arithmetic overflow when computing combined size.
28511
28512 2002-12-04  Paul Eggert  <eggert@twinsun.com>
28513
28514         Do not generate unlocked-io.h automatically, since it's easier to
28515         maintain it by hand.
28516
28517         * lib/unlocked-io.h: New file, from GNU diffutils,
28518         but with proper copyright notice and attribution.
28519         * lib/gen-uio: Remove.
28520         * lib/Makefile.am: Add copyright notice.
28521         (libfetish_a_SOURCES): Add unlocked-io.h.
28522         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
28523         (DISTCLEANFILES, io_functions): Remove macros.
28524         (EXTRA_DIST): Remove gen_uio.
28525         (unlocked-io.h): Remove rule.
28526
28527 2002-12-04  Jim Meyering  <jim@meyering.net>
28528
28529         Reflect the fact that stat.c and lstat.c are no longer generated.
28530         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
28531         (DISTCLEANFILES): Likewise.
28532         (EXTRA_DIST): Likewise.
28533         (all_local): Don't depend on stat.c or lstat.c.
28534         (stat.c, lstat.c): Remove rules.
28535         (EXTRA_DIST): Remove xstat.in.
28536
28537         * lib/xstat.in: Remove file.  Contents moved into stat.c.
28538         * lib/stat.c: New file.  Contents mostly from xstat.in.
28539         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
28540         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
28541
28542         * lib/safe-read.c: Rework so that it may serve to define safe_write,
28543         too.
28544         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
28545
28546 2002-12-03  Jim Meyering  <jim@meyering.net>
28547
28548         * lib/safe-read.c, safe-write.c: Change variable names and comments,
28549         but not semantics, to minimize the differences between these two files.
28550         (safe_read): Change comment to mention SAFE_READ_ERROR.
28551
28552         * lib/safe-read.c (IS_EINTR): Define.
28553         (safe_read): Use IS_EINTR in place of in-function cpp directives.
28554
28555 2002-12-02  Jim Meyering  <jim@meyering.net>
28556
28557         * lib/safe-read.c (EINTR): Define.
28558         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
28559         (INT_MAX): Provide fallback.
28560         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
28561
28562         * lib/safe-read.h (SAFE_READ_ERROR): Define.
28563
28564 2002-12-02  Bruno Haible  <bruno@clisp.org>
28565
28566         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
28567         Define, taken from safe-read.c.
28568         (INT_MAX): Provide fallback.
28569         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
28570         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
28571
28572         * lib/safe-read.c (EINTR): Remove definition.
28573         (safe_read): Don't use EINTR if it is absent.
28574
28575 2002-12-01  Jim Meyering  <jim@meyering.net>
28576
28577         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
28578         zero.
28579         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
28580
28581 2002-11-27  Paul Eggert  <eggert@twinsun.com>
28582
28583         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
28584         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
28585         with `if (! (value < limit)) abort ();', for readability.
28586
28587 2002-11-26  Karl Berry  <karl@gnu.org>
28588
28589         * lib/strdup.c: copy from libc again, with jim's ok.
28590         * lib/.cppi-disable: re-add strdup.c
28591
28592 2002-11-25  Karl Berry  <karl@gnu.org>
28593
28594         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
28595         instead of "strtol.c".
28596
28597 2002-11-25  Karl Berry  <karl@gnu.org>
28598
28599         * config/install-sh: update from automake for variable quoting, $0 in
28600         error msgs, etc.
28601
28602         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
28603         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
28604         entry.
28605
28606 2002-11-25  Jim Meyering  <jim@meyering.net>
28607
28608         * lib/mktime.c: Sync from libc, now that it has the latest fix.
28609
28610 2002-11-24  Karl Berry  <karl@gnu.org>
28611
28612         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
28613         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
28614
28615 2002-11-24  Jim Meyering  <jim@meyering.net>
28616
28617         Update from coreutils:
28618
28619         * lib/mktime.c: Merge in changes from libc.
28620
28621         Avoid a link-time failure on some Linux systems.
28622         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
28623         (otherwise).
28624         (__mon_yday): Declare with the STATIC attribute.
28625         (__mktime_internal): Likewise.
28626         Based on a report from Greg Schafer.
28627
28628 2002-11-23  Jim Meyering  <jim@meyering.net>
28629
28630         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
28631         Use `unsigned', not `int', as type of index.
28632
28633         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
28634
28635         * lib/fsusage.c: Remove unneeded parentheses around operands of
28636         `defined'.
28637
28638 2002-11-22  Paul Eggert  <eggert@twinsun.com>
28639
28640         * lib/quotearg.h: Allow multiple inclusion by surrounding with
28641         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
28642         so that we can be included first.
28643         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
28644         * lib/quotearg.c: Include quotearg.h immediately after config.h.
28645         No need to include stddef.h or sys/types.h any more.
28646         Surround local include files with "", not "<>".
28647         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
28648         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
28649         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
28650         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
28651         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
28652         (ISPRINT): Remove; no longer needed now that we assume C89.
28653
28654         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
28655         Preserve errno.
28656
28657         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
28658         quotearg_char): Use SIZE_MAX rather than
28659         (size_t) -1 when we are talking about "infinity".
28660
28661         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
28662
28663 2002-11-22  Paul Eggert  <eggert@twinsun.com>
28664
28665         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
28666         hint that one should use `if (! x) abort ();' rather than `assert
28667         (x);', and anyway it's one less thing to worry about configuring.
28668         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
28669         hash_rehash, hash_insert): Use abort rather than assert.
28670
28671 2002-11-22  Bruno Haible  <bruno@clisp.org>
28672
28673         * lib/safe-read.h: Assume C89. Add comments.
28674         (safe_read): Change return type to size_t.
28675         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
28676         byte counts > SSIZE_MAX correctly.
28677         * lib/safe-write.h: New file.
28678         * lib/safe-write.c: New file.
28679         * lib/full-read.h: New file.
28680         * lib/full-read.c: New file.
28681         * lib/full-write.h: Assume C89. Add comments.
28682         * lib/full-write.c: Include safe-write.h.
28683         (full_write): Rewritten to use safe_write.
28684         Suggested by Jim Meyering and Paul Eggert.
28685
28686 2002-11-21  Jim Meyering  <jim@meyering.net>
28687
28688         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
28689
28690         Merge in changes from the coreutils.
28691
28692         2002-09-25  Paul Eggert  <eggert@twinsun.com>
28693         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
28694         <stdint.h>.
28695         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
28696         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
28697         int.  Work more efficiently if X is the same width as uintmax_t.
28698         Do not compare X to -1, to avoid bogus compiler warning.
28699         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
28700         Don't assume that f_frsize and f_bsize are the same type.
28701
28702         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
28703         warning on FreeBSD.
28704
28705         * lib/makepath.c (make_path): Restore umask *before* creating the final
28706         component.
28707         (make_path): Minor reformatting.
28708
28709         * lib/xmalloc.c: Adjust to work with new autoconf macros,
28710         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
28711         HAVE_MALLOC/HAVE_REALLOC.
28712
28713         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
28714         dummy ones.  At least on GNU/Linux systems, `auto' means something
28715         else.
28716         From Michael Stone.
28717
28718 2002-11-21  Bruno Haible  <bruno@clisp.org>
28719
28720         Remove case insensitive option matching.
28721         * lib/argmatch.h (argcasematch): Remove declaration.
28722         (ARGCASEMATCH): Remove macro.
28723         (__xargmatch_internal): Remove case_sensitive argument.
28724         (XARGMATCH): Update.
28725         (XARGCASEMATCH): Remove macro.
28726         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
28727         case_sensitive argument.
28728         (argcasematch): Remove function.
28729         (__xargmatch_internal): Remove case_sensitive argument.
28730         (main): Use XARGMATCH instead of XARGCASEMATCH.
28731
28732         * lib/xmalloc.c: Change compile-time error message. Add comment about
28733         required autoconf version.
28734
28735 2002-11-20  Paul Eggert  <eggert@twinsun.com>
28736
28737         Merge argmatch cleanups from Bison.  Assume C89.
28738
28739         * lib/argmatch.c: Include config.h here, not in argmatch.h.
28740         Include stdlib.h, for EXIT_FAILURE.
28741         Always include <string.h>, since we assume C89.
28742         (EXIT_FAILURE): Remove pre-C89 bug workaround.
28743         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
28744         Include <stddef.h> instead, since it's all we need for size_t.
28745         (PARAMS): Remove.  All uses removed.
28746         (ARRAY_CARDINALITY): Do not bother to #undef.
28747         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
28748         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
28749         Remove unnecessary parentheses.
28750         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
28751         Insert necessary parentheses.
28752         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
28753         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
28754
28755 2002-11-19  Bruno Haible  <bruno@clisp.org>
28756
28757         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
28758         * lib/mbswidth.h: Include <stddef.h>, for size_t.
28759
28760         * lib/mbswidth.h (PARAMS): Remove macro.
28761         (mbswidth, mbsnwidth): Use ANSI C function declarations.
28762         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
28763
28764         * lib/gcd.h (PARAMS): Remove macro.
28765         (gcd): Use ANSI C function declarations.
28766         * lib/gcd.c (gcd): Likewise.
28767
28768 2002-11-15  Bruno Haible  <bruno@clisp.org>
28769
28770         * lib/strcspn.c: Include <stddef.h>.
28771         (strcspn): Use ANSI C function declaration. Change return type to
28772         size_t. Use NULL.
28773         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
28774         (strpbrk): Use NULL.
28775         * lib/strpbrk.h (PARAMS): Remove macro.
28776         (strpbrk): Use ANSI C function declaration.
28777         * lib/strstr.c: Don't include <sys/types.h>.
28778         * lib/strstr.h (PARAMS): Remove macro.
28779         (strstr): Use ANSI C function declarations.
28780
28781 2002-11-14  Karl Berry  <karl@gnu.org>
28782
28783         * config/mkinstalldirs: `do' on separate line, instead of
28784         `for var; do'.
28785
28786 2002-11-06  Bruno Haible  <bruno@clisp.org>
28787
28788         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
28789         * lib/gcd.c (gcd): Likewise.
28790
28791 2002-11-05  Bruno Haible  <bruno@clisp.org>
28792
28793         * lib/gcd.h: New file, from gettext-0.11.5.
28794         * lib/gcd.c: New file, from gettext-0.11.5.
28795
28796 2002-11-05  Bruno Haible  <bruno@clisp.org>
28797
28798         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
28799         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
28800         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
28801         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
28802
28803         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
28804         <libintl.h>.
28805         * lib/makepath.c: Include gettext.h instead of <locale.h> and
28806         <libintl.h>.
28807
28808         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
28809         * lib/human.c: Include gettext.h instead of <libintl.h>.
28810         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
28811         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
28812         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
28813         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
28814         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
28815         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
28816         (textdomain): Remove definition.
28817         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
28818
28819         * lib/long-options.c: Remove include of <libintl.h> and definition of
28820         _.
28821         * lib/same.c: Remove include of <libintl.h> and definition of _.
28822
28823 2002-11-04  Owen Taylor  <otaylor@redhat.com>
28824
28825         * lib/config.charset: A few additions for Solaris.
28826
28827 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
28828
28829         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
28830         * lib/localcharset.c (locale_charset): Declare as extern "C".
28831
28832 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
28833
28834         * lib/config.charset: msdos in uk_UA uses CP1125.
28835
28836 2002-11-04  Bruno Haible  <bruno@clisp.org>
28837
28838         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
28839         * lib/strcase.h: New file, from GNU gettext-0.11.5.
28840         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
28841         * lib/strstr.h: New file, from GNU gettext-0.11.5.
28842         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
28843
28844 2002-11-04  Bruno Haible  <bruno@clisp.org>
28845
28846         * lib/localcharset.c (locale_charset): Don't return an empty string.
28847
28848 2002-11-04  Bruno Haible  <bruno@clisp.org>
28849
28850         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
28851         aliases.
28852
28853 2002-11-04  Bruno Haible  <bruno@clisp.org>
28854
28855         * lib/config.charset: Update for newest glibc. Add canonical names
28856         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
28857
28858 2002-11-04  Bruno Haible  <bruno@clisp.org>
28859
28860         * lib/config.charset: Add support for NetBSD.
28861
28862 2002-11-04  Bruno Haible  <bruno@clisp.org>
28863
28864         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
28865
28866 2002-11-01  Bruno Haible  <bruno@clisp.org>
28867
28868         * configure.in: Add AC_CONFIG_AUX_DIR call.
28869         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
28870         test/Makefile.
28871         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
28872
28873 2002-09-28  Karl Berry  <karl@gnu.org>
28874
28875         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
28876         installed automake until the next release, since changes have been
28877         made.
28878
28879 2002-09-25  Karl Berry  <karl@gnu.org>
28880
28881         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
28882         * lib/getopt*: copy from libc/posix.
28883         * lib/gettext.h: copy from gettext.
28884         * lib/.cppi-disable: add strdup.c, gettext.h.
28885
28886 2002-09-25  Karl Berry  <karl@gnu.org>
28887
28888         * config/srclist.txt: enable gettext.h check.
28889         * config/config.{guess,sub}: update from prep.
28890         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
28891                 from automake 1.6.3.
28892         See srclist*.
28893
28894 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
28895
28896         * regex.c (PATFETCH): Remove the translating fetch.
28897         (PATFETCH_RAW): Rename to PATFETCH.
28898         (set_image_of_range): New fun.
28899         (SET_RANGE_TABLE_WORK_AREA): Use it.
28900         (regex_compile): Don't translate the pattern chars so eagerly.
28901         Only do it when inserting an `exactn' bytecode or when handling
28902         a char-range.
28903         (mutually_exclusive_p): Avoid empty statement.
28904
28905 2002-07-06  Jim Meyering  <meyering@lucent.com>
28906
28907         * m4/README: Don't mention Makefile.am.in.
28908         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
28909
28910 2002-07-01  Jim Meyering  <meyering@lucent.com>
28911
28912         * lib/c-stack.c: Include sys/time.h.
28913         From Volker Borchert.
28914
28915 2002-06-26  Paul Eggert  <eggert@twinsun.com>
28916
28917         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
28918
28919 2002-06-26  Paul Eggert  <eggert@twinsun.com>
28920
28921         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
28922         New macro.  Use it uniformly instead of
28923         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
28924         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
28925         reported by Vin Shelton.
28926
28927 2002-06-22  Paul Eggert  <eggert@twinsun.com>
28928
28929         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
28930         Do not assume SA_SIGINFO behavior.
28931         Bug reported by Jim Meyering on NetBSD 1.5.2.
28932
28933 2002-06-22  Jim Meyering  <meyering@lucent.com>
28934
28935         * m4/c-stack.m4: New file, from diffutils-2.8.2.
28936         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
28937
28938         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
28939         now that configure.ac uses AC_GNU_SOURCE.
28940         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
28941         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
28942
28943         Update to latest tools.  Suggestions from Paul Eggert.
28944         * m4/stdbool.m4: New file, from diffutils-2.8.2.
28945         * m4/gnu-source.m4: Update from diffutils-2.8.2.
28946         * m4/fnmatch.m4: Likewise.
28947         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
28948         to AC_HEADER_STDBOOL
28949
28950 2002-06-22  Jim Meyering  <meyering@lucent.com>
28951
28952         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
28953         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
28954
28955 2002-06-22  Jim Meyering  <meyering@lucent.com>
28956
28957         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
28958
28959         * lib/exitfail.c, exitfail.h: Likewise.
28960         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
28961
28962         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
28963         of fnmatch.h.
28964         (EXTRA_DIST): Add fnmatch_loop.c.
28965         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
28966
28967         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
28968         * lib/fnmatch.c: Update from diffutils-2.8.2.
28969         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
28970         * lib/fnmatch.h: Remove file.
28971
28972 2002-06-21  Jim Meyering  <meyering@lucent.com>
28973
28974         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
28975         * m4/mbrtowc.m4: Likewise.
28976
28977         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
28978         * m4/mbswidth.m4: Reflect name change:
28979         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
28980         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
28981
28982         * m4/lib-link.m4: Update from gettext-0.11.2.
28983         * m4/gettext.m4: Likewise.
28984
28985         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
28986         From Alfred M. Szmidt.
28987
28988 2002-06-18  Paul Eggert  <eggert@twinsun.com>
28989
28990         * lib/file-type.h: Report an error if neither S_ISREG nor
28991         S_IFREG is defined, instead of using a test specific to glibc
28992         2.2.  This should be safe, since POSIX requires S_ISREG and
28993         Unix Version 7 had S_IFREG.  We don't need to check for
28994         <sys/types.h> since we don't use any symbols that it defines.
28995
28996 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
28997
28998         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
28999         $@-t, so that each temporary file name is unique and valid in the first
29000         8 characters, for operation under DOS.
29001
29002 2002-06-15  Paul Eggert  <eggert@twinsun.com>
29003
29004         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
29005
29006 2002-06-15  Jim Meyering  <meyering@lucent.com>
29007
29008         Work even with DJGPP 2.03, which lacks support for symlinks.
29009         From Richard Dawe.
29010         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
29011         is defined.
29012         * lib/lchown.c (S_ISLNK): Likewise.
29013
29014 2002-06-15  Jim Meyering  <meyering@lucent.com>
29015
29016         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
29017         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
29018         have been included before this file.
29019
29020 2002-06-14  Jim Meyering  <meyering@lucent.com>
29021
29022         * lib/file-type.h: Use the version from diffutils-2.8.2.
29023         * lib/file-type.c: Likewise.
29024
29025 2002-06-07  Jim Meyering  <meyering@lucent.com>
29026
29027         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
29028         They're needed at least for NetBSD 1.5.2.
29029         ($statxfs_includes): Include those same headers.
29030         ($statxfs_includes): Include sys/vfs.h if available.
29031         ($statxfs_includes): Likewise for sys/statvfs.h.
29032         Check for the following members in both structs statfs and statvfs:
29033         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
29034
29035 2002-06-01  Jim Meyering  <meyering@lucent.com>
29036
29037         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
29038         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
29039
29040 2002-05-28  Jim Meyering  <meyering@lucent.com>
29041
29042         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
29043         Reported by Volker Borchert.
29044
29045 2002-05-27  Jim Meyering  <meyering@lucent.com>
29046
29047         Fix a problem seen only on nonconforming systems whereby ls.c's
29048         use of localtime, and then of gettimeofday would cause trouble:
29049         the localtime call used to initialize rpl_gettimeofday's save
29050         mechanism would clobber ls's current local time information so
29051         that in any long listing the first file would always be listed
29052         with date 1970-01-01.  Analysis by Volker Borchert.
29053
29054         * lib/gettimeofday.c (localtime): Undefine.
29055         (rpl_localtime): New function.
29056
29057 2002-05-27  Jim Meyering  <meyering@lucent.com>
29058
29059         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
29060         localtime.
29061
29062         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
29063         use the replacement function; it wouldn't resolve at link time.
29064         Reported by Volker Borchert.
29065
29066 2002-05-22  Jim Meyering  <meyering@lucent.com>
29067
29068         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
29069         file-type.h.
29070         * lib/file-type.h: New file.
29071         * lib/file-type.c (file_type): New file/function.  Extracted from
29072         diffutils.
29073
29074 2002-04-30  Jim Meyering  <meyering@lucent.com>
29075
29076         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
29077
29078 2002-04-29  Paul Eggert  <eggert@twinsun.com>
29079
29080         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
29081
29082 2002-04-29  Paul Eggert  <eggert@twinsun.com>
29083
29084         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
29085         Do not check for alloca.h (no longer used) or stdbool.h (was never
29086         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
29087
29088 2002-04-29  Paul Eggert  <eggert@twinsun.com>
29089
29090         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
29091
29092 2002-04-29  Jim Meyering  <meyering@lucent.com>
29093
29094         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
29095         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
29096         Use AC_FUNC_STRNLEN here instead.
29097
29098         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
29099         With autoconf-2.53a, it's part of AC_PROG_CC.
29100
29101 2002-04-28  Paul Eggert  <eggert@twinsun.com>
29102
29103         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
29104         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
29105
29106 2002-04-28  Paul Eggert  <eggert@twinsun.com>
29107
29108         * lib/sig2str.h, lib/sig2str.c: New files.
29109         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
29110
29111 2002-04-28  Paul Eggert  <eggert@twinsun.com>
29112
29113         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
29114         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
29115         of 127, since 64 is the largest conceivable number for ancient
29116         nonstandard hosts.
29117         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
29118
29119 2002-04-28  Jim Meyering  <meyering@lucent.com>
29120
29121         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
29122
29123 2002-04-24  Jim Meyering  <meyering@lucent.com>
29124
29125         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
29126         (jm_PREREQ): Use it.
29127
29128         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
29129         mach/mach.h fcntl.h.
29130         Check for this function: setlocale.
29131
29132 2002-04-24  Jim Meyering  <meyering@lucent.com>
29133
29134         * lib/gettext.h: New file, from Gettext.
29135         * lib/Makefile.am (INCLUDES): Remove -I../intl.
29136         (libfetish_a_SOURCES): Add gettext.h.
29137
29138 2002-04-16  Jim Meyering  <meyering@lucent.com>
29139
29140         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
29141         ut_pid, ut_id, ut_exit.
29142
29143 2002-04-16  Jim Meyering  <meyering@lucent.com>
29144
29145         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
29146         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
29147         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
29148
29149 2002-04-12  Jim Meyering  <meyering@lucent.com>
29150
29151         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
29152         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
29153         existence of the getmntinfo function.  Needed for Darwin 5.3.
29154
29155         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
29156         This is necessary at least on Darwin 5.3.
29157
29158         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
29159         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
29160         strnlen.o in the library, and that makes some versions of ranlib
29161         object.
29162
29163 2002-04-12  Jim Meyering  <meyering@lucent.com>
29164
29165         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
29166
29167 2002-04-09  Jim Meyering  <meyering@lucent.com>
29168
29169         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
29170         to be more precise.  Rather than saying we're checking whether the
29171         function `works', say what we're testing.
29172         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
29173         Reported by Bruno Haible.
29174
29175 2002-03-10  Jim Meyering  <meyering@lucent.com>
29176
29177         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
29178         Suggestion from Santiago Vila.
29179
29180 2002-03-08  Jim Meyering  <meyering@lucent.com>
29181
29182         * lib/rename.c: Mention that this wrapper is needed also on
29183         mips-dec-ultrix4.4 systems.
29184
29185 2002-03-02  Jim Meyering  <meyering@lucent.com>
29186
29187         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
29188         not HAVE_CLOCK_SETTIME.
29189
29190 2002-02-27  Paul Eggert  <eggert@twinsun.com>
29191
29192         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
29193         Check for clock_settime.
29194
29195 2002-02-27  Paul Eggert  <eggert@twinsun.com>
29196
29197         * lib/nanosleep.h: Rename to....
29198         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
29199
29200         * lib/gettime.c: New file.
29201         * lib/settime.c: New file.
29202         * lib/stime.c: Remove.
29203
29204         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
29205         timespec.h.  Remove nanosleep.h.
29206
29207 2002-02-25  Paul Eggert  <eggert@twinsun.com>
29208
29209         * m4/acl.m4: New file.
29210         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
29211         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
29212
29213 2002-02-25  Paul Eggert  <eggert@twinsun.com>
29214
29215         * lib/acl.c, lib/acl.h: New files.
29216         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
29217
29218 2002-02-24  Jim Meyering  <meyering@lucent.com>
29219
29220         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
29221         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
29222         cause trouble.  Reported by Nelson Beebe.
29223
29224 2002-02-23  Paul Eggert  <eggert@twinsun.com>
29225
29226         * lib/path-concat.c (xpath_concat): Reorder code to pacify
29227         compilers that don't know that xalloc_die never returns.
29228
29229 2002-02-20  Jim Meyering  <meyering@lucent.com>
29230
29231         * lib/getdate.c: Regenerate using bison-1.33.
29232
29233 2002-02-17  Jim Meyering  <meyering@lucent.com>
29234
29235         * config/config.guess (main): Don't use `head -1'; it's no longer
29236         portable. Use `sed 1q' instead.
29237
29238 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
29239
29240         * m4/codeset.m4: Upgrade to gettext-0.11.
29241         * m4/gettext.m4: Upgrade to gettext-0.11.
29242         * m4/glibc21.m4: Upgrade to gettext-0.11.
29243         * m4/iconv.m4: Upgrade to gettext-0.11.
29244         * m4/isc-posix.m4: Upgrade to gettext-0.11.
29245         * m4/lcmessage.m4: Upgrade to gettext-0.11.
29246         * m4/lib-ld.m4: New file, from gettext-0.11.
29247         * m4/lib-link.m4: New file, from gettext-0.11.
29248         * m4/lib-prefix.m4: New file, from gettext-0.11.
29249         * m4/progtest.m4: Upgrade to gettext-0.11.
29250
29251 2002-02-15  Paul Eggert  <eggert@twinsun.com>
29252
29253         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
29254         (jm_PREREQ): Use it.
29255
29256 2002-02-15  Paul Eggert  <eggert@twinsun.com>
29257
29258         * lib/posixver.c, lib/posixver.h: New files.
29259         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
29260
29261 2002-02-02  Paul Eggert  <eggert@twinsun.com>
29262             Bruno Haible  <bruno@clisp.org>
29263
29264         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
29265         (fwrite_success_callback): New declaration.
29266         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
29267         print_unicode_char. Call failure callback instead of error.
29268         (fwrite_success_callback): New function.
29269         (exit_failure_callback): New function.
29270         (fallback_failure_callback): New function.
29271         (print_unicode_char): Call unicode_to_mb.
29272
29273 2002-01-26  Jim Meyering  <meyering@lucent.com>
29274
29275         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
29276         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
29277
29278 2002-01-26  Jim Meyering  <meyering@lucent.com>
29279
29280         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
29281
29282 2002-01-22  Paul Eggert  <eggert@twinsun.com>
29283
29284         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
29285
29286 2002-01-22  Jim Meyering  <meyering@lucent.com>
29287
29288         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
29289         Otherwise, some versions of automake would omit the rule that makes
29290         Makefile from Makefile.in.
29291
29292 2002-01-21  Paul Eggert  <eggert@twinsun.com>
29293
29294         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
29295         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
29296         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
29297         (memcoll): Set errno to zero if there is no error.
29298
29299         * lib/quotearg.c (quotearg_buffer_restyled):
29300         Fix bug with quoting buffers containing NUL when backslashing escapes.
29301         This bug was exposed by the other changes in this patch.
29302         (quotearg_n_options): New arg ARGSIZE.
29303         All callers changed.
29304         (quoting_options_from_style): New function.
29305         (quotearg_n_style): Use it.
29306         (quotearg_n_style_mem): New function.
29307
29308         * lib/quotearg.h (quotearg_n_style_mem): New function.
29309
29310 2002-01-19  Jim Meyering  <meyering@lucent.com>
29311
29312         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
29313         Remove useless quotes: DF_PROG="df".
29314         * m4/strnlen.m4: New file.
29315
29316 2002-01-16  Paul Eggert  <eggert@twinsun.com>
29317
29318         * lib/backupfile.c (ISDIGIT): Comment fix.
29319         * lib/getdate.y (ISDIGIT): Likewise.
29320         * lib/posixtm.c (ISDIGIT, year): Likewise.
29321         * lib/strverscmp.c (ISDIGIT): Likewise.
29322         * lib/userspec.c (ISDIGIT): Likewise.
29323
29324 2002-01-16  Jim Meyering  <meyering@lucent.com>
29325
29326         * lib/getdate.y: Add three semicolons, each just before a closing
29327         brace. Bison (as of version 1.31) no longer papers over that mistake.
29328
29329 2002-01-05  Jim Meyering  <meyering@lucent.com>
29330
29331         * lib/version-etc.c (version_etc_copyright): Update copyright year.
29332
29333 2001-12-19  Paul Eggert  <eggert@twinsun.com>
29334
29335         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
29336         not silently exit merely because the output buffer happens to
29337         have nothing pending.
29338
29339 2001-12-18  Paul Eggert  <eggert@twinsun.com>
29340
29341         See the big note in ../ChangeLog.
29342         * lib/human.c (suffixes): Prefer K to k for 1024.
29343         (generate_suffix_backwards): New function.
29344         (human_readable_inexact): Use it.
29345         * lib/xstrtol.c (__xstrtol): If there is no number but there
29346         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
29347         Accept 'K' as well as 'k'.
29348
29349 2001-12-15  Jim Meyering  <meyering@lucent.com>
29350
29351         * lib/regex.h (__restrict_arr): Update from libc.
29352
29353         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
29354         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
29355         (STREQ): Define.
29356
29357 2001-12-14  Jim Meyering  <meyering@lucent.com>
29358
29359         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
29360         Suggestion from Bruno Haible.
29361
29362 2001-12-10  Jim Meyering  <meyering@lucent.com>
29363
29364         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
29365         xrealloc, Instead, include "xalloc.h".
29366         (initbuffer): Don't cast xmalloc return value to char*.
29367         (readline): Reword comment.
29368         Don't cast xrealloc return value to char*
29369         Return NULL, not 0.
29370
29371 2001-12-09  Jim Meyering  <meyering@lucent.com>
29372
29373         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
29374         about `signed and unsigned type in conditional expression'.
29375         * lib/posixtm.c (posix_time_parse): Likewise.
29376
29377         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
29378
29379         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
29380         to avoid a pedantic warning.
29381
29382         * lib/getstr.c: Don't include assert.h.
29383         (getstr): Remove warning-evoking assertions.
29384         Return -1 if offset parameter is out of bounds.
29385         Change the type of a local from int to size_t.
29386
29387         * lib/strftime.c (my_strftime_localtime_r): Include this function
29388         definition in the `#if ! HAVE_TM_GMTOFF' block.
29389
29390         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
29391         Include xalloc.h instead.
29392
29393 2001-12-02  Jim Meyering  <meyering@lucent.com>
29394
29395         * lib/tempname.c: Don't declare getenv, thus reverting the change of
29396         2001-11-18.  It's no longer necessary, now that stdlib.h is always
29397         included.
29398
29399         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
29400         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
29401
29402 2001-11-30  Akim Demaille  <akim@epita.fr>
29403
29404         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
29405         before being defined.
29406
29407 2001-11-27  Paul Eggert  <eggert@twinsun.com>
29408
29409         * lib/quotearg.h (quotearg_n, quotearg_n_style):
29410         First arg is int, not unsigned.
29411         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
29412         (SIZE_MAX, UINT_MAX): New macros.
29413         (quotearg_n_options): Abort if N is negative.
29414         Avoid overflow check on hosts where size_t is 64 bits and int
29415         is 32 bits, as overflow is impossible there.
29416         Fix off-by-one typo that caused unnecessary reallocation.
29417
29418 2001-11-27  Jim Meyering  <meyering@lucent.com>
29419
29420         * lib/tempname.c: Merge with version from libc.
29421         * lib/regex.c: Likewise.
29422
29423         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
29424         systems for which STDC_HEADERS is 0, it was not included, resulting in
29425         a warning about an integer-to-pointer conversion problem with getenv.
29426         Reported by Volker Borchert.
29427
29428 2001-11-26  Jim Meyering  <meyering@lucent.com>
29429
29430         * lib/gtod.h: Remove file.
29431         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
29432         * lib/gettimeofday.c: Don't include gtod.h.
29433         (GTOD_init): Remove function.
29434         (rpl_gettimeofday): Do its job here instead, rather than aborting.
29435         Suggestion from Volker Borchert.
29436
29437 2001-11-23  Jim Meyering  <meyering@lucent.com>
29438
29439         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
29440         it.
29441         * lib/hash.c (struct hash_table): Define it here instead.
29442
29443 2001-11-22  Jim Meyering  <meyering@lucent.com>
29444
29445         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
29446
29447 2001-11-20  Jim Meyering  <meyering@lucent.com>
29448
29449         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
29450         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
29451
29452 2001-11-19  Jim Meyering  <meyering@lucent.com>
29453
29454         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
29455         directory.  Use "conftestXXXXXX" as the template.
29456         Suggestion from Paul Eggert.
29457
29458         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
29459         immediately, so the test doesn't mistakenly hit the max-open-files
29460         limit.
29461
29462 2001-11-18  Paul Eggert  <eggert@twinsun.com>
29463
29464         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
29465         (TEMPORARIES): New macro.
29466         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
29467         removes an artificial limitation (e.g. HP-UX 10.20, where
29468         TMP_MAX is 17576).
29469
29470 2001-11-18  Jim Meyering  <meyering@lucent.com>
29471
29472         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
29473
29474 2001-11-18  Jim Meyering  <meyering@lucent.com>
29475
29476         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
29477         on SunOS 4.
29478
29479         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
29480         files will be created before anything else.
29481
29482 2001-11-17  Paul Eggert  <eggert@twinsun.com>
29483
29484         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
29485         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
29486
29487 2001-11-17  Jim Meyering  <meyering@lucent.com>
29488
29489         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
29490         Prompted by a report from Bob Proulx.
29491
29492         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
29493         Instead, require UTILS_FUNC_MKSTEMP.
29494
29495 2001-11-17  Jim Meyering  <meyering@lucent.com>
29496
29497         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
29498         Now, that's done as part of AC_FUNC_STRTOD.
29499
29500 2001-11-17  Jim Meyering  <meyering@lucent.com>
29501
29502         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
29503         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
29504         rather than group writable.  Patch by Juan F. Codagnone.
29505
29506         * lib/readtokens.c: Remove explicit declarations of xmalloc and
29507         xrealloc, Instead, include "xalloc.h".
29508
29509         * lib/mountlist.c: Include unlocked-io.h after all system headers.
29510         Remove explicit declarations of xmalloc, xrealloc,
29511         and xstrdup.  Instead, include "xalloc.h".
29512
29513         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
29514         unlocked-io.h.
29515         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
29516         Likewise.
29517         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
29518
29519         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
29520         Reported by Padraig Brady.
29521
29522         * lib/mkstemp.c: #undef mkstemp.
29523         Include config.h.
29524         (rpl_mkstemp): Rename from mkstemp.
29525         Protoize.
29526
29527 2001-11-16  Jim Meyering  <meyering@lucent.com>
29528
29529         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
29530         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
29531         determine the amount of total physical memory, use pstat_getstatic.
29532         HPUX-11 doesn't define _SC_PHYS_PAGES.
29533         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
29534         If sysconf couldn't be used to determine the amount of available
29535         physical memory, use both pstat_getstatic and pstat_getdynamic.
29536         Based on a patch from Bob Proulx.
29537
29538 2001-11-10  Jim Meyering  <meyering@lucent.com>
29539
29540         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
29541         (jm_PREREQ): Use it.
29542
29543 2001-11-09  Jim Meyering  <meyering@lucent.com>
29544
29545         * m4/jm-macros.m4: Require autoconf-2.52f.
29546         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
29547         Use these AC_-prefixed names, not the AM_-prefixed ones.
29548
29549         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
29550
29551 2001-11-05  Jim Meyering  <meyering@lucent.com>
29552
29553         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
29554
29555 2001-11-04  Jim Meyering  <meyering@lucent.com>
29556
29557         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
29558         $DEFS.
29559
29560 2001-11-03  Jim Meyering  <meyering@lucent.com>
29561
29562         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
29563         of AC_DEFUN.
29564
29565         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
29566         know the name of the variable in the macro definition.
29567
29568 2001-11-03  Jim Meyering  <meyering@lucent.com>
29569
29570         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
29571         in argmatch_to_argument call.
29572
29573         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
29574         argument.
29575
29576         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
29577         e.g., a fault due to an attempt to free a NULL pointer.
29578
29579 2001-11-01  Jim Meyering  <meyering@lucent.com>
29580
29581         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
29582         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
29583
29584 2001-11-01  Jim Meyering  <meyering@lucent.com>
29585
29586         * lib/dirfd.c, lib/dirfd.h: New files.
29587         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
29588
29589         * lib/hash.c (hash_print) [TESTING]: Clean up.
29590
29591 2001-10-22  Paul Eggert  <eggert@twinsun.com>
29592
29593         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
29594         to avoid a warning if -Wall.
29595
29596 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
29597
29598         * README: New file
29599         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
29600         (per RMS's instructions, this is now the canonical source)
29601         * lgpl/, gpl/: New directories.
29602
29603 2001-10-21  Paul Eggert  <eggert@twinsun.com>
29604
29605         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
29606
29607 2001-10-21  Jim Meyering  <meyering@lucent.com>
29608
29609         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
29610         this code would end up calling gettext even in packages built
29611         with --disable-nls.
29612         * lib/getopt.c (_): Likewise.
29613         * lib/regex.c (_): Likewise.
29614
29615 2001-10-20  Paul Eggert  <eggert@twinsun.com>
29616
29617         * m4/error.m4 (jm_PREREQ_ERROR):
29618         Do not invoke AC_CHECK_FUNCS with strerror_r, as
29619         AC_FUNC_STRERROR_R does that.
29620         Check for strerror declaration.
29621
29622         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
29623         are supposed to have them these days.
29624         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
29625         Merge changes from latest Autoconf CVS.
29626         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
29627         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
29628         POSIX decided to standardize on the int flavor of strerror_r.
29629
29630 2001-10-20  Paul Eggert  <eggert@twinsun.com>
29631
29632         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
29633         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
29634         Use strerror_r that is only a macro, even if it is not a function.
29635         (strerror): Check for HAVE_DECL_STRERROR before declaring.
29636         (private_strerror): Use prototypes, not old-style function definition.
29637         (print_errno_message): New function.
29638         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
29639         char*-flavored one.
29640         (error_tail, error, error_at_line): Use it.
29641
29642 2001-10-11  Jim Meyering  <meyering@lucent.com>
29643
29644         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
29645         and quote_n (1, ... to avoid clobbering a buffer.
29646
29647 2001-10-05  Jim Meyering  <meyering@lucent.com>
29648
29649         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
29650         hash-pjw.h.
29651         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
29652         * lib/hash-pjw.h: New file.
29653
29654 2001-09-30  Jim Meyering  <meyering@lucent.com>
29655
29656         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
29657         `struct fsstat' has the `f_fstypename' member.
29658         Use that to define FS_TYPE, which is now used to make
29659         the getfsstat link test tighter.
29660
29661 2001-09-30  Jim Meyering  <meyering@lucent.com>
29662
29663         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
29664         Include <sys/ucred.h>, for Apple Darwin.
29665         Include sys/mount.h and sys/fs_types.h only if available.
29666         (FS_TYPE): Define.
29667         (read_filesystem_list): Use FS_TYPE.
29668
29669 2001-09-29  Paul Eggert  <eggert@twinsun.com>
29670
29671         * lib/exclude.c (excluded_filename): 0 -> false, since it's
29672         a boolean context.
29673
29674 2001-09-29  Jim Meyering  <meyering@lucent.com>
29675
29676         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
29677         [one-argument getmntent function]): Include stdio.h before mntent.h.
29678         SunOS 4.1.x needs it for the declaration of `FILE'.
29679         Patch by Volker Borchert.
29680
29681         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
29682         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
29683         sys/fs_types.h, and make the link-test for getfsstat guard #include
29684         directives with appropriate #if HAVE_*_H tests so that we can
29685         detect getfsstat on Apple Darwin1.3.7 systems.
29686         Reported by Nelson Beebe.
29687         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
29688
29689 2001-09-28  Paul Eggert  <eggert@twinsun.com>
29690
29691         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
29692         #defines strtoimax.  Also treat the other strto* functions
29693         like strtoimax.
29694
29695         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
29696         Check for strtoul and strtoumax,
29697         as those declarations are made even in the signed case.
29698         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
29699         Likewise, for strtol and strtoimax.
29700
29701 2001-09-28  Paul Eggert  <eggert@twinsun.com>
29702
29703         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
29704         #defines strtoimax.  Also treat the other strto* functions
29705         like strtoimax.
29706
29707         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
29708         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
29709         (strtoimax, strtoumax): Do not declare if already defined as a macro.
29710
29711 2001-09-26  Jim Meyering  <meyering@lucent.com>
29712
29713         Most macros in unlocked-io.h had the wrong number of arguments.
29714         * lib/gen-uio: New script.
29715         (USE_UNLOCKED_IO): Define to 1 if not already defined.
29716         * lib/unlocked-io.hin: Remove file.
29717         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
29718         rather than trying to embed it here.
29719         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
29720         Reported by Padraig Brady.
29721
29722 2001-09-25  Volker Borchert  <bt@teknon.de>
29723
29724         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
29725         `result'.
29726
29727 2001-09-24  Jim Meyering  <meyering@lucent.com>
29728
29729         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
29730
29731 2001-09-23  Jim Meyering  <meyering@lucent.com>
29732
29733         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
29734         instead of the mere test for existence of mntent.h.  The latter
29735         would get a false-positive on AIX 3.4 systems.
29736         In the outer getmntent if-block, don't die if neither of the getmntent
29737         tests succeeds.  Instead, just fall through and continue with the
29738         remaining tests.
29739
29740 2001-09-23  Jim Meyering  <meyering@lucent.com>
29741
29742         * lib/mountlist.c: Remove useless parentheses in #if directives.
29743         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
29744         the deprecated MOUNTED symbol is no longer defined in mntent.h.
29745
29746 2001-09-22  Jim Meyering  <meyering@lucent.com>
29747
29748         * m4/gettext.m4: New file.  From gettext.
29749         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
29750         * m4/progtest.m4: Likewise
29751         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
29752         * m4/glibc21.m4: Likewise.
29753
29754         * m4/libintl.m4: Remove.  No longer used.
29755
29756 2001-09-22  Jim Meyering  <meyering@lucent.com>
29757
29758         * lib/localcharset.c: Update from latest gettext.
29759         * lib/config.charset: Likewise.
29760
29761 2001-09-20  Jim Meyering  <meyering@lucent.com>
29762
29763         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
29764         strtoimax.
29765         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
29766         strtoumax.
29767
29768 2001-09-20  Jim Meyering  <meyering@lucent.com>
29769
29770         * lib/xstrtol.c (strtoimax): Guard declaration with
29771         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
29772         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
29773         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
29774         (strtoumax): Likewise, for completeness (it wasn't necessary).
29775
29776 2001-09-17  Paul Eggert  <eggert@twinsun.com>
29777
29778         * lib/strtoimax.c (HAVE_LONG_LONG):
29779         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
29780         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
29781         to work around bug in IBM C compiler.
29782
29783 2001-09-17  Jim Meyering  <meyering@lucent.com>
29784
29785         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
29786         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
29787         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
29788         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
29789         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
29790         whenever the right hand side need not be expanded by the shell.
29791
29792 2001-09-16  Paul Eggert  <eggert@twinsun.com>
29793
29794         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
29795         library.  It's not correct, as some older glibcs are buggy.
29796         fnmatch wasn't fixed until glibc 2.2.
29797
29798         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
29799         special shell magic here.
29800
29801 2001-09-16  Jim Meyering  <meyering@lucent.com>
29802
29803         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
29804         * m4/jm-macros.m4: Require it.
29805
29806 2001-09-16  Jim Meyering  <meyering@lucent.com>
29807
29808         * lib/mkdir.c: New file.
29809
29810 2001-09-15  Jim Meyering  <meyering@lucent.com>
29811
29812         * m4/jm-macros.m4: Check for help2man.
29813
29814 2001-09-11  Jim Meyering  <meyering@lucent.com>
29815
29816         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
29817         The body, by Paul Eggert, was moved here from configure.in.
29818         * m4/jm-macros.m4: Require UTILS_HOST_OS.
29819
29820 2001-09-04  Paul Eggert  <eggert@twinsun.com>
29821
29822         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
29823         (jm_PREREQ): Use it.
29824
29825 2001-09-04  Paul Eggert  <eggert@twinsun.com>
29826
29827         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
29828         Use ssize_t, not int, to store result of readlink.
29829         Check for ssize_t overflow as well as size_t overflow,
29830         as POSIX says the result of readlink is implementation-defined
29831         when ssize_t overflows.
29832         Remove unnecessary cast to char*.
29833         Use free+malloc instead of realloc, as the storage doesn't need
29834         to be preserved and it's clearer and can be more efficient that way.
29835         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
29836         * lib/xreadlink.h (xreadlink): Update prototype.
29837
29838 2001-09-04  Paul Eggert  <eggert@twinsun.com>
29839
29840         * lib/xgetcwd.c: Revert some of the previous change; intead,
29841         fix the HAVE_GETCWD_NULL code to behave more like the
29842         !HAVE_GETCWD_NULL code used to.
29843
29844         Include "xalloc.h".
29845         (xgetcwd): Do not return NULL when memory is exhausted; instead,
29846         invoke xalloc_die.
29847
29848 2001-09-03  Paul Eggert  <eggert@twinsun.com>
29849
29850         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
29851         sys/param.h, as pathmax.h includes them.
29852
29853 2001-09-03  Paul Eggert  <eggert@twinsun.com>
29854
29855         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
29856         (jm_PREREQ_XGETCWD): New macro.
29857
29858         * m4/getcwd.m4: New file.
29859
29860 2001-09-03  Paul Eggert  <eggert@twinsun.com>
29861
29862         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
29863         like the HAVE_GETCWD_NULL code.
29864         Include pathmax.h if not HAVE_GETCWD.
29865         Do not include xalloc.h.
29866         (INITIAL_BUFFER_SIZE): New symbol.
29867         Do not use xmalloc / xrealloc, since the caller is responsible for
29868         handling errors.  Preserve errno around `free' during failure.
29869         Do not overrun buffer when using getwd.
29870
29871 2001-09-03  Paul Eggert  <eggert@twinsun.com>
29872
29873         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
29874         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
29875         getcwd (NULL, 0).
29876
29877 2001-09-03  Paul Eggert  <eggert@twinsun.com>
29878
29879         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
29880         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
29881         spotted by Jim Meyering.
29882
29883 2001-09-03  Jim Meyering  <meyering@lucent.com>
29884
29885         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
29886         failure.
29887
29888 2001-09-02  Jim Meyering  <meyering@lucent.com>
29889
29890         * lib/error.c: Update from GNU libc.
29891
29892 2001-09-01  Jim Meyering  <meyering@lucent.com>
29893
29894         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
29895         Used by df.
29896
29897 2001-09-01  Jim Meyering  <meyering@lucent.com>
29898
29899         * lib/xreadlink.c: New file.
29900         * lib/xreadlink.h: New file.
29901         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
29902         xreadlink.h.
29903
29904         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
29905         doesn't conflict with sparc Solaris 7's definition in
29906         /usr/include/sys/int_types.h.
29907
29908         * lib/exclude.c: Use `""', not `<>' to #include non-system header
29909         files.
29910         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
29911         and strncasecmp as r-values.  Unixware didn't have declarations.
29912
29913 2001-08-31  Paul Eggert  <eggert@twinsun.com>
29914
29915         * lib/xstrtol.h: Add copyright notice.
29916         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
29917         LONGINT_INVALID_SUFFIX_CHAR.
29918
29919 2001-08-31  Paul Eggert  <eggert@twinsun.com>
29920
29921         * lib/xstrtol.c (strtoimax): New decl.
29922
29923 2001-08-31  Paul Eggert  <eggert@twinsun.com>
29924
29925         * lib/xgetcwd.c: Don't include pathmax.h.
29926         Include stdlib.h and unistd.h if available.
29927         Include xalloc.h.
29928         (xmalloc, xstrdup, free): Remove decls.
29929         (xgetcwd): Don't assume sizes fit in unsigned.
29930         Check for overflow when computing sizes.
29931         Simplify reallocation code.
29932
29933 2001-08-31  Paul Eggert  <eggert@twinsun.com>
29934
29935         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
29936         a directory's st_size can have an arbitrary value, so the old
29937         usage could waste an arbitrary amount of memory.  All uses
29938         changed.
29939         * lib/savedir.h: Update prototype.
29940
29941 2001-08-31  Paul Eggert  <eggert@twinsun.com>
29942
29943         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
29944
29945         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
29946         old strtoimax.c.
29947
29948         Also, make the following further changes to make this file's
29949         configuration more similar to that of strtol.c:
29950         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
29951         (strtoumax, uintmax_t, strtoull, strtol): Remove.
29952         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
29953         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
29954         changed to signed values.
29955
29956         And make the following changes as well:
29957         Fix copyright notice, as 1999 was missing.
29958         (verify): New macro.
29959         (strtoimax): Check sizes at compile-time, not run-time.
29960         Prefer strtol to strtoll if both work.
29961         (main): Remove; it was not that useful and was a pain to maintain.
29962
29963         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
29964
29965 2001-08-31  Jim Meyering  <meyering@lucent.com>
29966
29967         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
29968         Use an initial, malloc'd, buffer of length 128 rather than
29969         a statically allocated one of length 1024.
29970
29971 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29972
29973         Simplify code, partly by assuming autoconf 2.52 semantics.
29974
29975         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
29976
29977         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
29978         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
29979         All uses removed.
29980         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
29981         Move AC_REQUIRE to next-to-top level, to avoid confusion.
29982         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
29983         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
29984         jm_AC_HEADER_INTTYPES_H.
29985         * m4/jm-macros.m4 (jm_MACROS): Likewise.
29986
29987         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
29988
29989         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
29990         Quote first arg of AC_DEFUN.
29991         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
29992         since they are needed to parse the include file even if we need
29993         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
29994         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
29995         but with opposite signedness.
29996
29997 2001-08-30  Paul Eggert  <eggert@twinsun.com>
29998
29999         Merge 'exclude' changes from tar 1.13.22.
30000         This fixes one or two unlikely storage allocation overflow bugs,
30001         but doesn't change user-visible behavior otherwise.
30002
30003 2001-08-30  Paul Eggert  <eggert@twinsun.com>
30004
30005         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
30006         (jm_PREREQ_EXCLUDE): New macro.
30007
30008 2001-08-30  Paul Eggert  <eggert@twinsun.com>
30009
30010         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
30011         tm to be declared.
30012
30013 2001-08-30  Paul Eggert  <eggert@twinsun.com>
30014
30015         * lib/hash.c: Remove '2001' from copyright notice.
30016
30017 2001-08-30  Paul Eggert  <eggert@twinsun.com>
30018
30019         * lib/full-write.h: New file.
30020         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
30021         * lib/full-write.c: Correct credits, as cccp.c no longer
30022         exists and anyway it was so heavily changed from the old cccp
30023         code as to be unrecognizable.  Include full-write.h.
30024         (full_write) Return size_t, with short writes meaning failure.
30025         All callers changed.  This fixes a bug with large buffers
30026         on 64-bit hosts.
30027         * lib/utime.c: Include full-write.h.
30028
30029 2001-08-30  Paul Eggert  <eggert@twinsun.com>
30030
30031         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
30032         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
30033         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
30034         Include if available.
30035         (<xalloc.h>): Include
30036         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
30037         (verify): New macro.  Use it to verify that EXCLUDE macros do not
30038         collide with FNM macros.
30039         (struct patopts): New struct.
30040         (struct exclude): Use it, as exclude patterns now come with options.
30041         (new_exclude): Support above changes.
30042         (new_exclude, add_exclude_file):
30043         Initial size must now be a power of two to simplify overflow checking.
30044         (free_exclude, fnmatch_no_wildcards): New function.
30045         (excluded_filename): No longer requires options arg, as the options
30046         are determined by add_exclude.  Now returns bool, not int.
30047         (excluded_filename, add_exclude):
30048         Add support for the fancy new exclusion options.
30049         (add_exclude, add_exclude_file): Now takes int options arg.
30050         Check for arithmetic overflow when computing sizes.
30051         (add_exclude_file): xrealloc might modify errno, so don't
30052         realloc until after errno might be used.
30053
30054         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
30055         New macros.
30056         (free_exclude): New decl.
30057         (add_exclude, add_exclude_file): Now takes int options arg.
30058         (excluded_filename): No longer requires options arg, as the options
30059         are determined by add_exclude.  Now returns bool, not int.
30060
30061 2001-08-30  Paul Eggert  <eggert@twinsun.com>
30062
30063         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
30064
30065 2001-08-27  Jim Meyering  <meyering@lucent.com>
30066
30067         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
30068
30069         * lib/version-etc.c (N_): Remove definition.
30070         Revert most of last change.
30071         Instead, simply don't mark the `Copyright...' string for translation.
30072         Based on advice from Paul Eggert.
30073
30074         * lib/strtoxmax.c: Tweak comment.
30075
30076 2001-08-26  Jim Meyering  <meyering@lucent.com>
30077
30078         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
30079
30080         * m4/xstrtoimax.m4: New file.
30081         * m4/xstrtoumax.m4: Add comments explaining why we
30082         AC_REPLACE_FUNCS(strtol).
30083
30084 2001-08-26  Jim Meyering  <meyering@lucent.com>
30085
30086         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
30087         of copyright with `%s' so translators don't get an untranslated
30088         message in 2002.
30089         (COPYRIGHT_YEAR): Define.
30090         (version_etc): Use fprintf rather than fputs.
30091         Suggestion from Ulrich Drepper.
30092
30093         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
30094
30095         * lib/strtoll.c: New file, from GNU libc.
30096         * lib/xstrtoimax.c: New file.
30097
30098         * lib/xstrtol.h: Add xstrtoimax.
30099         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
30100         * lib/strtoimax.c: New file.  Likewise, but first define
30101         STRTOUXMAX_SIGNED.
30102
30103         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
30104         ...
30105         * lib/strtoxmax.c: ... then renamed to this.
30106
30107 2001-08-18  Paul Eggert  <eggert@twinsun.com>
30108
30109         * m4/inttypes.m4: Add AC_PREREQ(2.13).
30110         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
30111         (jm_AC_TYPE_INTMAX_T): New macro.
30112         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
30113
30114         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
30115
30116         * m4/longlong.m4: Renamed from ulonglong.m4.
30117         * m4/inttypes.m4: Renamed from inttypes_h.m4.
30118         * m4/uintmax_t.m4: Removed.
30119
30120 2001-08-13  Paul Eggert  <eggert@twinsun.com>
30121
30122         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
30123         Port to Solaris 8, where 'sed' requires a space after the 'r'
30124         command, and where sh dislikes "$/".  Clean up the spacing a bit.
30125         Redirect output to $tmp just once.
30126
30127 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
30128
30129         * lib/addext.c (<errno.h>): Include.
30130         (errno): Declare if not defined.
30131         (addext): Work correctly when pathconf returns -1 and leaves
30132         errno alone because there is no limit.  Also, work even if
30133         pathconf returns a value greater than SIZE_MAX.
30134
30135 2001-08-12  Jim Meyering  <meyering@lucent.com>
30136
30137         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
30138         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
30139         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
30140         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
30141         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
30142         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
30143         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
30144         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
30145         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
30146         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
30147         utime.m4, utimes.m4, xstrtoumax.m4:
30148         Quote the first argument in each use of AC_DEFUN.
30149
30150 2001-08-12  Jim Meyering  <meyering@lucent.com>
30151
30152         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
30153         Simply `return getcwd (NULL, 0);'.
30154         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
30155         Use 1300 as initial value for length, not PATH_MAX.
30156
30157         * lib/pathmax.h: Clean up cpp syntax.
30158
30159 2001-08-12  Jim Meyering  <meyering@lucent.com>
30160
30161         * lib/gettimeofday.c: New file.
30162         * lib/gtod.h: New file.
30163         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
30164
30165 2001-08-05  Jim Meyering  <meyering@lucent.com>
30166
30167         * m4/jm-macros.m4: Require autoconf-2.52.
30168
30169 2001-08-04  Jim Meyering  <meyering@lucent.com>
30170
30171         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
30172         stmt, to get in sync with glibc.
30173
30174 2001-08-03  Paul Eggert  <eggert@twinsun.com>
30175
30176         The following changes are from gettext 0.10.39 as maintained by
30177         Bruno Haible.
30178
30179         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
30180         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
30181         with inverted sense.  All uses changed.
30182
30183         * lib/mbswidth.c: Don't include <limits.h>.
30184         Include <stdlib.h> and <string.h> unconditionally.
30185         (iswcntrl, mbsinit, ISCNTRL): New macros.
30186         (mbsnwidth): Use K&R style function declarations.
30187         Don't bother checking for MB_LEN_MAX == 1, since the compiler
30188         can optimize it when MB_CUR_MAX == 1.
30189         The width of control characters is zero, not 1.
30190
30191 2001-08-03  Paul Eggert  <eggert@twinsun.com>
30192
30193         The following changes are from gettext 0.10.39 as maintained by
30194         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
30195
30196         * m4/codeset.m4: Upgrade to serial AM1.
30197         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
30198         all uses changed.  Quote first arg of AC_DEFUN.
30199         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
30200
30201         * m4/iconv.m4: Upgrade to serial AM2.
30202         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
30203         Add --with-libconv-prefix.
30204         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
30205         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
30206         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
30207         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
30208         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
30209
30210         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
30211         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
30212         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
30213         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
30214         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
30215         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
30216         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
30217         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
30218         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
30219
30220         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
30221         string.h any more.
30222
30223         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
30224         not the default value.
30225
30226         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
30227         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
30228         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
30229         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
30230         Also check for iswcntrl, used for wcwidth fallback.
30231         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
30232         to Autoconf 2.13.
30233
30234 2001-08-03  Jim Meyering  <meyering@lucent.com>
30235
30236         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
30237         as it was in the original.  Reported by Paul Eggert.
30238
30239 2001-07-16  Jim Meyering  <meyering@lucent.com>
30240
30241         * m4/gettimeofday.m4: New file.
30242         Prompted by a report from Bernhard Baehr.
30243
30244 2001-07-15  Jim Meyering  <meyering@lucent.com>
30245
30246         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
30247         stuff. Now it's in ../Makefile.cfg.
30248
30249 2001-07-15  Jim Meyering  <meyering@lucent.com>
30250
30251         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
30252         (BUILT_SOURCES): Add unlocked-io.h.
30253         (io_functions): Define.
30254         (unlocked-io.h): New rule.
30255         (DISTCLEANFILES): Add unlocked-io.h.
30256         (all-local): Depend on unlocked-io.h, to ensure it is created.
30257
30258         * lib/unlocked-io.hin: New file
30259
30260         * lib/regex.c: Update from glibc.
30261
30262 2001-07-05  Jim Meyering  <meyering@lucent.com>
30263
30264         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
30265         recommendation.
30266         (libfetish_a_SOURCES): Put all .h files here instead.
30267         Remove a thus-exposed (better checks in automake) duplicate and
30268         two unnecessary .h files.
30269
30270 2001-07-04  Jim Meyering  <meyering@lucent.com>
30271
30272         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
30273         that generates jm-glibc-io.m4 so that it doesn't trigger any make
30274         distcheck failure.
30275
30276 2001-07-02  Jim Meyering  <meyering@lucent.com>
30277
30278         The following changes were prompted by suggestions from Bruno Haible.
30279
30280         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
30281         is now generated.
30282         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
30283         definition of EXTRA_DIST.
30284         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
30285         ensure that the generated file is created/updated whenever the list
30286         of $(unlocked_functions) is changed.
30287         (jm-glibc-io.m4): New rule.
30288         (unlocked-io.h): New rule -- currently unused.
30289
30290 2001-06-24  Jim Meyering  <meyering@lucent.com>
30291
30292         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
30293         unmatched right bracket, rather than kludging it with an extra,
30294         falsely-matching quote in a comment.  Patch by Akim Demaille.
30295
30296 2001-06-11  Jim Meyering  <meyering@lucent.com>
30297
30298         * lib/regex.c: Update from GNU libc.
30299
30300 2001-05-27  Jim Meyering  <meyering@lucent.com>
30301
30302         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
30303         Check for ut_type in struct utmp.
30304
30305 2001-05-27  Jim Meyering  <meyering@lucent.com>
30306
30307         * lib/readutmp.h (UT_TYPE): Define.
30308
30309 2001-05-24  Jim Meyering  <meyering@lucent.com>
30310
30311         * lib/argmatch.c: Include "quote.h".
30312         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
30313         quote function.  Reported by Göran Uddeborg.
30314
30315 2001-05-22  Jim Meyering  <meyering@lucent.com>
30316
30317         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
30318         now that we use the package-supplied version unconditionally.
30319         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
30320
30321 2001-05-21  Jim Meyering  <meyering@lucent.com>
30322
30323         * m4/regex.m4: Change a couple backticks to single quotes to avoid
30324         shell syntax errors.
30325
30326 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
30327
30328         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
30329
30330 2001-05-20  Paul Eggert  <eggert@twinsun.com>
30331
30332         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
30333         Don't bother to check library strftime, since
30334         we'll be using our own my_strftime function anyway.
30335         Define my_strftime instead of strftime.
30336
30337 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
30338
30339         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
30340         which is not yet declared.
30341
30342 2001-05-15  Jim Meyering  <meyering@lucent.com>
30343
30344         * m4/regex.m4: Use proper quoting so brackets appear in the test
30345         program.
30346         Reported by, and with help from, Bruno Haible.
30347
30348 2001-05-13  Jim Meyering  <meyering@lucent.com>
30349
30350         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
30351         undefined.
30352
30353 2001-05-11  Paul Eggert  <eggert@twinsun.com>
30354
30355         dirname code cleanup.  base_name now behaves more compatibly
30356         with POSIX basename when given file names that have trailing
30357         slashes, and similarly for dir_name.  Add new primitives
30358         base_len and dir_len.  Put the directory-name-related decls
30359         into dirname.h.
30360
30361         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
30362         * lib/backupfile.c (base_name): Likewise.
30363         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
30364         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
30365         * lib/makepath.c (strip_trailing_slashes): Likewise.
30366         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
30367         ISSLASH): Likewise.
30368         * lib/rename.c (strip_trailing_slashes): Likewise.
30369         * lib/same.c (base_name): Likewise.
30370         * lib/stripslash.c (ISSLASH): Likewise.
30371
30372         * lib/addext.c: Include <dirname.h> after size_t is defined.
30373         * lib/backupfile.c: Likewise.
30374
30375         * lib/addext.c (addext): Use base_len to trim redundant
30376         trailing slashes instead of doing it ourselves.
30377         But do not trim the last slash if it is not redundant.
30378
30379         * lib/backupfile.c (find_backup_file_name,
30380         max_backup_version): Use base_len instead of rolling it ourselves.
30381         Handle the case of "" and (on DOS) "C:" correctly.
30382
30383         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
30384         needed. Include <string.h>, <dirname.h>.
30385         (base_name): Allow file names ending in slashes, other than names
30386         that are all slashes.  In this case, return the basename followed
30387         by the slashes.  This is more general, and can be used in places
30388         where the original base_name purposely had an assertion failure.
30389         (base_len): New function.
30390
30391         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
30392         Do not include <assert.h>; no longer needed.
30393         Include xalloc.h.
30394         (memrchr): Remove decl.
30395         (dir_name_r): Remove.
30396         (dir_len): Renamed from dirlen.  All callers changed.
30397         Rewrite in terms of base_name, for simplicity and consistency.
30398         (dir_name): Never return NULL.  All callers changed.
30399         Do not include <stdlib.h> in test program; no longer needed.
30400         return 0; is fine for test program.
30401
30402         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
30403         New macros.
30404         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
30405
30406         * lib/path-concat.c (path_concat): Use base_len to compute
30407         base length, not strlen; this means we cannot rely on memcpy
30408         to null-terminate.
30409
30410         * lib/same.c (STREQ): Remove.
30411         (same_name): Handle the case where the basename ends in trailing '/'.
30412
30413         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
30414         a slash was stripped.  Do not strip the last slash after a
30415         file system prefix.
30416
30417 2001-05-11  Paul Eggert  <eggert@twinsun.com>
30418
30419         * lib/Makefile.am (libfetish_a_SOURCES):
30420         Add strftime.c, since we now compile it on all hosts.
30421
30422         * lib/strftime.c (my_strftime):
30423         Define to nstrftime if emacs, but only if my_strftime is not defined.
30424         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
30425         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
30426         Add one more extra argument: a nanoseconds value.
30427         All uses changed.
30428         (ns): New macro.
30429         (my_strftime function): Add %N format.
30430         (emacs_strftimeu): Renamed from emacs_strftime,
30431         with extra ut argument.
30432
30433 2001-05-09  Paul Eggert  <eggert@twinsun.com>
30434
30435         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
30436
30437 2001-04-21  Jim Meyering  <meyering@lucent.com>
30438
30439         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
30440         doesn't interfere.
30441
30442 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
30443
30444         * m4/ftruncate.m4: Check for chsize.
30445         Link with ftruncate.o unconditionally if ftruncate is missing.
30446         This was required when cross-compiling to i586-mingw32msvc.
30447
30448 2001-04-08  Jim Meyering  <meyering@lucent.com>
30449
30450         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
30451         recomputed; that's necessary when the offset spans a DST transition.
30452         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
30453
30454 2001-04-02  Jim Meyering  <meyering@lucent.com>
30455
30456         * lib/regex.h, regex.c: Update from GNU libc.
30457
30458 2001-03-24  Jim Meyering  <meyering@lucent.com>
30459
30460         * m4/jm-macros.m4: Require autoconf-2.49d.
30461
30462 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
30463
30464         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
30465
30466 2001-03-19  Paul Eggert  <eggert@twinsun.com>
30467
30468         * lib/version-etc.c (version_etc_copyright): Update to 2001.
30469
30470 2001-03-17  Jim Meyering  <meyering@lucent.com>
30471
30472         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
30473         now that the version in autoconf is equivalent.
30474         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
30475
30476         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
30477         Suggestion from Akim Demaille.
30478
30479         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
30480         (jm_PREREQ_TEMPNAME): New function.
30481
30482 2001-03-16  Paul Eggert  <eggert@twinsun.com>
30483
30484         * lib/tempname.c (uint64_t): Define to uintmax_t if
30485         not defined, and if UINT64_MAX is not defined.
30486         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
30487         Reported by John David Anglin.
30488
30489 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
30490
30491         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
30492         resolve alias if codeset is empty.
30493         * lib/config.charset (BeOS): Use wildcard syntax.
30494
30495 2001-03-13  Jim Meyering  <meyering@lucent.com>
30496
30497         * lib/path-concat.c (path_concat)
30498         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
30499         concatenating e.g., `C:' and `foo'.
30500         From Bruno Haible.
30501
30502 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
30503
30504         * lib/localcharset.c (locale_charset): Don't use
30505         setlocale(LC_CTYPE,NULL). Don't return NULL.
30506         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
30507
30508 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
30509
30510         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
30511         support for DOS/DJGPP.
30512
30513 2001-03-01  Paul Eggert  <eggert@twinsun.com>
30514
30515         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
30516         lacks mkstemp.  Compile our own tempname.c if we compile our own
30517         mkstemp.c, as mkstemp relies on tempname.
30518
30519 2001-03-01  Jim Meyering  <meyering@lucent.com>
30520
30521         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
30522         AH_VERBATIM really does output its argument verbatim.
30523
30524 2001-02-28  Paul Eggert  <eggert@twinsun.com>
30525
30526         * lib/Makefile.am (libfetish_a_SOURCES):
30527         Add dup-safer.c, fopen-safer.c.
30528         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
30529
30530         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
30531         * lib/unistd-safer.h: New files.
30532
30533 2001-02-25  Paul Eggert  <eggert@twinsun.com>
30534
30535         The mkstemp replacement is taken from glibc 2.2.2, with some
30536         portability fixes for use outside glibc, as follows:
30537
30538         * lib/tempname.c (struct_stat64): New macro.
30539         (direxists, __gen_tempname): Use it.
30540         This avoids a portability problem with Solaris 8.
30541
30542         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
30543         (<stddef.h>, <stdint.h>, <string.h>):
30544         Include only if STDC_HEADERS || _LIBC.
30545         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
30546         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
30547         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
30548         (__set_errno): Define this macro if <errno.h> doesn't.
30549         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
30550         Define these macros if <stdio.h> doesn't.
30551         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
30552         Define these macros if <sys/stat.h>
30553         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
30554         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
30555         __xstat64): Define if not _LIBC.
30556         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
30557         (__gen_tempname): Invoke gettimeofday only if
30558         HAVE_GETTIMEOFDAY || _LIBC;
30559         otherwise, fall back on plain "time".
30560         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
30561
30562         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
30563
30564         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
30565
30566 2001-02-18  Paul Eggert  <eggert@twinsun.com>
30567
30568         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
30569
30570 2001-02-17  Paul Eggert  <eggert@twinsun.com>
30571
30572         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
30573         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
30574         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
30575         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
30576
30577 2001-02-17  Paul Eggert  <eggert@twinsun.com>
30578
30579         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
30580         Remove workaround macros for hosts that have mbrtowc but not
30581         mbstate_t, as we now insist on proper declarations for both
30582         before using mbrtowc.
30583
30584 2001-02-17  Jim Meyering  <meyering@lucent.com>
30585
30586         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
30587         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
30588         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
30589         UnixWare 7.1.1.
30590
30591         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
30592         rather than AC_CACHE_VAL.
30593
30594 2001-02-17  Jim Meyering  <meyering@lucent.com>
30595
30596         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
30597         around included file name.
30598
30599         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
30600
30601         * lib/strftime.c: Update from GNU libc (the only changes were to
30602         comments).
30603
30604 2001-02-17  Jim Meyering  <meyering@lucent.com>
30605
30606         * lib/regex.c: Update from libc.
30607
30608 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
30609
30610         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
30611         clash.
30612
30613 2001-02-16  Paul Eggert  <eggert@twinsun.com>
30614
30615         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
30616         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
30617         Reported by Mark Hounschell via Paul Eggert.
30618
30619 2001-02-07  Jim Meyering  <meyering@lucent.com>
30620
30621         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
30622
30623 2001-02-05  Jim Meyering  <meyering@lucent.com>
30624
30625         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
30626         it includes the patch required for `large file' support with at least
30627         HP-UX's 10.20 /bin/cc.
30628
30629 2001-02-03  Jim Meyering  <meyering@lucent.com>
30630
30631         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
30632         AS_IF, now that it works once again (mysteriously).
30633         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
30634
30635 2001-01-30  Jim Meyering  <meyering@lucent.com>
30636
30637         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
30638         * m4/chown.m4: Rename conftestchown to conftest.chown.
30639         * m4/rename.m4: s/conftestdir/conftest.d1/ and
30640         s/conftestdir2/conftest.d2/.
30641         * m4/utimes.m4: s/conftestdata/conftest.data/
30642         Inspired by Pavel Roskin's change in autoconf.
30643
30644 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
30645
30646         * lib/config.charset: Update for FreeBSD 4.2.
30647
30648 2001-01-27  Jim Meyering  <meyering@lucent.com>
30649
30650         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
30651         a use of AS_IF.
30652         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
30653
30654 2001-01-26  Jim Meyering  <meyering@lucent.com>
30655
30656         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
30657         quotearg.c includes it.
30658
30659 2001-01-26  Jim Meyering  <meyering@lucent.com>
30660
30661         * lib/quotearg.c: Include stddef.h.
30662         * lib/quote.c: Include stddef.h.
30663         Reported by Axel Kittenberger.
30664
30665         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
30666         line in double quotes so that it evokes a better diagnostic.
30667         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
30668         Reported by Axel Kittenberger.
30669
30670 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
30671
30672         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
30673         as if it was a `charset'.
30674
30675 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
30676
30677         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
30678         has const.
30679
30680 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
30681
30682         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
30683         to avoid a warning.  Add back 'const' to inptr.
30684
30685 2001-01-20  Jim Meyering  <meyering@lucent.com>
30686
30687         Be sure that headers are checked before used in code compiled
30688         for the type checks.
30689         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
30690         In place of that, invoke jm_CHECK_ALL_TYPES.
30691         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
30692         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
30693         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
30694         The check for ssize_t was mistakenly run before the test for unistd.h.
30695
30696         The configure-time check for stdbool.h was missing.
30697         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
30698         (jm_PREREQ_HASH): New function.
30699
30700 2001-01-17  Jim Meyering  <meyering@lucent.com>
30701
30702         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
30703         for autoconf-2.49c.
30704         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
30705
30706 2001-01-16  Jim Meyering  <meyering@lucent.com>
30707
30708         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
30709         From Bruno Haible.
30710
30711 2001-01-14  Jim Meyering  <meyering@lucent.com>
30712
30713         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
30714         foo and bar.  Create conftestdir/ in the script, not in the C code.
30715         Remove directories in the script, not in the C code.
30716         Remove conftestdir{,2} before trying to create the directory.
30717         Make the entire configure script fail if the mkdir fails.
30718
30719 2001-01-14  Jim Meyering  <meyering@lucent.com>
30720
30721         * lib/rename.c: New file.  From Volker Borchert.
30722         Include stdlib.h, string.h or strings.h, and xalloc.h.
30723         Use strip_trailing_slashes rather than open-coding it.
30724
30725 2001-01-03  Paul Eggert  <eggert@twinsun.com>
30726
30727         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
30728
30729 2001-01-03  Jim Meyering  <meyering@lucent.com>
30730
30731         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
30732         of local `inptr' to avoid warning with some system declarations of
30733         iconv.
30734
30735 2001-01-02  Volker Borchert  <bt@teknon.de>
30736
30737         * m4/rename.m4: New file.
30738         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
30739
30740 2001-01-01  Jim Meyering  <meyering@lucent.com>
30741
30742         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
30743         even on systems with utmpx.h.  It's necessary for the declaration of
30744         utmp's ut_user member.  Reported by Andreas Jaeger.
30745
30746         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
30747         available. They are required for the declarations of getgrgid and
30748         getpwuid resp.
30749         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
30750         Reported by Andreas Jaeger.
30751
30752 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
30753
30754         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
30755         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
30756         so `make install' also works in VPATH builds.
30757
30758 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
30759
30760         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
30761         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
30762         can be used in subdirectories.
30763
30764 2000-12-29  Paul Eggert  <eggert@twinsun.com>
30765
30766         * lib/modechange.c: Do not assume that mode_t uses the
30767         traditional octal encoding.  E.g. "chmod 1 FOO" should set
30768         the other-execute bit of FOO even if S_IXOTH != 1.
30769
30770         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
30771         WOTH, XOTH, ALLM): New macros.
30772         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
30773          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
30774         Use them.
30775         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
30776         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
30777         (mode_compile):
30778         No need to use uintmax_t; unsigned long is long enough.
30779         Don't bother to get suffix since we don't use it.
30780
30781 2000-12-26  Jim Meyering  <meyering@lucent.com>
30782
30783         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
30784         better with autoheader.
30785
30786 2000-12-24  Jim Meyering  <meyering@lucent.com>
30787
30788         * lib/hash.c (is_prime): Return explicit boolean values.
30789         (hash_get_first): Return NULL to appease Irix5.6's 89.
30790         Reported by Nelson Beebe.
30791
30792 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
30793
30794         * lib/localcharset.c (locale_charset): Add support for Win32.
30795
30796 2000-12-18  Paul Eggert  <eggert@twinsun.com>
30797
30798         * lib/physmem.h, lib/physmem.c: New files.
30799
30800         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
30801         (noinst_HEADERS): Add physmem.h.
30802
30803         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
30804         't' for compatibility with Solaris 8 sort.
30805
30806 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
30807
30808         * lib/config.charset: Add support for BeOS.
30809
30810 2000-12-17  Jim Meyering  <meyering@lucent.com>
30811
30812         * m4/dos.m4 (jm_AC_DOS): New file and macro.
30813         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
30814
30815 2000-12-16  Jim Meyering  <meyering@lucent.com>
30816
30817         This bug had a serious impact on chown: `chown N:M FILE' (for integer
30818         N and M) would have treated it like `chown N:N FILE'.
30819
30820         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
30821
30822 2000-12-16  Jim Meyering  <meyering@lucent.com>
30823
30824         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
30825         SHELLS_FILE to a file name that's useful on djgpp systems.
30826         Include stdlib.h.
30827         (ADDITIONAL_DEFAULT_SHELLS): Define.
30828         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
30829         Based mostly on a patch from Prashant TR.
30830
30831 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
30832
30833         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
30834         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
30835         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
30836
30837 2000-12-08  Andreas Schwab  <schwab@suse.de>
30838
30839         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
30840         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
30841
30842 2000-12-07  Jim Meyering  <meyering@lucent.com>
30843
30844         * lib/stripslash.c (ISSLASH): Define.
30845         (strip_trailing_slashes): Use ISSLASH rather than comparing against
30846         `/'.
30847         From Prashant TR.
30848
30849         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
30850         (dir_name_r): Declare this function as static.
30851         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
30852         manifest itself on a name containing a mix of slashes and
30853         backslashes.
30854         Make this function work with names starting with a DOS-style
30855         drive letter and colon prefix.
30856         (dir_name): Append `.' if necessary.
30857         Based mostly on patches from Prashant TR and Eli Zaretskii.
30858
30859         * lib/dirname.h (dir_name_r): Remove prototype.
30860
30861 2000-12-06  Paul Eggert  <eggert@twinsun.com>
30862
30863         * m4/off_t-format.m4: Remove this file.
30864         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
30865
30866 2000-12-06  Jim Meyering  <meyering@lucent.com>
30867
30868         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
30869         replacement strtoull, we may well need the replacement strtoul, too.
30870         Check for declarations of strtoul and strtoull.
30871         Check for strtol.  Mainly as a cue to cause automake to include
30872         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
30873         Check for limits.h -- strtol.c needs it.
30874
30875 2000-12-05  Jim Meyering  <meyering@lucent.com>
30876
30877         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
30878
30879 2000-12-04  Jim Meyering  <meyering@lucent.com>
30880
30881         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
30882         Also include memory.h, stdlib.h, unistd.h if appropriate.
30883         Reported by Andreas Jaeger (conflicting declaration of malloc).
30884
30885 2000-12-02  Jim Meyering  <meyering@lucent.com>
30886
30887         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
30888         * m4/jm-macros.m4 (jm_MACROS): require it.
30889
30890 2000-12-02  Jim Meyering  <meyering@lucent.com>
30891
30892         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
30893
30894 2000-12-01  Paul Eggert  <eggert@twinsun.com>
30895
30896         * lib/memrchr.c: Include <config.h> before any system include file.
30897
30898 2000-11-30  Jim Meyering  <meyering@lucent.com>
30899
30900         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
30901
30902 2000-11-30  Jim Meyering  <meyering@lucent.com>
30903
30904         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
30905
30906 2000-11-29  Paul Eggert  <eggert@twinsun.com>
30907
30908         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
30909
30910 2000-11-26  Jim Meyering  <meyering@lucent.com>
30911
30912         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
30913
30914 2000-11-22  Paul Eggert  <eggert@twinsun.com>
30915
30916         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
30917         size of (size_t) -1; it's not portable.
30918
30919 2000-11-17  Jim Meyering  <meyering@lucent.com>
30920
30921         * lib/strstr.c: Update from GNU libc.
30922
30923 2000-11-17  Akim Demaille  <akim@epita.fr>
30924
30925         * lib/obstack.h: Formatting changes.
30926         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
30927         prevent type checking.
30928         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
30929         cast the value to (void *): assigning a `foo *' to a `void *'
30930         variable is valid.
30931         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
30932
30933 2000-11-16  Jim Meyering  <meyering@lucent.com>
30934
30935         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
30936
30937 2000-11-11  Jim Meyering  <meyering@lucent.com>
30938
30939         * lib/error.c: Add a couple #includes, merging from GNU libc version.
30940
30941 2000-11-10  Jim Meyering  <meyering@lucent.com>
30942
30943         * lib/obstack.h: Update from GNU libc.
30944         * lib/obstack.c: Likewise.
30945
30946 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
30947
30948         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
30949
30950 2000-11-06  Paul Eggert  <eggert@twinsun.com>
30951
30952         * lib/getusershell.c (setusershell): Use rewind rather than
30953         fseek/fseeko, to avoid configuration hassles with fseeko.
30954         Don't bother opening SHELLS_FILE if shellstream is NULL;
30955         it's not necessary.
30956
30957 2000-11-05  Jim Meyering  <meyering@lucent.com>
30958
30959         * lib/makepath.h (make_dir): Declare.
30960         * lib/makepath.c (make_dir): Remove `static' attribute.
30961         Tweak a comment.
30962
30963 2000-11-04  Jim Meyering  <meyering@lucent.com>
30964
30965         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
30966
30967 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
30968
30969         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
30970         last one in a bucket, advance to the next bucket.
30971
30972 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
30973
30974         * lib/fnmatch.c: Do not comment out all the code if we are using
30975         the GNU C library, because in some cases we are replacing buggy
30976         code in the GNU C library itself.
30977
30978 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
30979
30980         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
30981         (regex_compile): Catch bogus \(\1\).
30982
30983 2000-10-30  Paul Eggert  <eggert@twinsun.com>
30984
30985         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
30986         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
30987         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
30988
30989 2000-10-30  Paul Eggert  <eggert@twinsun.com>
30990
30991         * lib/error.h, getline.h, modechange.h:
30992         Remove "2000" from Copyright line, as the file hasn't been
30993         changed this year other than in the copyright notice.
30994
30995         * lib/xalloc.h: Add "2000" to Copyright line, as this file
30996         was changed this year.
30997
30998 2000-10-29  Jim Meyering  <meyering@lucent.com>
30999
31000         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
31001         renaming.
31002         * m4/ls-mntd-fs.m4: Likewise
31003
31004 2000-10-29  Jim Meyering  <meyering@lucent.com>
31005
31006         * lib/xstat.in: Fix grammar in comment.
31007
31008 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
31009
31010         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
31011         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
31012         doesn't define __restrict_arr.
31013
31014 2000-10-28  Jim Meyering  <meyering@lucent.com>
31015
31016         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
31017         (jm_PREREQ_MEMCHR): New function.
31018
31019 2000-10-28  Jim Meyering  <meyering@lucent.com>
31020
31021         * lib/memchr.c: Update from libc.
31022         Adjust for portability:
31023         [HAVE_STDLIB_H]: Include stdlib.h.
31024         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
31025         Undef __memchr, too.
31026         [!weak_alias]: Define __memchr to memchr.
31027
31028         * lib/regex.c: Update from libc.
31029         * lib/regex.h: Likewise.
31030         * lib/getopt1.c: Likewise.
31031         * lib/memcmp.c: Likewise.
31032
31033         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
31034         Avoid using fseek, when possible -- it's broken by design.
31035         Patch by Ulrich Drepper.
31036
31037 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
31038
31039         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
31040         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
31041         Giving in to popular pressure to shut up the compiler with casts.
31042
31043 2000-10-26  Jim Meyering  <meyering@lucent.com>
31044
31045         * lib/strftime.c: Update from libc.
31046
31047 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
31048
31049         * regex.c: More `unsigned char' -> `re_char' changes.
31050         Also change several `int' into `re_wchar_t'.
31051         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
31052         (PUSH_FAILURE_POINTER): Don't cast any more.
31053         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
31054         We want GCC to complain, since this piece of code makes
31055         re_match non-reentrant, which *should* be fixed.
31056         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
31057         (EXTEND_BUFFER): Use RETALLOC.
31058         (SET_LIST_BIT): Don't cast.
31059         (re_wchar_t): New type.
31060         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
31061         that those two functions will always properly return.
31062         (IMMEDIATE_QUIT_CHECK): Cast to void.
31063         (analyse_first): Use recursion rather than an explicit stack.
31064         (re_compile_fastmap): Can't fail anymore.
31065         (re_search_2): Don't check re_compile_fastmap for failure.
31066         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
31067         Now also sets the new value (passed in a new argument).
31068         (re_match_2_internal): Use it.
31069         Also, use a new var `reg' of type size_t when looping through regs
31070         rather than reuse the inappropriate `mcnt'.
31071
31072 2000-10-25  Jim Meyering  <meyering@lucent.com>
31073
31074         * lib/obstack.c: Update from libc.
31075
31076 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
31077
31078         * regex.c (regex_compile): Change the way of handling a range from
31079         a char less than 256 to a char not less than 256.
31080
31081 2000-10-24  Andrew Innes  <andrewi@gnu.org>
31082
31083         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
31084         NT-Emacs only.
31085         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
31086         so that re_search functions only quit when callers expect them to.
31087
31088 2000-10-23  Jim Meyering  <meyering@lucent.com>
31089
31090         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
31091         wrong.  That set_locale call must not have any side effects.
31092         From Paul Eggert.
31093
31094 2000-10-22  Jim Meyering  <meyering@lucent.com>
31095
31096         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
31097         [CYCLIC]: Remove now-unused definition.
31098
31099         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
31100         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
31101         Suggestion from Ulrich Drepper.
31102
31103 2000-10-21  Jim Meyering  <meyering@lucent.com>
31104
31105         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
31106         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
31107         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
31108
31109 2000-10-21  Jim Meyering  <meyering@lucent.com>
31110
31111         * lib/dirname.c (memrchr): Declare if necessary.
31112         (dir_name): Remove the restriction that there be no
31113         trailing slashes.  Now, this code skips past them, effectively
31114         ignoring them.
31115         [TEST_DIRNAME] (main): New unit tests.
31116
31117         * lib/memrchr.c: New file from GNU libc.
31118         Undef __memrchr, too.
31119         [!weak_alias]: Define __memrchr to memrchr.
31120         Guard weak_alias use with `#ifdef weak_alias'.
31121
31122 2000-10-21  Jim Meyering  <meyering@lucent.com>
31123
31124         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
31125         (dir_name): Use dir_name_r.
31126         * lib/dirname.h (dir_name_r): Declare it.
31127
31128 2000-10-17  Jim Meyering  <meyering@lucent.com>
31129
31130         * lib/quote.h (PARAMS): Define and use.
31131         Reported by Akim Demaille.
31132
31133         * lib/getopt.c: Update from libc.
31134
31135 2000-10-16  Jim Meyering  <meyering@lucent.com>
31136
31137         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
31138         setlocale.
31139         From Jan Fedak.
31140
31141 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
31142
31143         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
31144
31145 2000-09-25  Jim Meyering  <meyering@lucent.com>
31146
31147         * lib/md5.h (rol): Define (from GnuPG).
31148
31149         * lib/sha.c: Give credit (GnuPG) where due.
31150         (M): Use rol rather than open-coding it.
31151         Add a FIXME comment.
31152
31153 2000-09-21  Jim Meyering  <meyering@lucent.com>
31154
31155         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
31156         Reported by Michael Stone.
31157
31158 2000-09-20  Jim Meyering  <meyering@lucent.com>
31159
31160         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
31161         (noinst_HEADERS): Add sha.h.
31162         Based on code from Scott G. Miller and from GnuPG.
31163
31164 2000-09-18  Jim Meyering  <meyering@lucent.com>
31165
31166         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
31167         LIBS. Otherwise, everyone ends up linking with -lelf for some
31168         configurations.
31169         Reported by Mike Stone.
31170
31171 2000-09-15  Jim Meyering  <meyering@lucent.com>
31172
31173         * lib/regex.c: Update from libc.
31174
31175 2000-09-10  Jim Meyering  <meyering@lucent.com>
31176
31177         * lib/getopt.c (_getopt_internal): Update from glibc.
31178
31179 2000-09-09  Jim Meyering  <meyering@lucent.com>
31180
31181         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
31182         think it should be used as a general replacement for isascii.
31183         * lib/fnmatch.c: Likewise.
31184         * lib/mbswidth.c: Likewise
31185         * lib/regex.c: Likewise.
31186
31187         Don't use atoi.
31188         * lib/userspec.c: Include sys/param.h and limits.h.
31189         Include xstrtol.h.
31190         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
31191         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
31192         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
31193         UID, GID.  Check range.
31194
31195 2000-09-06  Jim Meyering  <meyering@lucent.com>
31196
31197         * lib/getopt.c (_getopt_internal): Update from glibc.
31198
31199 2000-08-30  Jim Meyering  <meyering@lucent.com>
31200
31201         * lib/strftime.c: Merge in changes from GNU libc.
31202
31203 2000-08-26  Jim Meyering  <meyering@lucent.com>
31204
31205         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
31206         * m4/fpending.m4: New file.
31207
31208 2000-08-26  Jim Meyering  <meyering@lucent.com>
31209
31210         * lib/closeout.c: Include "__fpending.h".
31211         (close_stdout_status): Return right away if there's nothing to flush.
31212
31213         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
31214         * lib/__fpending.c: New file.
31215         * lib/__fpending.h: New file.
31216
31217 2000-08-20  Jim Meyering  <meyering@lucent.com>
31218
31219         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
31220         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
31221         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
31222
31223 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
31224
31225         Improve fileutils installation on systems where running
31226         programs (like install) can't be unlinked.
31227         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
31228         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
31229
31230 2000-08-07  Paul Eggert  <eggert@twinsun.com>
31231
31232         Standardize on "memory exhausted" instead of "Memory exhausted"
31233         or "virtual memory exhausted".
31234         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
31235         "virtual memory exhausted".
31236         * lib/same.c (same_name): Invoke xalloc_die instead of printing
31237         our own message.
31238         * lib/userspec.c (parse_user_spec): Likewise.
31239         * lib/bumpalloc.h: comment fix
31240         * lib/same.c, userspec.c: Include xalloc.h.
31241
31242         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
31243         not char *const and pointing to a constant array.
31244         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
31245         (xrealloc): Comment fix.
31246
31247         * lib/userspec.c (parse_user_spec):
31248         Don't translate a message until just before returning,
31249         to avoid unnecessary translation.
31250
31251 2000-08-07  Jim Meyering  <meyering@lucent.com>
31252
31253         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
31254         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
31255         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
31256         getgroups.c, gethostname.c, getopt.h, group-member.c,
31257         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
31258         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
31259         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
31260         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
31261         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
31262         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
31263         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
31264         yesno.c: Back out Copyright date changes for each file with no change
31265         this year.  This eases coordination with other programs using the same
31266         source code modules.  From Paul Eggert.
31267
31268 2000-08-06  Paul Eggert  <eggert@twinsun.com>
31269
31270         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
31271         not char, for compatibility with glibc 2.1.3 strftime.c.
31272
31273 2000-08-03  Greg McGary  <greg@mcgary.org>
31274
31275         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
31276         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
31277         (EXTEND_BUFFER): Use them.
31278
31279 2000-08-01  Jim Meyering  <meyering@lucent.com>
31280
31281         * lib/dirname.c (ISSLASH): Define.
31282         (BACKSLASH_IS_PATH_SEPARATOR): Define.
31283         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
31284         both `\' and `/' may be use as path separators.
31285         Based on a patch from Prashant TR.
31286
31287 2000-07-31  Paul Eggert  <eggert@twinsun.com>
31288
31289         * lib/quotearg.c (quotearg_n_options): Don't make the initial
31290         slot vector a constant, since it might get modified.
31291
31292 2000-07-31  Jim Meyering  <meyering@lucent.com>
31293
31294         * lib/xmalloc.c: Use `virtual memory exhausted', not
31295         `Memory exhausted'.
31296         * lib/obstack.c (print_and_abort): Likewise.
31297
31298 2000-07-30  Paul Eggert  <eggert@twinsun.com>
31299
31300         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
31301         buffer, so that the caller can always quote one small
31302         component of a "memory exhausted" message in slot 0.
31303         From a suggestion by Jim Meyering.
31304
31305 2000-07-30  Jim Meyering  <meyering@lucent.com>
31306
31307         * lib/makepath.c (make_path): Quote the other instance, too.
31308
31309         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
31310         (STATIC_BUF_SIZE): Define.
31311         (quotearg_n_options): Use only statically allocated storage when
31312         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
31313         than STATIC_BUF_SIZE.
31314
31315 2000-07-29  Jim Meyering  <meyering@lucent.com>
31316
31317         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
31318         * lib/dirname.c (dir_name): Likewise.
31319
31320         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
31321         `/'.
31322
31323         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
31324         (dir_name): Assert that there are no trailing slashes.
31325
31326 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
31327
31328         * lib/mbswidth.h (mbswidth): Add a flags argument.
31329         (mbswidth): New declaration.
31330         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
31331         * lib/mbswidth.c (mbswidth): Add a flags argument.
31332         (mbsnwidth): New function.
31333
31334 2000-07-24  Jim Meyering  <meyering@lucent.com>
31335
31336         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
31337
31338 2000-07-23  Paul Eggert  <eggert@twinsun.com>
31339
31340         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
31341
31342 2000-07-23  Paul Eggert  <eggert@twinsun.com>
31343
31344         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
31345         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
31346         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
31347         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
31348         invoke multibyte primitives.
31349
31350 2000-07-23  Paul Eggert  <eggert@twinsun.com>
31351
31352         * lib/quotearg.c:
31353         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
31354         so that mbstate_t is always defined.
31355
31356         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
31357         be 1 in at least one GCC installation, and this configuration
31358         error is likely to be common.  Ignoring MB_LEN_MAX hurts
31359         performance on hosts that have mbrtowc but have only unibyte
31360         locales, but I assume these hosts are rare.
31361
31362 2000-07-23  Paul Eggert  <eggert@twinsun.com>
31363
31364         * lib/mbswidth.c (_XOPEN_SOURCE):
31365         Don't define; this causes problems on Solaris 7.
31366         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
31367
31368 2000-07-23  Jim Meyering  <meyering@lucent.com>
31369
31370         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
31371         too: getgrgid, getpwuid, getuid.
31372
31373 2000-07-23  Jim Meyering  <meyering@lucent.com>
31374
31375         * lib/basename.c (base_name): Add an assertion.
31376
31377 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
31378
31379         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
31380         shadow its mbsinit function.
31381
31382 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
31383
31384         * lib/mbswidth.h: New file.
31385         * lib/mbswidth.c: New file.
31386         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
31387         (noinst_HEADERS): Add mbswidth.h.
31388
31389 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
31390
31391         * lib/config.charset: Add support for FreeBSD. Improve support for
31392         HP-UX and IRIX 6.
31393
31394 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
31395
31396         * m4/mbswidth.m4: New file.
31397         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
31398
31399 2000-07-15  Jim Meyering  <meyering@lucent.com>
31400
31401         * lib/makepath.c: Include quote.h.
31402         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
31403         corresponding argument in a `quote (...)' call.
31404         Give better diagnostics.
31405
31406         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
31407         (noinst_HEADERS): Add quote.h.
31408
31409         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
31410         from tar's src/misc.c.
31411         * lib/quote.h: New file.  Prototypes for same.
31412
31413 2000-07-14  Paul Eggert  <eggert@twinsun.com>
31414
31415         From a suggestion by Bruno Haible.
31416         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
31417         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
31418         to decide whether to define the BeOS workaround macro;
31419         this adjusts to the change to AC_MBSTATE_T.
31420
31421 2000-07-14  Jim Meyering  <meyering@lucent.com>
31422
31423         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
31424         jm_AC_TYPE_UINTMAX_T.
31425
31426 2000-07-13  Paul Eggert  <eggert@twinsun.com>
31427
31428         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
31429
31430         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
31431         quotearg_buffer_restyled): Add support for
31432         clocale_quoting_style.  Undo previous change to
31433         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
31434         and "{RIGHT QUOTATION MARK}" msgids.
31435
31436 2000-07-10  Paul Eggert  <eggert@twinsun.com>
31437
31438         From a suggestion by Bruno Haible.
31439         * m4/mbstate_t.m4 (AC_MBSTATE_T):
31440         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
31441         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
31442         and mbstate_t, to a single-part test that simply defines mbstate_t.
31443         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
31444         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
31445
31446 2000-07-10  Jim Meyering  <meyering@lucent.com>
31447
31448         * m4/strerror_r.m4: Mirror the correction made in autoconf.
31449
31450         * m4/gnu-source.m4: Output to confdefs.h directly.
31451         Suggestion from Akim Demaille.
31452
31453 2000-07-09  Paul Eggert  <eggert@twinsun.com>
31454
31455         The old behavior of quoting `like this' doesn't look good with
31456         newer, ISO-style fonts.  See:
31457         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
31458
31459         Instead, quote "like this" by default.  Let the translator
31460         tailor the locale-specific quoting behavior by providing
31461         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
31462
31463         * lib/quotearg.c (N_): New macro.
31464         (gettext_default): New function.
31465         (quotearg_buffer_restyled): Use
31466         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
31467         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
31468
31469 2000-07-09  Jim Meyering  <meyering@lucent.com>
31470
31471         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
31472         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
31473
31474         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
31475         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
31476
31477 2000-07-09  Jim Meyering  <meyering@lucent.com>
31478
31479         * lib/Most files: Update copyright dates to include 2000.
31480
31481 2000-07-08  Jim Meyering  <meyering@lucent.com>
31482
31483         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
31484         if not defined.
31485         (xgethostname): Remove now-unnecessary #ifdef.
31486         Move declaration of `err' into loop where it's used.
31487
31488 2000-07-05  Paul Eggert  <eggert@twinsun.com>
31489         and Bruno Haible  <haible@clisp.cons.org>
31490
31491         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
31492         only if the test for an object-type mbstate_t fails.  This
31493         prevents us from mistakenly reporting that mbstate_t is a
31494         system object type after we "#define mbstate_t int" to work
31495         around its lack.
31496
31497 2000-07-05  Paul Eggert  <eggert@twinsun.com>
31498         and Bruno Haible  <haible@clisp.cons.org>
31499
31500         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
31501
31502 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
31503
31504         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
31505         to strerror_r.
31506         Include <ctype.h> for use of isalpha.
31507
31508 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
31509
31510         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
31511         by allocating a larger buffer. Test the gethostname return value for
31512         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
31513         returns an error and ENAMETOOLONG isn't defined.
31514
31515 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
31516
31517         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
31518         dimension.
31519
31520 2000-07-04  Jim Meyering  <meyering@lucent.com>
31521
31522         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
31523         of the deprecated AC_CHECKING.
31524
31525 2000-07-04  Jim Meyering  <meyering@lucent.com>
31526
31527         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
31528         Reported by Bruno Haible.
31529
31530 2000-07-04  Jim Meyering  <meyering@lucent.com>
31531
31532         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
31533         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
31534         lacks mbrtowc.
31535
31536 2000-07-03  Paul Eggert  <eggert@twinsun.com>
31537
31538         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
31539         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
31540
31541 2000-07-03  Paul Eggert  <eggert@twinsun.com>
31542         and Bruno Haible  <haible@clisp.cons.org>
31543
31544         * lib/quotearg.c (mbrtowc):
31545         Assign to *pwc, and return 1 only if result is nonzero.
31546         (iswprint): Use ISPRINT when substituting our own mbrtowc.
31547
31548 2000-07-03  Jim Meyering  <meyering@lucent.com>
31549
31550         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
31551
31552 2000-07-03  Jim Meyering  <meyering@lucent.com>
31553
31554         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
31555         This is necessary to get a definition of e.g., UTMP_FILE on
31556         HP-UX 10.20.
31557         From Bob Proulx.
31558
31559 2000-07-02  Jim Meyering  <meyering@lucent.com>
31560
31561         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
31562
31563         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
31564         AC_LIBOBJ(function_name).
31565         * m4/chown.m4: Likewise.
31566         * m4/fnmatch.m4: Likewise.
31567         * m4/ftruncate.m4: Likewise.
31568         * m4/getgroups.m4: Likewise.
31569         * m4/getline.m4: Likewise.
31570         * m4/group-member.m4: Likewise.
31571         * m4/jm-macros.m4: Likewise.
31572         * m4/lstat.m4: Likewise.
31573         * m4/malloc.m4: Likewise.
31574         * m4/memcmp.m4: Likewise.
31575         * m4/nanosleep.m4: Likewise.
31576         * m4/putenv.m4: Likewise.
31577         * m4/realloc.m4: Likewise.
31578         * m4/regex.m4: Likewise.
31579         * m4/stat.m4: Likewise.
31580         * m4/strftime.m4: Likewise.
31581
31582 2000-07-02  Jim Meyering  <meyering@lucent.com>
31583
31584         * lib/quotearg.c (mbstate_t): Don't define here.
31585
31586 2000-07-02  Jim Meyering  <meyering@lucent.com>
31587
31588         * lib/nanosleep.c (SIGCONT): Define if not already defined.
31589
31590 2000-07-01  Jim Meyering  <meyering@lucent.com>
31591
31592         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
31593
31594 2000-07-01  Jim Meyering  <meyering@lucent.com>
31595
31596         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
31597         problem.
31598
31599 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
31600
31601         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
31602         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
31603
31604 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
31605
31606         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
31607         per change in ../m4/ls-mntd-fs.m4.
31608         (read_filesystem_list): Ignore symbolic links.
31609
31610 2000-06-29  Jim Meyering  <meyering@lucent.com>
31611
31612         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
31613         for declaration of strcmp.
31614
31615         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
31616
31617         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
31618         Avoid warning by casting result to `char *' to remove `const'.
31619
31620 2000-06-28  Jim Meyering  <meyering@lucent.com>
31621
31622         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
31623         included by quotearg.c, for which we perform this test.  From
31624         Bruno Haible.
31625
31626 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
31627
31628         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
31629         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
31630         <utmpx.h> exists, put readutmp.o into LIBOBJS.
31631
31632 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
31633
31634         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
31635
31636 2000-06-26  Paul Eggert  <eggert@twinsun.com>
31637
31638         savedir now sets errno on failure and invokes xmalloc to get memory.
31639         Fix a couple of other minor bugs while we're at it.
31640
31641         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
31642         (NAMLEN): Remove macro.
31643         (malloc, realloc): Remove decls.
31644         (stpcpy): Likewise.
31645         ("xalloc.h"): Include.
31646         (NAME_SIZE_DEFAULT): New macro.
31647         (savedir): Use xmalloc / xrealloc to allocate memory.
31648         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
31649         Skip "" directory entries.
31650         Use strlen to calculate directory entry length, since the old method
31651         is rarely used these days and isn't worth supporting.
31652         Don't use a pointer after freeing it.
31653         Check for integer overflow when calculating allocation size.
31654         Use memcpy to copy entries, instead of stpcpy.
31655         Set errno properly when returning NULL.
31656         Check for readdir error.
31657
31658 2000-06-26  Jim Meyering  <meyering@lucent.com>
31659
31660         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
31661
31662 2000-06-25  Jim Meyering  <meyering@lucent.com>
31663
31664         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
31665         Linux header bug when _XOPEN_SOURCE is defined to 500.
31666
31667 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
31668
31669         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
31670         deficiency.
31671
31672 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
31673
31674         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
31675         Include xalloc.h.
31676         Don't include <stdlib.h>.  Don't declare malloc, realloc.
31677
31678 2000-06-24  Jim Meyering  <meyering@lucent.com>
31679
31680         * m4/strerror_r.m4: Revive this file -- to try out an experimental
31681         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
31682         for which strerror does return char*, but which lacks a conveniently
31683         accessible declaration of the function.  If the compile-test says
31684         strerror_r doesn't work, then resort to a `run'-test that works on
31685         BeOS and segfaults on DEC Unix.
31686
31687 2000-06-24  Jim Meyering  <meyering@lucent.com>
31688
31689         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
31690
31691 2000-06-23  Paul Eggert  <eggert@twinsun.com>
31692
31693         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
31694         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
31695
31696 2000-06-23  Paul Eggert  <eggert@twinsun.com>
31697
31698         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
31699         (mbrtowc, mbstate_t): Define substitutes if
31700         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
31701         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
31702         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
31703
31704 2000-06-23  Jim Meyering  <meyering@lucent.com>
31705
31706         * m4/afs.m4: Add missing AC_MSG_RESULT.
31707         Reported by Bruno Haible.
31708
31709         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
31710         Suggestion from Bruno Haible.
31711
31712 2000-06-23  Jim Meyering  <meyering@lucent.com>
31713
31714         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
31715
31716 2000-06-21  Jim Meyering  <meyering@lucent.com>
31717
31718         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
31719
31720 2000-06-21  Jim Meyering  <meyering@lucent.com>
31721
31722         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
31723         (noinst_HEADERS): Add getstr.h.
31724
31725         * lib/getline.c (getstr): Move into a separate file.
31726         * lib/getstr.c (getstr): New file, extracted from getline.c, with
31727         the following changes: new parameter, delim2; both delim[12]
31728         parameters have type `int', not `char'.  The latter would lose
31729         with 8-bit delimiters.
31730         * lib/getstr.h: New file.
31731
31732 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
31733
31734         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
31735         than 1024, return a memory chunk of least possible size, instead
31736         of size PATH_MAX + 2. In the loop, increment the size proportionally.
31737         Use free/xmalloc instead of xrealloc to avoid copying for very long
31738         paths.
31739
31740 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
31741
31742         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
31743         the empty string.
31744
31745 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
31746
31747         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
31748         address, not strdup.  Include <stdlib.h> and don't declare free().
31749
31750 2000-06-19  Jim Meyering  <meyering@lucent.com>
31751
31752         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
31753
31754 2000-06-18  Jim Meyering  <meyering@lucent.com>
31755
31756         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
31757
31758         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
31759         `checking whether...' message to be consistent with that of the
31760         lstat test.
31761
31762 2000-06-18  Jim Meyering  <meyering@lucent.com>
31763
31764         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
31765         Besides, these days every porting target provides a mkdir function.
31766
31767         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
31768         needed. (this snippet comes from src/system.h).
31769
31770 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
31771
31772         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
31773
31774 2000-06-15  Paul Eggert  <eggert@twinsun.com>
31775
31776         * lib/human.c (adjust_value): New function.
31777         (human_readable_inexact): Apply rounding style even when
31778         printing approximate values.
31779
31780 2000-06-14  Paul Eggert  <eggert@twinsun.com>
31781
31782         * lib/human.c (human_readable_inexact): Allow an input block
31783         size that is not a multiple of the output block size, and vice versa.
31784         Reported by Piergiorgio Sartor.
31785
31786 2000-06-14  Paul Eggert  <eggert@twinsun.com>
31787
31788         * lib/getdate.y (get_date): Apply relative times after time
31789         zone indicator, not before.  Reported by Todd A. Jacobs.
31790
31791 2000-06-13  Jim Meyering  <meyering@lucent.com>
31792
31793         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
31794
31795         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
31796
31797 2000-06-12  Paul Eggert  <eggert@twinsun.com>
31798
31799         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
31800
31801 2000-06-12  Jim Meyering  <meyering@lucent.com>
31802
31803         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
31804         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
31805         optional argument.
31806         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
31807         the optional argument, `lib'.
31808
31809 2000-06-08  Jim Meyering  <meyering@lucent.com>
31810
31811         * m4/largefile.m4: Remove file (now that it's part of autoconf).
31812
31813 2000-06-04  Paul Eggert  <eggert@twinsun.com>
31814
31815         Rewrite largefile configuration so that we don't need to run
31816         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
31817         AC_CANONICAL_HOST in configure.in -- jmm]
31818
31819         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
31820         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
31821         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
31822         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
31823         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
31824         All uses changed.
31825         Instead of inspecting the output of getconf, try to compile the
31826         test program without and with the macro definition.
31827         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
31828         for getconf.  Instead, check for the needed flags by compiling
31829         test programs.
31830
31831 2000-06-04  Paul Eggert  <eggert@twinsun.com>
31832
31833         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
31834
31835 2000-06-04  Jim Meyering  <meyering@lucent.com>
31836
31837         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
31838         SunOS 4.1.4 for which gid_t is an unsigned type.
31839
31840 2000-06-03  Jim Meyering  <meyering@lucent.com>
31841
31842         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
31843         now that autoconf requires that.
31844
31845         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
31846         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
31847         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
31848
31849 2000-06-03  Jim Meyering  <meyering@lucent.com>
31850
31851         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
31852
31853 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
31854
31855         * m4/glibc21.m4: New file.
31856         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
31857
31858 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
31859
31860         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
31861         newer, don't install charset.alias.
31862         * lib/config.charset: Change the Linux/glibc rules so they become empty
31863         on glibc-2.1 or newer.
31864
31865 2000-06-02  Jim Meyering  <meyering@lucent.com>
31866
31867         * lib/mountlist.c: Back out last change.  Instead, do this...
31868         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
31869         me_dummy member using the same `ignore'-testing code.
31870         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
31871         fs_type strings.
31872         From Mark D. Roth.
31873
31874 2000-05-29  Jim Meyering  <meyering@lucent.com>
31875
31876         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
31877         mounts with the `ignore' attribute.  Based on a patch from
31878         Mark D. Roth.
31879
31880 2000-05-28  Jim Meyering  <meyering@lucent.com>
31881
31882         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
31883         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
31884         * m4/stat.m4: Likewise.
31885         * m4/lstat.m4: Likewise.
31886         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
31887
31888         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
31889         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
31890
31891 2000-05-26  Jim Meyering  <meyering@lucent.com>
31892
31893         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
31894
31895 2000-05-24  Jim Meyering  <meyering@lucent.com>
31896
31897         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
31898         autoconf requires that.
31899         * m4/lib-check.m4: Likewise.
31900         * m4/jm-macros.m4: Likewise.
31901         * m4/strftime.m4: Likewise.
31902
31903         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
31904         AC_CHECK_DECLS, now that autoconf requires that.
31905
31906 2000-05-22  Jim Meyering  <meyering@lucent.com>
31907
31908         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
31909         * m4/lstat.m4: Likewise.
31910
31911 2000-05-22  Jim Meyering  <meyering@lucent.com>
31912
31913         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
31914
31915 2000-05-20  Jim Meyering  <meyering@lucent.com>
31916
31917         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
31918         (jm_PREREQ): Use it.
31919
31920 2000-05-18  Jim Meyering  <meyering@lucent.com>
31921
31922         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
31923         back, too, since it may have been modified by allocate_entry.
31924         (hash_delete): Rewrite to use neither the assignment operator
31925         nor the comma operator in an if-expression.
31926
31927 2000-05-15  Paul Eggert  <eggert@twinsun.com>
31928
31929         * lib/closeout.c:
31930         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
31931         Remove; no longer needed.
31932         "quotearg.h": Add include.
31933         (file_name): Do not bother to explicitly initialize to NULL; it's less
31934         efficient on some hosts.
31935         (close_stdout_status): Remove test as to whether stdout was already
31936         closed; it breaks for the case "echo x | sort >&-".
31937         Quote file name colons.
31938         Do not assume that _("write error") lacks format strings.
31939
31940 2000-05-15  Jim Meyering  <meyering@lucent.com>
31941
31942         * lib/version-etc.c (version_etc_copyright): Update the copyright
31943         string used in all --version output.
31944
31945 2000-05-14  Jim Meyering  <meyering@lucent.com>
31946
31947         * lib/closeout.c (close_stdout_set_file_name): New function.
31948         (close_stdout_status): Use new file-scoped global.
31949         Return right away if fstat says the stdout file descriptor is invalid.
31950         * lib/closeout.h (close_stdout_set_file_name): Declare.
31951
31952 2000-05-10  Jim Meyering  <meyering@lucent.com>
31953
31954         * lib/closeout.c [default_exit_status]: New file-scoped variable.
31955         (close_stdout_set_status): New function.
31956         * lib/closeout.h (close_stdout_set_status): Declare.
31957
31958 2000-05-09  Jim Meyering  <meyering@lucent.com>
31959
31960         * m4/gettext.m4: Rename this...
31961         * m4/libintl.m4: ...to this.
31962
31963 2000-05-08  Jim Meyering  <meyering@lucent.com>
31964
31965         * lib/long-options.c: Don't include closeout.h.
31966         (parse_long_options): Don't call close_stdout for --version.
31967
31968 2000-05-06  Paul Eggert  <eggert@twinsun.com>
31969
31970         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
31971         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
31972         2.1.3 bug.  This avoids a clash when files like regex.c define
31973         _GNU_SOURCE.
31974
31975 2000-05-06  Jim Meyering  <meyering@lucent.com>
31976
31977         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
31978         (AC_REPLACE_FUNCS): Add strnlen.
31979
31980         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
31981         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
31982
31983         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
31984         AC_SEARCH_LIBS call for nanosleep.
31985         (LIB_NANOSLEEP): Set and AC_SUBST.
31986
31987 2000-05-06  Jim Meyering  <meyering@lucent.com>
31988
31989         * lib/strnlen.c: Undefine __strnlen and strnlen.
31990         [!weak_alias]: Define __strnlen to strnlen.
31991
31992         * lib/atexit.c: New file, from libiberty.
31993
31994 2000-05-06  Jim Meyering  <meyering@lucent.com>
31995
31996         * lib/closeout.c (close_stdout_status): Also check for errors on the
31997         stderr stream.
31998
31999 2000-05-05  Jim Meyering  <meyering@lucent.com>
32000
32001         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
32002         AC_SEARCH_LIBS call for clock_gettime.
32003         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
32004
32005         * m4/search-libs.m4: Update from autoconf.
32006
32007         su doesn't work on Solaris 2.6.
32008         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
32009         <shadow.h>.  Reported by Dragos Harabor.
32010
32011 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
32012
32013         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
32014         memcpy instead of xmalloc, xrealloc, path_concat.
32015         (locale_charset): Treat empty environment variables as absent.
32016         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
32017
32018 2000-05-04  Jim Meyering  <meyering@lucent.com>
32019
32020         * lib/getopt.c: Update from glibc.
32021         * lib/obstack.c: Likewise.
32022         * lib/obstack.h: Likewise.
32023         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
32024         file
32025
32026         * lib/regex.h: Likewise.
32027         * lib/strndup.c: Likewise.
32028         * lib/strnlen.c: New file, from glibc.
32029
32030 2000-05-03  Jim Meyering  <meyering@lucent.com>
32031
32032         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
32033
32034 2000-05-02  Paul Eggert  <eggert@twinsun.com>
32035
32036         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
32037         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
32038         compile-time test, rather than inspecting host and OS, to
32039         decide whether to define _LARGEFILE_SOURCE.
32040
32041 2000-05-01  Jim Meyering  <meyering@lucent.com>
32042
32043         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
32044
32045         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
32046         Based on a patch from Bruno Haible.
32047
32048 2000-05-01  Jim Meyering  <meyering@lucent.com>
32049
32050         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
32051
32052 2000-04-29  Jim Meyering  <meyering@lucent.com>
32053
32054         * lib/path-concat.c: Declare strdup only if it's not defined.
32055         * lib/canon-host.c: Likewise.
32056
32057 2000-04-28  Jim Meyering  <meyering@lucent.com>
32058
32059         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
32060         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
32061         is included first, then limits.h is included by locale.h by libintl.h.
32062         From John David Anglin.
32063
32064 2000-04-25  Jim Meyering  <meyering@lucent.com>
32065
32066         * lib/makepath.c (S_IRWXUGO): Define.
32067         (make_path): Always perform explicit chmod if MODE specifies any
32068         of the `special' permission bits.  Prompted by a bug report against
32069         install from Mate Wierdl and Joost van Baal.
32070
32071 2000-04-18  Jim Meyering  <meyering@lucent.com>
32072
32073         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
32074         (jm_PREREQ): Use it.
32075
32076 2000-04-18  Jim Meyering  <meyering@lucent.com>
32077
32078         * lib/README: New file.
32079
32080         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
32081         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
32082
32083 2000-04-17  Jim Meyering  <meyering@lucent.com>
32084
32085         Get it right :-)
32086         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
32087         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
32088         Suggestion from Akim Demaille.
32089
32090 2000-04-17  Jim Meyering  <meyering@lucent.com>
32091
32092         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
32093         the definition of it to rpl_strftime also defined-away the system's
32094         declaration.
32095
32096 2000-04-15  Jim Meyering  <meyering@lucent.com>
32097
32098         Use `C' to denote so-called `contiguous' files, the same way
32099         that tar does.
32100         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
32101         (ftypelet): Use S_ISCTG.
32102         From Michael Deutschmann.
32103
32104 2000-04-14  Jim Meyering  <meyering@lucent.com>
32105
32106         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
32107         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
32108         clobbered.
32109
32110 2000-04-14  Jim Meyering  <meyering@lucent.com>
32111
32112         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
32113
32114 2000-04-13  Jim Meyering  <meyering@lucent.com>
32115
32116         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
32117         AH_VERBATIM to insert required #ifndef into config.h.in.
32118         Suggestion from Akim Demaille.
32119
32120 2000-04-12  Jim Meyering  <meyering@lucent.com>
32121
32122         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
32123         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
32124         Christian Krackowizer.
32125
32126         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
32127         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
32128         (AC_SYS_LARGEFILE): Require.
32129         (AM_C_PROTOTYPES): Require.
32130
32131 2000-04-08  Jim Meyering  <meyering@lucent.com>
32132
32133         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
32134         names don't conflict.  Reported by Eli Zaretskii.
32135
32136 2000-04-07  Jim Meyering  <meyering@lucent.com>
32137
32138         * lib/putenv.c: Move inclusion of errno.h so it follows that of
32139         sys/types.h, to work around system header problems on AIX 3.2.5.
32140         From Bruno Haible.
32141
32142 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
32143
32144         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
32145         bug.  Deal with the different error behavior of Irix iconv.
32146
32147 2000-04-05  Paul Eggert  <eggert@twinsun.com>
32148
32149         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
32150         IRIX if the installer said otherwise.
32151
32152 2000-04-05  Jim Meyering  <meyering@lucent.com>
32153
32154         Portability tweaks required for ultrix4.3.
32155         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
32156         (jm_CHECK_DECLS): Add getutent to the list of functions.
32157         (_jm_DECL_HEADERS): Add utmpx.h.
32158         From John David Anglin.
32159
32160         * m4/strftime.m4: Back out the 2000-04-02 change.
32161         Instead of that change, simply undefine putenv in the test program.
32162
32163 2000-04-05  Jim Meyering  <meyering@lucent.com>
32164
32165         Portability tweaks required for ultrix4.3.
32166         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
32167         getutent.
32168         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
32169         * lib/canon-host.c: Declare strdup.
32170         * lib/path-concat.c: Likewise.
32171         From John David Anglin.
32172
32173 2000-04-04  Jim Meyering  <meyering@lucent.com>
32174
32175         Be more DOS 8.3-friendly.
32176         * lib/ref-add.sin: Renamed from ref-add.sed.in.
32177         * lib/ref-del.sin: Renamed from ref-del.sed.in.
32178         * lib/Makefile.am: Reflect renaming.
32179         Reported by Eli Zaretskii.
32180
32181         Use a temporary file name that won't clash with `charset.alias'
32182         in the DOS 8.3 name space.
32183         * lib/Makefile.am (charset_tmp): Define.
32184         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
32185         (uninstall-local): Likewise.
32186         Reported by Eli Zaretskii.
32187
32188 2000-04-03  Jim Meyering  <meyering@lucent.com>
32189
32190         * m4/gettext.m4: Fix typo in comment.
32191
32192         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
32193         textutils/configure.in).  Suggestion from Paul Eggert.
32194         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
32195
32196 2000-04-02  Paul Eggert  <eggert@twinsun.com>
32197
32198         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
32199         variable in the shell rather than using putenv, which isn't
32200         portable.  This avoids the configure-time inter-test dependency
32201         on the potentially-renamed putenv function.
32202
32203 2000-03-30  Paul Eggert  <eggert@twinsun.com>
32204
32205         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
32206         before checking struct stat.st_blksize, so that
32207         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
32208
32209 2000-03-29  Paul Eggert  <eggert@twinsun.com>
32210
32211         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
32212         since strftime.c uses HAVE_STRFTIME to decide whether to use
32213         the underlying strftime.
32214
32215 2000-03-29  Paul Eggert  <eggert@twinsun.com>
32216
32217         * lib/time/strftime.c (my_strftime): Make sure we call the system
32218         strftime, not ourselves, when invoking the underlying strftime.
32219
32220 2000-03-24  Jim Meyering  <meyering@lucent.com>
32221
32222         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
32223         (charset_alias): Define.
32224         (install-exec-local): Factor out common code.
32225         (uninstall-local): Split lines longer than 80.
32226         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
32227         (SUFFIXES): Define.
32228         (.sed.in.sed): New rule.  Don't redirect directly to $@.
32229         (CLEANFILES): Add ref-add.sed and ref-del.sed.
32230
32231 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
32232
32233         * lib/config.charset: Output a line containing "Packages using this
32234         file".
32235         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
32236         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
32237         ref-del.sed): New rules.
32238
32239 2000-03-17  Jim Meyering  <meyering@lucent.com>
32240
32241         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
32242         Otherwise, include <strings.h>
32243
32244 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
32245
32246         * lib/unicodeio.c (utf8_wctomb): New function.
32247         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
32248         format instead of in UCS-4 with platform dependent endianness.
32249
32250 2000-03-10  Jim Meyering  <meyering@lucent.com>
32251
32252         * m4/lib-check.m4: Look for getspnam in -lgen, too.
32253         From Marco Franzen.
32254
32255 2000-03-07  Paul Eggert  <eggert@twinsun.com>
32256
32257         * lib/savedir.c (savedir): Work even if directory size is
32258         negative; this can happen with some screwy NFS configurations.
32259
32260 2000-03-06  Jim Meyering  <meyering@lucent.com>
32261
32262         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
32263         if it's NULL (because we ran out of memory).  From Bruno Haible.
32264
32265 2000-03-05  Jim Meyering  <meyering@lucent.com>
32266
32267         * lib/localcharset.c ("path-concat.h"): Include.
32268         (get_charset_aliases): Use path_concat instead of ANSI string
32269         concatenation.
32270
32271         * lib/unicodeio.h (PARAMS): Define.
32272         Use it to guard prototype.
32273
32274 2000-03-04  Jim Meyering  <meyering@lucent.com>
32275
32276         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
32277         for lib/localcharset.c.
32278
32279 2000-03-04  Jim Meyering  <meyering@lucent.com>
32280
32281         * lib/Makefile.am (install-exec-local): Create $(libdir) before
32282         installing into it.
32283         (uninstall-local): Uncomment this rule so `make distcheck' works
32284         once again.
32285
32286         * lib/unicodeio.c (<errno.h>): Include it.
32287         (errno): Declare if not defined.
32288
32289         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
32290
32291         * lib/config.charset: New version, incorporating remarks from a linux
32292         i18n mailing list.  From Bruno Haible.
32293
32294 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
32295
32296         * m4/codeset.m4: New file.
32297         * m4/iconv.m4: New file.
32298         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
32299
32300 2000-03-03  Jim Meyering  <meyering@lucent.com>
32301
32302         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
32303
32304 2000-03-02  Jim Meyering  <meyering@lucent.com>
32305
32306         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
32307         the messages come out on separate lines.
32308
32309         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
32310         rather than jm_CHECK_DECLARATIONS.
32311         * m4/decl.m4: Remove now-unused file.
32312
32313         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
32314         geteuid.
32315
32316 2000-03-02  Jim Meyering  <meyering@lucent.com>
32317
32318         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
32319
32320 2000-03-01  Jim Meyering  <meyering@lucent.com>
32321
32322         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
32323         * lib/unicodeio.c: Likewise.
32324
32325 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
32326
32327         * lib/config.charset: New file.
32328         * lib/localcharset.c: New file.
32329         * lib/unicodeio.h, lib/unicodeio.c: New files.
32330         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
32331         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
32332         (noinst_HEADERS): Add unicodeio.h.
32333         (all-local, install-exec-local, charset.alias): New targets.
32334
32335 2000-02-28  Paul Eggert  <eggert@twinsun.com>
32336
32337         * lib/quotearg.c (ALERT_CHAR): New macro.
32338         (quotearg_buffer_restyled): Use it.
32339
32340 2000-02-27  Jim Meyering  <meyering@lucent.com>
32341
32342         * m4/check-decl.m4: Add getenv to the list.
32343
32344 2000-02-27  Jim Meyering  <meyering@lucent.com>
32345
32346         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
32347         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
32348
32349         * lib/backupfile.c: Guard inclusion of stdlib.h with
32350         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
32351         Declare malloc if needed.
32352
32353         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
32354         `#ifndef HAVE_DECL..'
32355         now that autoconf always defines the HAVE_DECL_ symbols.
32356         * lib/human.c: Likewise.
32357         * lib/same.c: Likewise.
32358         * lib/strtoumax.c: Likewise.
32359
32360         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
32361         declaration check was not run.
32362         * lib/hash.c: Likewise.
32363         * lib/human.c: Likewise.
32364         * lib/same.c: Likewise.
32365         * lib/strtoumax.c: Likewise.
32366
32367         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
32368         `.', then first look up the entire `.'-containing string as a login
32369         name.
32370
32371 2000-02-23  Jim Meyering  <meyering@lucent.com>
32372
32373         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
32374         in place of my hack.
32375
32376 2000-02-18  Paul Eggert  <eggert@twinsun.com>
32377
32378         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
32379         (textint): New typedef.
32380         (parser_control): Member year changed from int to textint.
32381         All uses changed.
32382         (YYSTYPE): Removed; replaced by %union with int and textint members.
32383         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
32384         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
32385         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
32386         (tSNUMBER, tUNUMBER): Now of type <textintval>.
32387         (date, number, to_year): Use width of number in digits, not its value,
32388         to determine whether it's a 2-digit year, or a 2-digit time.
32389         (yylex): Store number of digits of numeric tokens.
32390         Reported by John Kendall.
32391
32392         (parser_control): Changed from struct parser_control to typedef (for
32393         consistency).  All uses changed.
32394
32395         (tID): Removed; not used.
32396         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
32397
32398 2000-02-14  Paul Eggert  <eggert@twinsun.com>
32399
32400         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
32401         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
32402
32403 2000-02-12  Jim Meyering  <meyering@lucent.com>
32404
32405         * lib/userspec.c (ISDIGIT): Define it.
32406         (isdigit): Remove definition.
32407         (is_number): Use ISDIGIT, not isdigit.
32408         <libintl.h>: Include.
32409         (_ and N_): Define.
32410         (parse_user_spec): Mark translatable strings.
32411
32412 2000-02-10  Jim Meyering  <meyering@lucent.com>
32413
32414         With these changes, nanosleep.[ch] are finally enough like the other
32415         lib/* replacement files to compile on a few more losing systems.
32416
32417         * lib/nanosleep.h: Don't include config.h.
32418         Remove prototype from declaration of nanosleep.
32419         (PARAMS): Remove now-unneeded definition.
32420         * lib/nanosleep.c: #undef nanosleep.
32421         (rpl_nanosleep): Rename from nanosleep.
32422
32423 2000-02-10  Jim Meyering  <meyering@lucent.com>
32424
32425         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
32426         gnu_nanosleep to rpl_nanosleep.
32427
32428 2000-02-09  Jim Meyering  <meyering@lucent.com>
32429
32430         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
32431         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
32432
32433 2000-02-08  Akim Demaille  <akim@epita.fr>
32434
32435         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
32436         `[' and `]' and remove uses of `changequote'.
32437         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
32438         (AC_SYS_LARGEFILE): Likewise.
32439         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
32440         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
32441         of changequote.
32442         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
32443         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
32444         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
32445         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
32446
32447 2000-02-05  Jim Meyering  <meyering@lucent.com>
32448
32449         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
32450         Remove explicit use of AC_HEADER_TIME.  It is required by
32451         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
32452         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
32453         in autoconf whereby the expansion of the latter ended up preceding
32454         the expansion of its prerequisite, AC_HEADER_TIME.
32455         Reported by Volker Borchert.
32456
32457 2000-02-03  Jim Meyering  <meyering@lucent.com>
32458
32459         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
32460
32461 2000-02-03  Jim Meyering  <meyering@lucent.com>
32462
32463         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
32464         rather than with `#if HAVE_UTMPNAME'.
32465
32466 2000-02-02  Jim Meyering  <meyering@lucent.com>
32467
32468         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
32469         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
32470         Reported by Eli Zaretskii.
32471
32472 2000-02-01  Jim Meyering  <meyering@lucent.com>
32473
32474         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
32475
32476 2000-01-31  Jim Meyering  <meyering@lucent.com>
32477
32478         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
32479         functions.  Add the time.h and sys/time.h headers along with the
32480         AC_REQUIRE'ment of AC_HEADER_TIME.
32481
32482 2000-01-31  Jim Meyering  <meyering@lucent.com>
32483
32484         * lib/nanosleep.h (nanosleep): Guard declaration with
32485         `#if ! HAVE_DECL_NANOSLEEP'.
32486         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
32487         the declaration in that vendor's sys/timers.h.
32488         Reported by Christian Krackowizer.
32489
32490         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
32491         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
32492         (ISPRINT): Likewise.
32493         Reported by Tom Tromey.
32494
32495 2000-01-30  Jim Meyering  <meyering@lucent.com>
32496
32497         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
32498
32499         * m4/prereq.m4 (utmp_includes): Define.
32500         Check for ut_user and ut_name members in both struct utmpx
32501         and struct utmp.
32502
32503 2000-01-30  Jim Meyering  <meyering@lucent.com>
32504
32505         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
32506         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
32507         header files where only utmpx.ut_user is declared.
32508
32509         * lib/readutmp.h (UT_USER): Define.
32510
32511 2000-01-29  Jim Meyering  <meyering@lucent.com>
32512
32513         * m4/lib-check.m4: New file containing library-related checks from
32514         fileutils and sh-utils (textutils had none).
32515
32516 2000-01-28  Jim Meyering  <meyering@lucent.com>
32517
32518         * m4/perl.m4: Change format of warning message to look more like that
32519         from the missing script.  Suggestion from François Pinard.
32520
32521 2000-01-25  Jim Meyering  <meyering@lucent.com>
32522
32523         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
32524         well as time.h in the compile check.
32525         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
32526         Fix typo in cross-compiling case: s/yes/no/.
32527
32528 2000-01-23  Jim Meyering  <meyering@lucent.com>
32529
32530         * m4/jm-macros.m4: Move df-related tests here from
32531         fileutils/configure.in
32532
32533         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
32534         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
32535
32536         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
32537         s/space/ac_fsusage_space/.
32538         (jm_FILE_SYSTEM_USAGE): Take two parameters.
32539
32540         * m4/ftruncate.m4: New file (derived from part of
32541         fileutils/configure.in).
32542         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
32543         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
32544
32545         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
32546         AC_SUBST these here, rather than just in sh-util/configure.in, so
32547         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
32548         all the same.
32549         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
32550         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
32551         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
32552         (AC_SUBST(POW_LIBM)): Likewise.
32553         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
32554
32555 2000-01-23  Jim Meyering  <meyering@lucent.com>
32556
32557         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
32558         obstack.c.
32559
32560 2000-01-22  Jim Meyering  <meyering@lucent.com>
32561
32562         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
32563
32564         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
32565
32566         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
32567         configure.in
32568         (AC_CHECK_HEADERS): Likewise for sh-utils.
32569         (AC_CHECK_HEADERS): Likewise for textutils.
32570         Merge the three lists of headers.
32571
32572         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
32573         from fileutils' configure.in.
32574
32575         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
32576         code. Moved tests into their own function (_jm_DECL_HEADERS) in
32577         check-decl.m4.
32578
32579         * m4/check-decl.m4: Use #if rather than #ifdef.
32580         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
32581         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
32582         (_jm_DECL_HEADERS): Define new function.
32583         (jm_CHECK_DECLARATIONS): Require it.
32584
32585 2000-01-22  Jim Meyering  <meyering@lucent.com>
32586
32587         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
32588         [! HAVE_DECL_STRTOULL]: Declare strtoull.
32589         Required for some AIX systems.  Reported by Christian Krackowizer.
32590         [TESTING] (main): New function.
32591
32592         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
32593         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
32594         letters.
32595
32596         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
32597         iswprint.
32598
32599         * lib/strverscmp.c (ISDIGIT): Define.
32600         (strverscmp): Use ISDIGIT, not isdigit.
32601
32602 2000-01-19  Jim Meyering  <meyering@lucent.com>
32603
32604         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
32605         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
32606         defines `struct timespec' in <sys/time.h>
32607
32608         * m4/c-bs-a.m4: Remove uses of changequote altogether.
32609         Thanks to Akim for explaining.
32610
32611 2000-01-17  Paul Eggert  <eggert@twinsun.com>
32612
32613         * lib/nanosleep.c (nanosleep):
32614         Don't use SA_INTERRUPT to decide whether to call sigaction, as
32615         POSIX.1 doesn't require SA_INTERRUPT and some systems
32616         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
32617         it's been part of POSIX.1 since day 1 (in 1988).
32618
32619 2000-01-17  Jim Meyering  <meyering@lucent.com>
32620
32621         * lib/interlock: Remove unused file.  Reported by François Pinard.
32622
32623 2000-01-16  Paul Eggert  <eggert@twinsun.com>
32624
32625         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
32626         alert, backslash, formfeed, and vertical tab unnecessarily in
32627         shell quoting style.
32628
32629 2000-01-16  Jim Meyering  <meyering@lucent.com>
32630
32631         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
32632         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
32633         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
32634         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
32635
32636 2000-01-16  Jim Meyering  <meyering@lucent.com>
32637
32638         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
32639         because the latter didn't work.
32640
32641 2000-01-15  Jim Meyering  <meyering@lucent.com>
32642
32643         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
32644         (AC_REPLACE_FUNCS): Add memcpy and memset.
32645         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
32646         Add strpbrk.
32647         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
32648
32649 2000-01-12  Jim Meyering  <meyering@lucent.com>
32650
32651         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
32652         (jm_PREREQ): Use it.
32653         (jm_PREREQ_READUTMP): New macro.
32654         (jm_PREREQ): Use it.
32655
32656 2000-01-11  Paul Eggert  <eggert@twinsun.com>
32657
32658         Quote multibyte characters correctly.
32659         * m4/c-bs-a.m4: New file.
32660         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
32661         (jm_PREREQ): Use it.
32662
32663 2000-01-11  Paul Eggert  <eggert@twinsun.com>
32664
32665         * m4/uintmax_t.m4: Port to autoconf 2.13.
32666
32667 2000-01-08  Jim Meyering  <meyering@ascend.com>
32668
32669         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
32670         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
32671
32672 2000-01-04  Jim Meyering  <meyering@ascend.com>
32673
32674         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
32675         jm_STRUCT_DIRENT_D_TYPE.
32676         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
32677         jm_STRUCT_DIRENT_D_INO.
32678         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
32679         jm_STRUCT_UTIMBUF.
32680         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
32681         renamings.
32682         * m4/utime.m4: Likewise.
32683
32684         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
32685         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
32686
32687 2000-01-03  Paul Eggert  <eggert@twinsun.com>
32688
32689         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
32690         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
32691
32692 2000-01-02  Jim Meyering  <meyering@ascend.com>
32693
32694         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
32695         remember if this is necessary.
32696
32697 1999-12-26  Jim Meyering  <meyering@ascend.com>
32698
32699         * m4/jm-macros.m4: Use it here.
32700         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
32701
32702 1999-12-23  Jim Meyering  <meyering@ascend.com>
32703
32704         * m4/jm-macros.m4: Check for clock_gettime (moved from
32705         fileutils/configure.in)
32706         Check for gettimeofday.
32707
32708 1999-12-20  Jim Meyering  <meyering@ascend.com>
32709
32710         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
32711         autoconf-2.14a-1999-12-20.
32712
32713 1999-12-19  Jim Meyering  <meyering@ascend.com>
32714
32715         * m4/lstat-slash.m4: New file.
32716         * m4/jm-macros.m4: Use the new macro:
32717         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
32718
32719 1999-12-07  Jim Meyering  <meyering@ascend.com>
32720
32721         * m4/perl.m4: Require that File::Compare be available, too.
32722         Too many systems seem to lack it.
32723
32724         * m4/strftime.m4: Add checks for most of the cpp macros tested in
32725         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
32726
32727 1999-11-18  Paul Eggert  <eggert@twinsun.com>
32728
32729         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
32730         problem with the QNX 4.25 shell, which doesn't propagate exit
32731         status of failed commands inside shell assignments.
32732
32733 1999-11-17  Jim Meyering  <meyering@ascend.com>
32734
32735         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
32736
32737 1999-11-07  Jim Meyering  <meyering@ascend.com>
32738
32739         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
32740
32741 1999-11-06  Jim Meyering  <meyering@ascend.com>
32742
32743         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
32744         * m4/jm-macros.m4 (jm_MACROS): Use it here.
32745
32746 1999-11-05  Jim Meyering  <meyering@ascend.com>
32747
32748         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
32749         configure.in of textutils, fileutils, and sh-utils into this one
32750         (shared between those packages) file.
32751         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
32752         AC_STRUCT_ST_BLKSIZE.
32753
32754 1999-11-03  Jim Meyering  <meyering@ascend.com>
32755
32756         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
32757         of AC_CHECK_TYPE checks includes unistd.h.
32758         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
32759         Suggestion from Akim Demaille.
32760
32761 1999-10-30  Jim Meyering  <meyering@ascend.com>
32762
32763         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
32764         m4-quoted string.
32765         * m4/ls-mntd-fs.m4: Likewise.
32766         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
32767         * m4/jm-winsz1.m4: Likewise.
32768
32769         * m4/const.m4: Remove file, since the fix made it into the experimental
32770         version of autoconf.
32771         * m4/mktime.m4: Likewise.
32772
32773         * m4/check-type.m4: Remove file, now that the latest version of
32774         AC_CHECK_TYPE takes a third arg to specify additional #includes.
32775
32776         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
32777         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
32778         AC_CHECK_TYPE.
32779
32780 1999-10-04  Jim Meyering  <meyering@ascend.com>
32781
32782         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
32783
32784 1999-09-22  Paul Eggert  <eggert@twinsun.com>
32785
32786         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
32787         2.95.1 bug with HP-UX 10.20.
32788
32789 1999-09-17  Jim Meyering  <meyering@ascend.com>
32790
32791         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
32792         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
32793         due to missing strdup (against sh-utils-2.0).
32794
32795 1999-08-29  Jim Meyering  <meyering@ascend.com>
32796
32797         * m4/jm-macros.m4: Require jm_BISON.
32798         * m4/bison.m4: New file.
32799
32800 1999-08-17  Paul Eggert  <eggert@twinsun.com>
32801
32802         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
32803         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
32804
32805 1999-08-05  Jim Meyering  <meyering@ascend.com>
32806
32807         * m4/getline.m4: Rename test file from conftestdata to conftest.data
32808         to avoid conflicts with `conftest' on 8+3 filesystems.
32809         Suggestion from Eli Zaretskii.
32810
32811 1999-08-04  Jim Meyering  <meyering@ascend.com>
32812
32813         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
32814         fileutils and sh-utils (textutils's getline test was inadequate).
32815         (AM_FUNC_GETLINE): Run this test.
32816         (AC_CHECK_FUNCS): Check for getdelim.
32817         Reported by Bob Proulx.
32818
32819 1999-08-02  Jim Meyering  <meyering@ascend.com>
32820
32821         * m4/jm-macros.m4: Add a comment.
32822
32823 1999-08-01  Paul Eggert  <eggert@twinsun.com>
32824
32825         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
32826         <inttypes.h> defines strtoumax as a macro (and not as a
32827         function).
32828
32829 1999-08-01  Paul Eggert  <eggert@twinsun.com>
32830
32831         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
32832         that we can shift, multiply and divide unsigned long long
32833         values; Ultrix cc can't do it.
32834
32835 1999-08-01  Paul Eggert  <eggert@twinsun.com>
32836
32837         * m4/mktime.m4: New file, which is a preview of what should appear
32838         in the next public autoconf release.
32839
32840 1999-08-01  Paul Eggert  <eggert@twinsun.com>
32841
32842         * m4/lfs.m4: Remove this file.
32843         * m4/largefile.m4: New file.  It contains the old contents of
32844         lfs.m4, except that all names with prefix AC_LFS have been
32845         changed to use the prefix AC_SYS_LARGEFILE instead, to be
32846         compatible with future autoconf versions.  Also, some minor m4
32847         quoting problems have been fixed.
32848
32849 1999-08-01  Paul Eggert  <eggert@twinsun.com>
32850
32851         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
32852         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
32853         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
32854         and simplify the shell code.
32855
32856 1999-08-01  Jim Meyering  <meyering@ascend.com>
32857
32858         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
32859         m4.
32860
32861 1999-07-20  Jim Meyering  <meyering@ascend.com>
32862
32863         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
32864
32865 1999-07-15  Jim Meyering  <meyering@ascend.com>
32866
32867         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
32868
32869 1999-05-22  Jim Meyering  <meyering@ascend.com>
32870
32871         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
32872
32873 1999-05-20  Jim Meyering  <meyering@ascend.com>
32874
32875         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
32876         Add a colon after each `then' in case $4 is empty.
32877
32878 1999-05-16  Jim Meyering  <meyering@ascend.com>
32879
32880         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
32881
32882 1999-05-10  Jim Meyering  <meyering@ascend.com>
32883
32884         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
32885
32886         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
32887         AC_FUNC_MKTIME.
32888
32889 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
32890
32891         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
32892
32893 1999-05-04  Paul Eggert  <eggert@twinsun.com>
32894
32895         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
32896         not CPPFLAGS, so that linking works correctly in IRIX.
32897
32898 1999-04-30  Paul Eggert  <eggert@twinsun.com>
32899
32900         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
32901
32902 1999-04-20  Paul Eggert  <eggert@twinsun.com>
32903
32904         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
32905         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
32906         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
32907         jm_AC_TYPE_UNSIGNED_LONG_LONG.
32908         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
32909
32910         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
32911
32912 1999-04-20  Jim Meyering  <meyering@ascend.com>
32913
32914         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
32915         AC_REPLACE xstroull if necessary.  From Paul Eggert.
32916         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
32917
32918 1999-04-18  Jim Meyering  <meyering@ascend.com>
32919
32920         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
32921         * m4/jm-macros.m4: Use it.
32922
32923 1999-04-06  Jim Meyering  <meyering@ascend.com>
32924
32925         * m4/strftime.m4: Remove test for %f.
32926
32927 1999-03-29  Jim Meyering  <meyering@ascend.com>
32928
32929         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
32930         superset of the AC_TYPE_* checks in the textutils, fileutils,
32931         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
32932         AC_TYPE_PID_T.
32933
32934 1999-03-28  Jim Meyering  <meyering@ascend.com>
32935
32936         * m4/jm-macros.m4: Define GNU_PACKAGE here.
32937         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
32938         replaced e.g., in the *.sh files of the sh-utils.
32939
32940 1999-03-20  Jim Meyering  <meyering@ascend.com>
32941
32942         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
32943         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
32944         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
32945
32946 1999-03-19  Jim Meyering  <meyering@ascend.com>
32947
32948         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
32949
32950 1999-03-12  Jim Meyering  <meyering@ascend.com>
32951
32952         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
32953
32954 1999-03-07  Jim Meyering  <meyering@ascend.com>
32955
32956         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
32957         declared.
32958
32959 1999-02-17  Jim Meyering  <meyering@ascend.com>
32960
32961         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
32962         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
32963
32964 1999-02-07  Jim Meyering  <meyering@ascend.com>
32965
32966         * m4/group-member.m4: New file -- extracted from sh-utils'
32967         configure.in.
32968
32969         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
32970         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
32971
32972 1999-02-06  Jim Meyering  <meyering@ascend.com>
32973
32974         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
32975         * m4/fnmatch.m4: Likewise.
32976         * m4/getgroups.m4: Likewise.
32977         * m4/lstat.m4: Likewise.
32978         * m4/malloc.m4: Likewise.
32979         * m4/putenv.m4: Likewise.
32980         * m4/realloc.m4: Likewise.
32981         * m4/regex.m4: Likewise.
32982         * m4/stat.m4: Likewise.
32983         * m4/strftime.m4: Likewise.
32984         Suggestion from Alain Magloire.
32985
32986         * m4/chown.m4: Use `.$ac_objext', not `.o'.
32987         * m4/fnmatch.m4: Likewise.
32988         * m4/getgroups.m4: Likewise.
32989         * m4/getline.m4: Likewise.
32990         * m4/lstat.m4: Likewise.
32991         * m4/malloc.m4: Likewise.
32992         * m4/memcmp.m4: Likewise.
32993         * m4/putenv.m4: Likewise.
32994         * m4/realloc.m4: Likewise.
32995         * m4/regex.m4: Likewise.
32996         * m4/stat.m4: Likewise.
32997         * m4/strftime.m4: Likewise.
32998         Suggestion from Alain Magloire.
32999
33000         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
33001         an argument.
33002
33003         * m4/regex.m4: Add a run-time Test for proper operation of
33004         re_compile_pattern.
33005
33006 1999-01-31  Jim Meyering  <meyering@ascend.com>
33007
33008         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
33009
33010 1999-01-30  Jim Meyering  <meyering@ascend.com>
33011
33012         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
33013
33014         * m4/jm-mktime.m4: Make this a wrapper around the official
33015         AM_FUNC_MKTIME rather than my private copy, now that the official one
33016         is up to date.
33017         * m4/mktime.m4: Remove file.
33018
33019         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
33020         * m4/uptime.m4: Likewise.
33021         * m4/uintmax_t.m4: Likewise.
33022
33023 1999-01-28  Jim Meyering  <meyering@ascend.com>
33024
33025         * m4/jm-macros.m4: Use jm_AFS.
33026         * m4/afs.m4: New file (from fileutils' configure.in).
33027
33028         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
33029         * m4/chown.m4: Likewise.
33030         * m4/d-ino.m4: Likewise.
33031         * m4/d-type.m4: Likewise.
33032         * m4/fnmatch.m4: Likewise.
33033         * m4/getgroups.m4: Likewise.
33034         * m4/gettext.m4: Likewise.
33035         * m4/jm-mktime.m4: Likewise.
33036         * m4/jm-winsz2.m4: Likewise.
33037         * m4/lcmessage.m4: Likewise.
33038         * m4/ls-mntd-fs.m4: Likewise.
33039         * m4/malloc.m4: Likewise.
33040         * m4/memcmp.m4: Likewise.
33041         * m4/putenv.m4: Likewise.
33042         * m4/realloc.m4: Likewise.
33043         * m4/st_mtim.m4: Likewise.
33044         * m4/strftime.m4: Likewise.
33045
33046 1999-01-16  Jim Meyering  <meyering@ascend.com>
33047
33048         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
33049         (ARGMATCH_DIE_DECL): Define.
33050
33051 1999-01-12  Jim Meyering  <meyering@ascend.com>
33052
33053         * m4/Makefile.am.in: Rewrite to avoid using fmt.
33054         Reported by Lars Hecking.
33055
33056 1999-01-10  Jim Meyering  <meyering@ascend.com>
33057
33058         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
33059         gross kludge.
33060         * m4/inttypes_h.m4: Likewise.
33061         * m4/lstat.m4: Likewise.
33062         * m4/malloc.m4: Likewise.
33063         * m4/readdir.m4: Likewise.
33064         * m4/realloc.m4: Likewise.
33065         * m4/st_dm_mode.m4: Likewise.
33066         * m4/stat.m4: Likewise.
33067         * m4/utimbuf.m4: Likewise.
33068         * m4/utimes.m4: Likewise.
33069
33070         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
33071         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
33072         comments in config.h.in are meaningful.
33073
33074         * m4/jm-macros.m4: Require autoconf-2.13 here.
33075
33076         * m4/regex.m4: By default, don't use the included regex.c on systems
33077         with glibc 2.  Suggestion from Uli Drepper.
33078
33079 1999-01-02  Jim Meyering  <meyering@ascend.com>
33080
33081         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
33082
33083 1998-12-18  Jim Meyering  <meyering@ascend.com>
33084
33085         * m4/Makefile.am.in (Makefile.am): Simplify rule.
33086         Based on a suggestion from Lars Hecking.
33087
33088 1998-11-16  Paul Eggert  <eggert@twinsun.com>
33089
33090         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
33091
33092 1998-11-16  Jim Meyering  <meyering@ascend.com>
33093
33094         * m4/lfs.m4: Double-quote the `uname...` expression.
33095
33096 1998-11-14  Jim Meyering  <meyering@ascend.com>
33097
33098         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
33099         * m4/stat.m4: Likewise.
33100
33101 1998-11-03  Jim Meyering  <meyering@ascend.com>
33102
33103         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
33104         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
33105
33106 1998-10-18  Jim Meyering  <meyering@ascend.com>
33107
33108         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
33109
33110 1998-10-17  Jim Meyering  <meyering@ascend.com>
33111
33112         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
33113         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
33114         calls for those previously hard-coded headers.  Instead, take a new
33115         parameter.
33116         (jm_CHECK_DECLARATIONS): Reflect interface change.
33117         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
33118         (jm_CHECK_DECL_LOCALTIME_R): New macro.
33119
33120         * m4/mktime.m4: Test for spring-forward gap before long-running test.
33121
33122 1998-10-14  Jim Meyering  <meyering@ascend.com>
33123
33124         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
33125         instead of "TZ=America/Vancouver".  From Paul Eggert.
33126
33127 1998-10-11  Jim Meyering  <meyering@ascend.com>
33128
33129         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
33130         This adds a test for a recently added compatibility fix for mktime.c.
33131         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
33132
33133 1998-09-27  Jim Meyering  <meyering@ascend.com>
33134
33135         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
33136
33137         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
33138         ../configure.in, including a change from Gordon Matzigkeit to allow
33139         cross-compiling for the Hurd.
33140
33141         * m4/glibc.m4: New file/macro to test for the GNU C Library
33142         versions 1 and 2.  From Gordon Matzigkeit.
33143         Indent.
33144
33145 1998-09-21  Jim Meyering  <meyering@ascend.com>
33146
33147         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
33148
33149 1998-08-18  Paul Eggert  <eggert@twinsun.com>
33150
33151         Port nanosecond-resolution times to UnixWare 2.1.2 and
33152         pedantic Solaris 2.6.
33153
33154         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
33155         AC_STRUCT_ST_MTIM.
33156         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
33157         Generate name of ns member, instead of just 1 or undef.
33158         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
33159
33160 1998-08-15  Jim Meyering  <meyering@ascend.com>
33161
33162         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
33163         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
33164         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
33165         instead of jm_TYPE_SSIZE_T.
33166
33167 1998-08-12  Jim Meyering  <meyering@ascend.com>
33168
33169         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
33170
33171 1998-08-02  Jim Meyering  <meyering@ascend.com>
33172
33173         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
33174         in acconfig.h manually.
33175
33176 1998-07-31  Paul Eggert  <eggert@twinsun.com>
33177
33178         * m4/st_mtim.m4: New file.
33179
33180 1998-07-28  Jim Meyering  <meyering@ascend.com>
33181
33182         * m4/utimes.m4: Undef stat.
33183
33184 1998-07-25  Jim Meyering  <meyering@ascend.com>
33185
33186         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
33187         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
33188
33189 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
33190
33191         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
33192         uid and gid actually remain unchanged.
33193
33194 1998-07-07  Jim Meyering  <meyering@ascend.com>
33195
33196         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
33197
33198 1998-07-04  Jim Meyering  <meyering@ascend.com>
33199
33200         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
33201         to prove that this macro can be used in packages without regex.c.
33202
33203 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
33204
33205         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
33206         is to be used.
33207
33208 1998-07-03  Jim Meyering  <meyering@ascend.com>
33209
33210         * m4/gettext.m4: Add -lintl if it's found to be necessary.
33211
33212         * m4/gettext.m4: New file -- from gettext-0.10.35.
33213         * m4/lcmessage.m4: Likewise.
33214         * m4/progtest.m4: Likewise.
33215
33216         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
33217         * m4/jm-macros.m4: Require the new macro.
33218
33219 1998-06-29  Jim Meyering  <meyering@ascend.com>
33220
33221         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
33222         for the definition of NGROUPS (used in a system header included
33223         by sys/mount.h).
33224
33225 1998-06-28  Jim Meyering  <meyering@ascend.com>
33226
33227         * m4/ls-mntd-fs.m4: New file.
33228         * m4/fstypename.m4: New file.
33229
33230         * m4/jm-macros.m4: Require the new macro.
33231         * m4/jm-glibc-io.m4: New file.
33232
33233 1998-05-19  Jim Meyering  <meyering@ascend.com>
33234
33235         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
33236         * m4/lchown.m4: New file.
33237
33238         * m4/Makefile.am.in: New file.
33239         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
33240
33241 1998-05-14  Jim Meyering  <meyering@ascend.com>
33242
33243         * m4/Makefile.am (EXTRA_DIST): Add them.
33244         * m4/jm-macros.m4: New file.
33245         * m4/utimbuf.m4: New file.
33246
33247 1998-05-12  Jim Meyering  <meyering@ascend.com>
33248
33249         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
33250
33251 1998-05-11  Jim Meyering  <meyering@ascend.com>
33252
33253         * m4/isc-posix.m4: New file.
33254
33255 1998-05-10  Jim Meyering  <meyering@ascend.com>
33256
33257         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
33258
33259 1998-05-09  Jim Meyering  <meyering@ascend.com>
33260
33261         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
33262         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
33263         with automake.
33264
33265         * m4/ssize_t.m4: New file.
33266         * m4/mktime.m4: Remove file -- the new automake has this now.
33267
33268 1998-04-26  Jim Meyering  <meyering@ascend.com>
33269
33270         * m4/assert.m4: New file.
33271         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
33272
33273 1998-04-05  Jim Meyering  <meyering@ascend.com>
33274
33275         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
33276         (jm_PREREQ): Use it here.
33277
33278 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
33279
33280         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
33281         in acconfig.h.
33282
33283 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
33284
33285         * m4/prereq.m4: New file.
33286         * m4/error.m4: New file.
33287         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
33288
33289 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
33290
33291         * m4/getline.m4: Don't set am_cv_func_working_getline before the
33292         cache-check for the same variable -- that defeated the purpose of
33293         the test; the test program was never run.  This was a problem only
33294         on systems with losing getline functions -- HP-UX 10.20 is one.
33295         Reported by Bjorn Helgaas.
33296
33297 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
33298
33299         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
33300
33301 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
33302
33303         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
33304
33305         * m4/const.m4: New file.  Use an initializer in this declaration
33306         typedef int charset[2]; const charset x;
33307         Reported by Bob Glickstein.
33308
33309 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
33310
33311         * m4/chown.m4: Fix reversed types on -1 args to chown.
33312         From Kaveh Ghazi.
33313
33314 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
33315
33316         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
33317         Add lseek and memchr.
33318
33319         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
33320         T.E.Dickey <dickey@clark.net> said that some older preprocessors
33321         have a 20-character limit on names.
33322
33323 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
33324
33325         * m4/inttypes_h.m4: New file.
33326         * m4/uintmax_t.m4: New file.
33327         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
33328
33329 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
33330   Free Software Foundation, Inc.
33331 Copying and distribution of this file, with or without modification,
33332 are permitted provided the copyright notice and this notice are preserved.